UDP connection



I’ve got an application where I’ve been using TCP, now I’m trying to swap to UDP. I have been using Docklight to set up a server.
Once the bearer is setup I have tried to setup my UDP connection through. I know it works up to this point because I have used it for my TCP application.
UDPChannel = wip_UDPCreate (UDPEventhandler, NULL);
wip_setOpts(UDPChannel, WIP_COPT_PEER_PORT, 25000, WIP_COPT_PEER_STRADDR, “xx.xxx.xxx.xx”, WIP_COPT_END);

then from within my UDP Event handler, once I get WIP_CEV_OPEN and WIP_CEV_WRITE, i do
write_Return = wip_writeOpts(UDPChannel, DataWriteBuffer, 7);

where my DataWriteBuffer is an ascii pointer to “1234567”

I get no connection though in Docklight and do not receive any data even though I get no errors from my code.

Is there something obvious I am missing in my UDP setup?

Thanks in advance


Have you tried using the WIPAT sample application, just to make sure you can connect a UDP client to your server? There is an example at the end of the WIPAT user guide explaining all the AT commands required to setup your GPRS bearer and create a UDP connection to the server. Make sure this works first, there may be nothing wrong with your code :slight_smile:


Oh, also you are using wip_writeOpts without any options. This might be causing errors. Rather use wip_write(), or else include WIP_COPT_END as the last argument.


Thanks, that helped me troubleshoot the problem. The issue was on my server side :stuck_out_tongue: