Skip to content

HCI UART with Linux host cannot connect to nrf52 6lowpan peripheral #7999

Closed
@glbsalazar

Description

@glbsalazar

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 on
    The 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_enable
    echo "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:

app: Physical layer connected.
app: Got IP Application Handler Event on interface 0x20003D78
app: New interface added!
icmp6: Bad checksum detected. Got 0x00002301 but expected 0x0000FDFF, 0x00000020
app: Got ICMP6 Application Handler Event on interface 0x20003D78
app: ERROR 49473 [Unknown error code] at ../../../main.c:590
PC at: 0x0002F07B
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

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions