All of lore.kernel.org
 help / color / mirror / Atom feed
* at86rf233 in Raspberry Pi 3
@ 2016-08-22  7:50 Tao Liu
  2016-08-22 14:11 ` smlng
  0 siblings, 1 reply; 8+ messages in thread
From: Tao Liu @ 2016-08-22  7:50 UTC (permalink / raw)
  To: linux-wpan

Dear list,

I am trying make at86rf233 radio from openlabs work with Raspberry Pi
3. I followed the guide here:
https://github.com/RIOT-OS/RIOT/wiki/How-to-install-6LoWPAN-Linux-Kernel-on-Raspberry-Pi,
but it seems do not work well in Raspberry Pi 3.

So far I can
- see "at86rf230 spi0.0: Detected at86rf233 chip version 1" in dmesg
- use iwpan command to list wpan0 interface and set pan_id/short_addr/etc.
- create 6LoWPAN interface
(http://wpan.cakelab.org/#_setup_a_6lowpan_test_network)

But I cannot ping other Raspberry using wpan-ping tool, and pinging
through 6LoWPAN interface also failed. Can anyone give me some
pointers about how to setup at86rf233 for Raspberry Pi 3?

Thanks in advance,
Tao

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: at86rf233 in Raspberry Pi 3
  2016-08-22  7:50 at86rf233 in Raspberry Pi 3 Tao Liu
@ 2016-08-22 14:11 ` smlng
  2016-08-22 15:30   ` Michael Richardson
  2016-08-22 21:34   ` Tao Liu
  0 siblings, 2 replies; 8+ messages in thread
From: smlng @ 2016-08-22 14:11 UTC (permalink / raw)
  To: Tao Liu; +Cc: linux-wpan

Hi Tao,

the RIOT-OS Wiki-Guide is rather outdated on this, please have look at [1] - this approach works for me and I heard from other, successfully using that one too.

Best,
  Sebastian 

[1]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support

> Am 22.08.2016 um 09:50 schrieb Tao Liu <liu3tao@gmail.com>:
> 
> Dear list,
> 
> I am trying make at86rf233 radio from openlabs work with Raspberry Pi
> 3. I followed the guide here:
> https://github.com/RIOT-OS/RIOT/wiki/How-to-install-6LoWPAN-Linux-Kernel-on-Raspberry-Pi,
> but it seems do not work well in Raspberry Pi 3.
> 
> So far I can
> - see "at86rf230 spi0.0: Detected at86rf233 chip version 1" in dmesg
> - use iwpan command to list wpan0 interface and set pan_id/short_addr/etc.
> - create 6LoWPAN interface
> (http://wpan.cakelab.org/#_setup_a_6lowpan_test_network)
> 
> But I cannot ping other Raspberry using wpan-ping tool, and pinging
> through 6LoWPAN interface also failed. Can anyone give me some
> pointers about how to setup at86rf233 for Raspberry Pi 3?
> 
> Thanks in advance,
> Tao
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: at86rf233 in Raspberry Pi 3
  2016-08-22 14:11 ` smlng
@ 2016-08-22 15:30   ` Michael Richardson
  2016-08-22 21:34   ` Tao Liu
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Richardson @ 2016-08-22 15:30 UTC (permalink / raw)
  To: smlng; +Cc: Tao Liu, linux-wpan

[-- Attachment #1: Type: text/plain, Size: 973 bytes --]


smlng <s@mlng.net> wrote:
    > the RIOT-OS Wiki-Guide is rather outdated on this, please have look at
    > [1] - this approach works for me and I heard from other, successfully
    > using that one too.

In my experience the most challenging part of this is getting the right
upstream RPI3 kernel things with and the right linux-bluetooth-next stuff.

On RPI2, everything is upstream, so the bt-next tree just works. That might
not be the case for RPI3... and I'd probably stick to 32-bit kernels/systems
for now, since I still see lots of 64-bit fixes going upstream.

I have two RPI2 unit working fine, but I traded my RPI3 for an RPI2, because
the serial console UART on the RPI3 is wonky. I believe that this is now fixed.


--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        | network architect  [
]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 464 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: at86rf233 in Raspberry Pi 3
  2016-08-22 14:11 ` smlng
  2016-08-22 15:30   ` Michael Richardson
@ 2016-08-22 21:34   ` Tao Liu
  2016-08-23  7:26     ` smlng
  1 sibling, 1 reply; 8+ messages in thread
From: Tao Liu @ 2016-08-22 21:34 UTC (permalink / raw)
  To: smlng; +Cc: linux-wpan

Hi Sebastian,

Thanks for the pointers. I followed the link [1] in your email, but
the at86rf233 does not show in the dmesg, and "iwpan list" command
outputs "nl802154 not found."

In the old (outdated) guide [2], I need to patch the device tree. Do I
need to do the same with the new guide?

[1]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support
[2]: https://github.com/RIOT-OS/RIOT/wiki/How-to-install-6LoWPAN-Linux-Kernel-on-Raspberry-Pi


Best Regards,
Tao

On Mon, Aug 22, 2016 at 7:11 AM, smlng <s@mlng.net> wrote:
> Hi Tao,
>
> the RIOT-OS Wiki-Guide is rather outdated on this, please have look at [1] - this approach works for me and I heard from other, successfully using that one too.
>
> Best,
>   Sebastian
>
> [1]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support
>
>> Am 22.08.2016 um 09:50 schrieb Tao Liu <liu3tao@gmail.com>:
>>
>> Dear list,
>>
>> I am trying make at86rf233 radio from openlabs work with Raspberry Pi
>> 3. I followed the guide here:
>> https://github.com/RIOT-OS/RIOT/wiki/How-to-install-6LoWPAN-Linux-Kernel-on-Raspberry-Pi,
>> but it seems do not work well in Raspberry Pi 3.
>>
>> So far I can
>> - see "at86rf230 spi0.0: Detected at86rf233 chip version 1" in dmesg
>> - use iwpan command to list wpan0 interface and set pan_id/short_addr/etc.
>> - create 6LoWPAN interface
>> (http://wpan.cakelab.org/#_setup_a_6lowpan_test_network)
>>
>> But I cannot ping other Raspberry using wpan-ping tool, and pinging
>> through 6LoWPAN interface also failed. Can anyone give me some
>> pointers about how to setup at86rf233 for Raspberry Pi 3?
>>
>> Thanks in advance,
>> Tao
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: at86rf233 in Raspberry Pi 3
  2016-08-22 21:34   ` Tao Liu
@ 2016-08-23  7:26     ` smlng
  2016-08-23 17:49       ` Tao Liu
       [not found]       ` <1472122778.2490.149.camel@newmarch.name>
  0 siblings, 2 replies; 8+ messages in thread
From: smlng @ 2016-08-23  7:26 UTC (permalink / raw)
  To: Tao Liu; +Cc: linux-wpan

Hi Tao,

you don't have to patch the device directly, I use DT overlays. The important steps (different from [2]) in my guide [1] are:

- use latest Raspbian image from [3], see also [4]
- deploy a custom Linux-Kernel using Raspi sources [5], see also [6]
- enable the transceiver using device tree overlays, see [7]

For details and trouble shooting, carefully read my guide top to bottom. 

If the at86rf233 doesn't show up, you likely missed to enable the overlay in '/boot/config.txt'. But for RPi3 you also have to build a custom Linux Kernel, because the default Raspbian-Kernel v4.4 has some issues - the device is visible but is not working correctly.

Anyway, I will have to setup some RPi3 for a project in the next days - I'll let you know if there is any trouble (and how to solve it).

Best,
  Sebastian

[3]: https://www.raspberrypi.org/downloads/raspbian/
[4]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support#2-prepare-raspbian-image
[5]: https://github.com/raspberrypi/linux
[6]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support#4-new-linux-kernels-for-the-pi
[7]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support#3-enable-support-for-ieee-802154lowpan-devices

> Am 22.08.2016 um 23:34 schrieb Tao Liu <liu3tao@gmail.com>:
> 
> Hi Sebastian,
> 
> Thanks for the pointers. I followed the link [1] in your email, but
> the at86rf233 does not show in the dmesg, and "iwpan list" command
> outputs "nl802154 not found."
> 
> In the old (outdated) guide [2], I need to patch the device tree. Do I
> need to do the same with the new guide?
> 
> [1]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support
> [2]: https://github.com/RIOT-OS/RIOT/wiki/How-to-install-6LoWPAN-Linux-Kernel-on-Raspberry-Pi
> 
> 
> Best Regards,
> Tao
> 
> On Mon, Aug 22, 2016 at 7:11 AM, smlng <s@mlng.net> wrote:
>> Hi Tao,
>> 
>> the RIOT-OS Wiki-Guide is rather outdated on this, please have look at [1] - this approach works for me and I heard from other, successfully using that one too.
>> 
>> Best,
>>  Sebastian
>> 
>> [1]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support
>> 
>>> Am 22.08.2016 um 09:50 schrieb Tao Liu <liu3tao@gmail.com>:
>>> 
>>> Dear list,
>>> 
>>> I am trying make at86rf233 radio from openlabs work with Raspberry Pi
>>> 3. I followed the guide here:
>>> https://github.com/RIOT-OS/RIOT/wiki/How-to-install-6LoWPAN-Linux-Kernel-on-Raspberry-Pi,
>>> but it seems do not work well in Raspberry Pi 3.
>>> 
>>> So far I can
>>> - see "at86rf230 spi0.0: Detected at86rf233 chip version 1" in dmesg
>>> - use iwpan command to list wpan0 interface and set pan_id/short_addr/etc.
>>> - create 6LoWPAN interface
>>> (http://wpan.cakelab.org/#_setup_a_6lowpan_test_network)
>>> 
>>> But I cannot ping other Raspberry using wpan-ping tool, and pinging
>>> through 6LoWPAN interface also failed. Can anyone give me some
>>> pointers about how to setup at86rf233 for Raspberry Pi 3?
>>> 
>>> Thanks in advance,
>>> Tao
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: at86rf233 in Raspberry Pi 3
  2016-08-23  7:26     ` smlng
@ 2016-08-23 17:49       ` Tao Liu
       [not found]       ` <1472122778.2490.149.camel@newmarch.name>
  1 sibling, 0 replies; 8+ messages in thread
From: Tao Liu @ 2016-08-23 17:49 UTC (permalink / raw)
  To: smlng; +Cc: linux-wpan

Hi Sebastian,

I am able to ping my node now -- thanks a lot for your help!

It turns out I didn't enable the transceiver in /boot/config.txt. I
jumped directly to building the new kernel, and skipped the part 3 of
your guide.

Thanks again for providing the wonderful guide!

Best,
Tao





On Tue, Aug 23, 2016 at 12:26 AM, smlng <s@mlng.net> wrote:
> Hi Tao,
>
> you don't have to patch the device directly, I use DT overlays. The important steps (different from [2]) in my guide [1] are:
>
> - use latest Raspbian image from [3], see also [4]
> - deploy a custom Linux-Kernel using Raspi sources [5], see also [6]
> - enable the transceiver using device tree overlays, see [7]
>
> For details and trouble shooting, carefully read my guide top to bottom.
>
> If the at86rf233 doesn't show up, you likely missed to enable the overlay in '/boot/config.txt'. But for RPi3 you also have to build a custom Linux Kernel, because the default Raspbian-Kernel v4.4 has some issues - the device is visible but is not working correctly.
>
> Anyway, I will have to setup some RPi3 for a project in the next days - I'll let you know if there is any trouble (and how to solve it).
>
> Best,
>   Sebastian
>
> [3]: https://www.raspberrypi.org/downloads/raspbian/
> [4]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support#2-prepare-raspbian-image
> [5]: https://github.com/raspberrypi/linux
> [6]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support#4-new-linux-kernels-for-the-pi
> [7]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support#3-enable-support-for-ieee-802154lowpan-devices
>
>> Am 22.08.2016 um 23:34 schrieb Tao Liu <liu3tao@gmail.com>:
>>
>> Hi Sebastian,
>>
>> Thanks for the pointers. I followed the link [1] in your email, but
>> the at86rf233 does not show in the dmesg, and "iwpan list" command
>> outputs "nl802154 not found."
>>
>> In the old (outdated) guide [2], I need to patch the device tree. Do I
>> need to do the same with the new guide?
>>
>> [1]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support
>> [2]: https://github.com/RIOT-OS/RIOT/wiki/How-to-install-6LoWPAN-Linux-Kernel-on-Raspberry-Pi
>>
>>
>> Best Regards,
>> Tao
>>
>> On Mon, Aug 22, 2016 at 7:11 AM, smlng <s@mlng.net> wrote:
>>> Hi Tao,
>>>
>>> the RIOT-OS Wiki-Guide is rather outdated on this, please have look at [1] - this approach works for me and I heard from other, successfully using that one too.
>>>
>>> Best,
>>>  Sebastian
>>>
>>> [1]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support
>>>
>>>> Am 22.08.2016 um 09:50 schrieb Tao Liu <liu3tao@gmail.com>:
>>>>
>>>> Dear list,
>>>>
>>>> I am trying make at86rf233 radio from openlabs work with Raspberry Pi
>>>> 3. I followed the guide here:
>>>> https://github.com/RIOT-OS/RIOT/wiki/How-to-install-6LoWPAN-Linux-Kernel-on-Raspberry-Pi,
>>>> but it seems do not work well in Raspberry Pi 3.
>>>>
>>>> So far I can
>>>> - see "at86rf230 spi0.0: Detected at86rf233 chip version 1" in dmesg
>>>> - use iwpan command to list wpan0 interface and set pan_id/short_addr/etc.
>>>> - create 6LoWPAN interface
>>>> (http://wpan.cakelab.org/#_setup_a_6lowpan_test_network)
>>>>
>>>> But I cannot ping other Raspberry using wpan-ping tool, and pinging
>>>> through 6LoWPAN interface also failed. Can anyone give me some
>>>> pointers about how to setup at86rf233 for Raspberry Pi 3?
>>>>
>>>> Thanks in advance,
>>>> Tao
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Fwd: Re: at86rf233 in Raspberry Pi 3]
       [not found]       ` <1472122778.2490.149.camel@newmarch.name>
@ 2016-08-25 11:10         ` Jan Newmarch
  2016-08-25 11:12         ` at86rf233 in Raspberry Pi 3 smlng
  1 sibling, 0 replies; 8+ messages in thread
From: Jan Newmarch @ 2016-08-25 11:10 UTC (permalink / raw)
  To: linux-wpan

Hi

I'm still struggling to get two RPi 2 B's to ping each other
with at86rf233 devices. I can see the devices. They can ping themselves
but they can't ping each other. According to wireshark and dmesg, lots
of malformed packets.

Details:

Used raspbian-lite: 2016--6-27-raspbian-jessie-lite
Upgraded using rpi-update

uname -a returns 
    Linux raspberrypi 4.4.18-v7+ #905 SMP Fri Aug 19 19:11:00 BST 2016
       armv7l GNU/Linux

For firmware, /opt/vc/bin/vcgencmd version returns
    Aug 19 2016 19:51:20 
    Copyright (c) 2012 Broadcom
    version 04cb74d9feb624e2463cde9db466bdce8b9799e9 (clean) (release)

Only change made to /boot/config.txt is to add
dtoverlay=at86rf233

dmesg has seen the device
[    7.597997] at86rf230 spi0.0: Detected at86rf233 chip version 1

Decompiling the device tree using  dtc -I fs /proc/device-tree &gt;
name.dts shows
at86rf233@0{
                                reg = <0x0>;
                                interrupts = &lt;0x17 0x4>;
                                compatible = "atmel,at86rf233";
                                sleep-gpio = &lt;0xb 0x19 0x1>;
                                xtal-trim = [0f];
                                spi-max-frequency = &lt;0x2dc6c0>;
                                reset-gpio = &lt;0xb 0x18 0x1>;
                                phandle = &lt;0x42>;
                                interrupt-parent = &lt;0xb>;
                        };
The SPI frequency is 0x2dc6c0 i.e. 3000000, the default

I setup openlabs  Raspberry Pi 802.15.4 radio using
    iwpan dev wpan0 set pan_id 0xbeef
    ip link add link wpan0 name lowpan0 type lowpan
    ifconfig wpan0 up
    ifconfig lowpan0 up

iz list shows the pan id is set
wpan0 (3)
    link: IEEE 802.15.4 MAC interface
    phy phy0
    hw 22:62:94:95:cd:2e:5a:3a pan 0xbeef short 0xffff

iwpan (v0.6) reports

$ ./iwpan list
wpan_phy phy0
supported channels:
	page 0: 11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 
current_page: 0
current_channel: 13,  2415 MHz
cca_mode: (1) Energy above threshold
cca_ed_level: -77
tx_power: 4
capabilities:
	iftypes: node,monitor 
	channels:
		page 0: 
			[11]  2405 MHz, [12]  2410 MHz, [13]  2415
MHz, 
			[14]  2420 MHz, [15]  2425 MHz, [16]  2430
MHz, 
			[17]  2435 MHz, [18]  2440 MHz, [19]  2445
MHz, 
			[20]  2450 MHz, [21]  2455 MHz, [22]  2460
MHz, 
			[23]  2465 MHz, [24]  2470 MHz, [25]  2475
MHz, 
			[26]  2480 MHz  
	tx_powers: 4,3.7,3.4,3,2.5,2,1,0,-1,-2,-3,-4,-6,-8,-12,-17 
	cca_ed_levels: -91,-89,-87,-85,-83,-81,-79,-77,-75,-73,-71,-
69,-67,-65,-63,-61 
	cca_modes: 
		(1) Energy above threshold
		(2) Carrier sense only
		(3, cca_opt: 0) Carrier sense with energy above
threshold (logical operator is 'and')
		(3, cca_opt: 1) Carrier sense with energy above
threshold (logical operator is 'or')
	min_be: 0,1,2,3,4,5,6,7,8 
	max_be: 3,4,5,6,7,8 
	csma_backoffs: 0,1,2,3,4,5 
	frame_retries: 0,1,2,3,4,5,6,7 
	lbt: false
Supported commands:
	* new_interface
	* del_interface
	* set_channel
	* set_pan_id
	* set_short_addr
	* set_backoff_exponent
	* set_max_csma_backoffs
	* set_max_frame_retries
	* set_lbt_mode
	* set_ackreq_default
	* set_tx_power
	* set_cca_ed_level
	* set_cca_mode

ifconfig on first RPi (second one not running yet) shows
lowpan0   Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-
00-00-00-00-00  
          inet6 addr: fe80::2062:9495:cd2e:5a3a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1280  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0 B)  TX bytes:3141 (3.0 KiB)

wpan0     Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-
00-00-00-00-00  
          UP BROADCAST RUNNING NOARP  MTU:123  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:300 
          RX bytes:0 (0.0 B)  TX bytes:3133 (3.0 KiB)
i.e. already transmitted from lowpan0 and wpan0 but nothing received
(no-one to receive from yet).

dmesg shows no errors.

Wireshark shows errors already [image removed for mailing list]
plus later errors.

Now I ping6 the local device
$ping6 fe80::2062:9495:cd2e:5a3a%lowpan0
PING fe80::2062:9495:cd2e:5a3a%lowpan0(fe80::2062:9495:cd2e:5a3a) 56
data bytes
64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=1 ttl=64 time=0.257
ms
64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=2 ttl=64 time=0.205
ms
64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=3 ttl=64 time=0.183
ms
64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=4 ttl=64 time=0.179
ms
64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=5 ttl=64 time=0.182
ms

dmesg reports no errors

Wireshark is happy

ifconfig reports more bytes sent, none received
lowpan0   Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-
00-00-00-00-00  
          inet6 addr: fe80::2062:9495:cd2e:5a3a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1280  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0 B)  TX bytes:3205 (3.1 KiB)

wpan0     Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-
00-00-00-00-00  
          UP BROADCAST RUNNING NOARP  MTU:123  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:300 
          RX bytes:0 (0.0 B)  TX bytes:3176 (3.1 KiB)


Now to add in the second RPi. After setting it up, ifconfig on the
second RPi shows
lowpan0   Link encap:UNSPEC  HWaddr 82-B7-04-8B-DB-57-9E-E1-00-00-00-
00-00-00-00-00  
          inet6 addr: fe80::80b7:48b:db57:9ee1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1280  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0 B)  TX bytes:3237 (3.1 KiB)

wpan0     Link encap:UNSPEC  HWaddr 82-B7-04-8B-DB-57-9E-E1-00-00-00-
00-00-00-00-00  
          UP BROADCAST RUNNING NOARP  MTU:123  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:300 
          RX bytes:0 (0.0 B)  TX bytes:3208 (3.1 KiB)

dmesg shows no errors

Wireshark shows errors on this second RPi [image removed for mailing
list]

On the first Rpi, wireshark shows NOTHING. On the other hand, dmesg on
the first RPi shows
[ 3197.970150] ieee802154: bad frame received (type = 0)
[ 3198.170317] ieee802154: bad frame received (type = 0)
[ 3198.680961] ieee802154: bad frame received (type = 0)
[ 3199.170489] ieee802154: bad frame received (type = 0)
[ 3199.173315] ieee802154: bad frame received (type = 0)
[ 3199.190078] ieee802154: bad frame received (type = 0)
[ 3199.307879] ieee802154: bad frame received (type = 0)
[ 3199.312959] ieee802154: bad frame received (type = 0)
[ 3199.318120] ieee802154: bad frame received (type = 0)
[ 3199.324555] ieee802154: bad frame received (type = 0)
[ 3199.555055] ieee802154: bad frame received (type = 0)

ifconfig on the first RPi now shows bytes received on wpan0 but not
making it up to lowpan0 
I guess those are the dmesg errors
> lowpan0   Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-
> 00-00-00-00-00  
>           inet6 addr: fe80::2062:9495:cd2e:5a3a/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1280  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1 
>           RX bytes:0 (0.0 B)  TX bytes:3205 (3.1 KiB)
> 
> wpan0     Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-
> 00-00-00-00-00  
>           UP BROADCAST RUNNING NOARP  MTU:123  Metric:1
>           RX packets:34 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:300 
>           RX bytes:578 (578.0 B)  TX bytes:3176 (3.1 KiB)
Finally trying ping6 from the first RPi to to the second.

 $ ping6 fe80::80b7:48b:db57:9ee1%lowpan0
PING fe80::80b7:48b:db57:9ee1%lowpan0(fe80::80b7:48b:db57:9ee1) 56 data
bytes
 From fe80::2062:9495:cd2e:5a3a icmp_seq=1 Destination unreachable:
Address unreachable
 From fe80::2062:9495:cd2e:5a3a icmp_seq=2 Destination unreachable:
Address unreachable
 From fe80::2062:9495:cd2e:5a3a icmp_seq=3 Destination unreachable:
Address unreachable
 From fe80::2062:9495:cd2e:5a3a icmp_seq=4 Destination unreachable:
Address unreachable

ifconfig on the first RPi show bytes transmitted, none received
ifconfig on the second RPi shows bytes received by wpan0, none made it
up to lowpan0

dmesg on the first RPi shows no more errors
dmesg on the second RPi shows errors
[ 3801.036140] ieee802154: bad frame received (type = 0)
[ 3802.031620] ieee802154: bad frame received (type = 0)
[ 3803.031183] ieee802154: bad frame received (type = 0)
[ 3804.041254] ieee802154: bad frame received (type = 0)

Wireshark on the first RPi shows failure [image removed for mailing
list]

Wireshark on the second RPi shows NOTHING (nothing made it up to
lowpan0)

The routing table on the first RPi looks ok
$ route -A inet6
Kernel IPv6 routing table
Destination                    Next Hop                   Flag Met Ref
Use If
::1/128                        ::                         U    256
0     0 lo
fe80::/64                      ::                         U    256
0     0 eth0
fe80::/64                      ::                         U    256
1     9 lowpan0
::/0                           ::                         !n   -
1  1    26 lo
::1/128                        ::                         Un   0   5   
 11 lo
fe80::2062:9495:cd2e:5a3a/128  ::                         Un   0   3   
 35 lo
fe80::f698:e074:cc43:3109/128  ::                         Un   0   1   
  0 lo
ff00::/8                       ::                         U    256
3   281 eth0
ff00::/8                       ::                         U    256
1     9 lowpan0
::/0                           ::                         !n   -
1  1    26 lo

The second RPi routing table looks okay too.

I have seen comments about setting the SPI rate. The default rate is
3000000. I'ev used it in all the above. 
Resetting it to 1000000 didn't make any difference, nor did 100000, by
dtoverlay=at86rf233,speed=100000
in /boot/config.txt

As you can see, I've tried a lot of things. What do I do now?

Regards

Jan
-- 
Dr Jan Newmarch,
Head of Higher Education (ICT) @ Box Hill,
Adjunct Professor @ University of Canberra

P 61 3 9286 9971
M +61 4 0117 0509
F 61 3 9286 9100
W www.boxhill.edu.au
W jan.newmarch.name
E j.newmarch@boxhill.edu.au
E jan@newmarch.name




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: at86rf233 in Raspberry Pi 3
       [not found]       ` <1472122778.2490.149.camel@newmarch.name>
  2016-08-25 11:10         ` [Fwd: Re: at86rf233 in Raspberry Pi 3] Jan Newmarch
@ 2016-08-25 11:12         ` smlng
  1 sibling, 0 replies; 8+ messages in thread
From: smlng @ 2016-08-25 11:12 UTC (permalink / raw)
  To: Jan Newmarch; +Cc: Tao Liu, linux-wpan, f.mentiplay

Hey Jan,

the v4.4 Linux-Kernel of latest Raspbian is not working with the OpenLabs transceiver. You have to build a custom Kernel, e.g. v4.7 or v4.8 as described in [1]. That should do the trick.

Best,
 Sebastian

[1]: https://github.com/RIOT-Makers/wpan-raspbian/wiki/Create-a-generic-Raspbian-image-with-6LoWPAN-support#4-new-linux-kernels-for-the-pi
> Am 25.08.2016 um 12:59 schrieb Jan Newmarch <jan@newmarch.name>:
> 
> Hi
> 
> I'm still struggling to get two RPi 2 B's to ping each other with at86rf233 devices. I can see the devices. They can ping themselves but they can't ping each other. According to wireshark and dmesg, lots of malformed packets.
> 
> Details:
> 
> Used raspbian-lite: 2016--6-27-raspbian-jessie-lite
> Upgraded using rpi-update
> 
> uname -a returns 
>     Linux raspberrypi 4.4.18-v7+ #905 SMP Fri Aug 19 19:11:00 BST 2016        armv7l GNU/Linux
> 
> For firmware, /opt/vc/bin/vcgencmd version returns
>     Aug 19 2016 19:51:20 
>     Copyright (c) 2012 Broadcom
>     version 04cb74d9feb624e2463cde9db466bdce8b9799e9 (clean) (release)
> 
> Only change made to /boot/config.txt is to add
> dtoverlay=at86rf233
> 
> dmesg has seen the device
> [    7.597997] at86rf230 spi0.0: Detected at86rf233 chip version 1
> 
> Decompiling the device tree using  dtc -I fs /proc/device-tree &gt; name.dts shows
> at86rf233@0{
>                                 reg = <0x0>;
>                                 interrupts = &lt;0x17 0x4>;
>                                 compatible = "atmel,at86rf233";
>                                 sleep-gpio = &lt;0xb 0x19 0x1>;
>                                 xtal-trim = [0f];
>                                 spi-max-frequency = &lt;0x2dc6c0>;
>                                 reset-gpio = &lt;0xb 0x18 0x1>;
>                                 phandle = &lt;0x42>;
>                                 interrupt-parent = &lt;0xb>;
>                         };
> The SPI frequency is 0x2dc6c0 i.e. 3000000, the default
> 
> I setup openlabs  Raspberry Pi 802.15.4 radio using
>     iwpan dev wpan0 set pan_id 0xbeef
>     ip link add link wpan0 name lowpan0 type lowpan
>     ifconfig wpan0 up
>     ifconfig lowpan0 up
> 
> iz list shows the pan id is set
> wpan0 (3)
>     link: IEEE 802.15.4 MAC interface
>     phy phy0
>     hw 22:62:94:95:cd:2e:5a:3a pan 0xbeef short 0xffff
> 
> iwpan (v0.6) reports
> 
> $ ./iwpan list
> wpan_phy phy0
> supported channels:
> 	page 0: 11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 
> current_page: 0
> current_channel: 13,  2415 MHz
> cca_mode: (1) Energy above threshold
> cca_ed_level: -77
> tx_power: 4
> capabilities:
> 	iftypes: node,monitor 
> 	channels:
> 		page 0: 
> 			[11]  2405 MHz, [12]  2410 MHz, [13]  2415 MHz, 
> 			[14]  2420 MHz, [15]  2425 MHz, [16]  2430 MHz, 
> 			[17]  2435 MHz, [18]  2440 MHz, [19]  2445 MHz, 
> 			[20]  2450 MHz, [21]  2455 MHz, [22]  2460 MHz, 
> 			[23]  2465 MHz, [24]  2470 MHz, [25]  2475 MHz, 
> 			[26]  2480 MHz  
> 	tx_powers: 4,3.7,3.4,3,2.5,2,1,0,-1,-2,-3,-4,-6,-8,-12,-17 
> 	cca_ed_levels: -91,-89,-87,-85,-83,-81,-79,-77,-75,-73,-71,-69,-67,-65,-63,-61 
> 	cca_modes: 
> 		(1) Energy above threshold
> 		(2) Carrier sense only
> 		(3, cca_opt: 0) Carrier sense with energy above threshold (logical operator is 'and')
> 		(3, cca_opt: 1) Carrier sense with energy above threshold (logical operator is 'or')
> 	min_be: 0,1,2,3,4,5,6,7,8 
> 	max_be: 3,4,5,6,7,8 
> 	csma_backoffs: 0,1,2,3,4,5 
> 	frame_retries: 0,1,2,3,4,5,6,7 
> 	lbt: false
> Supported commands:
> 	* new_interface
> 	* del_interface
> 	* set_channel
> 	* set_pan_id
> 	* set_short_addr
> 	* set_backoff_exponent
> 	* set_max_csma_backoffs
> 	* set_max_frame_retries
> 	* set_lbt_mode
> 	* set_ackreq_default
> 	* set_tx_power
> 	* set_cca_ed_level
> 	* set_cca_mode
> 
> ifconfig on first RPi (second one not running yet) shows
> lowpan0   Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-00-00-00-00-00  
>           inet6 addr: fe80::2062:9495:cd2e:5a3a/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1280  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1 
>           RX bytes:0 (0.0 B)  TX bytes:3141 (3.0 KiB)
> 
> wpan0     Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-00-00-00-00-00  
>           UP BROADCAST RUNNING NOARP  MTU:123  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:300 
>           RX bytes:0 (0.0 B)  TX bytes:3133 (3.0 KiB)
> i.e. already transmitted from lowpan0 and wpan0 but nothing received (no-one to receive from yet).
> 
> dmesg shows no errors.
> 
> Wireshark shows errors already
> <unknown-GBRCMY.png>plus later errors.
> 
> Now I ping6 the local device
> $ping6 fe80::2062:9495:cd2e:5a3a%lowpan0
> PING fe80::2062:9495:cd2e:5a3a%lowpan0(fe80::2062:9495:cd2e:5a3a) 56 data bytes
> 64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=1 ttl=64 time=0.257 ms
> 64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=2 ttl=64 time=0.205 ms
> 64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=3 ttl=64 time=0.183 ms
> 64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=4 ttl=64 time=0.179 ms
> 64 bytes from fe80::2062:9495:cd2e:5a3a: icmp_seq=5 ttl=64 time=0.182 ms
> 
> dmesg reports no errors
> 
> Wireshark is happy
> <unknown-55MMMY.png>
> ifconfig reports more bytes sent, none received
> lowpan0   Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-00-00-00-00-00  
>           inet6 addr: fe80::2062:9495:cd2e:5a3a/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1280  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1 
>           RX bytes:0 (0.0 B)  TX bytes:3205 (3.1 KiB)
> 
> wpan0     Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-00-00-00-00-00  
>           UP BROADCAST RUNNING NOARP  MTU:123  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:300 
>           RX bytes:0 (0.0 B)  TX bytes:3176 (3.1 KiB)
> 
> 
> Now to add in the second RPi. After setting it up, ifconfig on the second RPi shows
> lowpan0   Link encap:UNSPEC  HWaddr 82-B7-04-8B-DB-57-9E-E1-00-00-00-00-00-00-00-00  
>           inet6 addr: fe80::80b7:48b:db57:9ee1/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1280  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1 
>           RX bytes:0 (0.0 B)  TX bytes:3237 (3.1 KiB)
> 
> wpan0     Link encap:UNSPEC  HWaddr 82-B7-04-8B-DB-57-9E-E1-00-00-00-00-00-00-00-00  
>           UP BROADCAST RUNNING NOARP  MTU:123  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:300 
>           RX bytes:0 (0.0 B)  TX bytes:3208 (3.1 KiB)
> 
> dmesg shows no errors
> 
> Wireshark shows errors on this second RPi
> <unknown-NU95LY.png>
> On the first Rpi, wireshark shows NOTHING. On the other hand, dmesg on the first RPi shows
> [ 3197.970150] ieee802154: bad frame received (type = 0)
> [ 3198.170317] ieee802154: bad frame received (type = 0)
> [ 3198.680961] ieee802154: bad frame received (type = 0)
> [ 3199.170489] ieee802154: bad frame received (type = 0)
> [ 3199.173315] ieee802154: bad frame received (type = 0)
> [ 3199.190078] ieee802154: bad frame received (type = 0)
> [ 3199.307879] ieee802154: bad frame received (type = 0)
> [ 3199.312959] ieee802154: bad frame received (type = 0)
> [ 3199.318120] ieee802154: bad frame received (type = 0)
> [ 3199.324555] ieee802154: bad frame received (type = 0)
> [ 3199.555055] ieee802154: bad frame received (type = 0)
> 
> ifconfig on the first RPi now shows bytes received on wpan0 but not making it up to lowpan0 
> I guess those are the dmesg errors
>> lowpan0   Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-00-00-00-00-00  
>>           inet6 addr: fe80::2062:9495:cd2e:5a3a/64 Scope:Link
>>           UP BROADCAST RUNNING MULTICAST  MTU:1280  Metric:1
>>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>>           TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
>>           collisions:0 txqueuelen:1 
>>           RX bytes:0 (0.0 B)  TX bytes:3205 (3.1 KiB)
>> 
>> wpan0     Link encap:UNSPEC  HWaddr 22-62-94-95-CD-2E-5A-3A-00-00-00-00-00-00-00-00  
>>           UP BROADCAST RUNNING NOARP  MTU:123  Metric:1
>>           RX packets:34 errors:0 dropped:0 overruns:0 frame:0
>>           TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
>>           collisions:0 txqueuelen:300 
>>           RX bytes:578 (578.0 B)  TX bytes:3176 (3.1 KiB)
> 
> Finally trying ping6 from the first RPi to to the second.
> 
>  $ ping6 fe80::80b7:48b:db57:9ee1%lowpan0
> PING fe80::80b7:48b:db57:9ee1%lowpan0(fe80::80b7:48b:db57:9ee1) 56 data bytes
> From fe80::2062:9495:cd2e:5a3a icmp_seq=1 Destination unreachable: Address unreachable
> From fe80::2062:9495:cd2e:5a3a icmp_seq=2 Destination unreachable: Address unreachable
> From fe80::2062:9495:cd2e:5a3a icmp_seq=3 Destination unreachable: Address unreachable
> From fe80::2062:9495:cd2e:5a3a icmp_seq=4 Destination unreachable: Address unreachable
> 
> ifconfig on the first RPi show bytes transmitted, none received
> ifconfig on the second RPi shows bytes received by wpan0, none made it up to lowpan0
> 
> dmesg on the first RPi shows no more errors
> dmesg on the second RPi shows errors
> [ 3801.036140] ieee802154: bad frame received (type = 0)
> [ 3802.031620] ieee802154: bad frame received (type = 0)
> [ 3803.031183] ieee802154: bad frame received (type = 0)
> [ 3804.041254] ieee802154: bad frame received (type = 0)
> 
> Wireshark on the first RPi shows failure
> <unknown-78X6LY.png>
> Wireshark on the second RPi shows NOTHING (nothing made it up to lowpan0)
> 
> The routing table on the first RPi looks ok
> $ route -A inet6
> Kernel IPv6 routing table
> Destination                    Next Hop                   Flag Met Ref Use If
> ::1/128                        ::                         U    256 0     0 lo
> fe80::/64                      ::                         U    256 0     0 eth0
> fe80::/64                      ::                         U    256 1     9 lowpan0
> ::/0                           ::                         !n   -1  1    26 lo
> ::1/128                        ::                         Un   0   5    11 lo
> fe80::2062:9495:cd2e:5a3a/128  ::                         Un   0   3    35 lo
> fe80::f698:e074:cc43:3109/128  ::                         Un   0   1     0 lo
> ff00::/8                       ::                         U    256 3   281 eth0
> ff00::/8                       ::                         U    256 1     9 lowpan0
> ::/0                           ::                         !n   -1  1    26 lo
> 
> The second RPi routing table looks okay too.
> 
> I have seen comments about setting the SPI rate. The default rate is 3000000. I'ev used it in all the above. 
> Resetting it to 1000000 didn't make any difference, nor did 100000, by
> dtoverlay=at86rf233,speed=100000
> in /boot/config.txt
> 
> As you can see, I've tried a lot of things. What do I do now?
> 
> Regards
> 
> Jan
> -- 
> Dr Jan Newmarch,
> Head of Higher Education (ICT) @ Box Hill,
> Adjunct Professor @ University of Canberra
> 
> P 61 3 9286 9971
> M +61 4 0117 0509
> F 61 3 9286 9100
> W www.boxhill.edu.au
> W jan.newmarch.name
> E j.newmarch@boxhill.edu.au
> E jan@newmarch.name
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-08-25 11:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22  7:50 at86rf233 in Raspberry Pi 3 Tao Liu
2016-08-22 14:11 ` smlng
2016-08-22 15:30   ` Michael Richardson
2016-08-22 21:34   ` Tao Liu
2016-08-23  7:26     ` smlng
2016-08-23 17:49       ` Tao Liu
     [not found]       ` <1472122778.2490.149.camel@newmarch.name>
2016-08-25 11:10         ` [Fwd: Re: at86rf233 in Raspberry Pi 3] Jan Newmarch
2016-08-25 11:12         ` at86rf233 in Raspberry Pi 3 smlng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.