I'm trying to use 6lowpan between two avr32 boards. On each board there
are two at86rf231 sharing one IRQ.
I have patched at86rf230 and mac802154 into the mainline kernel 3.3.1.
The board setup code is the following:
static struct at86rf230_platform_data at86rf230_info_a =
{
.rstn = -1,
.slp_tr = GPIO_PIN_PB(10),
.dig2 = -1,
.reset = NULL,
.reset_data = NULL,
};
static struct at86rf230_platform_data at86rf230_info_b =
{
.rstn = -1,
.slp_tr = GPIO_PIN_PB(11),
.dig2 = -1,
.reset = NULL,
.reset_data = NULL,
};
static struct spi_board_info spi0_board_info[] __initdata = {
{
.modalias = "at86rf230",
.max_speed_hz = 1000000,
.irq = AT32_EXTINT(1),
.chip_select = 2,
.mode = SPI_MODE_0,
.platform_data = &at86rf230_info_a,
},
{
.modalias = "at86rf230",
.max_speed_hz = 1000000,
.irq = AT32_EXTINT(1),
.chip_select = 1,
.mode = SPI_MODE_0,
.platform_data = &at86rf230_info_b,
}
};
static int __init lw_dimm_cpu_cb09_init(void)
{
.
.
at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info));
.
.
}
Following modules have been loaded:
~ # lsmod
Module Size Used by Tainted: G
6lowpan 8589 0
af_802154 6440 0
at86rf230 9083 0
mac802154 13803 1 at86rf230
ieee802154 10769 1 mac802154
mcp251x 6460 0
spidev 3231 0
spi_atmel 3601 0
macb
On both boards I use following sequence to start up 6lowpan:
~ # /usr/sbin/iz add wpan-phy0
Registered new device ('wpan0') on phy wpan-phy0
~ # /sbin/ip link set wpan0 address de:ad:be:af:ca:fe:ba:be (resp.
de:ad:be:af:ca:fe:ba:ce on the second board)
~ # /sbin/ifconfig wpan0 up
~ # /usr/sbin/iz assoc wpan0 777 1 14 short
Received short address 8001, status 00
~ # /sbin/ip link add link wpan0 name lowpan0 type lowpan
~ # /sbin/ifconfig lowpan0 up
~ # /sbin/ip -6 addr add 2001:0db8:0:f101::1/64 dev lowpan0 (resp.
2001:0db8:0:f101::2/64 on the second board)
Ping6 succeeds:
~ # ping6 2001:0db8:0:f101::2
PING 2001:0db8:0:f101::2 (2001:db8:0:f101::2): 56 data bytes
64 bytes from 2001:db8:0:f101::2: seq=0 ttl=64 time=117.366 ms
64 bytes from 2001:db8:0:f101::2: seq=1 ttl=64 time=72.838 ms
64 bytes from 2001:db8:0:f101::2: seq=2 ttl=64 time=67.647 ms
64 bytes from 2001:db8:0:f101::2: seq=3 ttl=64 time=57.074 ms
64 bytes from 2001:db8:0:f101::2: seq=4 ttl=64 time=54.589 ms
^C
--- 2001:0db8:0:f101::2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 54.589/73.902/117.366 ms
~ #
During transmitting udp packets (e.g. RFC868 time protocole via udp) the
receiving kernel freezes with following output:
Oops: Unhandled exception in kernel mode, sig: 7 [#1]
FRAME_POINTER chip: 0x01f:0x1e82 rev 2
Modules linked in: 6lowpan af_802154 at86rf230 mac802154 ieee802154
mcp251x spidev spi_atmel macb
PC is at lowpan_rcv+0x576/0x714 [6lowpan]
LR is at lowpan_rcv+0x576/0x714 [6lowpan]
pc : [<c08d97c2>] lr : [<c08d97c2>] Tainted: G W
<0>sp : 97c31e04 r12: 97e3623e r11: 97e3623e
r10: 00000008 r9 : 00000000 r8 : 97e3623a
r7 : 97c31e40 r6 : 000000f0 r5 : 97e36217 r4 : 00000000
r3 : 97e603c0 r2 : c08da4f0 r1 : c08da4e4 r0 : 0000007e
Flags: qvNzc
Mode bits: hjmde....g
CPU Mode: Supervisor
Process: kworker/u:0 [5] (task: 97c22b00 thread: 97c30000)
Stack: (0x97c31e04 to 0x97c32000)
1e00: 00000006 00000004 00000078 60000000 c08c1a40 20010db8
0000f101
1e20: 00000000 00000002 20010db8 0000f101 00000000 00000001 90270a4c
00400022
1e40: 90149dfc 97c31e6c c08ce184 902938a4 00000000 000000f6 97ded400
00000000
1e60: 9028e1ec 97e603c0 c08ce1a4 9014ab64 97c31e90 90289200 90289240
00000000
1e80: 00000000 00000001 ffff7d8a 9028e1ec 9014c866 97c31eb4 90289240
00000040
1ea0: 00000000 00000003 0000012c ffff7d8a 9028e1ec 90021644 97c31edc
00000100
1ec0: 97c30000 00000000 00000003 00000000 0000000c 9028e1ec 0000000a
9002184e
1ee0: 97c31f00 00400022 97ded760 00000000 c08b2588 97e60a80 97decd60
c08b255c
1f00: 9014c700 97c31f14 00000000 97ded760 00000000 c08b0dc4 97c31f2c
97e603c0
1f20: 97ded760 00000000 97ded760 c08b00c6 97c31f50 97e60a80 97decd60
00000000
1f40: 97c0e180 9028e7d0 97d86800 0000009a c08b00f8 97c31f64 97e204e0
00000000
1f60: 00000000 90029a80 97c31f80 97e204e4 00000000 00000000 c08b00e8
97d86805
1f80: 9002a5a8 97c31fa4 97c0e180 97c0e190 00000000 9028e7d0 97c0e190
9002ce18
1fa0: 97c25f3c 9002ce72 97c31fdc 97c25f3c 97c0e180 00000000 9002a4a8
9002018e
1fc0: 9002ce18 97c25f3c 00000000 97c0e180 00000000 97c31fd4 97c31fd4
9002018e
1fe0: 00000000 00000000 00000000 00000000 00000000 9002018e 9002ce18
97c25f3c
Call trace:
[<90149dfc>] __netif_receive_skb+0x2f4/0x350
[<9014ab64>] process_backlog+0x40/0xac
[<9014c866>] net_rx_action+0x2e/0xc8
[<90021644>] __do_softirq+0x54/0xbc
[<9002184e>] do_softirq+0x22/0x3c
[<9014c700>] netif_rx_ni+0x14/0x1c
[<c08b0dc4>] mac802154_wpans_rx+0x2b8/0x328 [mac802154]
[<c08b00c6>] mac802154_subif_rx+0x46/0x68 [mac802154]
[<c08b00f8>] mac802154_rx_worker+0x10/0x1c [mac802154]
[<90029a80>] process_one_work+0x134/0x212
[<9002a5a8>] worker_thread+0x100/0x1c4
[<9002ce72>] kthread+0x5a/0x68
[<9002018e>] do_exit+0x0/0x432
Disabling lock debugging due to kernel taint
Kernel panic - not syncing: Fatal exception in interrupt
On the transmitting board 'dmesg' shows the following:
~ # dmesg
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: (lowpan_header_create):
IPv6 header dump:
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: version = 6
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: length = 40
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: nexthdr = 0x3a
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: hop_lim = 255
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: (lowpan_header_create)
raw skb network header dump:
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: 00000000: 60 00
00 00 00 28 3a ff 20 01 0d b8 00 00 f1 01
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: 00000010: 00 00
00 00 00 00 00 02 ff 02 00 00 00 00 00 00
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: 00000020: 00 00
00 01 ff 00 00 01
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: (lowpan_header_create):
send the full source address
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: (lowpan_header_create):
destination address is multicast
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: compressed to 6 octets
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: (lowpan_header_create)
raw skb data dump:
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: 00000000: 7b 09
3a 20 01 0d b8 00 00 f1 01 00 00 00 00 00
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: 00000010: 00 00
02 02 01 ff 00 00 01 87 00 3c 1c 00 00 00
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: 00000020: 00 20
01 0d b8 00 00 f1 01 00 00 00 00 00 00 00
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: 00000030: 01 01
02 00 00 00 00 00 00 00 00 00 00 00 00 00
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: 00000040: 00
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: (lowpan_xmit): package xmit
Apr 11 15:13:10 Dimm-CPU-cb09 user.err kernel: at86rf230_xmit
Apr 11 15:13:10 Dimm-CPU-cb09 user.err kernel: at86rf230_state 4
Apr 11 15:13:10 Dimm-CPU-cb09 user.err kernel: at86rf230_state val1 = 6
Apr 11 15:13:10 Dimm-CPU-cb09 user.err kernel: at86rf230_state val2 = 9
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.2:
at86rf230_isr: IRQ!
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.1:
at86rf230_isr: IRQ!
Apr 11 15:13:10 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.2:
at86rf230_irqwork: IRQ status: 08
Apr 11 15:13:10 Dimm-CPU-cb09 user.err kernel: at86rf230_state 6
Apr 11 15:13:10 Dimm-CPU-cb09 user.err kernel: at86rf230_state val1 = 9
Apr 11 15:13:10 Dimm-CPU-cb09 user.err kernel: at86rf230_state val2 = 6
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.2:
at86rf230_isr: IRQ!
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.1:
at86rf230_isr: IRQ!
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.2:
at86rf230_irqwork: IRQ status: 04
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.2:
at86rf230_isr: IRQ!
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.1:
at86rf230_isr: IRQ!
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.2:
at86rf230_irqwork: IRQ status: 08
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: (lowpan_process_data)
raw skb data dump:
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000000: 7b 00
3a 20 01 0d b8 00 00 f1 01 00 00 00 00 00
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000010: 00 00
01 20 01 0d b8 00 00 f1 01 00 00 00 00 00
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000020: 00 00
02 88 00 b9 65 60 00 00 00 20 01 0d b8 00
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000030: 00 f1
01 00 00 00 00 00 00 00 01 02 02 00 00 00
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000040: 00 00
00 00 00 00 00 00 00 00 00
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel:
(lowpan_uncompress_addr): uncompressing 0 + 16 =>
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel:
(lowpan_uncompress_addr): uncompressing 0 + 16 =>
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: (lowpan_process_data)
raw header dump:
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000000: 60 00
00 00 00 28 3a ff 20 01 0d b8 00 00 f1 01
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000010: 00 00
00 00 00 00 00 01 20 01 0d b8 00 00 f1 01
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000020: 00 00
00 00 00 00 00 02
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: got frame, type 804,
dev 97e12000
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: ieee802154_rcv 88 00 b9
65 60 00 00 00 20 01 0d b8 00 00 f1 01 ...e`... .......
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: ieee802154_rcv 00 00 00
00 00 00 00 01 02 02 00 00 00 00 00 00 ................
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: ieee802154_rcv 00 00 00
00 00 00 00 00 ........
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: (lowpan_header_create):
IPv6 header dump:
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: version = 6
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000000: 60 00
00 00 00 1c 11 40 20 01 0d b8 00 00 f1 01
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000010: 00 00
00 00 00 00 00 02 20 01 0d b8 00 00 f1 01
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000020: 00 00
00 00 00 00 00 01
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: (lowpan_header_create):
send the full source address
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: (lowpan_header_create):
destination address is unicast:
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: using full address
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel:
(lowpan_compress_udp_header): UDP header compression
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel:
(lowpan_compress_udp_header): can't compress header
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: (lowpan_header_create)
raw skb data dump:
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000000: 7e 00
20 01 0d b8 00 00 f1 01 00 00 00 00 00 00
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000010: 00 02
20 01 0d b8 00 00 f1 01 00 00 00 00 00 00
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000020: 00 01
f0 84 d0 30 39 14 a9 84 d0 30 39 00 1c 14
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000030: a9 44
69 6d 6d 2d 43 50 55 2d 63 62 30 39 2e 6c
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: 00000040: 77 2e
6e 65 74
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: (lowpan_xmit): package xmit
Apr 11 15:13:11 Dimm-CPU-cb09 user.err kernel: at86rf230_xmit
Apr 11 15:13:11 Dimm-CPU-cb09 user.err kernel: at86rf230_state 4
Apr 11 15:13:11 Dimm-CPU-cb09 user.err kernel: at86rf230_state val1 = 6
Apr 11 15:13:11 Dimm-CPU-cb09 user.err kernel: at86rf230_state val2 = 9
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.2:
at86rf230_isr: IRQ!
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.1:
at86rf230_isr: IRQ!
Apr 11 15:13:11 Dimm-CPU-cb09 user.debug kernel: at86rf230 spi0.2:
at86rf230_irqwork: IRQ status: 08
Apr 11 15:13:11 Dimm-CPU-cb09 user.err kernel: at86rf230_state 6
Apr 11 15:13:11 Dimm-CPU-cb09 user.err kernel: at86rf230_state val1 = 9
Apr 11 15:13:11 Dimm-CPU-cb09 user.err kernel: at86rf230_state val2 = 6
Can anybody help me,please ?
--
Thomas Fechner
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Linux-zigbee-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel