-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No IPv6 routes from BLE IPSP node (NRF52840DK) #25444
Comments
Just as quick feedback - I wonder if the issue is in Zephyr or Linux kernel. I recall having issues with TCP connectivity, when I was using newer Linux kernel (5.4). Once I switched back to 4.14 it worked fine again, so there could be some compatibility issue with newer version - again, not sure on which side, I'm not that deep into BLE IPSP. |
Can you set |
Thanks for the quick feedback. I tried again with |
Indeed, the stale status should happen after a timeout and not immediately. I wonder if this is similar issue that I was seeing with IPv6 address and prefix timeouts in #22733 |
|
@carlescufi I did some investigation on this case. I've tested with current master (77946fa) and two Linux kernels: 4.14.179-1 and 5.4.39-1. I was able to reproduce the spcific case on both kernels I've used. I've tracked the ping message, up to the link layer (BLE IPSP in this case), where I saw that the packet is forwarded to It's interesting though, that the packet is not lost in that case. It seems that it's is buffered somewhere (at the BLE layer?). After any activity from the host side (not necesirally a ping, I've observed it could also happen on Neighbor Solicitation message from the host), the packet gets finally transmitted, like on the screenshot below. The ping request from Zephyr, was transmitted immediately after the ping request from host was received. Additionally, not related to this issue, TCP connectivity seems to be broken in 5.4.39-1 (the issue I've mentioned before). It can be easily observed in |
The packet would be queued if there is no credits to transmit, or perhaps it is waiting the a TX context, perhaps you should enable debugging so we can check why it is not being transmitted immediately. |
@rlubos could you enable |
Ok adding log file with There is a tremendous amount of logs after I've established connection with my host, then after a short pause, I've tried to ping the host (with no reply). After a few seconds, a Router Solicitation message was sent from the host, and only after that the ping showed up in the wireshark (along with the response, this can be observed in the wireshark pcap). I really hope it helps! |
With ipsp sample and NET_SHELL enabled (BOARD=qemu_x86) it doesn't seem to have this problem:
Also it doesn't like there is any calls to L2CAP layer on this attempt:
When I try with echo-client I got the same but with echo-server it does works:
Perhaps is something related to this:
@rlubos is there any reason you were using echo_client instead of echo_server? It doesn't look like echo_client should be used to trigger other traffics since it appears it stops UDP and TCP if it cannot connects, though there could be something else preventing echo_client to ping @jukkar. |
Something odd, after turning wireshark echo-client just works as well: |
The only reason is that
The only consequence of the TCP connection failure is that application sockets are closed, and main thread is blocked on a semaphore. It should not affect the network stack in any way. |
@Vudentz Unfortunately I cannot confirm that the issue does not show up in other samples. Reproduced on |
Ok, that would explain why it suddenly started working, but it appears the data never reaches the stack when the ping timeouts as we didn't get any logs from L2CAP layer when that happens. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Describe the bug
The
sockets/echo_client
sample compiled with Bluetooth support for the NRF52840DK is unable to send IPv6 packets to any destination, even the Bluetooth interface it is connected to. However, I am able to assign the device an IPv6 address and ping it from the host by following the guide in the Bluetooth IPSP sample documentation.Strangely, the device can gain network access only while it is being actively pinged by the host computer (i.e., I can ping the Bluetooth interface and other IPv6 addresses from the Zephyr shell over
minicom
and connect to the echo server.) Once the ping program on the host has been stopped, the device seems to forget all routes to all IPv6 addresses within 2 seconds.To reproduce
Steps to reproduce the behavior:
cd zephyr/samples/net/sockets/echo_client
west build -b nrf52840_pca10056 -- -DCONF_FILE="prj.conf overlay-bt.conf"; west flash
modprobe bluetooth_6lowpan
echo "connect <device MAC> 2" > /sys/kernel/debug/bluetooth/6lowpan_control
ping6 -I bt0 ff02::1
(works)ip address add 2001:db8::2/64 dev bt0
(works)ping6 2001:db8::3
(works)minicom -D /dev/ttyACM0 -b 115200
net ping 2001:db8::2
(from Zephyr shell, only works while step 7 is still running)Expected behavior
Since there is a Bluetooth overlay configuration file in the echo client source code, it is implied that this should work out-of-the-box, but this does not seem to be the case.
Impact
I am unable to continue working until I can get uninterrupted IPv6 access from my BLE IPSP nodes. They need to act as clients contacting external servers, so they cannot wait for an external connection to get network access.
Environment
Additional information
Running
net nbr
from the Zephyr shell does show the link to the Bluetooth interface on the host at2001:db8::2
, but the connection goes stale just a few seconds after ping is stopped on the host computer. However, the device is unable to ping that address even before it goes stale.The text was updated successfully, but these errors were encountered: