lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Pachube - lwip example


From: Kieran Mansley
Subject: Re: [lwip-users] Pachube - lwip example
Date: Fri, 29 Jul 2011 12:56:16 +0100

On Tue, 2011-07-26 at 05:34 -0700, Dzun wrote:
> Hi all,
> 
> I'm trying to do make a simple application which will send a TCP packet to
> Pachube server (Internet of Things server). It suppose to send only this
> data:
> 
> PUT /v2/feeds/12345.csv HTTP/1.1\r\nHost: api.pachube.com\r\nAccept:
> */*\r\nX-PachubeApiKey: MY_API_KEY\r\nContent-Length: 3\r\nContent-Type:
> application/x-www-form-urlencoded\r\n\r\n0,7\r\n
> 
> Nothing more, nothing less. I was looking for some simple example but what I
> found is either a webserver, echo or TFTP - nothing simple that does "send
> and forget".
> 
> Does anyone know about such an example or some tutorial for beginners?

Do you know which lwIP API you want to use?  If you're using the sockets
API then the application would be pretty much the same as on any system
as the lwIP sockets API tries to be compatible.  If you're using one of
lwIP's own APIs then it gets a bit more specialized, but the tcpecho_raw
example should be pretty close to what you want: it receives data and
then echoes it back, but if you ignore the receiving part and just look
at the sending part, that should give an idea of what to do as it is
also doing send and forget.  The only differences are (i) that it's
sending some data it has received, but you can just substitute your own
data for that; (ii) that it is a server (and so listening for
connections) and you want to do an active connect.  

Kieran




reply via email to

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