Jump to content

Using uIP to receive UDP packets


avockley
 Share

Recommended Posts

I'm working on creating a network device that will sit on a static IP and receive UDP packets. This will eventually turn in to an ArtNet to DMX converter, but the only thing i'm working on right now is how the networking will work. I have looked at the examples in the mios32 svn repository, but the ones for MIOS don't involve UDP, and the one that uses UDP is not for MIOS. It will also need to unicast UDP packets under a few conditions. All I really need to know is how to set up the ethernet port on an LPC1769 board and then read in and send UDP packets. I'm sure this is simpler than I'm making it, but I have absolutely no idea where to start. Any help would be greatly appreciated.

Link to comment
Share on other sites

That was actually the one I was looking at earlier, but I don't know how to get a raw UDP packet. I believe that the OSC code calls the APP_MIDI_Notify_Package function after receiving data, but my app will not be receiving OSC data. I want to get the raw data inside the UDP packet so that I can parse it myself.

Link to comment
Share on other sites

Here a short overview over the uip_task_standard module which is demonstrated in the tutorial app:

uip*: this code is required to handle UIP functions from a FreeRTOS task. The (simple) invocation of this task is demonstrated in the tutorial

uip_task mainly handles incoming and outgoing packets and links to protocol demons, such as DHCPC... and the OSC Server

There are also access functions to change IP parameters, e.g. from a MIOS terminal.

osc_server: parses incoming UDP packets which are received over given ports.

The entry point is OSC_SERVER_AppCall, which is a common uIP hook (see also the other examples in the uip directory, they are simpler but all use the same hook)

OSC_SERVER_SendPacket sends a packet via the uIP layer.

If you don't like the uIP based approach, because it means too much overhead for your application, then have a look into this directory:

http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fmodules%2Fuip%2Fmios32%2FLPC17xx%2F

network-device.c contains access functions to send/receive packets directly.

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...