Hi Christian,

I had the exact same problem before. Currently, the net-next kernel
does not fill struct ieee802154_mlme_ops mac802154_mlme_wpan completely
(in net/mac802154/mac_cmd.c). The current code does not set the
assoc_req member to a function (hence, it remains NULL). When trying to
send association request (and I believe association response), it
produces a NULL pointer dereference.

You may work around this problem, like I did, by not using iz assoc to
build your kernel. You can use exclusively izcoordinator instead (which
make no use of the association messages). Here is how I set up my
network on two different nodes:
- on node 1:
izcoordinator -d 1 -l lease -i wpan0 -p 0x777 -s 1 -c 11
[... 6lowpan stuffs ...]
- on node 2:
izcoordinator -d 1 -l lease -i wpan0 -p 0x777 -s 2 -c 11
[... 6lowpan stuffs ...]

The documentation you pointed out works for the linux-zibgee and may
not apply entirely to the linux net-next (yet). You may want to have a
look at [1], which is more recent (see how it carefully not use iz
assoc).

Hope it helps.

Regards,
        Tony

[1]: https://code.google.com/p/linux-wsn/wiki/LinuxStart

Le Fri, 27 Jul 2012 13:26:43 +0200,
Christian Groeger <kann.b...@gmail.com> a écrit :

> Hi everyone,
> 
> what do I need to do to get the IEEE802.15.4 and 6LoWPAN stack
> working on my computer? I built the net-next kernel [1] with all the
> drivers compiled as modules and the linux-zigbee userspace tools [2].
> Everything compiles without errors.
> 
> Then I more or less follow the Getting started guide in your wiki
> [3], I use the fakelb driver for testing. Everything seems to work
> fine, I bring up my wpan0 interface and see a "ieee802154fakelb:
> added ieee802154 hardware" in the kernel log.
> 
> Then I try an 'iz assoc', which is killed immediately and I get a
> kernel oops in the kernel logfile (see below for logfile).
> 
> Can anyone help get this working?
> 
> Thanks.
> 
> [1]
> http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git;a=tree
> [2]
> http://linux-zigbee.git.sourceforge.net/git/gitweb.cgi?p=linux-zigbee/linux-zigbee;a=summary
> [3]
> http://sourceforge.net/apps/trac/linux-zigbee/wiki/GettingStarted-0.2
> 
> 
> 
> [  199.830666] BUG: unable to handle kernel NULL pointer dereference
> at           (null)
> [  199.830677] IP: [<          (null)>]           (null)
> [  199.830686] PGD 1d2cb067 PUD 1d3cc067 PMD 0
> [  199.830691] Oops: 0010 [#1] SMP
> [  199.830695] Modules linked in: fakelb mac802154 ieee802154
> crc_ccitt joydev ppdev microcode snd_intel8x0 psmouse snd_ac97_codec
> ac97_bus serio_raw snd_pcm hid_generic i2c_piix4 snd_timer parport_pc
> snd soundcore mac_hid snd_page_alloc lp parport usbhid hid e1000
> [  199.830719] CPU 0
> [  199.830724] Pid: 1162, comm: iz Not tainted
> 3.5.0-net-next-next-20120726+ #3 innotek GmbH VirtualBox
> [  199.830729] RIP: 0010:[<0000000000000000>]  [<
> (null)>]           (null)
> [  199.830733] RSP: 0018:ffff88001d2579b0  EFLAGS: 00010246
> [  199.830736] RAX: ffffffffa0138000 RBX: ffff88001c2c5000 RCX:
> 0000000000000000
> [  199.830739] RDX: 000000000000000b RSI: ffff88001d2579c0 RDI:
> ffff88001c2c5000
> [  199.830743] RBP: ffff88001d2579f8 R08: 000000000000008a R09:
> ffff88001d25798f
> [  199.830746] R10: 0000000000000000 R11: 0000000000000246 R12:
> ffff88001d2579c0
> [  199.830749] R13: ffff88001d257a18 R14: ffff88001cc23e00 R15:
> ffffffff81caa6c0
> [  199.830758] FS:  00007fd84e5e5700(0000) GS:ffff88001fc00000(0000)
> knlGS:0000000000000000
> [  199.830763] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [  199.830766] CR2: 0000000000000000 CR3: 000000001d5b7000 CR4:
> 00000000000006f0
> [  199.830775] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000
> [  199.830779] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
> 0000000000000400
> [  199.830783] Process iz (pid: 1162, threadinfo ffff88001d256000,
> task ffff88001d3d5b40)
> [  199.830787] Stack:
> [  199.830789]  ffffffffa0128648 ffff88001d2579c8 0001077700000002
> ffff88001d2579e8
> [  199.830795]  0000000042cd25bf ffffffffa012c000 ffffffffa012c100
> ffffffffa012c000
> [  199.830800]  ffff88001f20b414 ffff88001d257aa8 ffffffff815822da
> ffff880000000014
> [  199.830806] Call Trace:
> [  199.830814]  [<ffffffffa0128648>] ?
> ieee802154_associate_req+0xd8/0x150 [ieee802154]
> [  199.830823]  [<ffffffff815822da>] genl_rcv_msg+0x21a/0x2b0
> [  199.830828]  [<ffffffff8154cbab>] ? __alloc_skb+0x8b/0x2a0
> [  199.830833]  [<ffffffff815820c0>] ? genl_rcv+0x40/0x40
> [  199.830838]  [<ffffffff81581a99>] netlink_rcv_skb+0xa9/0xd0
> [  199.830842]  [<ffffffff815820a5>] genl_rcv+0x25/0x40
> [  199.830846]  [<ffffffff8158147d>] netlink_unicast+0x1ad/0x230
> [  199.830851]  [<ffffffff815817b6>] netlink_sendmsg+0x2b6/0x310
> [  199.830856]  [<ffffffff8154034c>] sock_sendmsg+0xdc/0xf0
> [  199.830861]  [<ffffffff81542b9a>] ? move_addr_to_kernel+0x5a/0xa0
> [  199.830865]  [<ffffffff81541c8c>] __sys_sendmsg+0x38c/0x3a0
> [  199.830871]  [<ffffffff8114b2c9>] ? handle_mm_fault+0x259/0x340
> [  199.830877]  [<ffffffff8113d7eb>] ? krealloc+0x1b/0x60
> [  199.830883]  [<ffffffff81667540>] ? do_page_fault+0x210/0x520
> [  199.830888]  [<ffffffff81082903>] ? __wake_up+0x53/0x70
> [  199.830893]  [<ffffffff81543ad9>] sys_sendmsg+0x49/0x90
> [  199.830898]  [<ffffffff8166bb69>] system_call_fastpath+0x16/0x1b
> [  199.830901] Code:  Bad RIP value.
> [  199.830919] RIP  [<          (null)>]           (null)
> [  199.830923]  RSP <ffff88001d2579b0>
> [  199.830926] CR2: 0000000000000000
> [  199.830930] ---[ end trace 2d2a3541563f58e9 ]---

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to