# Connect to USB Serial Converter

(I'm using Windows 7 & Mathematica 10)

I have a sensor with RS232 serial interface. The sensor came with a RS232-to-USB converter and corresponding driver & software for data transportation. Now I want to retrieve the data from the sensor manually with Mathematica. FindDevices could not find the device, but it does appear in the Device Manager in Windows under the name "USB Serial Converter". So how can I connect to the sensor? Thanks

• Does this help at all? (I have no idea, just a wild guess.) Maybe the fact that FindDevices doesn't return it shouldn't be taken as an absolute "no"... Jul 7, 2015 at 8:20
• @Szabolcs I tried DeviceOpen["Serial", "COM1"], it could be opened but can't be read (\$TimeOut). I think it's my other device, though. Thanks for the information!
– arax
Jul 7, 2015 at 9:06

I also have a USB to RS232 converter connected to my machine (Windows 7 Mathematica 10). I don't have any RS232 device (The RS232 connector is left unconnected).

I have done successfully the following test : After connecting the receive and transmit pin together (pin 2 and 3, either valid for 9 pins connector or 25 pins connector), send and receive a message from/to Mathematica.

In this test, there is no need to adjust the Baud rate, the data bits length and the stop bits because they are always identical for the receiver and the transmitter of the same port.

Note that there is some documentation about RS232 in Mathematica help (look for "serial").

• One can use DeviceReadList[dev, 5, "String"] instead of FromCharacterCode /@ DeviceReadList[dev, 5] Jul 7, 2015 at 20:10
• Hello, I have a RS232 to USB converter. The USB input is on the PC. How to connect? Thank you very much. Jan 12, 2021 at 9:56
• @NamNguyen Do you mean that you want to do the test I describe above but you don't know where are pin 2 and 3 of the connector (assuming it is a Sub-D 9 or 25 pins) ? Jan 12, 2021 at 11:41
• Wonderful. It works! Thank you ! Thank you! :) Jan 12, 2021 at 15:44

plug usb and use from

ControllerInformation[]


you can see any device that plugged into your system with usb.