lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] 6lowpan support in lwip


From: Ivan Delamer
Subject: Re: [lwip-devel] 6lowpan support in lwip
Date: Fri, 05 Feb 2016 10:32:12 -0700

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:

- For questions on how to use the 6LowPAN code, start a thread on lwip-users - For topics related to improving the current 6LowPAN code, start a new thread on this list, or post a bug/patch in Savannah

Cheers
Ivan


Date: Thu, 4 Feb 2016 14:43:01 -0300
From: "Sergio R. Caprile" <address@hidden>
To: address@hidden
Subject: Re: [lwip-devel] 6lowpan support in lwip
Message-ID: <address@hidden>
Content-Type: text/plain; charset=windows-1252

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
much they share. I do know 6LoWPAN makes heavy use of 802.15.4
addressing, so I don't bet changes would be trivial.

As of now we are unable to get a clear picture of how the packet flow from Application to RF device/driver goes? Reason: we don't have a 6lowpan integrated lwip code along with a test case/app. It would be really helpful if you could send/share with us your basic software stack in which an application level payload goes through LWIP + 6LowPAN+MAC /PHY Radio layer. We can then migrate it to our radio device which can be a Bluetooth/ZigBee device.

If you would like to open a thread on the users list (lwip-users at
nongnu.org), we can have a conversation on this very subject and the
rest of the lwIP usage guidelines there. (I would jump in tomorrow)

Regards



reply via email to

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