Home/Support/Support Forum/Replacing an USB cable with Xbee to send and receive from Python
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Replacing an USB cable with Xbee to send and receive from Python

0 votes

I am new to Xbee.

I would like to know if I can replace an USB cable to control a laboratory instrument that has a USB port from a computer using python.

Computer side: Xbee explorer (Sparkfun) with Xbee S2C in API (escape) mode and Python code to send ascii commands and read response.

Instrument side: Xbee explorer (Sparkfun) with Xbee S2C in API mode attached to the instrument USB port. External 5V power supply to the explorer. The Instrument board has an FTDI chip inside to convert from USB to UART. It should reply to every command send from the computer with an ASCII string. That means the data delivered wirelessly to the instrument should be converted to USB by the sparkfun explorer and then converted back to UART by the FTDI chip inside the instrument.

The system it is not working. The TX and RX leds at instrument side are not blinking so it looks like it the instrument is not receiving any data from the xbee explorer.

If I try the same link between two pc's the system works, so I believe the python code is correct and the xbee modules are well configured.

Any ideas?
Thank you in advance
asked Jun 19 in USB by Finn New to the Community (2 points)

Please log in or register to answer this question.

2 Answers

+1 vote

If the device requires a USB driver, than no it will not.
answered Jun 19 by mvut Veteran of the Digi Community (12,756 points)
0 votes
Thank you.

The device has inside a UART connected to a FTDI chip to convert to USB serial so the only driver required is the FTDI driver to generate a virtual com port when the device is connected directly to the USB port of a windows PC. On a linux or raspberry no driver is required to use the device (because the FTDI is in the linux kernel).

If I set the xbee on device side in AT mode, would it work? I do not know if I can mix AT and API mode. API is compulsory at the pc side because of Python library.
answered Jun 19 by Finn New to the Community (2 points)