# Raspberry Pi - PC communication with xBee

**URL:** <https://forums.digi.com/t/raspberry-pi-pc-communication-with-xbee/21682>\
**Category:** ZNet 2.5\
**Tags:** c, raspberry-pi, python\
**Created:** [August 19, 2020, 12:16pm UTC](https://forums.digi.com/t/raspberry-pi-pc-communication-with-xbee/21682 "2020-08-19T12:16:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![highpriv](https://avatars.discourse-cdn.com/v4/letter/h/67e7ee/32.png) [@highpriv](https://forums.digi.com/u/highpriv)\
**Post date:** [August 19, 2020, 12:16pm UTC](https://forums.digi.com/t/raspberry-pi-pc-communication-with-xbee/21682/1 "2020-08-19T12:16:46Z")

</div>

Hey everyone,

I’ve two xBee Pro S2C module. I’m trying to send a data from Raspberry Pi to Windows PC with xBee modules. I can not send or get data with my codes.

[https://www.heypasteit.com/clip/0IUYIT](https://www.heypasteit.com/clip/0IUYIT) (Windows Side - C#)

[https://www.heypasteit.com/clip/0IUYIU](https://www.heypasteit.com/clip/0IUYIU) (Raspberry Pi Side - Python)

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [August 19, 2020, 12:19pm UTC](https://forums.digi.com/t/raspberry-pi-pc-communication-with-xbee/21682/2 "2020-08-19T12:19:50Z")

</div>

Have you verified that the two radios are associated to each other? If these are using the Zigbee firmware, one will need to be a coordinator. Also most 3rd party Raspberry Pi code uses the XBee in API mode.

What I would suggest if you are using transparent mode, remove the XBee, wire up the connection using the XBee port and try to get your data going.

---

<div class="post-metadata">

**Author:** ![highpriv](https://avatars.discourse-cdn.com/v4/letter/h/67e7ee/32.png) [@highpriv](https://forums.digi.com/u/highpriv)\
**Post date:** [August 19, 2020, 2:07pm UTC](https://forums.digi.com/t/raspberry-pi-pc-communication-with-xbee/21682/3 "2020-08-19T14:07:01Z")

</div>

I have already configured my xBees as coordinator and router. They working on API mode. I want to data transfer between Windows PC and Raspberry Pi. Is my codes are correct?

When i send data on XCTU, i can get on Raspberry Pi (with the above python code).

But when i try send data with my C# code, i can not get data.

Help me that is very important for me

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [August 19, 2020, 2:10pm UTC](https://forums.digi.com/t/raspberry-pi-pc-communication-with-xbee/21682/4 "2020-08-19T14:10:05Z")

</div>

I am far from an expert on C Code. But I would suggest looking over [https://xbplib.readthedocs.io/en/latest/](https://xbplib.readthedocs.io/en/latest/)

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [August 19, 2020, 2:10pm UTC](https://forums.digi.com/t/raspberry-pi-pc-communication-with-xbee/21682/5 "2020-08-19T14:10:58Z")

</div>

All I could see is where you open the COM port. I don’t see what it is you are sending.

---

<div class="post-metadata">

**Author:** ![Ryan780](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@Ryan780](https://forums.digi.com/u/Ryan780)\
**Post date:** [December 18, 2020, 1:26pm UTC](https://forums.digi.com/t/raspberry-pi-pc-communication-with-xbee/21682/6 "2020-12-18T13:26:55Z")

</div>

Are you sure that you have the serial device correct in Python for the Raspberry Pi? I would have thought it would have been something like /dev/ttyUSBx. COM6 looks like how it’s identified in Windows. You can use the command “python -m serial.tools.miniterm” to use the miniterm tool to find out what the serial device is actually called on your RPi.
