RS-232 IRQ etc
Home › Forums › MultiConnect OCG › RS-232 IRQ etc
Tagged: /dev/ttyS2, Serial Port
- This topic has 5 replies, 2 voices, and was last updated 13 years, 3 months ago by Neil McGuire.
-
AuthorPosts
-
July 28, 2011 at 6:53 pm #2596Neil McGuireParticipant
I’m trying to use the external DE-9 connector to communicate with an external device, using only pins 2 (TX), 3(RX) and 5(GND). I tried using setserial to see what IRQ and Port were being used, and it returned UART undefined, port 0x0000 and IRQ 7. Is that right?
The application I am using opens a boost serial_port on /dev/ttyS2, like the manual says, but no data seems to make it out, nor in. It works fine on /dev/ttyS0 on my ubuntu dev box, but not on the CDP. Are there any utilities/conf files I need to look at to try to figure out what the port and IRQ should be set for?
August 3, 2011 at 4:40 pm #3248Jesse GillesBlockedYou don’t need to specify the port and IRQ, you should just need to use /dev/ttyS2 (it is already configured with the correct hardware info). I would recommend running microcom on the port with the correct baud rate and confirm that you can send data back and forth?
August 8, 2011 at 9:10 pm #3249Neil McGuireParticipantOkay, I took a break from it for a while and have come back to it.
I have minicom on both the CDP and my development pc. When I hook the target serial cable into the dev pc, I get the expected data. I then plug the cable into the cdp box, and get nothing. If I hook the serial cables (with a liberal number of gender changes) directly from the cdp box to the dev pc, I can pass data across between the two of them.
Here’s the settings I have that allow them to talk to each other and for the dev pc to read from the signal source, which is a three-wire (gnd, rx, tx) connection:
Development PC:
Serial Device: /dev/ttyS0
Lock File: /var/lock
Callin Program:
Callout Program:
Bps/Par/Bits: 9600 8N1
Hardware Flow Control: No
Software Flow Control: No
CDP box:
Serial Device: /dev/ttyS2
Lock File: /var/lock
Callin Program:
Callout Program:
Bps/Par/Bits: 9600 8N1
Hardware Flow Control: No
Software Flow Control: No
I was wondering if the driver was expecting there to be more than the three pins active? I’m also going to try a USB to Serial converter, but am not sure what device that would end up being.
August 9, 2011 at 10:28 pm #3250Neil McGuireParticipantAlright, got the USB Serial port up and running, reading just fine from the source. I just had to modify defconf in /openembedded/recipes/linux/[version used] to enable the PL2303 driver, and it got up and running as ttyUSB0. Still not sure why the built-in RS232 can’t read the source.
August 10, 2011 at 2:09 pm #3251Jesse GillesBlockedThe external RS232 port is setup to be a DCE port, so the RX and TX lines are swapped compared to your PC serial port (DTE). You’ll need to use a null modem adapter when you’re connecting the serial device to the CDP since the CDP is DCE and your external device is also DCE.
August 10, 2011 at 7:39 pm #3252Neil McGuireParticipantI re-soldered the wire swapping RX and TX, and it’s working now. Thanks, Jesse.
-
AuthorPosts
- You must be logged in to reply to this topic.