B4R Library rCurieBLE - Arduino 101 BLE

Erel

Administrator
Staff member
Licensed User
With this library it is simple to connect to the Arduino 101 board with an Android or iOS device.
Arduino 101 instructions: https://www.b4x.com/android/forum/posts/448783/

It is similar to B4i peripheral implementation: BLE (Bluetooth Low Energy) Peripheral

It creates a service (0001) with a readable characteristic (1001) and a writable characteristic (1002).

The NewData event is raised when a central device, the iOS or Android device, writes to the writable character.
The DataAvailable event on the central device is raised after a call to CuriePeripheral.Write.

Note that messages are limited to 20 bytes. Don't try to send more as it will break the connection.

A B4A + B4R example is attached.
 

Attachments

Beja

Expert
Licensed User
20 bytes are more than enough for telemetry communication.

Thank you Erel so much
 
Last edited:

Beja

Expert
Licensed User
One question!
Can one use Uno or Mega? or it has to be 101 (I am using B4A only).
 

Erel

Administrator
Staff member
Licensed User
This library will only work with the Arduino 101 built-in BLE module.
 

Beja

Expert
Licensed User
Hi Erel,
Yesterday I received my 101 and tried the Android/101 example above.. the B4A is working fine and stuck on "Trying to connect"
The 101 app cannot compile and said missing a library.. I copied the rCurieBLE (XML) in B4R library folder. besides I can't see the Arduino 101 in the Board selector list.
Any guidance appreciated.
Beja
 

Erel

Administrator
Staff member
Licensed User
1. Configure Windows to show the extension files.
2. B4R libraries are made of a folder and xml file. You must keep this structure.
3. the libraries folder should only contain xml files and other folders.
 

Beja

Expert
Licensed User
Thanks Erel, thumps up!
All working now except the 101 BT is not discovered.. I am posting this in the questions forum.
 

tigleth

Member
Licensed User
Hello
I set the 101 up in arduino and it runs sketches ; I ran the arduino example (on their site) for ble using nRF connect with my moto2g and it switches pin 13 led on and off. When I run BLEcentral it just stays on " trying to connect" . The phone sees the b4r_perif in the Bluetooth list. Any ideas will be appreciated.

Thank you
 

Erel

Administrator
Staff member
Licensed User
You need to run the B4R program from the first post on the board.
 

tigleth

Member
Licensed User
Hello

I am running the B4R program from the first post 1.b4r on 101 and BLEcentral on moto2g, stays on " trying to connect" . When I click connect on b4r i get the message
Error opening port
jssc.SerialPortException: Port name - COM4; Method name - openPort(); Exception type - Port not found. When I look in device manager COM4 is on the 101.

Thank you
 
Last edited:

tigleth

Member
Licensed User
Hello

the b4r example is working; tested with nRF Connect; led off on; it is the b4a example that stops at " trying to connect ".

Thank you
 
Top