All of lore.kernel.org
 help / color / mirror / Atom feed
* wpan-ping not working for an initial setup of Openlabs 802.15.4 modules connected to rapsberry pi.
       [not found] <6BFF517D-8A33-4817-A251-BE649C27BE3D@gmail.com>
@ 2019-04-24  4:11 ` Aditya Nath
  2019-04-24 18:47   ` Stefan Schmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Nath @ 2019-04-24  4:11 UTC (permalink / raw)
  To: linux-wpan

Hi,

I’m trying to get basic ping working between the two devices and from each of them it says host unreachable.
My setup includes 2 raspberry pi 3b+ model and each of them attached to 2 Openlabs 802.15.4 module.

I ran the following commands on each of them seperately:

ip link set wpan0 down
iwpan phy0 set channel 0 15
iwpan dev wpan0 set pan_id 0x1111
iwpan dev wpan0 set short_addr 0x0001
ip link set wpan0 up

wpan-ping -d 0x0002

The only difference between the two pi was that I changed the short_addr for the other pi to 0x0002.

The ping command used was:

wpan-ping -a 0x0001 -s 5 -c 5

I understand you must tbe very busy, but I would really appreciate if you can support with some answers. There is very little thorough documentation on the web elsehwere, and that is why I have to turn to thtis mailing list for answes.

Thanks,
Aditya Nath

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

* Re: wpan-ping not working for an initial setup of Openlabs 802.15.4 modules connected to rapsberry pi.
  2019-04-24  4:11 ` wpan-ping not working for an initial setup of Openlabs 802.15.4 modules connected to rapsberry pi Aditya Nath
@ 2019-04-24 18:47   ` Stefan Schmidt
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Schmidt @ 2019-04-24 18:47 UTC (permalink / raw)
  To: linux-wpan

Hello.

On 24.04.19 06:11, Aditya Nath wrote:
> Hi,
> 
> I’m trying to get basic ping working between the two devices and from each of them it says host unreachable.
> My setup includes 2 raspberry pi 3b+ model and each of them attached to 2 Openlabs 802.15.4 module.

This would be the first time they would communicate? Or did you had this
setup working before successfully?

What kernel version are you using on the rpi? Mainline or the Raspberry
provided kernel?

We had many problems that we helped debugging which ended in being a
problem with the rpi kernel and SPI or the wrong wiring (or wrongly
connected in the openlabs case). Thus I would like to ask you to double
and triple check on these. :-)

> I ran the following commands on each of them seperately:
> 
> ip link set wpan0 down
> iwpan phy0 set channel 0 15
> iwpan dev wpan0 set pan_id 0x1111
> iwpan dev wpan0 set short_addr 0x0001
> ip link set wpan0 up
> 
> wpan-ping -d 0x0002
> 
> The only difference between the two pi was that I changed the short_addr for the other pi to 0x0002.
> 
> The ping command used was:
> 
> wpan-ping -a 0x0001 -s 5 -c 5

Could you start wireshark/tshark/tcpdump on the server side wpan0
interface and see if packets are actually arriving? If not, try the same
on the client side wpan0 and check if you see them being submitted.

Even better if you have another device (from which you know that it
works) to use as a sniffer directly on the air.

> I understand you must tbe very busy, but I would really appreciate if you can support with some answers. There is very little thorough documentation on the web elsehwere, and that is why I have to turn to thtis mailing list for answes.

Another thing you could try is to setup 6lowpan fully and see if ping6
works. That would rule out problems with wpan-ping.

regards
Stefan Schmidt

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

* Re: wpan-ping not working for an initial setup of Openlabs 802.15.4 modules connected to rapsberry pi.
  2019-04-26  4:29 Aditya Nath
@ 2019-05-08 15:43 ` Alexander Aring
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Aring @ 2019-05-08 15:43 UTC (permalink / raw)
  To: Aditya Nath; +Cc: linux-wpan

Hi,

On Fri, Apr 26, 2019 at 12:29:54AM -0400, Aditya Nath wrote:
> Hi,
> 
> Sorry for creating another thread of mails, but I couldn’t figure out how to properly send the mail in the same chain using git-send-mail.
> 

latest rpi kernel is known to have problems which I don't have with a
mainline kernel.

try:

sudo rpi-update 936a8dc3a605c20058fbb23672d6b47bca77b0d5

which downgrades the kernel to a version where I heard from people that
it works with the rpi kernel.

- Alex

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

* wpan-ping not working for an initial setup of Openlabs 802.15.4 modules connected to rapsberry pi.
@ 2019-04-26  4:29 Aditya Nath
  2019-05-08 15:43 ` Alexander Aring
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Nath @ 2019-04-26  4:29 UTC (permalink / raw)
  To: linux-wpan

Hi,

Sorry for creating another thread of mails, but I couldn’t figure out how to properly send the mail in the same chain using git-send-mail.

Anyways, I gathered some data after my last mail.

> What kernel version are you using on the rpi? Mainline or the Raspberry
> provided kernel?

The kernel on both the pi. It is the Raspberry provided kernel:
Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
There are tutorials giving directions to create a custom kernel in order to patch the driver support for at86rf233.
But for the Raspberry provided kernel, the device overlay was already present. So I did not go through the process
of creating the custom kernel.
> We had many problems that we helped debugging which ended in being a
> problem with the rpi kernel and SPI or the wrong wiring (or wrongly
> connected in the openlabs case). Thus I would like to ask you to double
> and triple check on these. :-)
I understand your concerns, but if there was a chance of device not connected properly (or the wiring issue) would it still show up in kernel messages as an identified device.
For example, the output of ‘dmesg | grep spi’:
[        3.990085] at86rf233 spi0.0: Detected at86rf233 chip version 2
> This would be the first time they would communicate? Or did you had this
> setup working before successfully?
This is the first time I’m trying to make the connection.
> Could you start wireshark/tshark/tcpdump on the server side wpan0
> interface and see if packets are actually arriving? If not, try the same
> on the client side wpan0 and check if you see them being submitted.
> Even better if you have another device (from which you know that it
> works) to use as a sniffer directly on the air.
——— Raspberry Pi3 - Acting as the IoT device with the OpenLabs module transmitting the data.

root@raspberrypi:/home/pi# ip link set wpan0 down
root@raspberrypi:/home/pi# iwpan phy0 set channel 0 15
root@raspberrypi:/home/pi# iwpan dev wpan0 set pan_id 0x1111
root@raspberrypi:/home/pi# iwpan dev wpan0 set short_addr 0x0002
root@raspberrypi:/home/pi# ip link set wpan0 up
root@raspberrypi:/home/pi# wpan-ping -a 0x0001  -s 5 -c5
PING 0x0001 (PAN ID 0x1111) 5 data bytes
Hit 500 ms packet timeout
Hit 500 ms packet timeout
Hit 500 ms packet timeout
Hit 500 ms packet timeout
Hit 500 ms packet timeout

--- 0x0001 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss
rtt min/avg/max = 2147483.750/0.000/0.000 ms
root@raspberrypi:/home/pi# 


——— Raspberry Pi3 - Device having the monitor interface:

root@raspberrypi:/home/pi# tshark -i monitor0
Running as user "root" and group "root". This could be dangerous.
Capturing on 'monitor0'
    1 0.000000000              →              IEEE 802.15.4 143 Beacon, Bad FCS
    2 0.002232663              →              IEEE 802.15.4 143 Beacon, Bad FCS
    3 0.005587516              →              IEEE 802.15.4 143 Beacon, Bad FCS
    4 0.008298513              →              IEEE 802.15.4 143 Beacon, Bad FCS
    5 0.499330889              →              IEEE 802.15.4 143 Beacon, Bad FCS

> Another thing you could try is to setup 6lowpan fully and see if ping6
> works. That would rule out problems with wpan-ping.
Setting up LowPan to see if ping over ipv6 works:

——— Raspberry pi - Node 1

root@raspberrypi:/home/pi# ip link set lowpan0 down
Cannot find device "lowpan0"
root@raspberrypi:/home/pi# ip link set wpan0 down
root@raspberrypi:/home/pi# 
root@raspberrypi:/home/pi# iwpan dev wpan0 set pan_id 0xcafe
root@raspberrypi:/home/pi# iwpan phy0 set channel 0 26
root@raspberrypi:/home/pi# 
root@raspberrypi:/home/pi# ip link add link wpan0 name lowpan0 type lowpan
root@raspberrypi:/home/pi# 
root@raspberrypi:/home/pi# ip link set wpan0 up
root@raspberrypi:/home/pi# ip link set lowpan0 up
root@raspberrypi:/home/pi# 
root@raspberrypi:/home/pi# ip addr add 2001:db8::1/64 dev lowpan0 
root@raspberrypi:/home/pi# 

——— Raspberry Pi - Node 2

root@raspberrypi:/home/pi# ip link set lowpan0 down
Cannot find device "lowpan0"
root@raspberrypi:/home/pi# ip link set wpan0 down
root@raspberrypi:/home/pi# 
root@raspberrypi:/home/pi# iwpan dev wpan0 set pan_id 0xcafe
root@raspberrypi:/home/pi# iwpan phy0 set channel 0 26
root@raspberrypi:/home/pi# 
root@raspberrypi:/home/pi# ip link add link wpan0 name lowpan0 type lowpan
root@raspberrypi:/home/pi# 
root@raspberrypi:/home/pi# ip link set wpan0 up
root@raspberrypi:/home/pi# ip link set lowpan0 up
root@raspberrypi:/home/pi# 
root@raspberrypi:/home/pi# ip addr add 2001:db8::2/64 dev lowpan0
root@raspberrypi:/home/pi# ping6 2001:db8::1
PING 2001:db8::1(2001:db8::1) 56 data bytes
From 2001:db8::2 icmp_seq=1 Destination unreachable: Address unreachable
From 2001:db8::2 icmp_seq=2 Destination unreachable: Address unreachable
From 2001:db8::2 icmp_seq=3 Destination unreachable: Address unreachable
^C
--- 2001:db8::1 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4200ms


Hopefully, I’ve provided all the information required for the help that I’m asking. 

Thank you for your time again,
Aditya Nath

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

end of thread, other threads:[~2019-05-08 15:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <6BFF517D-8A33-4817-A251-BE649C27BE3D@gmail.com>
2019-04-24  4:11 ` wpan-ping not working for an initial setup of Openlabs 802.15.4 modules connected to rapsberry pi Aditya Nath
2019-04-24 18:47   ` Stefan Schmidt
2019-04-26  4:29 Aditya Nath
2019-05-08 15:43 ` Alexander Aring

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.