Running the following python 2.7 code to receive UDP packets from the S6B and echo the packet back:
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(("", 9750))
while True:
data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
print "received message:", repr(data), addr
sock.sendto(data, addr)
I am receiving data from the S6B:
received message: '\x0e \x81\x9d@\x00\x00\x00\x07\x00\x00\x00\x00' ('20.10.10.101', 9750)
received message: '\x0e \x81\x9d@\x00\x00\x00\xf017L870\x00\x00' ('20.10.10.101', 9750)
received message: '\x0e \x81\x9d@\x00\x00\x00\xf017L870\x00\x00' ('20.10.10.101', 9750)
received message: '\x0e \x81\x9d@\x00\x00\x00\x07\x00\x00\x00\x00' ('20.10.10.101', 9750
But the S6B is not giving any output that indicates it is receiving UDP packets. I have tried monitoring the radio but in my embedded environments and in XCTU I have confirmed via wireshark that the packets are being sent to the correct port via wireshark.
Setting file:
<?xml version="1.0" encoding="UTF-8"?>
<data>
<profile>
<description_file>XB2B-WF-2026.xml</description_file>
<settings>
<setting command="PL">4</setting>
<setting command="AH">2</setting>
<setting command="CE">2</setting>
<setting command="ID">almond</setting>
<setting command="EE">2</setting>
<setting command="PK"></setting>
<setting command="IP">0</setting>
<setting command="MA">0</setting>
<setting command="TM">64</setting>
<setting command="TS">258</setting>
<setting command="DO">3</setting>
<setting command="EQ">devicecloud.digi.com</setting>
<setting command="NS">20.10.10.254</setting>
<setting command="DL">255.255.255.255</setting>
<setting command="NI">0x20</setting>
<setting command="KP">0x20</setting>
<setting command="KC">0x20</setting>
<setting command="KL">0x20</setting>
<setting command="C0">2616</setting>
<setting command="DE">2616</setting>
<setting command="GW">20.10.10.254</setting>
<setting command="MK">255.255.255.0</setting>
<setting command="MY">20.10.10.101</setting>
<setting command="BD">3</setting>
<setting command="NB">0</setting>
<setting command="SB">0</setting>
<setting command="RO">3</setting>
<setting command="FT">7F3</setting>
<setting command="AP">2</setting>
<setting command="AO">2</setting>
<setting command="D0">1</setting>
<setting command="D1">0</setting>
<setting command="D2">0</setting>
<setting command="D3">0</setting>
<setting command="D4">0</setting>
<setting command="D5">1</setting>
<setting command="D6">0</setting>
<setting command="D7">1</setting>
<setting command="D8">1</setting>
<setting command="D9">1</setting>
<setting command="P0">1</setting>
<setting command="P1">0</setting>
<setting command="P2">0</setting>
<setting command="P3">1</setting>
<setting command="P4">1</setting>
<setting command="PD">7FFF</setting>
<setting command="PR">7FFF</setting>
<setting command="DS">0</setting>
<setting command="M0">0</setting>
<setting command="M1">0</setting>
<setting command="LT">0</setting>
<setting command="RP">28</setting>
<setting command="AV">0</setting>
<setting command="IC">0</setting>
<setting command="IF">1</setting>
<setting command="IR">0</setting>
<setting command="OM">7FFF</setting>
<setting command="T0">0</setting>
<setting command="T1">0</setting>
<setting command="T2">0</setting>
<setting command="T3">0</setting>
<setting command="T4">0</setting>
<setting command="T5">0</setting>
<setting command="T6">0</setting>
<setting command="T7">0</setting>
<setting command="T8">0</setting>
<setting command="T9">0</setting>
<setting command="Q0">0</setting>
<setting command="Q1">0</setting>
<setting command="Q2">0</setting>
<setting command="Q3">0</setting>
<setting command="Q4">0</setting>
<setting command="SA">2710</setting>
<setting command="SM">0</setting>
<setting command="SO">100</setting>
<setting command="SP">1F4</setting>
<setting command="ST">1388</setting>
<setting command="WH">0</setting>
<setting command="CC">2B</setting>
<setting command="CT">64</setting>
<setting command="GT">3E8</setting>
</settings>
</profile>
</data>
Has anyone had luck receiving UDP packets with the S6B? Am I not supposed to send the packets to the port specified by DE? The manual talks about the XBee application service on port 0xBEE but I am unsure if I have to use that in API escaped mode.