[Linux-zigbee-devel] What hardware are folks here using to test 6Lowpan on Linux ?

2013-12-17 Thread Randy Graham
Hello, I am curious to know what hardware folks here are using for 6lowpan, would you mind sharing ? I am trying to get a beaglebone with a mrf24j40 radio up and running with 6Lowpan and am having some difficulties. Has anyone got this hardware combination to work with a recent kernel ? I have

[Linux-zigbee-devel] [PATCH v3 bluetooth-next 0/8] 6lowpan: udp compression/uncompression fix

2013-12-17 Thread Alexander Aring
The current 6LoWPAN udp compression/uncompression is completely broken. This patch series fix a lot of udp compression/uncompression issues and add support parsing with lowpan_fetch_skb/lowpan_push_hc_data functions. I tested it in all cases of compressions in wireshark and a contiki sensornode.

[Linux-zigbee-devel] [PATCH v3 bluetooth-next 1/8] 6lowpan: introduce lowpan_push_hc_data function

2013-12-17 Thread Alexander Aring
This patch introduce the lowpan_push_hc_data function to set data in the iphc buffer. It's a common case to set data and increase the buffer pointer. This helper function can be used many times in header_compress function to generate the iphc header. Signed-off-by: Alexander Aring --- net/ieee8

[Linux-zigbee-devel] [PATCH v3 bluetooth-next 7/8] 6lowpan: udp use subtraction on both conditions

2013-12-17 Thread Alexander Aring
Cleanup code to handle both calculation in the same way. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan_iphc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan_iphc.c b/net/ieee802154/6lowpan_iphc.c index 8857285..b298bfc 100644 --- a/net/ieee

[Linux-zigbee-devel] [PATCH v3 bluetooth-next 4/8] 6lowpan: fix udp byte ordering

2013-12-17 Thread Alexander Aring
The incoming udp header in lowpan_compress_udp_header function is already in network byte order. Everytime we read this values for source and destination port we need to convert this value to host byte order. In the outcoming header we need to set this value in network byte order which the upcomi

[Linux-zigbee-devel] [PATCH v3 bluetooth-next 6/8] 6lowpan: udp use lowpan_fetch_skb function

2013-12-17 Thread Alexander Aring
Cleanup the lowpan_uncompress_udp_header function to use the lowpan_fetch_skb function. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan_iphc.c | 37 ++--- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/net/ieee802154/6lowpan_iphc.c b/net

[Linux-zigbee-devel] [PATCH v3 bluetooth-next 8/8] 6lowpan: cleanup udp compress function

2013-12-17 Thread Alexander Aring
This patch remove unnecessary casts and brackets in compress_udp_header function. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan_iphc.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/net/ieee802154/6lowpan_iphc.c b/net/ieee802154/6lowpan_iphc

[Linux-zigbee-devel] [PATCH v3 bluetooth-next 5/8] 6lowpan: add udp warning for elided checksum

2013-12-17 Thread Alexander Aring
Bit 5 of "UDP LOWPAN_NHC Format" indicate that the checksum can be elided. The host need to calculate the udp checksum afterwards but this isn't supported right now. See: http://tools.ietf.org/html/rfc6282#section-4.3.3 Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.h | 1 + net

[Linux-zigbee-devel] [PATCH v3 bluetooth-next 3/8] 6lowpan: fix udp compress ordering

2013-12-17 Thread Alexander Aring
In case ((ntohs(uh->source) & LOWPAN_NHC_UDP_8BIT_MASK) the order of uncompression is wrong. It's always first source port then destination port as second. See: http://tools.ietf.org/html/rfc6282#section-4.3.3 "Fields carried in-line (in part or in whole) appear in the same order as they do in th

[Linux-zigbee-devel] [PATCH v3 bluetooth-next 2/8] 6lowpan: udp use lowpan_push_hc_data function

2013-12-17 Thread Alexander Aring
This patch uses the lowpan_push_hc_data to generate iphc header. The current implementation has some wrong pointer arithmetic issues and works in a random case only. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan_iphc.c | 37 - 1 file changed, 20 i

Re: [Linux-zigbee-devel] [PATCH v2 bluetooth-next 1/7] 6lowpan: fix udp nullpointer dereferencing

2013-12-17 Thread Alexander Aring
On Tue, Dec 17, 2013 at 12:06:01PM +0100, Alexander Aring wrote: > On Tue, Dec 17, 2013 at 06:58:12AM -0400, Anderson Lizardo wrote: > > Hi Alexander, > > > > On Tue, Dec 17, 2013 at 6:32 AM, Alexander Aring > > wrote: > > > Sometimes a nullpointer dereferencing occurs because of using a wrong >

Re: [Linux-zigbee-devel] [PATCH v2 bluetooth-next 1/7] 6lowpan: fix udp nullpointer dereferencing

2013-12-17 Thread Alexander Aring
On Tue, Dec 17, 2013 at 06:58:12AM -0400, Anderson Lizardo wrote: > Hi Alexander, > > On Tue, Dec 17, 2013 at 6:32 AM, Alexander Aring wrote: > > Sometimes a nullpointer dereferencing occurs because of using a wrong > > pointer arithmetic in udp_uncompression. > > > > This patch changes "**(hc06_

[Linux-zigbee-devel] [PATCH v2 bluetooth-next 4/7] 6lowpan: add udp warning for elided checksum

2013-12-17 Thread Alexander Aring
Bit 5 of "UDP LOWPAN_NHC Format" indicate that the checksum can be elided. The host need to calculate the udp checksum afterwards but this isn't supported right now. See: http://tools.ietf.org/html/rfc6282#section-4.3.3 Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan.h | 1 + net

[Linux-zigbee-devel] [PATCH v2 bluetooth-next 6/7] 6lowpan: udp use subtraction on both conditions

2013-12-17 Thread Alexander Aring
Cleanup code to handle both calculation in the same way. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan_iphc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan_iphc.c b/net/ieee802154/6lowpan_iphc.c index ee6891f..d49cc1b 100644 --- a/net/ieee

[Linux-zigbee-devel] [PATCH v2 bluetooth-next 2/7] 6lowpan: fix udp compress ordering

2013-12-17 Thread Alexander Aring
In case ((ntohs(uh->source) & LOWPAN_NHC_UDP_8BIT_MASK) the order of uncompression is wrong. It's always first source port then destination port as second. See: http://tools.ietf.org/html/rfc6282#section-4.3.3 "Fields carried in-line (in part or in whole) appear in the same order as they do in th

[Linux-zigbee-devel] [PATCH v2 bluetooth-next 7/7] 6lowpan: cleanup udp compress function

2013-12-17 Thread Alexander Aring
This patch remove unnecessary casts and brackets in compress_udp_header function. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan_iphc.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/net/ieee802154/6lowpan_iphc.c b/net/ieee802154/6lowpan_iphc.c index

[Linux-zigbee-devel] [PATCH v2 bluetooth-next 3/7] 6lowpan: fix udp byte ordering

2013-12-17 Thread Alexander Aring
The incoming udp header in lowpan_compress_udp_header function is already in network byte order. Everytime we read this values for source and destination port we need to convert this value to host byte order. In the outcoming header we need to set this value in network byte order which the upcomi

[Linux-zigbee-devel] [PATCH v2 bluetooth-next 5/7] 6lowpan: udp use lowpan_fetch_skb function

2013-12-17 Thread Alexander Aring
Cleanup the lowpan_uncompress_udp_header function to use the lowpan_fetch_skb function. Signed-off-by: Alexander Aring --- net/ieee802154/6lowpan_iphc.c | 37 ++--- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/net/ieee802154/6lowpan_iphc.c b/net

[Linux-zigbee-devel] [PATCH v2 bluetooth-next 1/7] 6lowpan: fix udp nullpointer dereferencing

2013-12-17 Thread Alexander Aring
Sometimes a nullpointer dereferencing occurs because of using a wrong pointer arithmetic in udp_uncompression. This patch changes "**(hc06_ptr + 3)" to the right one "*(*hc06_ptr + 3)". Dereferencing like "**(hc06_ptr + 3)" works in a random case only. Signed-off-by: Alexander Aring --- net/iee

[Linux-zigbee-devel] [PATCH v2 bluetooth-next 0/7] 6lowpan: udp compression/uncompression fix

2013-12-17 Thread Alexander Aring
The current 6LoWPAN udp compression/uncompression is completely broken. This patch series fix a lot of udp compression/uncompression issues and add support parsing with lowpan_fetch_skb function. I already sent this patch series to netdev some time ago. That's why I add a v2 to this series. Now we