zephyr: HCI UART with Linux host cannot connect to nrf52 6lowpan peripheral
When using a setup with one nrf52832 dev kit flashed as HCI UART device with a baudrate of 115200 attached to a Linux host running the 4.4.5 kernel and BlueZ tools version 5.47, it is not possible to connect to a nrf52840 dev kit running the ICMP example present in the Nordic SDK 15.
Steps to reproduce:
-
Flash everything with the versions described above:
- Linux Host with kernel 4.4.5 and BlueZ tools 5.47
- nrf52832 dev kit with HCI UART Zephyr sample with 115200 baudrate
- nrf52840 dev kit with Nordic SDK 15 ICMP example
-
Start bluetoothd with the experimental flag
/usr/libexec/bluetooth/bluetoothd --experimental -
Attach to the bluetooth controller using btattach
btattach -B /dev/ttyXXX -S 115200 -P h4 --noflowctl -
Launch bluetoothctl and scan for the device using the following commands:
bluetoothctl-> to drop into the bluetoothctl prompt[bluetooth]# power on[bluetooth]# default-agent[bluetooth]# set-scan-filter-transport le[bluetooth]# scan onThe device with name IPv6ICMP should be detected -
Ensure the bluetooth_6lowpan module is loaded (if not autoloaded use
modprobe bluetooth_6lowpan) and enable the module and connect to the device:echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enableecho "connect 00:CB:DD:EA:E9:B7 1" > /sys/kernel/debug/bluetooth/6lowpan_control -
The connection is not possible, please check the attached btmon logs. btmon_log_29_05_18.log
-
The nrf52840 logs present a checksum error as can be seen in the logs below:
<info> app: Physical layer connected. <info> app: Got IP Application Handler Event on interface 0x20003D78 <info> app: New interface added! <error> icmp6: Bad checksum detected. Got 0x00002301 but expected 0x0000FDFF, 0x00000020 <info> app: Got ICMP6 Application Handler Event on interface 0x20003D78 <error> app: ERROR 49473 [Unknown error code] at …/…/…/main.c:590 PC at: 0x0002F07B <error> app: End of error report
From my analysis of both logs it seems that the connection is established but something goes wrong in the communication to establish the IPv6 connection.
Thank you
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (6 by maintainers)
I realized that this occurred due to a mismatch in the nrf52 configuration. The nrf SDK supports “legacy” 6lowpan over BLE and that was set and should have not been set.
Thank you for the help
Thanks to you. My problem solved due to your notice. In “sdk_config.h” I changed “BLE_6LOWPAN_LEGACY_MODE 1” to “BLE_6LOWPAN_LEGACY_MODE 0” and problem solved.