Hi,
I see the Matter CHIP integration uses BLE for commissioning, so to advertise a ble service the documentation advises to use NUS.
What about scanning for ble devices and connecting to them?
Hi,
I see the Matter CHIP integration uses BLE for commissioning, so to advertise a ble service the documentation advises to use NUS.
What about scanning for ble devices and connecting to them?
Hi,
You can use the CHIP Tool to scan and commission. See Working with the CHIP Tool.
Regards,
Amanda H.
No, I meant I need to scan for ble devices from the nrf5340 and connect to them.
I'm trying to do the usual bt_le_scan_start(&scan_param, device_found) but with the Matter sample integrated bt_hci_cmd_send_sync fails with error 1 (opcode 0x200b status 0x01). That would translate to LE Set Scan Parameters throwing invalid address.
CHIP does enable BLE and use it without errors for Matter commissioning but I can't use it later in my software.
Hi,
0x200b is the opcode for BLE Set Scan Parameters and 0x01 is the error code for UNKNOWN HCI COMMAND.
The Unknown HCI Command error code indicates that the Controller does not understand the HCI Command packet opcode that the Host sent. The opcode given might not correspond to any of the opcodes specified in this document, or any vendor-specific opcodes, or the command may have not been implemented.
-Amanda H.
I see, and what could be causing the scan function to throw unknown hci command?
I also tried to integrate this sample but I'm still getting error -5 from bt_le_scan_start. I'm omitting bt_enable though because CHIP seems to be already calling it
Hi,
sfemat said:I also tried to integrate this sample but I'm still getting error -5 from bt_le_scan_start.
What sample are you using?
I see the Matter CHIP integration uses BLE for commissioning, so to advertise a ble service the documentation advises to use NUS.
What about scanning for ble devices and connecting to them?
In the Matter: Door lock sample which can advertise with NUS. See Matter Bluetooth LE with Nordic UART Service. You also can connect and test with nRF Toolbox on your Android (Android 11 or newer) or iOS smartphone (iOS 16.1 or newer). See Testing door lock using Bluetooth LE with Nordic UART Service
-Amanda H.
Hi,
sfemat said:I also tried to integrate this sample but I'm still getting error -5 from bt_le_scan_start.
What sample are you using?
I see the Matter CHIP integration uses BLE for commissioning, so to advertise a ble service the documentation advises to use NUS.
What about scanning for ble devices and connecting to them?
In the Matter: Door lock sample which can advertise with NUS. See Matter Bluetooth LE with Nordic UART Service. You also can connect and test with nRF Toolbox on your Android (Android 11 or newer) or iOS smartphone (iOS 16.1 or newer). See Testing door lock using Bluetooth LE with Nordic UART Service
-Amanda H.
I am trying to integrate central_uart with my Matter application as you suggested but I'm getting uart_init failed (err -88).
It's failing here:
const struct uart_driver_api *api =
(const struct uart_driver_api *)dev->api;
if (api->callback_set == NULL) {
return -ENOSYS;
}
I've seen from another ticket that it could be the uart_cb callback passed to the init function but mine is exactly the same as the central_uart sample. My uart device is declared in the overlay like this (and it's not disabled):
/ {
chosen {
nordic,nus-uart = &uart0;
};
};
so I'm not sure what could be causing this. I've also tried changing uart mode to async, interrupt driven and other params but with no luck, and meanwhile the scan is always returning error -5.
Can I only add BLE advertising alongside a Matter application? I specifically need scanning like bt_le_scan_start
Hi,
Amanda is out of office. So I'm replying instead.
Did you get any errors when calling bt_le_scan_start() ?
Yes, that's the function that I'm trying to use and it's throwing error -5 because of BLE Set Scan Parameters UNKNOWN HCI COMMAND
Here is the matter light_bulb sample with just bt_le_scan_start() inside app_task.cpp and even flashing it on a 5340dk it throws error -5