Sparkfun nRF52832 breakout board


hello guys,

i got hands on sparkfun nrf52832 breakout board. working of project needs bluetooth connectivity. got , able upload sketch using arduino ide, can't seem pair phone. "pairing rejected nrf52832".

any idea on how fix that?

code: [select]

///////////////////////// import libraries (bleperipheral depends on spi)
#include <spi.h>
#include <bleperipheral.h>
//////////////
// hardware //
//////////////
#define btn_pin    6 // btn pin on 6
#define btn_active low
///////////////////////
// ble advertisments //
///////////////////////
const char * localname = "nrf52832 button";
bleperipheral bleperiph;
bleservice bleserv("1234");
blecharcharacteristic btnchar("1234", bleread | blenotify);

void setup()
{
  serial.begin(115200); // set serial @ 115200 baud
  //pinmode(btn_pin, input_pullup);
  digitalwrite(7, high);
  setupble();
}
void loop() {
  bleperiph.poll();
  // read current button pin state
  //char buttonvalue = digitalread(btn_pin);
  // has value changed since last read
  //bool buttonchanged = (btnchar.value() != buttonvalue);
  //if (buttonchanged)
  //{
    // button state changed, update characteristics
    //btnchar.setvalue(buttonvalue);
  //}
}

void setupble()
{
  // advertise name , service:
  bleperiph.setdevicename(localname);
  bleperiph.setlocalname(localname);
  bleperiph.setadvertisedserviceuuid(bleserv.uuid());
  // add service
  bleperiph.addattribute(bleserv);
  // add characteristic
  bleperiph.addattribute(btnchar);
  // device, service, characteristic set up,
  // initialize ble:
  bleperiph.begin();
}

quote
i "pairing rejected nrf52832".
the arduino says that? missed part of code says that.


Arduino Forum > Community > Gigs and Collaborations > Sparkfun nRF52832 breakout board


arduino

Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???