You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Gilles Boccon-Gibod <bo...@bok.net> on 2017/01/04 04:53:19 UTC

Using LWIP with MyNewt

I'm trying to put together a simple app that uses TCP/IP with MyNewt.
I don't see any reference to how to enable/use LWIP in any of the tutorials
or docs, but I can see that LWIP is included in the platform.
If I add "@apache-mynewt-core/net/ip/lwip_base" to my pkg.yml, my build
does try to build the code from net/ip/lwip_base, but it seems pretty blunt
(it tries to compile everything from that subtree, including 'httpd' and
other apps), so there must be a better way to configure this.

Any pointers on how to get started with the IP stack?

-- Gilles

Re: Using LWIP with MyNewt

Posted by marko kiiskila <ma...@runtime.io>.
Hi Gilles,

yes, I believe it is in shape for that. Let me know about issues you run into.

Thanks,
M

> On Jan 4, 2017, at 2:24 PM, Gilles Boccon-Gibod <bo...@bok.net> wrote:
> 
> Thanks Marko.
> 
> Would you say that the LWIP stack that's currently in would be enough for a
> simple proof of concept (I would register a netif implementation that's in
> my app, since I'm running on a board that doesn't have an ethernet port, I
> want to tunnel the packets in some other way)?
> 
> -- Gilles
> 
> On Wed, Jan 4, 2017 at 8:46 AM, marko kiiskila <ma...@runtime.io> wrote:
> 
>> Hi Gilles,
>> 
>> 
>>> On Jan 3, 2017, at 8:53 PM, Gilles Boccon-Gibod <bo...@bok.net> wrote:
>>> 
>>> I'm trying to put together a simple app that uses TCP/IP with MyNewt.
>>> I don't see any reference to how to enable/use LWIP in any of the
>> tutorials
>>> or docs, but I can see that LWIP is included in the platform.
>>> If I add "@apache-mynewt-core/net/ip/lwip_base" to my pkg.yml, my build
>>> does try to build the code from net/ip/lwip_base, but it seems pretty
>> blunt
>>> (it tries to compile everything from that subtree, including 'httpd' and
>>> other apps), so there must be a better way to configure this.
>>> 
>>> Any pointers on how to get started with the IP stack?
>> 
>> unfortunately not yet. I did start the process of bringing it in, but the
>> process
>> is not yet complete. The code as it is now is more of a checkpoint towards
>> support.
>> 
>> What is missing is a) sample device driver(s) which can be included as
>> packages like our other drivers, b) sample app utilizing it (there is
>> winc1500_wifi app in arduino-zero repository, which does use sockets and
>> allows you to start the default inet services), I would probably make a
>> sample app with this and c) add locking to lwip socket adaptation and
>> d) documentation.
>> 
>> What you can do at the moment, however, is use the mn_socket abstraction
>> to write IP applications. This is functional when running with simulator,
>> and with WINC1500 wifi chip (which has offloaded TCP/IP).
>> 
>> Another thing which is missing is an abstraction of DNS. We need this
>> so you can write IP applications which work with offloaded DNS or LwIP,
>> depending on what is present in the build.
>> —
>> M


Re: Using LWIP with MyNewt

Posted by Gilles Boccon-Gibod <bo...@bok.net>.
Thanks Marko.

Would you say that the LWIP stack that's currently in would be enough for a
simple proof of concept (I would register a netif implementation that's in
my app, since I'm running on a board that doesn't have an ethernet port, I
want to tunnel the packets in some other way)?

-- Gilles

On Wed, Jan 4, 2017 at 8:46 AM, marko kiiskila <ma...@runtime.io> wrote:

> Hi Gilles,
>
>
> > On Jan 3, 2017, at 8:53 PM, Gilles Boccon-Gibod <bo...@bok.net> wrote:
> >
> > I'm trying to put together a simple app that uses TCP/IP with MyNewt.
> > I don't see any reference to how to enable/use LWIP in any of the
> tutorials
> > or docs, but I can see that LWIP is included in the platform.
> > If I add "@apache-mynewt-core/net/ip/lwip_base" to my pkg.yml, my build
> > does try to build the code from net/ip/lwip_base, but it seems pretty
> blunt
> > (it tries to compile everything from that subtree, including 'httpd' and
> > other apps), so there must be a better way to configure this.
> >
> > Any pointers on how to get started with the IP stack?
>
> unfortunately not yet. I did start the process of bringing it in, but the
> process
> is not yet complete. The code as it is now is more of a checkpoint towards
> support.
>
> What is missing is a) sample device driver(s) which can be included as
> packages like our other drivers, b) sample app utilizing it (there is
> winc1500_wifi app in arduino-zero repository, which does use sockets and
> allows you to start the default inet services), I would probably make a
> sample app with this and c) add locking to lwip socket adaptation and
> d) documentation.
>
> What you can do at the moment, however, is use the mn_socket abstraction
> to write IP applications. This is functional when running with simulator,
> and with WINC1500 wifi chip (which has offloaded TCP/IP).
>
> Another thing which is missing is an abstraction of DNS. We need this
> so you can write IP applications which work with offloaded DNS or LwIP,
> depending on what is present in the build.
> —
> M

Re: Using LWIP with MyNewt

Posted by marko kiiskila <ma...@runtime.io>.
Hi Gilles,


> On Jan 3, 2017, at 8:53 PM, Gilles Boccon-Gibod <bo...@bok.net> wrote:
> 
> I'm trying to put together a simple app that uses TCP/IP with MyNewt.
> I don't see any reference to how to enable/use LWIP in any of the tutorials
> or docs, but I can see that LWIP is included in the platform.
> If I add "@apache-mynewt-core/net/ip/lwip_base" to my pkg.yml, my build
> does try to build the code from net/ip/lwip_base, but it seems pretty blunt
> (it tries to compile everything from that subtree, including 'httpd' and
> other apps), so there must be a better way to configure this.
> 
> Any pointers on how to get started with the IP stack?

unfortunately not yet. I did start the process of bringing it in, but the process
is not yet complete. The code as it is now is more of a checkpoint towards
support.

What is missing is a) sample device driver(s) which can be included as
packages like our other drivers, b) sample app utilizing it (there is
winc1500_wifi app in arduino-zero repository, which does use sockets and
allows you to start the default inet services), I would probably make a
sample app with this and c) add locking to lwip socket adaptation and
d) documentation.

What you can do at the moment, however, is use the mn_socket abstraction
to write IP applications. This is functional when running with simulator,
and with WINC1500 wifi chip (which has offloaded TCP/IP).

Another thing which is missing is an abstraction of DNS. We need this
so you can write IP applications which work with offloaded DNS or LwIP,
depending on what is present in the build.
—
M