Date
1 - 1 of 1
Proper BT-SETTINGS Behavior #bluetoothmesh #bluetooth #ble
Hi,
Thanks in advance for all replies.
I've created a ble keyboard peripheral, using the native_posix board, to control my amazon firestick.
It seems to work fine, except I'm unsure if the CONFIG-BT-SETTINGS persistent storage is working properly.
From a snippet of my syslog, you can see my app (hogInput.exe) send 2 keyboard reports. Then I restart my firestick which causes my 3 report notifies to become disabled and the connection is broken.
Thanks in advance for all replies.
I've created a ble keyboard peripheral, using the native_posix board, to control my amazon firestick.
It seems to work fine, except I'm unsure if the CONFIG-BT-SETTINGS persistent storage is working properly.
From a snippet of my syslog, you can see my app (hogInput.exe) send 2 keyboard reports. Then I restart my firestick which causes my 3 report notifies to become disabled and the connection is broken.
hogInput.exe[829]: ***Send Report: x02, x41, x00, x00: Sent:0***hogInput.exe[829]: ***Send Report: x02, x00, x00, x00: Sent:0***hogInput.exe[829]: hog: input_ccc_changed: disabledhogInput.exe[829]: message repeated 2 times: [ hog: input_ccc_changed: disabled]hogInput.exe[829]: Disconnected (reason 0x08)
python3[830]: b'[00:02:34.352,704] \x1b[1;31m bt_gatt: Failed to store CCCs (err -2)'
python3[830]: b'[00:02:34.352,704] \x1b[1;31m bt_gatt: Failed to store Client Features (err -2)'
After the firestick becomes disconnected, the bt gatt module attempts to store my ccc and client features to persistent storage but fails.
Is this normal to save to settings after a disconnect? If it's normal, anyone know what my be the problem and how to fix it?
Update:
my prj.conf file content. here i try to use a filesystem backend for Posix persistent use:
Is this normal to save to settings after a disconnect? If it's normal, anyone know what my be the problem and how to fix it?
Update:
my prj.conf file content. here i try to use a filesystem backend for Posix persistent use:
# Incresed stack due to settings API usageCONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048CONFIG_RING_BUFFER=yCONFIG_SETTINGS=yCONFIG_SETTINGS_RUNTIME=yCONFIG_SETTINGS_FS=yCONFIG_BT_SETTINGS=yCONFIG_BT=yCONFIG_BT_TINYCRYPT_ECC=yCONFIG_BT_PERIPHERAL=yCONFIG_BT_DIS=yCONFIG_BT_BAS=yCONFIG_BT_DEBUG_LOG=yCONFIG_BT_DEVICE_NAME="smartRemotes 5.1"CONFIG_BT_DEVICE_APPEARANCE=961#uart i/oCONFIG_SERIAL=yCONFIG_UART_NATIVE_POSIX=y# CONFIG_UART_NATIVE_POSIX_PORT_1_ENABLE=y#ble securityCONFIG_BT_SMP=yCONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE=yCONFIG_BT_KEYS_OVERWRITE_OLDEST=y
Update:
i changed my prj.conf file to try using a flash backend instead of a filesystem for persistent storage.
i changed my prj.conf file to try using a flash backend instead of a filesystem for persistent storage.
# Incresed stack due to settings API usageCONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048CONFIG_RING_BUFFER=yCONFIG_FLASH=yCONFIG_FLASH_PAGE_LAYOUT=yCONFIG_FLASH_MAP=yCONFIG_NVS=yCONFIG_SETTINGS=y#CONFIG_SETTINGS_RUNTIME=y#CONFIG_SETTINGS_NONE=n#CONFIG_SETTINGS_FS=yCONFIG_BT_SETTINGS=yCONFIG_BT=yCONFIG_BT_TINYCRYPT_ECC=yCONFIG_BT_PERIPHERAL=yCONFIG_BT_DIS=yCONFIG_BT_BAS=yCONFIG_BT_DEBUG_LOG=yCONFIG_BT_DEVICE_NAME="smartRemotes 5.1"CONFIG_BT_DEVICE_APPEARANCE=961#uart i/oCONFIG_SERIAL=yCONFIG_UART_NATIVE_POSIX=y# CONFIG_UART_NATIVE_POSIX_PORT_1_ENABLE=y#ble securityCONFIG_BT_SMP=yCONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE=y
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
This fixed my problem and no longer get error messages when saving BT settings!
But, I have no idea why it works this way with Posix on my Ubuntu laptop. I did not think I had any flash memory on my laptop and can't understand why using a filesystem backend did not work? Can anyone explain this? I did notice a file named 'flash.bin' was created on my laptop. Maybe some sort of flash emulation?
But, I have no idea why it works this way with Posix on my Ubuntu laptop. I did not think I had any flash memory on my laptop and can't understand why using a filesystem backend did not work? Can anyone explain this? I did notice a file named 'flash.bin' was created on my laptop. Maybe some sort of flash emulation?