Skip to content

Commit

Permalink
appended mac address to default advertised name
Browse files Browse the repository at this point in the history
  • Loading branch information
dakhnod committed Mar 16, 2024
1 parent 3ad7295 commit 3601c9a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CUSTOM_INCLUDES_DIR = $(PROJ_DIR)/src/common
ADB_TARGET ?= Pixel-5
ADB_DIRECTORY ?= /sdcard/dfu

FIRMWARE_VERSION := \"0.8.2\"
FIRMWARE_VERSION := \"0.8.3\"

# Source files common to all targets
SRC_FILES += \
Expand Down
15 changes: 13 additions & 2 deletions src/ble/sensor_ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,20 @@ void ble_init() {

if(device_name_length == 0){
// set default device name
ble_gap_addr_t addr;

#ifdef S130
APP_ERROR_CHECK(sd_ble_gap_address_get(&addr));
#else
APP_ERROR_CHECK(sd_ble_gap_addr_get(&addr));
#endif


snprintf((char*) device_name, LENGTH_DEVICE_NAME, DEVICE_NAME " %02X:%02X:%02X", addr.addr[2], addr.addr[1], addr.addr[0]);

gap_params_init(
(uint8_t*) DEVICE_NAME,
strlen(DEVICE_NAME)
device_name,
strlen((char*) device_name)
);
}else {
gap_params_init(
Expand Down

0 comments on commit 3601c9a

Please # to comment.