Arduino Server Doesn't See That App Inventor App Has Disconnect Home » Arduino Ble Characteristic Writevalue » Arduino Server Doesn't See That App Inventor App Has Disconnect Maybe your like Arduino Ble Client Example Arduino Ble Device.h Arduino Ble Eeprom Arduino Ble Example Github Arduino Ble Float Loading Arduino Server doesn't see that App Inventor App has disconnect MIT App Inventor Help bug-or-problem, arduino, bluetooth jackie April 8, 2022, 7:30pm 1 LED_Control_HM10.aia (157.0 KB) #include <ArduinoBLE.h> #include <String> BLEService nanoService("0000ffe1-0000-1000-8000-00805f9b34fb"); // BLE LED Service // BLE LED Switch Characteristic - custom 128-bit UUID, read and writable by central String test = "gaming"; BLEByteCharacteristic bleRW("0000ffe0-0000-1000-8000-00805f9b34fb", BLERead | BLEWrite); BLEStringCharacteristic sdSend("0000ffe2-0000-1000-8000-00805f9b34fb", BLERead | BLEWrite , test.length()); void setup() { Serial.begin(9600); while (!Serial); // set LED's pin to output mode pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW); // when the central disconnects, turn off the LED // begin initialization if (!BLE.begin()) { Serial.println("starting BLE failed!"); while (1); } // set advertised local name and service UUID: BLE.setLocalName("Nano 33 BLE Sense"); BLE.setAdvertisedService(nanoService); // add the characteristic to the service nanoService.addCharacteristic(bleRW); nanoService.addCharacteristic(sdSend); // add service BLE.addService(nanoService); // set the initial value for the characteristic: bleRW.writeValue('0'); // start advertising BLE.advertise(); Serial.println("Arduino BLE"); } void loop() { // listen for BLE peripherals to connect: BLEDevice central = BLE.central(); // if a central is connected to peripheral: if (central) { Serial.print("Connected to central: "); // print the central's MAC address: Serial.println(central.address()); // while the central is still connected to peripheral: while (central.connected()) { // if the remote device wrote to the characteristic, // use the value to control the LED: if (bleRW.written()) { switch (bleRW.value()) { // any value other than 0 case 1: Serial.println("LED on"); digitalWrite(LED_BUILTIN, HIGH); // will turn the LED off break; case 2: Serial.println(F("LED off")); digitalWrite(LED_BUILTIN, LOW); // will turn the LED off break; case 3: bleRW.writeValue((byte)0x05); sdSend.writeValue((String)test); Serial.println("Handshake initiated");. break; } } } // when the central disconnects, print it out: Serial.print(F("Disconnected from central: ")); Serial.println(central.address()); digitalWrite(LED_BUILTIN, LOW); // when the central disconnects, turn off the LED } } I am making a simple test app to send and receive BLE data between my Arduino Nano 33 BLE Sense and an Android phone. One issue I am facing right now is that when I press disconnect on my app, the phone disconnects but the Arduino thinks it is still connected. This is irritating as I have to reupload the Arduino to reset the BLE (pressing the physical reset button doesn't seem to work sadly). What am I missing? ABG April 8, 2022, 8:49pm 2 jackie: One issue I am facing right now is that when I press disconnect on my app, the phone disconnects but the Arduino thinks it is still connected. Can you set up a message recognized by the Arduino for the app to say 'Goodbye!'? 2 Likes Tag » Arduino Ble Characteristic Writevalue Using BLECharacteristic.writeValue() For Byte Arrays - Arduino Forum Arduino Array Structure BLE WriteValue - Programming Questions ArduinoBLE - Arduino Reference Constructing A Complex Value For BleCharacteristic.writeValue Ble.writeValue() Simplest Way To Write Value To BLE Characteristic - ESP32 Forum ArduinoBLE/BLECharacteristic.h At Master - GitHub Arduino BLE Programming - Giovanni Organtini - Medium Data Received By BLE On The Wio Terminal Limited To The Number Of 3? ESP32 BLE Server And Client (Bluetooth Low Energy) Asyncio, Arduino BLE, And Not Reading Characteristic Updates Esp-nimble-cpp: NimBLERemoteCharacteristic Class Reference Bluetooth Low Energy | SpringerLink Simplest Way To Write Value To BLE Characteristic : R/esp32 - Reddit