Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
17060 Discussions

Communicating with Edison over UDP

Aaron_N_1
Beginner
1,169 Views

I am setting up a communications path to the Edison over WiFi, and I would like to use raw UDP packets for general purpose and high-speed transfer of data. I am relatively new to the Edison but not to programming. I am looking for advice on how to setup the Edison to communicate with a host on the same network. Is there a library I can use to send and receive UDP packets to a host computer?

I see iotkit-comm provides data publish and subscribe options, but I am looking for general purpose communications, such as is possible with UNIX using sockets or Windows .NET using .NET libraries. Is there a similar library available on the Edison for raw UDP?

Thanks in advance,  Aaron

0 Kudos
3 Replies
Stan_G_
Beginner
1,169 Views

FWIW most of the time when I wanna do something like this on the Edison, I ignore Edison and just look for Linux - the following may be useful

 

http://www.binarytides.com/programming-udp-sockets-c-linux/

 

In a month or so I will be looking for something to perform bidirectional comms with a mac running osx - I believe I can configure (or get another instance of eclipse) to get native mac code to run - (I hate x-code with a passion.....).

I will be following what you are doing (and wish you the best of success) - because I may wish to unashamibally (sic) leech your code at some stage.

 

Stan

0 Kudos
Matthias_H_Intel
Employee
1,169 Views

agree with Stan - from my side I used UDP sockets from within C, C++, Node.JS and Python on Edison fine. Haven't looked into Mono .NET but probably doable there as well. Just note: Linux socket programming is slightly different to Windows one (different header files ...)

Just the default busybox netcat "nc" on Edison doesn't come with udp (-u) support. If you'd want to go via nc you'd have to install a more powerful netcat version 

0 Kudos
Matthias_H_Intel
Employee
1,169 Views

... and there is lots of information available online

e.g. Node.JS: https://nodejs.org/api/dgram.html

Python: http://pymotw.com/2/socket/udp.html

...

 

0 Kudos
Reply