lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Best way to send sensor data from RAW sockets


From: Paul Archer
Subject: [lwip-users] Best way to send sensor data from RAW sockets
Date: Mon, 5 Mar 2012 14:39:08 +1100

Hi All,

I am creating an application to transmit audio over a small (and
cheap) radio chip.

I have lwIP setup using the the radio chip as a standard Ethernet
device (later I hope to make it support mesh networking).
This works well and I can ping and send UDP/TCP data.

I am now trying to setup a raw UDP socket that will accept audio data
from a queue and send it out over UDP.
I have the receive side working well with raw sockets and can
correctly receive and hand the data off to the DAC.

My question is, what is the best way for my audio data to get into a
packet and send it?

I could constantly check if data is available in the queue by polling
(using a sys_timeout()), but this does not seem like an optimal solution.

I could also use some form of interrupt or notification and send
a message to the lwIP tcp thread by using tcpip_callback(),
but then my task creating the audio data needs to know who is
consuming the data.

Normally using Berkley sockets I would have the task wait on the
data from the queue, until I have enough for a full packet and then
send the packet.

I am sure I am not the first to need to solve this problem, how have
others solved it?


----
Regards
Paul Archer
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]