(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

  • $\begingroup$ 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"... $\endgroup$ – Szabolcs Jul 7 '15 at 8:20
  • $\begingroup$ @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! $\endgroup$ – arax Jul 7 '15 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.

enter image description here

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").

  • 1
    $\begingroup$ One can use DeviceReadList[dev, 5, "String"] instead of FromCharacterCode /@ DeviceReadList[dev, 5] $\endgroup$ – andre314 Jul 7 '15 at 20:10
  • $\begingroup$ Hello, I have a RS232 to USB converter. The USB input is on the PC. How to connect? Thank you very much. $\endgroup$ – Nam Nguyen Jan 12 at 9:56
  • $\begingroup$ @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) ? $\endgroup$ – andre314 Jan 12 at 11:41
  • $\begingroup$ Wonderful. It works! Thank you ! Thank you! :) $\endgroup$ – Nam Nguyen Jan 12 at 15:44

plug usb and use from


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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.