Issue with example SendAccelDataOverUdpAndBle
19. 9. 6 오전 11:26


I have installed XDK Workbench 3.6.0

I have opened the example project SendAccelDataOverUdpAndBle

I have configured my Wifi SSID & Password as well as DEST_SERVER_IP and DEST_SERVER_PORT

Flashing and registering at the WIfi works perfectly

When I start wireshark on the destination machine however, I see all the UDP Packets from the XDK coming in with a FRAME CHECK SEQUENCE of 0x0000000000, which is incorrect.

As a response my destination machine sends an ICMP Message "Destination unreachable" / Port unreachable.

See example packets here:

I have started a netcat listening on the UDP Port I specified, but nothing is received

nc -u -l -p 12345


Any hints on what I could try?


0 (0 투표)
RE: Issue with example SendAccelDataOverUdpAndBle
19. 9. 6 오후 3:17 as a reply to Alexander Federlin.

Ok, capturing on "any" Network interface instead of my physical NIC has done away with the Frame Check Sequence Error. Possibly something to do with checksum offloading.

However, the ICMP response from my machine remains. 

All in all, I doubt that XDK has anything to do withss this. Still keeping  the thread for reference. 

EDIT: my guess is that nc closes the connection when it receives data which cannot be converted to utf-8.

I'm running a simple python process now listening to the UDP port and everything works as it should.

EDIT 2: 

Here's the simplest way to decode the acceleration data sent over UDP:

import socket
import struct

# set up the socket using local address
socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
socket.bind(("", 12345))

while 1:

    # get the data sent to us
    data, ip = socket.recvfrom(1024)

    # the received data is three signed integer values one after the other (each 4 bytes long)
    values=struct.unpack ('iii', data)
    print("values: ", values)


0 (0 투표)