Closed Jstar018 closed 1 year ago
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?
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.
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?
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.
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....
That's weird. Let's try a systematic approach.
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...
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?
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.
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.
Thank you for letting us know! Great find!
@Jstar018 Could you please change the line to "platform = nordicnrf52@9.5.0" in platformio.ini (https://github.com/FabianRig/ArduinoMoonBoardLED/blob/main/platformio.ini) and check if it works? If yes, we have a fix.
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!
I have used this app on many different arduino BLE 33 without any issue, but if you want you can buy a cheaper ESP32 on AliExpress, and it also works flawlessly, so if you still have problems with the Arduino try the ESP32 😉
On Sun, 18 Jun 2023, 07:24 svigani4ok, @.***> wrote:
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 https://github.com/platformio/platform-nordicnrf52/issues/175), so I downgraded it to 9.5.0 and it started to work.
— Reply to this email directly, view it on GitHub https://github.com/FabianRig/ArduinoMoonBoardLED/issues/8#issuecomment-1595960880, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENEE5EDZXUKID4VI6OHFO3XL2GKPANCNFSM6AAAAAAYRSS3DI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Great! Good to know that it works now. I'll include the fix asap.
And thanks for the info regarding the ESP32!
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:~~~~~ .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)) {