lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] coap on lwip


From: chrysn
Subject: Re: [lwip-users] coap on lwip
Date: Thu, 17 Jan 2013 23:45:43 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jan 14, 2013 at 05:08:46PM -0700, Mat Henshall wrote:
> I had given libcoap a quick look over the weekend!
> 
> It seemed like the best choice as a starting place. My biggest concern was I 
> need an lwip raw API implementation, and a minimal memory footprint version. 
> 
> I'd be happy to help - tell me what you need from me. Feel free to email 
> directly: address@hidden 

i've created an initial port and uploaded it to a dedicated project on
gitorious[1].

it's just enough to get a server operational that answers to coap
requests.

the code i need in an initialization function is:

static coap_context_t my_context;

void myapp_init(void)
{
        coap_address_t listenaddress;

        coap_address_init(&listenaddress);

        listenaddress.addr = *(IP_ADDR_ANY);
        listenaddress.port = COAP_DEFAULT_PORT;

        coap_init_context(&my_context, &listenaddress);
}

and the coap_dispatch(&my_context) function has to be called
periodically.

there is a config.h.lwip header file that has to be copied to config.h.
for the time being, that includes usage of the libc malloc function.
packages to be sent are copied around, as are received packages. i'd
prefer to use pbufs in some places and make everything more zero-copy; i
hope to get rid of all mallocs for inclusion on really small systems.

next issues are

* getting rid of all the FIXME that came up
* see what to do with timers (so far, they're just disabled; lwip
  recently has a timer system that seems to work even w/o operating
  system, maybe we can use that)
* check if i'm using lwip right
* testing testing testing

all kinds of feedback are welcome
chrysn

[1] https://gitorious.org/coap-lwip

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom

Attachment: signature.asc
Description: Digital signature


reply via email to

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