Main Site Documentation

RS232 Issue


#1

Hello Everyone,

I am using RS232 Module with Raptor and trying to communicate with PC over usb to serial adapter: http://www.aten.com/Mobility-&-USB/USB-Converters/USB-to-Serial-Converter~UC232A.html#.U8joNfmSxgJ

On the RS232 side I have a Gender Changer.

Here my code:

 void ProgramStarted()
        {
            
            Debug.Print("Program Started");

            rs232.Configure(9600, GT.SocketInterfaces.SerialParity.None, GT.SocketInterfaces.SerialStopBits.One, 8, GT.SocketInterfaces.HardwareFlowControl.NotRequired);
            Debug.Print(rs232.Port.IsOpen.ToString());
            rs232.Port.Open();
            Debug.Print(rs232.Port.IsOpen.ToString());

            rs232.Port.DataReceived += Port_DataReceived;
            rs232.Port.LineReceived += Port_LineReceived;
            

        }

        void Port_DataReceived(GT.SocketInterfaces.Serial sender)
        {
            byte[] readData = new byte[sender.BytesToRead];
            sender.Read(readData, 0, readData.Length);
            Debug.Print(readData.ToString());
        }

        void Port_LineReceived(GT.SocketInterfaces.Serial sender, string line)
        {
            Debug.Print(line);
        }

None of any callback methods run so I assume this should be a HW issue.

When I read this topic: https://www.ghielectronics.com/docs/149/device-to-pc-communication

I did not find any “FT232R USB UART” device in Dev & Printers.

Only I have, see attached picture.

Do you have any idea? (On PC Side I have a small LabVIEW vi that tries to connect and send some junk data to Raptor.


#2

the device named FT232 will only appear if you have the GHI USB to serial device (that uses an FTDI FT232-based chip). So in your case, COM3 is the equivalent from your ATEN usb converter.

What does a “gender changer” do for you ? It’s probably the cause of your lack of communication; I think you’ll need a null modem cable

Personal suggestion. Go to eBay and buy a number of USB-to-UART TTL adapters. Search for CP2102. These are only a couple of bucks each, so get several. Means you can directly connect a UART on a Fez device to this device and you’re done. Very cheap, and the CP2102 driver support under Windows is awesome (I have a few RS232 to USB converters that just don’t have supported drivers).

Second suggestion. Just try simple communications with TeraTerm. You should have TeraTerm anyway in case you need to manually load firmware, and you just connect it to COM3, set the right serial parameters of 9600,n,8,1, and you should then be able to send/receive successfully.