Hi all, some time ago I bought the new Arduino Nano 33 BLE and now I'm trying to work with it via the mobile app named LightBlue which is recommended by Arduino tutorial . I have such sketch at this moment:
#include <ArduinoBLE.h>
#define BLE_UUID_TEST_SERVICE "9A48ECBA-2E92-082F-C079-9E75AAE428B1"
#define BLE_UUID_FILE_NAME "2D2F88C4-F244-5A80-21F1-EE0224E80658"
BLEService testService(BLE_UUID_TEST_SERVICE);
BLEStringCharacteristic fileNameCharacteristic(BLE_UUID_FILE_NAME, BLERead | BLEWrite, 20);
void setup() {
Serial.begin(38400);
if (!BLE.begin()) {
Serial.println("- Starting Bluetooth® Low Energy module failed!");
while (1);
}
BLE.begin();
// set advertised local name and service UUID:
BLE.setDeviceName("Arduino Nano 33 BLE");
BLE.setLocalName("Arduino Nano 33 BLE");
BLE.setAdvertisedService(testService);
// BLE add characteristics
testService.addCharacteristic(fileNameCharacteristic);
// add service
BLE.addService(testService);
// start advertising
BLE.advertise();
}
void loop() {
// listen for BLE peripherals to connect:
BLEDevice central = BLE.central();
if (central) {
while (central.connected()) {
if (fileNameCharacteristic.written()) {
String incomeData = fileNameCharacteristic.value();
Serial.print("Received data: ");
Serial.println(incomeData);
}
}
}
}
But after firing I can not see any available BT device in the application. I tried to reload the board but it did not help. The only BT device appearance is visible during the firing the board but the module is not connectable at all. Maybe I need to enable BT discoverability ? I managed to connected to the board only 2-3 times but by default when I turn it on or reload it is not available. How to work with BT on such boards? I worked before with Arduino UNO R3 with external BT module HC-06.
I have no issue connection to you sketch with an Android phone and Light Blue, so there is no issue with the code.
Are you using Android or an iPhone?
If using Android and you go into the phones Settings for Connections what do you see under Bluetooth. Do you see the Arduino Nano 33 BLE as an available device?
It sounds like you don't actually have the program loaded on the board.
The Nano 33BLE has two serial ports which can show on the computer/ide. One is for programming and one is for operation. In programming mode (double press the reset button), there will be an oscillating orange light next to the usb connector. You should see the ports change on the computer. Normally, the ide will switch the board to programming mode on the download, but if you put the board into programming mode manually you can download as well.
But is it dependant from the usb port of the laptop? I tried on the another "non-working" port to turn on programming mode by tapping on the hardware button, but it did not help me
I'm not familiar with the Macintosh and the usb port setups. Your first task is to get the Nano 33 BLE board recognized by the Mac.
Can you disconnect the device and reconnect it and see a Serial port disappear and come back?
Are you absolutely certain you have a usb data cable and not a usb charging cable. Do you have any other Arduino to test with?
In preferences, enable the show verbose output on compile and download.
Try and load the bare minimum program (selecting the nano 33 ble board and the port you think it is on) and report what you see for the error message.
Is this a micro usb cable? Can you use this known working cable with the Nano33?
Yes, I'm using it together
If the usb on the mac appears to be working normally with the uno, can you explain in detail, what the issue is with the Nano 33 BLE?
In general after some googling and research the problem was resolved. The case fixed when I used another port on the laptop and all is stable to work
Can you load anything to the Nano 33 BLE? If so, can you run the Blink program? Are your issues specifically with using the BLE on the board?
Yes, I could load every programm, the issue was only with BLE which appeared for some seconds and the disappeared at all every time after loading any programm.