[Linux-zigbee-devel] Load mrf24j40 on beaglebone

2013-03-25 Thread João Paulo Bodanese
Hi Alan, I am starting this new thread to do not disturb that one from the compilation error. I'm following the steps you told me to load the MRF24J40. After board power up, I am getting problem below when running the command: echo BB-BONE-MRF24J40 >/sys/devices/bone_capemgr.7/slots [ 30.1434

Re: [Linux-zigbee-devel] [PATCH] drivers/ieee802154/at86rf230: Add Automatic retransmit form the extended mode

2013-03-25 Thread Alexander Aring
Hi, On Mon, Mar 25, 2013 at 03:31:04AM -0300, Werner Almesberger wrote: > Alexander Aring wrote: > > I work on the atusb driver too and make some change on this driver. > > Oh dear, another one ! This must be the device with the largest > choice of drivers per user :-) > > > I tried to understan

Re: [Linux-zigbee-devel] Load mrf24j40 on beaglebone

2013-03-25 Thread Alan Ott
On 03/25/2013 04:48 AM, João Paulo Bodanese wrote: > Hi Alan, > > I am starting this new thread to do not disturb that one from the > compilation error. > > I'm following the steps you told me to load the MRF24J40. > > After board power up, I am getting problem below when running the > command: ech

Re: [Linux-zigbee-devel] [PATCH] drivers/ieee802154/at86rf230: Add Automatic retransmit form the extended mode

2013-03-25 Thread Stefan Schmidt
Hello. On Mon, 2013-03-25 at 03:50, Werner Almesberger wrote: > Stefan Schmidt wrote: > > Which means the firmware side would be already usable even if not > > finished? Seems I need to compile the newest firmware. :) > > You can see it being used by the user-space tools. E.g., > ben-wpan/tools/a

Re: [Linux-zigbee-devel] [PATCH] drivers/ieee802154/at86rf230: Add Automatic retransmit form the extended mode

2013-03-25 Thread Stefan Schmidt
Hello. On Mon, 2013-03-25 at 10:30, Alexander Aring wrote: > On Mon, Mar 25, 2013 at 03:31:04AM -0300, Werner Almesberger wrote: > > Alexander Aring wrote: > > > > Hmm, but your driver still has the fundamental problem of tx/rx > > doing all these USB transfers that get paced at one per USB frame

Re: [Linux-zigbee-devel] Install linux-zigbee tools in the Beaglebone

2013-03-25 Thread K F
Hi Alan, I'm using bash shell as well. My automake is version 1.11.6. Autoconf is 2.69. Using: PKG_CONFIG_DIR= \ PKG_CONFIG_LIBDIR=$STAGING/lib/pkgconfig:$STAGING/share/pkgconfig \ PKG_CONFIG_SYSROOT_DIR=$STAGING DESTDIR=$STAGING \ pkg-config libnl-genl-3.0 --cflags --libs I get: -I /home/sha

Re: [Linux-zigbee-devel] Source address fix and at86rf230 address filter callback

2013-03-25 Thread Stefan Schmidt
Hello. On Sun, 2013-03-24 at 20:25, Alan Ott wrote: > On 03/24/2013 09:40 AM, Stefan Schmidt wrote: > > As promised here is the reworked patch to add the hardware address filter > > callback for at86rf230. I added two more patches that might be good to go > > in as > > well. > > > > I did not add

Re: [Linux-zigbee-devel] [PATCH 2/3] ieee802154/at86rf230: Implement hardware address filter callback.

2013-03-25 Thread Stefan Schmidt
Hello. On Sun, 2013-03-24 at 20:19, Alan Ott wrote: > On 03/24/2013 09:40 AM, Stefan Schmidt wrote: > > Implement the filter function to update short address, pan id and ieee > > address on change. Allowing for hardware address filtering needed for > > auto ACK. > > > > Signed-off-by: Stefan Schmi

Re: [Linux-zigbee-devel] Install linux-zigbee tools in the Beaglebone

2013-03-25 Thread Alan Ott
On 03/25/2013 02:50 PM, K F wrote: > I'm using bash shell as well. > > My automake is version 1.11.6. > Autoconf is 2.69. Mine are very close to that 1.11.1 and 2.69. > > Using: > PKG_CONFIG_DIR= \ > PKG_CONFIG_LIBDIR=$STAGING/lib/pkgconfig:$STAGING/share/pkgconfig \ > PKG_CONFIG_SYSROOT_DIR

Re: [Linux-zigbee-devel] Install linux-zigbee tools in the Beaglebone

2013-03-25 Thread K F
I also had another issue when patching the kernel. I already had a recent kernel for the Bbone (3.8.4-bone9), which I got following this procedure (which includes very helpful scripts): http://www.eewiki.net/display/linuxonarm/BeagleBone?focusedCommentId=13140246#BeagleBone-LinuxKernel Since the

Re: [Linux-zigbee-devel] Source address fix and at86rf230 address filter callback

2013-03-25 Thread Alan Ott
On 03/25/2013 02:51 PM, Stefan Schmidt wrote: > On Sun, 2013-03-24 at 20:25, Alan Ott wrote: >> On 03/24/2013 09:40 AM, Stefan Schmidt wrote: >>> As promised here is the reworked patch to add the hardware address filter >>> callback for at86rf230. I added two more patches that might be good to go

Re: [Linux-zigbee-devel] Install linux-zigbee tools in the Beaglebone

2013-03-25 Thread Alan Ott
On 03/25/2013 03:12 PM, K F wrote: > I also had another issue when patching the kernel. > > I already had a recent kernel for the Bbone (3.8.4-bone9), which I got > following this procedure (which includes very helpful scripts): > http://www.eewiki.net/display/linuxonarm/BeagleBone?focusedComment

Re: [Linux-zigbee-devel] [PATCH 2/3] ieee802154/at86rf230: Implement hardware address filter callback.

2013-03-25 Thread Alan Ott
On 03/25/2013 02:56 PM, Stefan Schmidt wrote: > On Sun, 2013-03-24 at 20:19, Alan Ott wrote: >> Some of those lines break the 80 column rule. You might get away with >> it. It's up to you if you want to try. > If the rule of thumb has not changed lately it depends on how ugly the > code would look

Re: [Linux-zigbee-devel] Source address fix and at86rf230 address filter callback

2013-03-25 Thread Stefan Schmidt
Hello. On Mon, 2013-03-25 at 15:18, Alan Ott wrote: > On 03/25/2013 02:51 PM, Stefan Schmidt wrote: > > On Sun, 2013-03-24 at 20:25, Alan Ott wrote: > >> On 03/24/2013 09:40 AM, Stefan Schmidt wrote: > >>> As promised here is the reworked patch to add the hardware address filter > >>> callback for

Re: [Linux-zigbee-devel] [PATCH] drivers/ieee802154/at86rf230: Add Automatic retransmit form the extended mode

2013-03-25 Thread Alexander Aring
Hi, On Mon, Mar 25, 2013 at 06:47:34PM +, Stefan Schmidt wrote: > Hello. > > On Mon, 2013-03-25 at 10:30, Alexander Aring wrote: > > On Mon, Mar 25, 2013 at 03:31:04AM -0300, Werner Almesberger wrote: > > > Alexander Aring wrote: > > > > > > Hmm, but your driver still has the fundamental pro

Re: [Linux-zigbee-devel] [PATCH 2/3] ieee802154/at86rf230: Implement hardware address filter callback.

2013-03-25 Thread Werner Almesberger
Stefan Schmidt wrote: > I think the MSB and LSB comments can go easily. As another step towards reaching the 80 columns goal, you could also consider getting rid of the & 0xff maskings. As far as I can tell, they don't help to avoid W=3 warnings (i.e., -Wconversion; you'd have to cast for that),

Re: [Linux-zigbee-devel] [PATCH 2/3] ieee802154/at86rf230: Implement hardware address filter callback.

2013-03-25 Thread Alexander Aring
Hi, On Mon, Mar 25, 2013 at 11:31:11PM +0100, Alexander Aring wrote: > Hi, > > On Sun, Mar 24, 2013 at 01:40:31PM +, Stefan Schmidt wrote: > > Implement the filter function to update short address, pan id and ieee > > address on change. Allowing for hardware address filtering needed for > > a

Re: [Linux-zigbee-devel] [PATCH 2/3] ieee802154/at86rf230: Implement hardware address filter callback.

2013-03-25 Thread Alexander Aring
Hi, On Sun, Mar 24, 2013 at 01:40:31PM +, Stefan Schmidt wrote: > Implement the filter function to update short address, pan id and ieee > address on change. Allowing for hardware address filtering needed for > auto ACK. > > Signed-off-by: Stefan Schmidt > --- > drivers/net/ieee802154/at86r

Re: [Linux-zigbee-devel] Install linux-zigbee tools in the Beaglebone

2013-03-25 Thread Alan Ott
On 03/25/2013 04:16 PM, K F wrote: > I did echo $STAGING and re-checked the pkconfig files again, and they > all seemed OK. > I thought I was going crazy or something, so I deleted all files (I > mean everything, even source files) and started over. > Same behaviour. > Ok, interesting. Try it ag

[Linux-zigbee-devel] Install linux-zigbee tools in the Beaglebone

2013-03-25 Thread K F
I'm baffled. I did echo $STAGING and re-checked the pkconfig files again, and they all seemed OK. I thought I was going crazy or something, so I deleted all files (I mean everything, even source files) and started over. Same behaviour. I'm also sending a screenshot, because I know it's hard to be

Re: [Linux-zigbee-devel] Install linux-zigbee tools in the Beaglebone

2013-03-25 Thread João Paulo Bodanese
Take a look if you are using the last 3.8 kernel from https://github.com/beagleboard/kernel. There is a patch after March, 6th (commit 9bf23ea262), that removes the symbol spi1_pins_s0 from am335x-bone-common.dtsi that is required to run the command "echo BB-BONE-MRF24J40 >/sys/devices/bone_capemgr

[Linux-zigbee-devel] [PATCH v2 net-next 01/12] 6lowpan: lowpan_is_iid_16_bit_compressable() does not detect compressible address correctly

2013-03-25 Thread Tony Cheneau
The current test is not RFC6282 compliant. The same issue has been found and fixed in Contiki. This patch is basically a port of their fix. Signed-off-by: Tony Cheneau --- net/ieee802154/6lowpan.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/6lowpan.h

[Linux-zigbee-devel] [PATCH v2 net-next 00/12] 6lowpan: Some more bug fixes

2013-03-25 Thread Tony Cheneau
Hello, This patchset fixes serious bugs within the 6LoWPAN modules. I wrote a script (available at [1]) to prove the issues are real. One can try and see that without these patches, most of the test fail (e.g. packet dropped by the receiver or node crashing). With all patches applied, all tests s

[Linux-zigbee-devel] [PATCH v2 net-next 03/12] 6lowpan: always enable link-layer acknowledgments

2013-03-25 Thread Tony Cheneau
This feature is especially important when using fragmentation, because the reassembly mechanism cannot recover from the loss of a fragment. Note that some hardware ignore this flag and not will not transmit acknowledgments even if this is set. Signed-off-by: Tony Cheneau --- net/ieee802154/6low

[Linux-zigbee-devel] [PATCH v2 net-next 02/12] 6lowpan: next header is not properly set upon decompression of a UDP header.

2013-03-25 Thread Tony Cheneau
This causes a drop of the UDP packet. Signed-off-by: Tony Cheneau --- net/ieee802154/6lowpan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 43b95ca..9f53904 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802

[Linux-zigbee-devel] [PATCH v2 net-next 05/12] 6lowpan: use short IEEE 802.15.4 addresses for broadcast destination

2013-03-25 Thread Tony Cheneau
The IEEE 802.15.4 standard uses the 0x short address (2 bytes) for message broadcasting. Signed-off-by: Tony Cheneau --- net/ieee802154/6lowpan.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c i

[Linux-zigbee-devel] [PATCH v2 net-next 04/12] mac802154: turn on ACK when enabled by the upper layers

2013-03-25 Thread Tony Cheneau
Signed-off-by: Tony Cheneau --- net/mac802154/wpan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mac802154/wpan.c b/net/mac802154/wpan.c index d20c6d3..7d3f659 100644 --- a/net/mac802154/wpan.c +++ b/net/mac802154/wpan.c @@ -145,6 +145,8 @@ static int mac802154_header_create(struct

[Linux-zigbee-devel] [PATCH v2 net-next 07/12] 6lowpan: add debug messages for 6LoWPAN fragmentation

2013-03-25 Thread Tony Cheneau
Add pr_debug() call in order to debug 6LoWPAN fragmentation and reassembly. Signed-off-by: Tony Cheneau --- net/ieee802154/6lowpan.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 4a62289..6

[Linux-zigbee-devel] [PATCH v2 net-next 06/12] 6lowpan: fix first fragment (FRAG1) handling

2013-03-25 Thread Tony Cheneau
The first fragment, FRAG1, must contain some payload according to the specs. However, as it is currently written, the first fragment will remain empty and only contain the 6lowpan headers. This patch also extracts the transport layer information from the first fragment. This information is used la

[Linux-zigbee-devel] [PATCH v2 net-next 08/12] 6lowpan: store fragment tag values per device instead of net stack wide

2013-03-25 Thread Tony Cheneau
Signed-off-by: Tony Cheneau --- net/ieee802154/6lowpan.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index 61eee9d..f952451 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -104,6 +104,7 @@

[Linux-zigbee-devel] [PATCH v2 net-next 09/12] mac802154: add mac802154_dev_get_dsn()

2013-03-25 Thread Tony Cheneau
Bring-over mac802154_dev_get_dsn() function that was present in the Linux ZigBee kernel. This function is called by the 6LoWPAN code in order to properly set the DSN (Data Sequence Number) value in the IEEE 802.15.4 frame. Signed-off-by: Tony Cheneau --- net/mac802154/mac802154.h | 1 + net/mac8

[Linux-zigbee-devel] [PATCH v2 net-next 10/12] 6lowpan: obtain IEEE802.15.4 sequence number from the MAC layer

2013-03-25 Thread Tony Cheneau
Sets the sequence number in the frame format. Without this fix, the sequence number is always set to 0. This makes trafic analysis very hard. Signed-off-by: Tony Cheneau --- net/ieee802154/6lowpan.c | 8 1 file changed, 8 insertions(+) diff --git a/net/ieee802154/6lowpan.c b/net/ieee80

[Linux-zigbee-devel] [PATCH v2 net-next 11/12] 6lowpan: use the PANID provided by the device instead of a static value

2013-03-25 Thread Tony Cheneau
Signed-off-by: Tony Cheneau --- net/ieee802154/6lowpan.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c index d1d4ee6..276971b 100644 --- a/net/ieee802154/6lowpan.c +++ b/net/ieee802154/6lowpan.c @@ -577,10 +577,12 @@

[Linux-zigbee-devel] [PATCH v2 net-next 12/12] 6lowpan: modify udp compression/uncompression to match the standard

2013-03-25 Thread Tony Cheneau
The previous code would just compress the UDP header and send the compressed UDP header along with the uncompressed one. Signed-off-by: Tony Cheneau --- net/ieee802154/6lowpan.c | 39 --- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/net/ieee8