Danny,
I don't think you can bind and connect with the same udp pcb, at the same time. Since you're not really doing anything with it anyway, I would remove the following line of code:
udp_bind(udpSocket, IP_ADDR_ANY, localPort); //Bind socket to port
Also, please keep in mind that UDP is "connectionless". Each _send or _recv is a separate transaction. The sockets paradigm hides this from you, but LWIP's raw API requires that you understand this fact and write appropriate code. I posted a sample of how to do this, for a simple echo server.
Also, it still disturbs me that you aren't just simply modifying the existing standalone LWIP example. IMHO, you'd make much faster progress going this route.
Best of luck,
- slacker