Is there any extension for BLE Server?

74 views
Skip to first unread message
Assigned to gerri...@gmail.com by chrisw...@gmail.com

Nirmal Panchasara

unread,
Dec 13, 2018, 6:44:04 AM12/13/18
to MIT App Inventor Forum
Hello,

I want to use BLE Server and Client in my project. Is there any extension?

Thank you.

Regards.

Ghica

unread,
Dec 13, 2018, 8:53:54 AM12/13/18
to MIT App Inventor Forum

Nirmal Panchasara

unread,
Dec 13, 2018, 10:57:27 PM12/13/18
to MIT App Inventor Forum
I used this extension but there is no support for creating GATT Server in Android device. I want to create pair of Service and Characteristic in Android device. Is it possible with this extension? If I am getting it wrong. 

Mistry Projects

unread,
Dec 14, 2018, 3:12:33 AM12/14/18
to MIT App Inventor Forum

Ghica

unread,
Dec 14, 2018, 6:10:46 AM12/14/18
to MIT App Inventor Forum
Misty projects:
This thread is referring to an old version of the BLE extension. 
Quite recently, a new version with bug fixes came out, to which I pointed.
But, honestly, I do not know whether it is able to do what you want. 
Cheers, Ghica.

Chris Ward

unread,
Dec 14, 2018, 6:54:36 AM12/14/18
to MIT App Inventor Forum
Hello Nirmal

Your request seems to be mixing BLE (Bluetooth Low Energy) and Bluetooth Classic. Whilst they are both Bluetooth systems, they are in fact quite different (Chalk and Cheese different in process).

We can tell what you require from the device(s) you are using. For each device:
  1. Make and Model
  2. Exact Bluetooth version
If a microprocessor (e.g. Arduino) is in the mix, post your Script/Sketch. A simple schematic/diagram of the hardware involved would be good too.



 

Nirmal Panchasara

unread,
Dec 14, 2018, 7:35:34 AM12/14/18
to MIT App Inventor Forum
Hi

A part of my project consists, 
1) ESP32 
2) Android Phone (May be more than one)

I want to create GATT Server and Advertise a Service. Currently it's all working using "nRF Connect" App. See this attached screen shots.

Thank You.
Capture+_2018-12-14-17-58-52.png
Capture+_2018-12-14-17-59-15.png

Chris Ward

unread,
Dec 14, 2018, 8:39:30 AM12/14/18
to mitappinv...@googlegroups.com
Hi Nirmal

About the nRF Connect App by Nordic Semiconductor:

nRF Connect for Mobile is a powerful generic tool that allows you to scan, advertise and explore your Bluetooth low energy (BLE) devices and communicate with them. nRF Connect supports number of Bluetooth SIG adopted profiles together with Device Firmware Update profile (DFU) from Nordic Semiconductors and Mcu Manager on Zephyr and Mynewt.

...App Inventor can fit the above description, i.e. can scan for BLE devices and communicate with them. Usually, the other devices would be using microprocessors/sensors, see
 

Of course data can be shared with other BLE smartphones (Android v5 and up only), but that is not strictly the purpose of GATT. 

I'm going to ask IOT expert gerrikoio if he can offer you more guidance.




Chris Ward

unread,
Dec 14, 2018, 9:25:26 AM12/14/18
to MIT App Inventor Forum
.......Sorry I meant Bluetooth version 5 not Android :)

Nirmal Panchasara

unread,
Dec 14, 2018, 10:05:02 AM12/14/18
to MIT App Inventor Forum
Chris

Thank you for your interest. 

gerrikoio

unread,
Dec 14, 2018, 11:36:36 AM12/14/18
to MIT App Inventor Forum
The extension to use is found here: http://iot.appinventor.mit.edu/#/bluetoothle/bluetoothleintro

As you may know, client and server refer to where the data resides. So the server tends to be the microcontroller device and the client tends to be the phone. With BLE there is also the "central device" which initiates the connection to the "peripheral device". 

So in your case you want your AI2 app to scan for the device "MYESP32" and then initiate a connection and then use the GATT service UUID "deadbeef-a002-c000...." with a characteristic UUID "deadbeef-a002-c002...." to read data and write to the device etc.

There are examples available on the FAQ (link shown above) which will give guidance.

Hope that helps

Nirmal Panchasara

unread,
Dec 15, 2018, 12:01:21 AM12/15/18
to mitappinv...@googlegroups.com
Thank you for your reply.

1) As you understand about GATT Service and Characteristic on "MYESP32" (Server+Peripheral) and "nRFConnect" (Client+Central) works OK and I can Read & Write to Characteristic. Currently, This can be done with AI2 App also.

2) My question begins at this step. Now concurrently I have created a GATT Server on "nRF.." App with name "NEW" and added Service with UUID "deadbeef-a002-c000..." and Characteristic with UUID "deadbeef-a002-c002-...." so now "nRF.." roles are (Client+Central+Server). See this screenshot here

Here is the screenshot of Advertising of the Service (i.e. from step 2) on "nRF.." App.

Now, When I first time Read from the Characteristic on "MYESP32" It will initiate a connection to the GATT Server running on that particular Client i.e. "nRF..." and Connection phase completes here.

In short, as I can read/write characteristics of "MYESP32" from "nRFConnect" app, It is possible with AI2 app also. But concurrently,
As I can read/write characteristics of "nRFConnect" app from "MYESP32" device, It is not possible with AI2 app. If it is also possible with AI2 app than I want to know. how?

Hope this can help you understand my question.

Thank you.

gerrikoio

unread,
Dec 16, 2018, 10:20:45 AM12/16/18
to MIT App Inventor Forum
The short answer is that AI2 cannot create a server.



Nirmal Panchasara

unread,
Dec 16, 2018, 11:07:13 PM12/16/18
to MIT App Inventor Forum
Exactly this answer I was looking for. Thank you.

Is it possible to create an app with BLE Server+Client without learning proper Android coding?

Thanks again :)
Reply all
Reply to author
Forward
0 new messages