I use it. nRF52832 PCA10040 Vesion12.2.0
I am working on the ble_app_uart example as a base.
I used the sd_ble_gap_addr_set command to change the BLE address but it was not possible.
What should I do?
I use it. nRF52832 PCA10040 Vesion12.2.0
I am working on the ble_app_uart example as a base.
I used the sd_ble_gap_addr_set command to change the BLE address but it was not possible.
What should I do?
Hi, have you received an error number after calling sd_ble_gap_addr_set command?
A static address is a 48-bit randomly generated address and shall meet the following requirements
Have you followed the above?
ble_gap_addr_t p_addr; p_addr.addr_id_peer = 1; p_addr.addr_type = 7; p_addr.addr[0] = 0xb4; p_addr.addr[1] = 0x39; p_addr.addr[2] = 0x34; p_addr.addr[3] = 0x00; p_addr.addr[4] = 0x00; p_addr.addr[5] = 0x71;
ble_stack_init();
**err_code = sd_ble_gap_addr_set(&p_addr);**
gap_params_init();
services_init();
advertising_init();
conn_params_init();
Can I do this at this location?
Is there a mistake in this address?
The error code is 12802.
Can you represent the minimum requirements in bytes? ex) 0x00 0x01 0xf0 0x01 0x01 0x01
Hi,
The error code you are seeing 12802 (0x3202) corresponds to the error BLE_ERROR_GAP_INVALID_BLE_ADDR
. The description of this error is: The upper two bits of the address do not correspond to the specified address type.
From your code, you set the address type to 7 (p_addr.addr_type = 7
), which is not a defined GAP Address type. The default address type is BLE_GAP_ADDR_TYPE_RANDOM_STATIC
(0x01). Also make sure the two LSB of the address corresponds to the specifications for the address type, as shown in this image:
Best regards,
Jørgen
Thank you :)