This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

HCI_UART on NRF52840, attaching the device on a Yocto based Linux SBC errors out saying “Can't init device hci0: Cannot assign requested address (99)”

Hello all,

I'm fairly new to BLE and Linux BlueZ.

I'm trying to interface a Mikrobus BLE module based on nrf52840dk to our Yocto based Linux SBC (Rugged board i.MX6-UL), I have flashed Zephyr's hci_uart code onto the module.
The module seems to work fine when attached on a Linux PC (Ubuntu) using hciattach command but on our SBC / BLE gateway the device fails to get inited and errors out like this

root@rb-imx6:~# hciconfig hci0 up

root@rb-imx6:~# Can't init device hci0: Cannot assign requested address (99)

it'd be great if anyone could help me figure out this issue.

Thanks in advance.

Parents
  • So I ran btmon while attaching the device and saw that it was erroring out here,


    bluetoothd: ../bluez-5.55/src/adapter.c:get_static_addr() Failed to open crypto


    On googling this issue I got to know that, when attaching the UART HCI controller with btattach, BlueZ was not able to create a static address, because of missing Linux kernel crypto interface in user-space. Compiling the kernel with these configs helped me solve the issue.

    CONFIG_CRYPTO_USER
    CONFIG_CRYPTO_USER_API
    CONFIG_CRYPTO_USER_API_AEAD
    CONFIG_CRYPTO_USER_API_HASH
    
    CONFIG_CRYPTO_AES
    CONFIG_CRYPTO_CCM
    CONFIG_CRYPTO_AEAD
    CONFIG_CRYPTO_CMAC

Reply
  • So I ran btmon while attaching the device and saw that it was erroring out here,


    bluetoothd: ../bluez-5.55/src/adapter.c:get_static_addr() Failed to open crypto


    On googling this issue I got to know that, when attaching the UART HCI controller with btattach, BlueZ was not able to create a static address, because of missing Linux kernel crypto interface in user-space. Compiling the kernel with these configs helped me solve the issue.

    CONFIG_CRYPTO_USER
    CONFIG_CRYPTO_USER_API
    CONFIG_CRYPTO_USER_API_AEAD
    CONFIG_CRYPTO_USER_API_HASH
    
    CONFIG_CRYPTO_AES
    CONFIG_CRYPTO_CCM
    CONFIG_CRYPTO_AEAD
    CONFIG_CRYPTO_CMAC

Children
No Data
Related