Pregunta

I have a modem with a serial port but my PC does not have a serial port. Hence, I bought an adapter like below picture. Once the modem switch to transmit mode, it can send something but it could never switch back to receive mode and its data light goes red. Does such an adapter may cause this failure? I am not familiar with these communication things such as full duplex etc.

enter image description here

¿Fue útil?

Solución

Most likely your issue is not an adapter itself, but software settings.

It is very important to properly set settings like speed, parity, flow control, etc.

On Linux, probably easiest way to check on these is to use minicom.

Most serial port devices max out at 115200 bps (however there are some USB/serial ports that support speeds as high as 2 mbps).

Most serial devices use 8 bits per byte, no parity, and use 1 stop but (aka 8N1).

And finally, one important setting is flow control. Best and very often supported is hardware flow control (aka RTS/CTS). Some devices do not support RTS/CTS, but support software flow control, aka XON/XOFF. It is typically bad idea to not use any flow control.

For your modem, you should try running minicom -D /dev/ttyUSBn (where n is your device number, most likely 0), get to configuration mode using Ctrl A, O and use following settings: speed 115200, 8N1 (8 bits/byte, no parity, 1 stop bit), RTS/CTS (hw flow control, preferable) or XON/XOFF (sw flow control).

You can also use Linux utility stty to set these parameters on port by default, but since your device is USB, these settings will be lost as soon as USB device is disconnected - so it is better to have your modem program know how to configure these settings without external helpers.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top