I had build a simple mobile robot control by wireless device using XBee. I am able to control the robot by sending (and receive) USART data to XBEE using microC or X-CTU terminal. The connection from computer to XBee using USB to Serial converter I buy from Cytron. The XBee is interfaced to serial by MAX232. The data is in simple 8 bit form, either send or receive.
Now I want to control the robot from the computer using a better program. I tried a Visual C++ program to send data to Serial port com. Here is the problem. The program could not open the virtual com. I tried a C++ program for serial library from 'codeproject.com'. The error is:
Unable to open COM-port
(error code 2)
I use visual C++ 2008 Express Edition. Can someone give hint as to what could be wrong. Or suggest a working library for the virtual com port. Or should I use some other programming base like VB.