0

I am totally new to Zigbee and serial proting and I want to build a communication channel between a Zigbee and https://github.com/mik3y/usb-serial-for-android through a USB serial port (send and receive bytes). I used the USB-serial-for-android project on Github https://github.com/mik3y/usb-serial-for-android but it shows no way of sending bytes. So could anyone give me a way to successfully send bytes to the Zigbee module? Thanks a lot :)

OmAr Hesham
  • 153
  • 1
  • 3
  • 14

1 Answers1

0

Pretty much when dealing with serial communication you need these 3 methods:

  • open - open the port for communication
  • read - read bytes from the serial interface
  • write - write bytes to the serial interface

Additionally you may want methods for setting the baudrate, parity, stopbits etc. After a quick look on the github project, I see it exposes the above mentioned operations. I suggest you use pySerial on your PC at first to accommodate yourself with sending and receiving data to/from your ZigBee device, and afterwards start developing on Android where things may get a little tricky. This Python module is simple to use and straight-forward.

adrian.nicolau
  • 516
  • 7
  • 17