EN CN
SBGC_lib - Connect with USB or UART?
  • Hi, I'm trying to communicate with the board via a serial port. I have Win7 with CP210x Virtual COM Port. Physical connection is USB. I tried to send CMD_BOARD_INFO to COM port, but there has been no response. What am I missing?

    I have tried different baud rates and parity settings.

    I can communicate with the board using SimpleBGC_GUI.

    I've been reading SimpleBGC_2_4_Serial_Protocol_Specification.pdf.
  • I am not sure if the serial protocol works over USB, I have been using the RS port on board, same that BT connects to.

    (And you need to implement the hole protocol, not just sending one value)
  • USB orBluetooth, no matter. It should work. And there are not too much pitfails to check: as you said, it may be parity or baud rate. Baus rate you can see in the GUI, advanced tab.

    Try to send several CMD_BOARD_INFO in sequece. Also, if you will provide your source code (that part that sends command) I can check it.
  • Thanks for your fast response.

    About the serial protocol. There's some example code in the Serial Protocol pdf. If I use SBGC_sendCommand to send any command that has no data part, then 5 bytes would be sent. 4 bytes of header followed by one checksum byte, which is zero because there's no data. Is this correct?
  • Yes, this is correct. And notice that "data size" inside header should be zero.
  • It works now. I set the port speed to 9600 from GUI, used even parity and sent 3 CMD_BOARD_INFO commands in a row. I had some "serial data corrupt" errors in GUI when I tried to set a higher baud rate again, but now it seems to work. Thank you for your help.