Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth issues #8

Closed
Jstar018 opened this issue May 28, 2023 · 14 comments
Closed

Bluetooth issues #8

Jstar018 opened this issue May 28, 2023 · 14 comments

Comments

@Jstar018
Copy link

Jstar018 commented May 28, 2023

Hi Fabian,

Thank you for pulling together. I am new to alot of this so apologies if this is an ignorant question. I have got the board, connected it up. compiled and uploaded the content to it but the Bluetooth is not visible on the moonboard app.

I have been playing around for a while looking at different options. When I go to 'build' there are 47 error messages mostly with the bluetooth setup (below is the output). I assume that this is what is driving it. Wondering if it is me or there were some changes in the reference libs that this uses.

Any advice and guidance on what I need to do to address is appreciated.

Cheers,

Processing nano33ble (platform: nordicnrf52; board: nano33ble; framework: arduino)

Library Manager: Installing SPI
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/nano33ble.html
PLATFORM: Nordic nRF52 (9.6.0) > Arduino Nano 33 BLE
HARDWARE: NRF52840 64MHz, 256KB RAM, 960KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink)
PACKAGES:

  • framework-arduino-mbed @ 4.0.2
  • tool-sreccat @ 1.164.0 (1.64)
  • toolchain-gccarmnoneeabi @ 1.80201.181220 (8.2.1)
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 46 compatible libraries
    Scanning dependencies...
    Dependency Graph
    |-- HardwareBLESerial @ 1.0.0
    |-- ArduinoBLE @ 1.3.4
    |-- NeoPixelBus @ 2.7.5
    Building in release mode
    Compiling .pio\build\nano33ble\src\main.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\BLEAdvertisingData.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\BLECharacteristic.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\BLEDescriptor.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\BLEDevice.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\BLEService.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\BLEStringCharacteristic.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\BLETypedCharacteristics.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\local\BLELocalAttribute.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\local\BLELocalCharacteristic.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\local\BLELocalDescriptor.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\local\BLELocalDevice.cpp.o
    In file included from .pio\libdeps\nano33ble\ArduinoBLE\src/utility/GATT.h:26,
    from .pio\libdeps\nano33ble\ArduinoBLE\src\local\BLELocalCharacteristic.cpp:25:
    .pio\libdeps\nano33ble\ArduinoBLE\src/local/BLELocalCharacteristic.h: In constructor 'BLELocalCharacteristic::BLELocalCharacteristic(const char*, uint16_t, int, bool)':
    .pio\libdeps\nano33ble\ArduinoBLE\src/local/BLELocalCharacteristic.h:90:12: warning: 'BLELocalCharacteristic::_cccdValue' will be initialized after [-Wreorder]
    uint16_t _cccdValue;
    ^~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src/local/BLELocalCharacteristic.h:79:12: warning: 'uint8_t BLELocalCharacteristic::_permissions' [-Wreorder]
    uint8_t _permissions;
    ^~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\local\BLELocalCharacteristic.cpp:32:1: warning: when initialized here [-Wreorder]
    BLELocalCharacteristic::BLELocalCharacteristic(const char* uuid, uint16_t permissions, int valueSize, bool fixedLength) :
    ^~~~~~~~~~~~~~~~~~~~~~
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\local\BLELocalService.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\remote\BLERemoteAttribute.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\remote\BLERemoteCharacteristic.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\remote\BLERemoteDescriptor.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\remote\BLERemoteDevice.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\remote\BLERemoteService.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\ATT.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\BLEUuid.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\GAP.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\GATT.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\HCI.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\HCICordioTransport.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\HCIUartTransport.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\HCIVirtualTransport.cpp.o
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\L2CAPSignaling.cpp.o
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual bool ATTClass::handleNotify(uint16_t, const uint8_t*, int)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:592:39: warning: variable length array 'notification' is used [-Wvla]
    uint8_t notification[_peers[i].mtu];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual bool ATTClass::handleInd(uint16_t, const uint8_t*, int)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:623:37: warning: variable length array 'indication' is used [-Wvla]
    uint8_t indication[_peers[i].mtu];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual void ATTClass::findInfoReq(uint16_t, uint16_t, uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:746:23: warning: variable length array 'response' is used [-Wvla]
    uint8_t response[mtu];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual void ATTClass::findByTypeReq(uint16_t, uint16_t, uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:838:23: warning: variable length array 'response' is used [-Wvla]
    uint8_t response[mtu];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual void ATTClass::readByGroupReq(uint16_t, uint16_t, uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:896:23: warning: variable length array 'response' is used [-Wvla]
    uint8_t response[mtu];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual void ATTClass::readOrReadBlobReq(uint16_t, uint16_t, uint8_t, uint8_t, uint8_t*)':
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\bitDescriptions.cpp.o
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:1003:23: warning: variable length array 'response' is used [-Wvla]
    uint8_t response[mtu];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual void ATTClass::readByTypeReq(uint16_t, uint16_t, uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:1118:23: warning: variable length array 'response' is used [-Wvla]
    uint8_t response[mtu];
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\btct.cpp.o
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual void ATTClass::writeReqOrCmd(uint16_t, uint16_t, uint8_t, uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:1343:25: warning: variable length array 'response' is used [-Wvla]
    uint8_t response[mtu];
    Compiling .pio\build\nano33ble\lib6ac\ArduinoBLE\utility\keyDistribution.cpp.o
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual void ATTClass::prepWriteReq(uint16_t, uint16_t, uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:1457:23: warning: variable length array 'response' is used [-Wvla]
    uint8_t response[mtu];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual void ATTClass::execWriteReq(uint16_t, uint16_t, uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:1490:23: warning: variable length array 'response' is used [-Wvla]
    uint8_t response[mtu];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual bool ATTClass::exchangeMtu(uint16_t)':
    Compiling .pio\build\nano33ble\libbbe\HardwareBLESerial\HardwareBLESerial.cpp.o
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:1572:33: warning: variable length array 'responseBuffer' is used [-Wvla]
    uint8_t responseBuffer[_maxMtu];
    Compiling .pio\build\nano33ble\lib876\SPI\SPI.cpp.o
    ^
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\animations\NeoPixelAnimator.cpp.o
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual bool ATTClass::discoverServices(uint16_t, BLERemoteDevice*, const char*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:1586:33: warning: variable length array 'responseBuffer' is used [-Wvla]
    uint8_t responseBuffer[_maxMtu];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual bool ATTClass::discoverCharacteristics(uint16_t, BLERemoteDevice*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:1642:33: warning: variable length array 'responseBuffer' is used [-Wvla]
    uint8_t responseBuffer[_maxMtu];
    ^
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\HsbColor.cpp.o
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp: In member function 'virtual bool ATTClass::discoverDescriptors(uint16_t, BLERemoteDevice*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\ATT.cpp:1699:33: warning: variable length array 'responseBuffer' is used [-Wvla]
    uint8_t responseBuffer[_maxMtu];
    ^
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\HslColor.cpp.o
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp: In member function 'virtual void HCIClass::poll(long unsigned int)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:141:20: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
    if (_recvIndex >= sizeof(_recvBuffer)) {
    ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp: In member function 'virtual int HCIClass::tryResolveAddress(uint8_t*, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:565:14: warning: unused variable 'memcheck' [-Wunused-variable]
    uint8_t* memcheck;
    ^~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:557:11: warning: variable 'irk' set but not used [-Wunused-but-set-variable]
    uint8_t irk[16];
    ^~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp: In member function 'virtual int HCIClass::sendAclPkt(uint16_t, uint8_t, uint8_t, void*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:633:41: warning: variable length array 'txBuffer' is used [-Wvla]
    uint8_t txBuffer[sizeof(aclHdr) + plen];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp: In member function 'virtual int HCIClass::sendCommand(uint16_t, uint8_t, void*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:683:41: warning: variable length array 'txBuffer' is used [-Wvla]
    uint8_t txBuffer[sizeof(pktHdr) + plen];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp: In member function 'virtual void HCIClass::handleEventPkt(uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:979:33: warning: variable length array 'BD_ADDRs' is used [-Wvla]
    uint8_t BD_ADDRs[num_keys][6];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:980:29: warning: variable length array 'LKs' is used [-Wvla]
    uint8_t LKs[num_keys][16];
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:979:13: warning: unused variable 'BD_ADDRs' [-Wunused-variable]
    uint8_t BD_ADDRs[num_keys][6];
    ^~~~~~Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\HtmlColor.cpp.o
    ~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:980:13: warning: unused variable 'LKs' [-Wunused-variable]
    uint8_t LKs[num_keys][16];
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\HtmlColorNameStrings.cpp.o
    ^~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:981:10: warning: variable 'nAddresss' set but not used [-Wunused-but-set-variable]
    auto nAddresss = [pdata](uint8_t nAddr)->uint8_t*{
    ^~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:984:10: warning: variable 'nLK' set but not used [-Wunused-but-set-variable]
    auto nLK = [pdata](uint8_t nLK)->uint8_t*{
    ^~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:999:8: warning: unused variable 'cmdHardwareError' [-Wunused-variable]
    } cmdHardwareError = (CmdHardwareError)&pdata[sizeof(HCIEventHdr)];
    ^~~~~~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:1099:17: warning: unused variable 'address' [-Wunused-variable]
    uint8_t address[6];
    ^~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:1100:17: warning: variable 'BDAddr' set but not used [-Wunused-but-set-variable]
    uint8_t BDAddr[6];
    ^~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:1320:25: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
    for(int i=0; i<sizeof(pairingConfirm.cb);i++){
    ~^~~~~~~~~~~~~~~~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:1330:25: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
    for(int i=0; i<sizeof(HCI.remotePublicKeyBuffer); i++){
    ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:1329:19: warning: variable 'remotePublicKeyReversed' set but not used [-Wunused-but-set-variable]
    uint8_t remotePublicKeyReversed[sizeof(HCI.remotePublicKeyBuffer)];
    ^~~~~~~~~~~~~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCI.cpp:1016:7: warning: case value '10' not in enumerated type 'LE_META_EVENT' [-Wswitch]
    case 0x0A:{
    ^~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCICordioTransport.cpp: In function 'void bleLoop()':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCICordioTransport.cpp:123:68: warning: 'us_timestamp_t mbed::TimerBase::read_high_resolution_us() const' is deprecated: Use the Chrono-based elapsed_time method. If integer microseconds are needed, you can use elapsed_time().count() [since mbed-os-6.0.0] [-Wdeprecated-declarations]
    last_update_us += (uint64_t) timer.read_high_resolution_us();
    ^
    In file included from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/mbed.h:83,
    from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed.h:8,
    from .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCICordioTransport.cpp:23:
    C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/drivers/include/drivers/Timer.h:104:20: note: declared here
    us_timestamp_t read_high_resolution_us() const;
    ^~~~~~~~~~~~~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCICordioTransport.cpp:145:72: warning: 'us_timestamp_t mbed::TimerBase::read_high_resolution_us() const' is deprecated: Use the Chrono-based elapsed_time method. If integer microseconds are needed, you can use elapsed_time().count() [since mbed-os-6.0.0] [-Wdeprecated-declarations]
    uint64_t time_spent = (uint64_t) timer.read_high_resolution_us();
    ^
    In file included from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/mbed.h:83,
    from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed.h:8,
    from .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCICordioTransport.cpp:23:
    C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/drivers/include/drivers/Timer.h:104:20: note: declared here
    us_timestamp_t read_high_resolution_us() const;
    ^~~~~~~~~~~~~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCICordioTransport.cpp:156:55: warning: 'void rtos::ThisThread::sleep_for(uint32_t)' is deprecated: Pass a chrono duration, not an integer millisecond count. For example use 5s rather than 5000. [since mbed-os-6.0.0] [-Wdeprecated-declarations]
    rtos::ThisThread::sleep_for(wait_time_ms);
    ^
    In file included from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/rtos/include/rtos/rtos.h:30,
    from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/mbed.h:24,
    from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed.h:8,
    from .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCICordioTransport.cpp:23:
    C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/rtos/include/rtos/ThisThread.h:216:6: note: declared here
    void sleep_for(uint32_t millisec);
    ^~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCICordioTransport.cpp:156:55: warning: 'void rtos::ThisThread::sleep_for(uint32_t)' is deprecated: Pass a chrono duration, not an integer millisecond count. For example use 5s rather than 5000. [since mbed-os-6.0.0] [-Wdeprecated-declarations]
    rtos::ThisThread::sleep_for(wait_time_ms);
    ^
    In file included from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/rtos/include/rtos/rtos.h:30,
    from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/mbed.h:24,
    from C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed.h:8,
    from .pio\libdeps\nano33ble\ArduinoBLE\src\utility\HCICordioTransport.cpp:23:
    C:\Users\rahnl.platformio\packages\framework-arduino-mbed\cores\arduino/mbed/rtos/include/rtos/ThisThread.h:216:6: note: declared here
    void sleep_for(uint32_t millisec);
    ^~~~~~~~~
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\HtmlColorNames.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\HtmlColorShortNames.cpp.o
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\L2CAPSignaling.cpp: In member function 'virtual void L2CAPSignalingClass::handleSecurityData(uint16_t, uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\L2CAPSignaling.cpp:271:8: warning: unused variable 'pairingFailed' [-Wunused-variable]
    } pairingFailed = (PairingFailed)data;
    ^~~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\L2CAPSignaling.cpp:320:7: warning: unused variable 'readPublicKeyCommand' [-Wunused-variable]
    } readPublicKeyCommand = {
    ^~~~~~~~~~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\L2CAPSignaling.cpp: In member function 'virtual void L2CAPSignalingClass::smCalculateLTKandConfirm(uint16_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\L2CAPSignaling.cpp:421:19: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
    for(int i=0; i<sizeof(Eb); i++){
    ~^~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\L2CAPSignaling.cpp: In member function 'virtual void L2CAPSignalingClass::handleSecurityData(uint16_t, uint8_t, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\L2CAPSignaling.cpp:296:13: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
    for(int i; i<6; i++) peerAddress[5-i] = identityAddress->address[i];
    ^
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\NeoGammaDynamicTableMethod.cpp.o
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\btct.cpp: In member function 'int BluetoothCryptoToolbox::f5(uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*)':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\btct.cpp:63:13: warning: variable 'ADD_M' set but not used [-Wunused-but-set-variable]
    uint8_t ADD_M[7];
    ^~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\btct.cpp:64:13: warning: variable 'ADD_S' set but not used [-Wunused-but-set-variable]
    uint8_t ADD_S[7];
    ^~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\btct.cpp: In member function 'void BluetoothCryptoToolbox::testAh()':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\btct.cpp:138:13: warning: variable 'r' set but not used [-Wunused-but-set-variable]
    uint8_t r[3] = {0x70,0x81,0x94};
    ^
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\btct.cpp:139:13: warning: unused variable 'expected_AES' [-Wunused-variable]
    uint8_t expected_AES[16] = {0x15,0x9d,0x5f,0xb7,0x2e,0xbe,0x23,0x11,0xa4,0x8c,0x1b,0xdc,0xc4,0x0d,0xfb,0xaa};
    ^~~~~~~~~~~~
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\btct.cpp: In member function 'void BluetoothCryptoToolbox::testg2()':
    .pio\libdeps\nano33ble\ArduinoBLE\src\utility\btct.cpp:173:13: warning: unused variable 'AES' [-Wunused-variable]
    uint8_t AES[16] = {0x15,0x36,0xd1,0x8d,0xe3,0xd2,0x0d,0xf9,0x9b,0x70,0x44,0xc1,0x2f,0x9e,0xd5,0xba};
    ^~~
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\NeoGammaTableMethod.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\Rgb48Color.cpp.o
    Archiving .pio\build\nano33ble\lib6ac\libArduinoBLE.a
    Archiving .pio\build\nano33ble\lib876\libSPI.a
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\RgbColor.cpp.o
    Archiving .pio\build\nano33ble\libbbe\libHardwareBLESerial.a
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\RgbColorBase.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\Rgbw64Color.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\RgbwColor.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\colors\SegmentDigit.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\methods\Esp32_i2s.c.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\methods\NeoEsp32RmtMethod.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\methods\NeoEsp8266I2sMethodCore.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\methods\NeoEsp8266UartMethod.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\methods\NeoEspBitBangMethod.cpp.o
    Compiling .pio\build\nano33ble\libdb7\NeoPixelBus\internal\methods\NeoPixelAvr.c.o
    Compiling .pio\build\nano33ble\FrameworkArduinoVariant\variant.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\Interrupts.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\Serial.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\Tone.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\USB\PluggableUSBDevice.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\USB\USBCDC.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\USB\USBSerial.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\WMath.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\abi.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\api\Common.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\api\IPAddress.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\api\PluggableUSB.cpp.o
    Archiving .pio\build\nano33ble\libdb7\libNeoPixelBus.a
    Compiling .pio\build\nano33ble\FrameworkArduino\api\Print.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\api\Stream.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\api\String.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\arm_hal_random.c.o
    Compiling .pio\build\nano33ble\FrameworkArduino\as_mbed_library\variant.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\itoa.c.o
    Compiling .pio\build\nano33ble\FrameworkArduino\main.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\mbed\platform\cxxsupport\mstd_mutex.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\pinToIndex.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\random_seed.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\timer.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\wiring.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\wiring_analog.cpp.o
    Archiving .pio\build\nano33ble\libFrameworkArduinoVariant.a
    Compiling .pio\build\nano33ble\FrameworkArduino\wiring_digital.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\wiring_pulse.cpp.o
    Compiling .pio\build\nano33ble\FrameworkArduino\wiring_shift.cpp.o
    Archiving .pio\build\nano33ble\libFrameworkArduino.a
    Linking .pio\build\nano33ble\firmware.elf
    Checking size .pio\build\nano33ble\firmware.elf
    Building .pio\build\nano33ble\firmware.bin
    Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
    RAM: [=== ] 26.7% (used 69920 bytes from 262144 bytes)
    Flash: [=== ] 33.3% (used 327476 bytes from 983040 bytes)
    ======================================================= [SUCCESS] Took 45.36 seconds =======================================================
  • Terminal will be reused by tasks, press any key to close it.
@FabianRig
Copy link
Owner

Those are "only" warnings and in the end it says "SUCCESS". It might still work.

Could you connect the Nano to your computer and check the Nano's console logs? What does it say?

@Jstar018
Copy link
Author

Hi Fabian,

After uploading the project the nano does not connect and the com-port not recognised. I have tested some simple programs to blink and respond and I am able to upload then connect back in wiht the computer and monitor the output. However when I upload the project it disconnects - See below outputs.

It looks like something is creating an error in the code.

Any advice is appericated.

image Screenshot 2023-05-31 075250

@FabianRig
Copy link
Owner

Sorry for taking so long to answer. Currently, I don't have a lot of time... Sorry!

Do you have an original "Arduino Nano 33 BLE" or another brand?

Have you tried starting totally fresh? Reinstalling VS Code, Platform IO and all packages?

@FabianRig
Copy link
Owner

I just gave it a try in a new environment. There are indeed 45 warnings with respect to the libraries used. Warnings aren't errors however and the build is successful:

RAM: [=== ] 26.7% (used 69920 bytes from 262144 bytes)
Flash: [=== ] 33.3% (used 327476 bytes from 983040 bytes)
=========================== [SUCCESS] Took 38.53 seconds ===========================

The problem you're seeing might be something else. As soon as you successfully flash that file, you should see messages in the terminal.

@Jstar018
Copy link
Author

Hi Fabian,

Apologies, I have been traveling. Yes I am using an original "Arduino Nano 33 BLE"

I have reinstalled VS Code, Platform IO and the project.

Interestingly I am getting 47 error messages not the 45 you got on your build. Build size etc is exactly the same.

Still crashing and not able to monitor the COM Port or link in with Blue tooth....

@FabianRig
Copy link
Owner

That's weird. Let's try a systematic approach.

  • Can you flash the image without errors?
  • Can you make sure that you try to connect to the correct COM port?
  • Do you have access to another computer to try that?
  • Have you tried flashing it without any connections but the USB cable?
  • Could you try to flash another project and read from the COM port?

@Jstar018
Copy link
Author

I can flash without errors
I can connect to the right com port with only the USB connection and nothing else connected to the PC
I can flash another project and monitor it

I have not tried with another PC...

@FabianRig
Copy link
Owner

OK. That's a good start. If you can successfully flash it without errors and connect to it without any error, then it should work. (Otherwise you should see "BLE setup failed!" -- check https://github.com/FabianRig/ArduinoMoonBoardLED/blob/main/src/main.cpp line 29.)

What puzzles me is that the MoonBoard app doesn't see the device. I've used many different Android devices (mobile phones, tablets) and friends are successfully using various iPhones. The range isn't too good (less than 4 or 5 meters for me), other than that it's stable and reliable.

If you're using an Android phone: Please make sure the app has the location permission which is needed for bluetooth. Perhaps try reinstalling the app? Or could you maybe try another mobile device?

@FabianRig
Copy link
Owner

One more idea: If you're using an Android device, please download nRF Connect for Mobile (https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&hl=de&gl=US) and use the scanner. You should see "MoonBoard A". This app also needs the location permission.

@svigani4ok
Copy link

I also had a problem with bluetooth, neither moonboard app nor nRF Connect for Mobile was discovered the device. But the issue was with nordicnrf52 v.9.6.0 platform (see issue here), so I downgraded it to 9.5.0 and it started to work.

@FabianRig
Copy link
Owner

Thank you for letting us know! Great find!

@Jstar018 Could you please change the line to "platform = [email protected]" in platformio.ini (https://github.com/FabianRig/ArduinoMoonBoardLED/blob/main/platformio.ini) and check if it works? If yes, we have a fix.

@Jstar018
Copy link
Author

Hi @FabianRig @sviga

I downgraded the platform and it works perfectly. I can see the output in the monitor with the correct LEDs referenced. Bluetooth connects.

Thank you!

@jordigrau83
Copy link

jordigrau83 commented Jun 19, 2023 via email

@FabianRig
Copy link
Owner

Great! Good to know that it works now. I'll include the fix asap.

And thanks for the info regarding the ESP32!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants