Ivan Delamer | 5 Feb 18:32 2016

Re: 6lowpan support in lwip

What Sergio said is 100% right on.

6LowPAN will run parallel to ZigBee and Bluetooth. It will use the same 
IEEE802.15.4 interface that ZigBee uses.

You must remember that 6LowPAN will only exchange IPv6 packets.

The packet flow is roughly:

- Your application generates TCP or UDP packets to a IPv6 address
- LwIP will route those packets to the 6LowPAN netif, based on the 
destination address
- 6LowPAN will fragment the IPv6 packet to fit in the smaller IEEE 
802.15.4 frames, and send them via netif->linkoutput
- You must implement netif->linkoutput to place the frame in your PHY 
and send it. Let me know what PHY chip you are using for tips on that
- Your driver must also read incoming packets from your PHY, and pass 
them to 6LowPAN layer via lowpan6_input(), or recommended is to use the 
utility tcpip_6lowpan_input() so that the packet is taken over by the 
TCPIP thread.

Your driver may implement linkoutput in two ways:
- directly send the packet to the PHY, blocking the LwIP stack. This is 
usually OK in low-traffic applications
- buffer the packet and send it in an own thread. This is non-blocking 
but requires more memory

As Sergio mentioned, we must continue this discussion on the correct 
list:

(Continue reading)

Sergio R. Caprile | 4 Feb 18:43 2016
Picon

Re: 6lowpan support in lwip

Hi,

> We couldn't understand your following statement:
> "The 6LowPAN code is implemented like a netif, but you'll have to implement your own driver for your
PHY/MAC. I used an AT86RF231, so you need to write the driver to write the packets via SPI. That depends on
your CPU and your external PHY."

The netif is the layer-2-like part of lwIP. The driver for an Ethernet
chip, for example is a netif.
The 6LoWPAN code itself is written as a netif, lwIP sees it as an
interface carrying IP datagrams.
You have to write the code to interface to whatever you physically use
to carry the data, be it SPI or parallel or on-chip (also parallel...)
or ...

> ->We understand we will have to write driver for our 802.15.4 device which will speak with 6LowPAN driver.
Is this correct?

Exactly. I can't tell you more because I don't know. Let's wait for Ivan.
I still don't have my hardware ready, but I'm willing to help with this.

> -> We are having a setup running in which our application payload gets transferred from one device to
another over ZigBee and Bluetooth.
>       We now want to create an IP packet on the device itself and use ZigBee / Bluetooth to just transfer the data
from one device to another using LWIP + 6LowPAN.

AFAIK, 6LoWPAN is IPv6 over 802.15.4. If you want to carry it over
ZigBee, you have to implement ZigBee IP, which is pretty much the same,
but you better check for compatibility.
As for Bluetooth, that is 6LoBT, different animal, can't tell you how
(Continue reading)

Ivan Delamer | 2 Feb 20:51 2016

Re: 6lowpan support in lwip

Hi,

What is available is the patch in Savannah.

I have been testing it in a product for over a year and it works quite 
well.

It is not 100% complete, and lacks documentation. But if you're a bit 
of a hacker you'll figure it out.

The 6LowPAN code is implemented like a netif, but you'll have to 
implement your own driver for your PHY/MAC. I used an AT86RF231, so you 
need to write the driver to write the packets via SPI. That depends on 
your CPU and your external PHY.

I haven't had time to document it and merge, but if you want to improve 
the code we could look into merging with master.

Cheers
Ivan

> Date: Tue, 2 Feb 2016 12:41:31 +0000
> From: "Swapnil  Jakhade" <Swapnil.Jakhade <at> open-silicon.com>
> To: "lwip-devel <at> nongnu.org" <lwip-devel <at> nongnu.org>
> Subject: [lwip-devel]  6lowpan support in lwip
> Message-ID:
> 	<BY1PR0501MB1638E35A7D727B83CC966503C9DF0 <at> BY1PR0501MB1638.namprd05.prod.outlook.com>
> 
> Content-Type: text/plain; charset="us-ascii"
> 
(Continue reading)

Swapnil Jakhade | 2 Feb 13:41 2016

6lowpan support in lwip

Hello,

 

We are planning to use LWIP and 6lowpan as an IP stack on one of our IoT device.

We came across this group while searching for lwip+6lowpan integrated stack.

 

The following patch shows initial support for 6lowpan on lwip.
http://git.savannah.gnu.org/cgit/lwip.git/log/?h=lowpan6

But we don’t see any further commits to this. Has the work on this branch stopped?

 

There is git for lwip

http://git.savannah.gnu.org/cgit/lwip.git

Into which there is separate branch for 6lowpan. We don’t see any 6lowpan code into this branch.

Also in https://savannah.nongnu.org/patch/?8706 this link, found files with 6lowpan initial development.

We are a bit confused as to which branch to use for lwip and 6lowpan together.

 

Our ultimate aim is to enable IP stack on a demo sensor board

(lwip+6lowpan with Bluetooth or Zigbee device which are 802.15.4 complaint).

 

We would appreciate if we could get some pointers to our above requirement.

If the activity on this branch has been stopped and migrated somewhere else, can

anyone please redirect us to some other link where the development is still on.

 

Thanks.



Regards, 

Swapnil Jakhade 
Software Engineer - I 

T: (+91) 2041462 Ext. 616
F: (+91) 2041462 Ext. 601
E: Swapnil.Jakhade <at> open-silicon.com
 

6th Floor, East Wing,
Marisoft 3, Kalyani Nagar,
Pune, MH 411014 - INDIA
 

Open-Silicon     
Your Idea Delivered TM 
   w     f      t      in   

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient of this message please do not read, copy, use or disclose this communication and notify the sender immediately. It should be noted that any review, retransmission, dissemination or other use of, or taking action or reliance upon, this information by persons or entities other than the intended recipient is prohibited.

 

 

_______________________________________________
lwip-devel mailing list
lwip-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-devel
David Fernandez | 29 Jan 17:39 2016
Picon

[bug #47012] Builds may fail due to unused static variable memp_names in stats.c

URL:
  <http://savannah.nongnu.org/bugs/?47012>

                 Summary: Builds may fail due to unused static variable
memp_names in stats.c
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: david0fc
            Submitted on: Fri 29 Jan 2016 16:39:09 GMT
                Category: pbufs
                Severity: 3 - Normal
              Item Group: Compiler Warning
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: git head

    _______________________________________________________

Details:

The code changes for revision (sorry, I'm using hg plugin for git, so the hash
is: 978321cd2f6c699b390c56b41b209b33b72dd4ec, and the unique hg changeset is:
978321cd2f6c):

2016-01-14 15:18:57 +0800
----
stats: Move memp_names table out of stats_init/stats_display_memp functions

This makes the code simpler with better readability.
Also make memp_names static because it's only referenced by stats.c.

Signed-off-by: Axel Lin <axel.lin <at> ingics.com>
----

Introduced this change:

----
 <at>  <at>  -49,15 +49,18  <at>  <at> 

 struct stats_ lwip_stats;

+#if MEMP_STATS
+static const char * memp_names[] = {
+#define LWIP_MEMPOOL(name,num,size,desc) desc,
+#include "lwip/priv/memp_std.h"
+};
+#endif /* MEMP_STATS */
+
----

That defines memp_names on MEMP_STATS != 0, but the usages of this are under
either LWIP_DEBUG in stats_init, or under LWIP_STATS_DISPLAY in
stats_display_memp.

So, with the default values for all the macros here, it causes a warning:

----
lwip/src/core/stats.c:53:21: error: 'memp_names' defined but not used
[-Werror=unused-variable]
 static const char * memp_names[] = {
                     ^
cc1: all warnings being treated as errors
----

In some build systems, the warnings are forbidden, and there are policies to
avoid unneeded variables, and blah, blah, blah...

So, if any maintainer could sort this out when possible, that would be great.

I might be happy to submit a patch to the developers list myself, if you
prefer that.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?47012>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/
Stephan Linz | 23 Jan 11:56 2016
Picon

[patch #8886] minimal: support UDP echo server

URL:
  <http://savannah.nongnu.org/patch/?8886>

                 Summary: minimal: support UDP echo server
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: slz
            Submitted on: Sa 23 Jan 2016 11:56:06 CET
                Category: Contrib
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Use the new UDP echo server (lwIP raw API) in the minimal example.

    _______________________________________________________

File Attachments:

-------------------------------------------------------
Date: Sa 23 Jan 2016 11:56:06 CET  Name:
0004-minimal-support-UDP-echo-server.patch  Size: 984B   By: slz

<http://savannah.nongnu.org/patch/download.php?file_id=36144>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8886>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/
Stephan Linz | 23 Jan 11:54 2016
Picon

[patch #8885] apps: udpecho_raw: add UDP echo server for raw API

URL:
  <http://savannah.nongnu.org/patch/?8885>

                 Summary: apps: udpecho_raw: add UDP echo server for raw API
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: slz
            Submitted on: Sa 23 Jan 2016 11:54:53 CET
                Category: Contrib
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Introduce a UDP echo that works on the lwIP raw API. Based on code by Iwan
Budi Kusnanto and Juri Haberland:

 - https://gist.github.com/iwanbk/1399729
 - https://lists.gnu.org/archive/html/lwip-users/2007-06/msg00078.html

    _______________________________________________________

File Attachments:

-------------------------------------------------------
Date: Sa 23 Jan 2016 11:54:53 CET  Name:
0003-apps-udpecho_raw-add-UDP-echo-server-for-raw-API.patch  Size: 7kB   By:
slz

<http://savannah.nongnu.org/patch/download.php?file_id=36143>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8885>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/
Stephan Linz | 23 Jan 11:54 2016
Picon

[patch #8884] apps: tcpecho_raw: rename interface and symbols

URL:
  <http://savannah.nongnu.org/patch/?8884>

                 Summary: apps: tcpecho_raw: rename interface and symbols
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: slz
            Submitted on: Sa 23 Jan 2016 11:54:05 CET
                Category: Contrib
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Previously, from the API it was not apparent which type of echo server will be
used, in this case TCP echo on lwIP raw API. For a proper generalization we
want to see:

 - apps/tcpecho/tcpecho.c::tcpecho_init()
 - apps/tcpecho_raw/tcpecho_raw.c::tcpecho_raw_init()
 - apps/udpecho/udpecho.c::udpecho_init()

In future:

 - apps/udpecho_raw/udpecho_raw::udpecho_raw_init()

    _______________________________________________________

File Attachments:

-------------------------------------------------------
Date: Sa 23 Jan 2016 11:54:05 CET  Name:
0002-apps-tcpecho_raw-rename-interface-and-symbols.patch  Size: 24kB   By: slz

<http://savannah.nongnu.org/patch/download.php?file_id=36142>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8884>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/
Stephan Linz | 23 Jan 11:53 2016
Picon

[patch #8883] unixsim: sntp: refactoring system time setup

URL:
  <http://savannah.nongnu.org/patch/?8883>

                 Summary: unixsim: sntp: refactoring system time setup
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: slz
            Submitted on: Sa 23 Jan 2016 11:53:17 CET
                Category: Contrib
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Use strftime() from POSIC API to reduce self calculation.

    _______________________________________________________

File Attachments:

-------------------------------------------------------
Date: Sa 23 Jan 2016 11:53:17 CET  Name:
0001-unixsim-sntp-refactoring-system-time-setup.patch  Size: 1kB   By: slz

<http://savannah.nongnu.org/patch/download.php?file_id=36141>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8883>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/
Joel Cunningham | 21 Jan 22:51 2016
Picon

[patch #8882] Vector improvements

URL:
  <http://savannah.nongnu.org/patch/?8882>

                 Summary: Vector improvements
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jcunningham
            Submitted on: Thu 21 Jan 2016 09:51:32 PM GMT
                Category: sockets/netconn
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: jcunningham
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Continuing my work with sendmsg(), I've got a couple more improvements:

1) Move struct iovec to def.h - This patch moves the LwIP provided definition
of struct iovec to def.h from sockets.h. This was done so that netconn code
can reference the type without having the socket layer enabled

This also switches to using a compiler guard of #if LWIP_IOVEC_PRIVATE because
#if !defined() on a structure doesn't actually work.  This also allows a port
to include <sys/uio.h> instead for struct iovec

2) Optimize sendmsg UDP pbuf chain creation - This patch optimizes the sendmsg
UDP pbuf chain creation by not allocating/freeing a netbuf per IO vector. 
This adds a new API (netbuf_ref_vectors()) which takes an array of struct
iovecs and creates a chain of PBUF_REFs in the provided netbuf. The logic is a
combination of netbuf_ref() and netbuf_chain()

3) Vectorize netconn_write for TCP - This patch adds support to the netconn
write APIs to take an input of vectors instead of a single data pointer.  This
allows vectors sent on a TCP connection via sendmsg to be treated atomically. 
The set of vectors is segmented into as much data as can fit into the send
buffer and then the TCP output function is called

Previously, each vector was passed to netconn_write_partly and tcp_write
segmented it into its own packet, which was then it was sent via tcp_output
(if not Nagleing)

This patch adds vector support to lwip_netconn_do_writemore() which is the
meat of the TCP write functionality from netconn/sockets layer. A new netconn
API netconn_write_vectors_partly() takes a set of vectors as input and hooks
up to do_writemore()

The patches have the follow dependency order:

0001-Move-struct-iovec-to-def.h.patch
0001-Optimzie-sendmsg-UDP-pbuf-chain-creation.patch
0001-Vectorize-netconn_write-for-TCP.patch

    _______________________________________________________

File Attachments:

-------------------------------------------------------
Date: Thu 21 Jan 2016 09:51:32 PM GMT  Name:
0001-Move-struct-iovec-to-def.h.patch  Size: 2kB   By: jcunningham

<http://savannah.nongnu.org/patch/download.php?file_id=36123>
-------------------------------------------------------
Date: Thu 21 Jan 2016 09:51:32 PM GMT  Name:
0001-Vectorize-netconn_write-for-TCP.patch  Size: 12kB   By: jcunningham

<http://savannah.nongnu.org/patch/download.php?file_id=36124>
-------------------------------------------------------
Date: Thu 21 Jan 2016 09:51:32 PM GMT  Name:
0001-Optimzie-sendmsg-UDP-pbuf-chain-creation.patch  Size: 4kB   By:
jcunningham

<http://savannah.nongnu.org/patch/download.php?file_id=36125>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8882>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/
Stephan Linz | 21 Jan 20:12 2016
Picon

[patch #8881] unixsim: add support for SLIP interface

URL:
  <http://savannah.nongnu.org/patch/?8881>

                 Summary: unixsim: add support for SLIP interface
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: slz
            Submitted on: Do 21 Jan 2016 20:12:54 CET
                Category: Contrib
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Add a SLIP interface configuration, for test purposes use a PTY.

    _______________________________________________________

File Attachments:

-------------------------------------------------------
Date: Do 21 Jan 2016 20:12:54 CET  Name:
0008-unixsim-add-support-for-SLIP-interface.patch  Size: 3kB   By: slz

<http://savannah.nongnu.org/patch/download.php?file_id=36122>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8881>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/

Gmane