Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - danyyacoub

Pages: [1]
1
Below is the sketch of my Simblee :

Code: [Select]
#include <SimbleeBLE.h>

void setup() {
  Serial.begin(9600);
  Serial.println("Waiting for connection...");
  SimbleeBLE.deviceName = "Simblee";
  SimbleeBLE.advertisementData = "data";
//  SimbleeBLE.customUUID = "2220";
  SimbleeBLE.advertisementInterval = MILLISECONDS(300);
  SimbleeBLE.txPowerLevel = -20;  // (-20dbM to +4 dBm)
  SimbleeBLE.begin();
}

void loop() {

}

void SimbleeBLE_onConnect()
{
  Serial.println("Simblee Connected");
}

void SimbleeBLE_onDisconnect()
{
  Serial.println("Simblee Disconnected");
}

void SimbleeBLE_onReceive(byte *data, int len)
{
  Serial.println("Data received");
  SimbleeBLE.send(1);
  printf("%s\n", data);
}

void serialEvent()
{
   Serial.println("Serial event");
}

I can easily connect and read data from it, bit writing to it doesn't work from my app. SimbleeBLE_onReceive is never being called.

It actually never is called even when using third party BLE apps like nRF Connect and BLE Terminal.

So I'm suspecting that the issue is with my arduino Sketch and not related to the android code.

The android code is returning GATT_ERROR 133 when trying to write.

Is anything missing from this code ? Strangely I can't find any example online where we're simply sending data to Simblee (without using SimlbeeMobile)

Thanks,

Pages: [1]