Closed j45p41 closed 4 months ago
Please see the examples in the nimble-arduino library for BT5. You will need to enable extended advertising in the config.
Hi but this example is for the ESP32 and not the NRF52, when I enable extended advertising in nimconfig.h it say it's only for ESP32. I am reading this wrong? Thanks for your help!
it says:
/****
That note can be safely ignored for you use, it will be removed later.
Hi h2zero,
so to be clear I have this setup:
"Extended Advertising Demo.\r\n"
"Extended advertising allows for "
"251 bytes of data in a single advertisement,\r\n"
"or up to 1650 bytes with chaining.\r\n"
"This example message is 226 bytes long "
"and is using CODED_PHY for long range."
but I don't get this with the NRF52 code.
#define CONFIG_BT_NIMBLE_EXT_ADV 1
in nimconfig.h.Sorry, been struggling with this for a while, so any help would be of great use! Even better if I could just understand what needs to be specified at the server on the NRF52 to enable then that would be very helpful indeed.
Thanks once again for an excellent library.
Sorry, been busy with work. Admittedly I haven't tried the extended advertising on the nrf52 yet, I'll see if I can test this this week.
Thank you very much indeed. I try and compile but it doesn't when I remove the esp32 related content.
Hi,
did you get a chance to test? sorry just chasing because this is one of the final steps before I send my project out for test. I will try myself in the meanwhile and update if I have any success. Thanks again!
Here is the output I get when I use the multi advertising example:
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/n-able/nrf52840_DK.html
PLATFORM: n-able (1.0.0+sha.fee3577) > Nordic nRF52840 DK (PCA10056)
HARDWARE: NRF52840_XXAA 64MHz, 256KB RAM, 1008KB Flash
DEBUG: Current (jlink) On-board (cmsis-dap, jlink) External (blackmagic, stlink)
PACKAGES:
framework-n-able-arduino @ 0.1.0+sha.b9de789
tool-sreccat @ 1.164.0 (1.64)
toolchain-gccarmnoneeabi @ 1.90301.200702 (9.3.1) LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 7 compatible libraries Scanning dependencies... Dependency Graph | -- NimBLE-Arduino @ 1.4.1 Building in release mode Compiling .pio/build/nrf52840_dk_adafruit/src/main.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLEEddystoneURL.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLEExtAdvertising.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLEHIDDevice.cpp.o src/main.cpp:17:2: warning: "/*" within comment [-Wcomment] 17 | /**/ |
---|
Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLERemoteCharacteristic.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLERemoteDescriptor.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLERemoteService.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLEScan.cpp.o src/main.cpp: In member function 'virtual void ServerCallbacks::onDisconnect(NimBLEServer*)': src/main.cpp:54:42: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 54 | Serial.printf("Sleeping for %u seconds\n", sleepTime); | ~^ |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%lu |
src/main.cpp: In member function 'virtual void advCallbacks::onStopped(NimBLEExtAdvertising*, int, uint8_t)': src/main.cpp:70:61: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 70 | Serial.printf("Time expired - sleeping for %u seconds\n", sleepTime); | ~^ |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%lu |
Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLESecurity.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLEServer.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLEService.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLEUUID.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/NimBLEUtils.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/esp_port/esp-hci/src/esp_nimble_hci.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/esp_port/port/src/esp_nimble_mem.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/aes_decrypt.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/aes_encrypt.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/cbc_mode.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/ccm_mode.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/cmac_mode.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/ctr_mode.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/ctr_prng.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/ecc.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/ecc_dh.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/ecc_dsa.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/ecc_platform_specific.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/hmac.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/hmac_prng.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/sha256.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/ext/tinycrypt/src/utils.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_adv.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_conn.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_conn_hci.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_ctrl.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_dtm.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_hci.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_hci_ev.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_iso.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_rand.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_resolv.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_rfmgmt.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_scan.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_sched.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_supp_cmd.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_sync.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_trace.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_utils.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/controller/src/ble_ll_whitelist.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/drivers/nrf51/src/ble_hw.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/drivers/nrf51/src/ble_phy.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/drivers/nrf52/src/ble_hw.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/drivers/nrf52/src/ble_phy.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/drivers/nrf52/src/ble_phy_trace.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/access.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/adv.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/aes-ccm.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/app_keys.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/beacon.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/cdb.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/cfg.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/cfg_cli.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/cfg_srv.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/crypto.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/friend.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/glue.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/health_cli.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/health_srv.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/heartbeat.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/light_model.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/lpn.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/mesh.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/model_cli.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/model_srv.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/net.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/nodes.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/pb_adv.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/pb_gatt.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/prov.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/prov_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/provisioner.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/proxy.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/rpl.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/settings.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/shell.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/subnet.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/mesh/src/transport.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/services/ans/src/ble_svc_ans.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/services/bas/src/ble_svc_bas.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/services/dis/src/ble_svc_dis.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/services/gap/src/ble_svc_gap.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/services/gatt/src/ble_svc_gatt.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/services/ias/src/ble_svc_ias.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/services/ipss/src/ble_svc_ipss.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/services/lls/src/ble_svc_lls.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_att.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_att_clt.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_att_cmd.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_att_svr.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_eddystone.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_gap.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_gattc.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_gatts.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_gatts_lcl.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_adv.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_atomic.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_cfg.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_conn.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_flow.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_hci.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_hci_cmd.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_hci_evt.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_hci_util.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_id.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_log.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_mbuf.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_misc.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_mqueue.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_periodic_sync.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_pvcy.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_resolv.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_shutdown.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_startup.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_hs_stop.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_ibeacon.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_l2cap.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_l2cap_coc.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_l2cap_sig.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_l2cap_sig_cmd.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_monitor.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_sm.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_sm_alg.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_sm_cmd.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_sm_lgcy.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_sm_sc.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_store.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_store_util.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/src/ble_uuid.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/store/config/src/ble_store_config.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/store/config/src/ble_store_config_conf.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/store/config/src/ble_store_nvs.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/host/util/src/addr.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/nimble/transport/ram/src/ble_hci_ram.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/endian.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/hal_timer.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/hal_uart.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/mem.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/nimble_port.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/os_cputime.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/os_cputime_pwr2.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/os_mbuf.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/os_mempool.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/nimble/src/os_msys_init.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/npl/freertos/src/nimble_port_freertos.c.o Compiling .pio/build/nrf52840_dk_adafruit/libad9/NimBLE-Arduino/nimble/porting/npl/freertos/src/npl_os_freertos.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/BLEBond_nvs/BLEBond_nvs.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/FC_Store/FC_Store.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/IPAddress.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/Print.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/RingBuffer.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/Stream.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/Adafruit_USBD_CDC.cpp.o Archiving .pio/build/nrf52840_dk_adafruit/libad9/libNimBLE-Arduino.a Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/Adafruit_USBD_Device.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/class/bth/bth_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/class/cdc/cdc_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/class/dfu/dfu_rt_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/class/hid/hid_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/class/midi/midi_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/class/msc/msc_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/class/net/net_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/class/usbtmc/usbtmc_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/class/vendor/vendor_device.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/common/tusb_fifo.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/device/usbd.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/device/usbd_control.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/dialog/da146xx/dcd_da146xx.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/espressif/esp32s2/dcd_esp32s2.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/microchip/samd/dcd_samd.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/microchip/samg/dcd_samg.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/nuvoton/nuc120/dcd_nuc120.c.o Indexing .pio/build/nrf52840_dk_adafruit/libad9/libNimBLE-Arduino.a Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/nuvoton/nuc121/dcd_nuc121.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/nuvoton/nuc505/dcd_nuc505.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/nxp/lpc17_40/dcd_lpc17_40.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/nxp/lpc17_40/hcd_lpc17_40.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/nxp/lpc18_43/hcd_lpc18_43.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/nxp/transdimension/dcd_transdimension.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/sony/cxd56/dcd_cxd56.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/st/synopsys/dcd_synopsys.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/portable/valentyusb/eptri/dcd_eptri.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src/tusb.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/TinyUSB/Adafruit_TinyUSB_nRF.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/Uart.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/WInterrupts.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/WMath.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/WString.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/avr/dtostrf.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/base64/base64.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/delay.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/croutine.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/event_groups.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/heap_4.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/list.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/port.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/port_nrf51.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/port_nrf51_systick.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/port_nrf52.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/port_nrf52_systick.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/queue.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/static_tasks.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/stream_buffer.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/tasks.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/freertos/timers.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/hooks.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/itoa.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/libc/malloc.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/libc/printf/printf.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/libc/printf/putchar.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/main.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/new.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/linker/gcc_startup_nrf51.S.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/linker/gcc_startup_nrf52.S.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/linker/gcc_startup_nrf52810.S.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/linker/gcc_startup_nrf52811.S.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/linker/gcc_startup_nrf52820.S.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/linker/gcc_startup_nrf52833.S.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/linker/gcc_startup_nrf52840.S.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrf_nvm_store.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrfx/drivers/src/nrfx_clock.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrfx/drivers/src/nrfx_nvmc.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrfx/drivers/src/nrfx_power.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrfx/drivers/src/nrfx_qspi.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrfx/drivers/src/nrfx_spim.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrfx/mdk/system_nrf51.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrfx/mdk/system_nrf52.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrfx/mdk/system_nrf52833.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/nordic/nrfx/mdk/system_nrf52840.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/pulse.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/pulse_asm.S.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/rtos.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/utils/debug_utils.cpp.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/wiring.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/wiring_analog_nRF51.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/wiring_analog_nRF52.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/wiring_digital.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/wiring_private.c.o Compiling .pio/build/nrf52840_dk_adafruit/FrameworkArduino/wiring_shift.c.o /Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp: In function 'void Hardfault_handler_cpp(uint32_t*)': /Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:42:45: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=] 42 | Serial.printf("Unhandled exception 0x%08x ", SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk); | ~~~^ |
---|---|---|
unsigned int | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:43:40: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 43 | Serial.printf(", exception sp 0x%08x\n", (uint32_t)p_stack_address); | |
---|---|---|
uint32_t {aka long unsigned int} | ||
unsigned int | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:44:29: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 44 | Serial.printf("R0: 0x%08x, , R1: 0x%08x , R2: 0x%08x, R3: 0x%08x, R12: 0x%08x\n", ef->r0, ef->r1, ef->r2, ef->r3, ef->r12); | |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:44:43: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 44 | Serial.printf("R0: 0x%08x, , R1: 0x%08x , R2: 0x%08x, R3: 0x%08x, R12: 0x%08x\n", ef->r0, ef->r1, ef->r2, ef->r3, ef->r12); | |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:44:56: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 44 | Serial.printf("R0: 0x%08x, , R1: 0x%08x , R2: 0x%08x, R3: 0x%08x, R12: 0x%08x\n", ef->r0, ef->r1, ef->r2, ef->r3, ef->r12); | |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:44:68: warning: format '%x' expects argument of type 'unsigned int', but argument 6 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 44 | Serial.printf("R0: 0x%08x, , R1: 0x%08x , R2: 0x%08x, R3: 0x%08x, R12: 0x%08x\n", ef->r0, ef->r1, ef->r2, ef->r3, ef->r12); | |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:44:81: warning: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 44 | Serial.printf("R0: 0x%08x, , R1: 0x%08x , R2: 0x%08x, R3: 0x%08x, R12: 0x%08x\n", ef->r0, ef->r1, ef->r2, ef->r3, ef->r12); | |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:45:29: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 45 | Serial.printf("LR: 0x%08x, PC: 0x%08x, PSR: 0x%08x\n", ef->lr, ef->pc, ef->psr); | |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:45:41: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 45 | Serial.printf("LR: 0x%08x, PC: 0x%08x, PSR: 0x%08x\n", ef->lr, ef->pc, ef->psr); | |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/utils/debug_utils.cpp:45:54: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 45 | Serial.printf("LR: 0x%08x, PC: 0x%08x, PSR: 0x%08x\n", ef->lr, ef->pc, ef->psr); | |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%08lx |
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/wiring_analog_nRF52.c: In function 'analogRead':
/Users/jaspal/.platformio/packages/framework-n-able-arduino/cores/nRF5/wiring_analog_nRF52.c:203:13: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
203 | if (value < 0) {
| ~~^~~
Archiving .pio/build/nrf52840_dk_adafruit/libFrameworkArduino.a
Indexing .pio/build/nrf52840_dk_adafruit/libFrameworkArduino.a
Linking .pio/build/nrf52840_dk_adafruit/firmware.elf
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: .pio/build/nrf52840_dk_adafruit/libad9/libNimBLE-Arduino.a(NimBLEExtAdvertising.cpp.o): in function NimBLEExtAdvertising::setScanResponseData(unsigned char, NimBLEExtAdvertisement&)': NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising19setScanResponseDataEhR22NimBLEExtAdvertisement+0x30): undefined reference to
ble_gap_ext_adv_rsp_set_data'
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: .pio/build/nrf52840_dk_adafruit/libad9/libNimBLE-Arduino.a(NimBLEExtAdvertising.cpp.o): in function NimBLEExtAdvertising::start(unsigned char, int, int)': NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising5startEhii+0x18): undefined reference to
ble_gap_ext_adv_start'
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: .pio/build/nrf52840_dk_adafruit/libad9/libNimBLE-Arduino.a(NimBLEExtAdvertising.cpp.o): in function NimBLEExtAdvertising::stop()': NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising4stopEv+0x4): undefined reference to
ble_gap_ext_adv_clear'
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: .pio/build/nrf52840_dk_adafruit/libad9/libNimBLE-Arduino.a(NimBLEExtAdvertising.cpp.o): in function NimBLEExtAdvertising::setInstanceData(unsigned char, NimBLEExtAdvertisement&)': NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising15setInstanceDataEhR22NimBLEExtAdvertisement+0x52): undefined reference to
ble_gap_ext_adv_configure'
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising15setInstanceDataEhR22NimBLEExtAdvertisement+0x92): undefined reference to ble_gap_ext_adv_rsp_set_data' /Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising15setInstanceDataEhR22NimBLEExtAdvertisement+0xda): undefined reference to
ble_gap_ext_adv_set_addr'
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising15setInstanceDataEhR22NimBLEExtAdvertisement+0xea): undefined reference to `ble_gap_ext_adv_set_data'
collect2: error: ld returned 1 exit status
*** [.pio/build/nrf52840_dk_adafruit/firmware.elf] Error 1
=============== [FAILED] Took 9.20 seconds ===============
The terminal process "platformio 'run', '--environment', 'nrf52840_dk_adafruit'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it. `
Also here is the output I get (a bit shorter!) when using just the extended server on the nrtf52 with esp32 sleep commented out.
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https://docs.platformio.org/page/boards/n-able/nrf52840_DK.html
PLATFORM: n-able (1.0.0+sha.fee3577) > Nordic nRF52840 DK (PCA10056)
HARDWARE: NRF52840_XXAA 64MHz, 256KB RAM, 1008KB Flash
DEBUG: Current (jlink) On-board (cmsis-dap, jlink) External (blackmagic, stlink)
PACKAGES:
framework-n-able-arduino @ 0.1.0+sha.b9de789
tool-sreccat @ 1.164.0 (1.64)
toolchain-gccarmnoneeabi @ 1.90301.200702 (9.3.1) LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 7 compatible libraries Scanning dependencies... Dependency Graph | -- NimBLE-Arduino @ 1.4.1 Building in release mode Compiling .pio/build/nrf52840_dk_adafruit/src/main.cpp.o src/main.cpp:17:2: warning: "/*" within comment [-Wcomment] 17 | /**/ |
---|
src/main.cpp: In member function 'virtual void ServerCallbacks::onDisconnect(NimBLEServer*)': src/main.cpp:51:60: warning: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 51 | Serial.printf("Client disconnected - sleeping for %u seconds\n", sleepSeconds); | ~^ |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%lu |
src/main.cpp: In member function 'virtual void advertisingCallbacks::onStopped(NimBLEExtAdvertising*, int, uint8_t)': src/main.cpp:66:54: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Wformat=] 66 | printf("Time expired - sleeping for %u seconds\n", sleepSeconds); | ~^ |
---|---|---|
unsigned int uint32_t {aka long unsigned int} | ||
%lu |
Linking .pio/build/nrf52840_dk_adafruit/firmware.elf
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .heap by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .stack_dummy by 4 bytes
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: .pio/build/nrf52840_dk_adafruit/libad9/libNimBLE-Arduino.a(NimBLEExtAdvertising.cpp.o): in function NimBLEExtAdvertising::start(unsigned char, int, int)': NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising5startEhii+0x18): undefined reference to
ble_gap_ext_adv_start'
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: .pio/build/nrf52840_dk_adafruit/libad9/libNimBLE-Arduino.a(NimBLEExtAdvertising.cpp.o): in function NimBLEExtAdvertising::stop()': NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising4stopEv+0x4): undefined reference to
ble_gap_ext_adv_clear'
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: .pio/build/nrf52840_dk_adafruit/libad9/libNimBLE-Arduino.a(NimBLEExtAdvertising.cpp.o): in function NimBLEExtAdvertising::setInstanceData(unsigned char, NimBLEExtAdvertisement&)': NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising15setInstanceDataEhR22NimBLEExtAdvertisement+0x52): undefined reference to
ble_gap_ext_adv_configure'
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising15setInstanceDataEhR22NimBLEExtAdvertisement+0x92): undefined reference to ble_gap_ext_adv_rsp_set_data' /Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising15setInstanceDataEhR22NimBLEExtAdvertisement+0xda): undefined reference to
ble_gap_ext_adv_set_addr'
/Users/jaspal/.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: NimBLEExtAdvertising.cpp:(.text._ZN20NimBLEExtAdvertising15setInstanceDataEhR22NimBLEExtAdvertisement+0xea): undefined reference to `ble_gap_ext_adv_set_data'
collect2: error: ld returned 1 exit status
*** [.pio/build/nrf52840_dk_adafruit/firmware.elf] Error 1
=============== [FAILED] Took 1.14 seconds ===============
The terminal process "platformio 'run', '--environment', 'nrf52840_dk_adafruit'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it. `
Same thing happened to me, it seems it cannot load the ble functions (trying to load from the ESP32 library?)
Would like to get NRF52 working with coded PHY if possible
HI @h2zero - delighted to see that you are looking into this.
I have done a bit of research in the background and found that:
https://github.com/tjpetz/Coded-Advertiser/blob/main/main.cpp
seems to work for coded_phy but it is based on Mbed :(. However when I run the example your esp32 BT5 client example detects the coded_phy device. Just thought I would put it out there incase it helps!
@j45p41 @nunomiguelferreira I'm not sure what is going on with your environments. I have tested with the following and is compiling just fine.
[env:nrf52840_dk]
platform = https://github.com/h2zero/platform-n-able.git#1.0.0
board = nrf52840_dk
framework = arduino
platform_packages = framework-n-able @ https://github.com/h2zero/n-able-Arduino
lib_deps = h2zero/NimBLE-Arduino
build_flags =
'-DCONFIG_NIMBLE_CPP_LOG_LEVEL=3'
'-DCONFIG_BT_NIMBLE_EXT_ADV=1'
With this code (multi advertiser): ext_adv_nrf.txt
Hi @h2zero,
really appreciate you looking into this. I can confirm that it now compiles. However I get tis in the console:
I NimBLEDevice: BLE Host Task Started
I NimBLEDevice: NimBle host synced.
E NimBLEExtAdvertising: Advertising config error: rc = 530
Failed to register advertisment data
I also can't see the device on nrfConnect or ESP32.
@j45p41 that return code is odd.
0x0212 | 0x12 | BLE_ERR_INV_HCI_CMD_PARMS | Invalid HCI Command Parameters |
---|
I need more info and and possibly an example code to resolve this.
hi @h2zero I used the code and platform.ini you posed in the reply. I am using nrf52840 DK. Let me know if there is any other info that would be useful. Thanks!
HI @h2zero - Can you pls let me know how we can troubleshoot this. I used the example code you sent me with requested debug level - will really help if I can get the nrf52840 working with coded-PHY. Do you have any code that you have tested?
Hi, any help would really be appreciated:)
Hi @j45p41, I have pushed some changes to the n-able core that should have fixed this. Please try that out.
Hi,
@h2zero thank you very much indeed.
I have used the following platformio.ini:
[env:nrf52840_dk]
platform = https://github.com/h2zero/platform-n-able.git#1.0.0
board = nrf52840_dk
framework = arduino
platform_packages = framework-n-able @ https://github.com/h2zero/n-able-Arduino
monitor_speed = 115200
monitor_port = /dev/cu.usbmodem0010502223231
upload_protocol = jlink
build_flags =
-D USE_LFRC
'-DCONFIG_NIMBLE_CPP_LOG_LEVEL=3'
'-DCONFIG_BT_NIMBLE_EXT_ADV=1'
lib_deps =
h2zero/NimBLE-Arduino@^1.4.1
and the code you provided.
I am still getting same serial output:
Failed to register advertisment data
�I NimBLEDevice: BLE Host Task Started
I NimBLEDevice: NimBle host synced.
E NimBLEExtAdvertising: Advertising config error: rc = 530
I did platform clean before compiling. Do I need to do anything else to pull in your new changes?
That should work, it's likely using a cached version of the core.
I just tested here, if you delete the .platformio/packages/framework-n-able-arduino
folder and .platformio/.cache
folder it should pull the repo and you'll see the commit ID in the log.
Hi @h2zero that works! I can't believe after 7 months it's finally working! Thank you very much for your help!
If I can get a bit more range than the legacy BT in an indoor environment then this will really help our project.
Is it possible to:
Thanks Again!
Glad to hear, sorry it took so long, wasn't easy to find the issue.
NimBLEDevice::setPower(8);
should do it.You're very welcome 😄
It all in good time!
so after adapting the project last night and with your comments above here is my experience.
/* Primary PHY used for advertising, can be one of BLE_HCI_LE_PHY_1M or BLE_HCI_LE_PHY_CODED */
static uint8_t primaryPhy = BLE_HCI_LE_PHY_CODED_S8;
/* Secondary PHY used for advertising and connecting,
* can be one of BLE_HCI_LE_PHY_1M, BLE_HCI_LE_PHY_2M or BLE_HCI_LE_PHY_CODED
*/
static uint8_t secondaryPhy = BLE_HCI_LE_PHY_CODED_S2;
However I am getting the following message (all ok when using BLE_HCI_LE_PHY_CODED
).
I NimBLEDevice: BLE Host Task Started
I NimBLEDevice: NimBle host synced.
D NimBLEServer: >> createService - 0xabcd
D NimBLEServer: << createService
D NimBLEService: << Adding a duplicate characteristic with UUID: 0x1234
D NimBLEService: >> start(): Starting service: UUID: 0xabcd, handle: 0xffff
D NimBLEService: Adding 2 characteristics for service UUID: 0xabcd, handle: 0xffff
D NimBLEService: << start()
primary service
uuid 0x1800
handle 1
end_handle 5
characteristic
uuid 0x2a00
def_handle 2
val_handle 3
min_key_size 0
flags [READ]
characteristic
uuid 0x2a01
def_handle 4
val_handle 5
min_key_size 0
flags [READ]
primary service
uuid 0x1801
handle 6
end_handle 9
characteristic
uuid 0x2a05
def_handle 7
val_handle 8
min_key_size 0
flags [INDICATE]
ccc descriptor
uuid 0x2902
handle 9
min_key_size 0
flags [READ|WRITE]
primary service
uuid 0xabcd
handle 10
end_handle 16
characteristic
uuid 0x1234
def_handle 11
val_handle 12
min_key_size 0
flags [READ|WRITE|NOTIFY]
ccc descriptor
uuid 0x2902
handle 13
min_key_size 0
flags [READ|WRITE]
characteristic
uuid 0x1234
def_handle 14
val_handle 15
min_key_size 0
flags [READ|WRITE|NOTIFY]
ccc descriptor
uuid 0x2902
handle 16
min_key_size 0
flags [READ|WRITE]
E NimBLEExtAdvertising: Advertising config error: rc = 530
Failed to register advertisment data
The macros BLE_HCI_LE_PHY_CODED_S2
and BLE_HCI_LE_PHY_CODED_S8
are invalid, thus the return code of 530.
The macros
BLE_HCI_LE_PHY_CODED_S2
andBLE_HCI_LE_PHY_CODED_S8
are invalid, thus the return code of 530.
Ok. How do I enable s2 or s8 modes?
Hi @h2zero - first of all thanks for all your help. I managed to get what I wanted out of it.
Referring to: https://github.com/h2zero/NimBLE-Arduino/issues/599
'-DMYNEWT_VAL_BLE_LL_TX_PWR_DBM=4'
'-DMYNEWT_VAL_BLE_LL_RX_PWR_DBM=4'
and now the range is MUCH better even from outdoors to indoors.
So it seem that this is the only way of increasing power.
Here is the power graph with it it on:
and here it is with it off:
so there is a clear increase in power. This does not work when using NimBLEDevice::setPower(8);
as suggested above.
So I am happy now because my project is now in flight due to your kind help and the above change.
Only questions remain:
I have used the following line but now sure if this is making any difference:
NimBLEDevice::init("");
// NimBLEDevice::setPower(8);
NRF_RADIO->MODE = (RADIO_MODE_MODE_Ble_LR125Kbit << RADIO_MODE_MODE_Pos);
Looks like the NimBLE driver caps the tx power to 4dbm, you can use the register to go to 8 NRF_RADIO->TXPOWER = 8;
Hey thanks. putting it in the code after init:
NimBLEDevice::init(""); NRF_RADIO->TXPOWER = 8;
gets overridden by the setting in the platform file for 4dbm. When I remove it the current drops back to the 0dbm reading approx 15mA (when higher (4dbm) value is actually set its 25mA). So it looks like placing
NRF_RADIO->TXPOWER = 8;
OR
NimBLEDevice::setPower(8);
it in the code does not seem to have any effect on actual power output.
I also looked at max values:
so looks like only way to trigger the change is via:
'-DMYNEWT_VAL_BLE_LL_TX_PWR_DBM=4'
'-DMYNEWT_VAL_BLE_LL_RX_PWR_DBM=4'
in the platformio.ini
file, but that caps it at 4dbm.
Yes, I've just looked at this as well and the issue is the controller will change it when advertising starts to the macro value and hard cap the value when calling the setPower function. This will require changes to the controller code.
Well you have got me far enough my friend. This will be a welcome addition later. The 4dbm is enough for the current purpose.
I sent my board to Nordic who tested it and we performed radio optimisation over a few exchanges. So based on this a board with a pcb antenna and a plastic enclosure benefits massively with the extra power and is reliably usable in a home environment. 0 dbm is very hit and miss in my experience.
Sounds good, glad that it's working for you. I will try to address the controller shortfalls when I update the core files.
Actually I was wondering, is there a quick bypass to get this working or does it require lots of investigation? Where would I look if I wanted to have a go?
Do a search for the function called by setPower and follow it to where it is capped and change that.
When I look on ble_phy.hit is set to 10. So this is above 4dbm am I missing something?
Okay, if you search for ble_phy_txpwr_set
you'll find what I mentioned above with the calls to set the power level to the one in the macro but you'll also find that the macro is limited to 4dbm here. There is also a nice little TODO note for this reason 😄
@j45p41 Here is a branch with the new NimBLE version and an extension to the tx power setting function to allow for 8dbm. https://github.com/h2zero/NimBLE-Arduino/tree/nimble-1.5.0
NimBLEDevice::setPower(8);
should be all that is needed.
Whoa - thanks! I will be trying that when I get home!
Ok rushed home!
I get this:
Do I need to copy files manually?
try this:
https://github.com/h2zero/NimBLE-Arduino.git#nimble-1.5.0
Also, just FYI the default coded PHY is S=8
Hi @h2zero - so now it compiles. When I run it I get:
I NimBLEDevice: BLE Host Task Started
I NimBLEDevice: NimBle host synced.
D NimBLEServer: >> createService - 0xabcd
D NimBLEServer: << createService
D NimBLEService: << Adding a duplicate characteristic with UUID: 0x1234
D NimBLEService: >> start(): Starting service: UUID: 0xabcd, handle: 0xffff
D NimBLEService: Adding 2 characteristics for service UUID: 0xabcd, handle: 0xffff
Unhandled exception 0x00000003 , exception sp 0x20003d10
R0: 0x200059b8, , R1: 0x66666666 , R2: 0x200059e0, R3: 0x00000004, R12: 0x000027bb
LR: 0x00000000, PC: 0x0000a74c, PSR: 0x01000200
seems to happen only with new version when I set or do not set power.
this is the output on version 1.4.1:
I NimBLEDevice: BLE Host Task Started
I NimBLEDevice: NimBle host synced.
D NimBLEServer: >> createService - 0xabcd
D NimBLEServer: << createService
D NimBLEService: << Adding a duplicate characteristic with UUID: 0x1234
D NimBLEService: >> start(): Starting service: UUID: 0xabcd, handle: 0xffff
D NimBLEService: Adding 2 characteristics for service UUID: 0xabcd, handle: 0xffff
D NimBLEService: << start()
primary service
uuid 0x1800
handle 1
end_handle 5
characteristic
uuid 0x2a00
def_handle 2
val_handle 3
min_key_size 0
flags [READ]
characteristic
uuid 0x2a01
def_handle 4
val_handle 5
min_key_size 0
flags [READ]
primary service
uuid 0x1801
handle 6
end_handle 9
characteristic
uuid 0x2a05
def_handle 7
val_handle 8
min_key_size 0
flags [INDICATE]
ccc descriptor
uuid 0x2902
handle 9
min_key_size 0
flags [READ|WRITE]
primary service
uuid 0xabcd
handle 10
end_handle 16
characteristic
uuid 0x1234
def_handle 11
val_handle 12
min_key_size 0
flags [READ|WRITE|NOTIFY]
ccc descriptor
uuid 0x2902
handle 13
min_key_size 0
flags [READ|WRITE]
characteristic
uuid 0x1234
def_handle 14
val_handle 15
min_key_size 0
flags [READ|WRITE|NOTIFY]
ccc descriptor
uuid 0x2902
handle 16
min_key_size 0
flags [READ|WRITE]
D NimBLEExtAdvertising: >> Extended Advertising start
D NimBLEExtAdvertising: << Extended Advertising start
Started advertising
D NimBLEServer: >> handleGapEvent:
D NimBLEServerCallbacks: onConnect(): Default
Client connected:: ec:da:3b:1e:40:aa
D NimBLEServer: >> handleGapEvent:
Advertising instance 0 stopped
Client connecting
D NimBLEServer: >> handleGapEvent:
I NimBLEServer: mtu update event; conn_handle=1 mtu=255
D NimBLEServerCallbacks: onMTUChange(): Default
Thanks again!
I'm not surprised, I haven't really tested this yet. I'll look into the issue shortly.
I'm not surprised, I haven't really tested this yet. I'll look into the issue shortly.
Take your time bro. Happy to offer any testing needed.
Just pushed the fix, please let me know if it works for you.
OK so did some testing here is what I found:
It is possible to get to 8dbm by setting:
build_flags =
'-DMYNEWT_VAL_BLE_LL_TX_PWR_DBM=8'
'-DMYNEWT_VAL_BLE_LL_RX_PWR_DBM=8'
I can see this now on power graph:
No setting - RSSI: -82 - 15mA 4dbm setting - RSSI : -70 - 24mA 8dbm setting - RSSI: -59 - 38mA
I can also see it connecting on the client:
Connected to: cb:68:8d:5f:69:d3 RSSI: -68
Characteristic value:
cb:68:8d:5f:69:d3 Disconnected - Starting scan
Done with this device!
Connected to: fd:d1:a1:13:df:22 RSSI: -67
Characteristic value:
fd:d1:a1:13:df:22 Disconnected - Starting scan
Done with this device!
Connected to: f6:f0:bb:a6:ad:33 RSSI: -68
f6:f0:bb:a6:ad:33 Disconnected - Starting scan
Done with this device!
Connected to: f5:4f:a3:66:b0:84 RSSI: -66
f5:4f:a3:66:b0:84 Disconnected - Starting scan
ABCD service not found.
Done with this device!
Connected to: fb:4e:dd:70:b8:ac RSSI: -67
Characteristic value:
fb:4e:dd:70:b8:ac Disconnected - Starting scan
Done with this device!
Connected to: c7:ff:c7:79:e1:1b RSSI: -71
Characteristic value:
c7:ff:c7:79:e1:1b Disconnected - Starting scan
Done with this device!
Connected to: fe:69:1b:9e:95:bf RSSI: -60
Characteristic value:
fe:69:1b:9e:95:bf Disconnected - Starting scan
Done with this device!
Connected to: d3:8a:ed:a0:aa:d5 RSSI: -59
Characteristic value:
d3:8a:ed:a0:aa:d5 Disconnected - Starting scan
Done with this device!
However it seems that the incoming Mac address keeps changing. This happens with or without power setting so I think is something else in the updated library.
using setpower / SET_TXPOWER before or after init does not seem to change anything but now the power is not capped when specifying through plaformio.ini.
Thanks for the great progress!
Thanks for the feedback, glad to see the progress. You should be able to set the power level in code before starting advertising or connecting without the need for defining it on the command line.
Interesting about the MAC address, what is the client device?
client device is esp32 c3 running BLE5 client example. When I switch back to 1.4.1 address is ok.
Hmm, in that case I'm going to assume that random mac is enabled on the esp. is it also running on this updated branch?
yes because the client side is running the same example. When I switch to 1.4.1 it's consistent but with 1.5.0 it's changing.
That's what I was curious about, thanks for confirming that suspicion. I'll look into that, quite strange that it has been changed.
Thanks for testing, please report any other issues or errors encountered.
Discussed in https://github.com/h2zero/NimBLE-Arduino/discussions/580