I’m trying to start out making a USB Keyboard as shown at this link: https://www.ghielectronics.com/docs/20/usb-client but I guess I’m missing something stupid because I can’t figure out how to connect to my board over a serial connection. I tried to follow the steps as closely as described in that link but so far no dice.
I have a Fez Spider with a USB Client SP module on socket 1, an RS232 Module on socket 11, and a Button module on socket 14. Along with CPU Pin 4 turned to the On position so the board can communicate over a serial connection. Like the walkthrough in that link I’m also using an RS232<->USB cable to connect to my desktop.
When I start up MFDeploy I get a couple of COM ports to try and connect to: COM1, COM3, and COM5, but when I click ping for each one I just get a “No Connection” message.
I’m using Visual Studio 2012 Express on Windows 8.1.
I really think there’s something I’m doing wrong but I really can’t tell what. I’ve never had this problem trying to ping/debug over the USB connection and any help would be very appreciated.
Welcome to the Forum.
Did you use a Null-Modem cable between RS232Module an the USB-to-Serial Adapter?
I had to look up what a Null-Modem cable is, but I believe so. The GHI RS232 module, and my USB-to-Serial Adapter are both male and I needed a female-to-female converter in between. Do you think that could be the problem? Would a Female USB-to-Serial Adapter be better?
The important thing is, that in the cabel the TX and RX lines must be crossed, That means that (cable with 9 Pins) pin 2 on one side must be connected with pin 3 on the other side and vice versa. You can find it out by measuring the resistance with a “Voltmeter”.
There’s two things I’d suggest to help diagnose what is going on here.
First, I’ve said it before and I’ll say it again, everyone should have an USB-to-TTL UART adapter, and the cheapest one around that has good driver support is the CP2102, find them on ebay for well under $10, they’re so cheap everyone should have 3 or more so you can always find them. In your situation this will also remove the chance that your USB-to-RS232 connection isn’t working.
Second, I would suggest that you ignore RS232 debug as your first step in this journey, and actually communicate to the Spider over the serial link with TeraTerm. This will prove that your USB-to-RS232 connection and the cable you have are or are not working. As @ RoSchmi points out, you need a specific cable and the gender of the plugs on it is no guarantee that the cable you have is suitable. If you can’t get this setup working for simple serial communication, then you’ll never get it working with more complex serial debugging.
have a look at:
this should clear things up, and if you want to use strait cables you also can get a rs232 crossover adapter.
Thanks a lot for your help everyone. All of this non-software stuff is still really new to me.
I was able to get this all working. It turns out the adapter I was using did not cross the TX and RX pins. I was able to get another Null modem cable that did that. The next step was that I had to also uninstall the USB Device for the RS232<->USB from within the Windows Device Manager. Then everything worked like a charm. I was able to ping and even deploy/debug code over the serial connection.