Re: ARM SBC as a BLE Peripheral

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Travis,

On 18 December 2015 at 17:22, Gowtham Anandha Babu <gowbabuar@xxxxxxxxx> wrote:
> Hi Travis,
>
> On 18 December 2015 at 21:51, Travis Griggs <travisgriggs@xxxxxxxxx> wrote:
>> I’m working with a small Linux ARM SBC (similar to a Raspberry Pi), trying to set it up as a BLE peripheral.
>> I’m running Debian Jessie, and build 5.36 of the bluez stack.
I'm trying to do a similar thing with a Raspberry Pi. Although right
now I'm making more progress with the RPi in the central role rather
than a peripheral.

>> I *think* I’ve discerned that there may be 3 different ways I could do this?
>> 1) Just use the hcitool/hciconfig command line tools.
>> 2) There’s a C library. So write a C program that cross compiles for the ARM, including the ARM headers for the bluez stuff.
>> 3) There’s a dbus interface. I appear to have dbus running on my device.
I'm currently exploring your option number 3 using Python as I want to
take advantage to the numerous Python libraries for RPi peripherals.


> I am not that much familiar with embedded. But I tried below things in Ubuntu.
> There are few python scripts in bluez git tree which is using DBus interface.
> https://git.kernel.org/cgit/bluetooth/bluez.git/tree/test/example-gatt-server
> https://git.kernel.org/cgit/bluetooth/bluez.git/tree/test/example-advertisement
>
> 1) Run bluetoothd with experimental flag enabled (# sudo ./src/bluetoothd -ndE).
> 2) Run the above mentioned script.
> 3) # ./test/example-gatt-server -- it exposes 3 services.
> 4) # ./test/example-advertisement -- it will advertise a sample data.
> 5) Finally you can capture these via your phone app.
>
> You can edit those python scripts to meet your needs.
>
> This is very basic information. Let others comment on this.
I would agree with Gowtham that this is a good approach or at least
the one I'm following.

DBus and GObject are new to me and I found the following stackoverflow
article helpful:
http://stackoverflow.com/questions/33428804/role-of-mainloops-event-loops-in-dbus-service

The goal of my experiments is to get an open source library so school
children can easily code things like:
https://youtu.be/1ZvFdX5bA8k so if you do get something that you can
share I'd be interested.

Another idea you might want to explore is using the CLI client,
bluetoothctl. There are a few bits about it around and I've done a
short video of my experiments:
https://youtu.be/fEx2V5y-Egk

I hope some of that helps.

Regards,
Barry
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux