Lazarus

Programming => Networking and Web Programming => Topic started by: JP-CASSOU on June 27, 2022, 03:12:32 pm

Title: Using Bluetooth LE: Howto ? Components
Post by: JP-CASSOU on June 27, 2022, 03:12:32 pm
Hello,

I want to communicate with a Bluetooth LE device.

I can't find any detailed example in FreePascal, either on Windows or Linux

I am looking for DETAILED code examples.

Thanks

Title: Re: Using Bluetooth LE: Howto ? Components
Post by: BlueIcaro on June 27, 2022, 03:44:12 pm
Hi,

You need check which kind of device are dectect. For example  some bluethoot devices (in windows) are a serial port. So you should use a serial port component like LazSerial.

With no more info about the device is  complicate.

/BlueIcaro
Title: Re: Using Bluetooth LE: Howto ? Components
Post by: JP-CASSOU on June 27, 2022, 04:55:54 pm
My device BT LE uses GATT protocol. TLazSerial unusable here
Title: Re: Using Bluetooth LE: Howto ? Components
Post by: BlueIcaro on June 28, 2022, 12:56:52 pm
A fast search in google, gives some pages that sells Delphi packages.

But I found a C library https://github.com/labapart/gattlib (https://github.com/labapart/gattlib). You can take a look, compile it, and access to the library from Free Pascal.

/BlueIcaro
Title: Re: Using Bluetooth LE: Howto ? Components
Post by: JP-CASSOU on June 28, 2022, 01:50:25 pm
>> But I found a C library https://github.com/labapart/gattlib. You can take a look, compile it, and access to the library from Free Pascal.

I'm newbie in C. Exists FPC translation of the headers ?
TinyPortal © 2005-2018