avockley Posted June 6, 2012 Report Share Posted June 6, 2012 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. Quote Link to comment Share on other sites More sharing options...
nILS Posted June 6, 2012 Report Share Posted June 6, 2012 In the repository there's an OSC tutorial app, which pretty much does just that: /trunk/apps/tutorials/028_osc/ (http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Ftutorials%2F028_osc%2F) Quote Link to comment Share on other sites More sharing options...
avockley Posted June 6, 2012 Author Report Share Posted June 6, 2012 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. Quote Link to comment Share on other sites More sharing options...
TK. Posted June 6, 2012 Report Share Posted June 6, 2012 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.