Android Question BLE GATT Server and GATT Client

walterf25

Expert
Licensed User
Longtime User
Hi All, i'm somewhat confused with these two terms.

I have a device which is essentially a BLE badge reader, according to the spec-sheet I need to implement a GATT server with own GATT service and GATT characteristic.

I always get confused with these two terms, I know there's a BLEPeripheral Library for both B4A and B4i but not sure which one to use, do I use BLEManager or BLEPeripheral.

When I do a BLE scan I can see the device and I can connect just fine to it, but what i need to do is write and read data from the device.

This is the text related to this issue on their spec-sheet
The reader is the GATT client. To implement a data exchange, create your own GATT server with own GATT service and GATT characteristic in the application. Set the UUIDs for the GATT server and the GATT characteristic. The data length for the characteristic should be equal to or greater than 16 bytes.

Does that mean that the reader is a peripheral device and my application would be the central?

Does anyone have any idea?

Sorry, it's late and i have been working on a few things all day, and i am tired maybe I need some rest to clear my head.

Thanks all!

Walter
 

walterf25

Expert
Licensed User
Longtime User
See this: https://www.b4x.com/glossary/bluetooth/

You do need to implement a peripheral, however it is not so simple. You will need to extend BLEPeripheral for this as BLEPeripheral is built for a specific use case.
Thank you Erel, does this mean I need to modify the existing BLEPeripheral Library, and since I need to do this in B4i as well, would I need to do the same as well, meaning would I have to write an extended version of the iBLE library?

Thanks,
Walter
 
Upvote 0

iCAB

Well-Known Member
Licensed User
Longtime User
Hi There

What do we have to do to achieve the same in B4A?
Do we need to modify any libraries? and if so can we get the source code to modify it?

Thanks,
iCAB
 
Upvote 0
Top