Bluez BLE peripheral advertise custom characteristic with ADV data - bluez

Is there a sample app that allows advertising custom UUID and characteristics and with specific ADV data? Bluez has less documentation. Any help is appreciated.

Which version of BlueZ do you have? With newer versions of BlueZ (e.g. 5.50) you can use bluetoothctl from the command line to do this as follows:-
#bluetoothctl
[bluetooth]# menu advertise
[bluetooth]# uuids 0x1800 0x1801 0x1802
[bluetooth]# name MyDevice
[bluetooth]# data 0 01 02 03
[bluetooth]# back
[bluetooth]# advertise on
This allows you to set custom UUID, advertising data, and the advertising device name. You can dig through the BlueZ source to see how this is implemented using C.
I hope this helps.

Related

Limited devices Login's like Netflix

I am trying to build a video streaming platform and I need to implement a limited devices login feature just like netflix. I have seen some people using node device detector to get the device type from the useragent, but I don't think this is a good solution since the user agent can be faked. Please any ideas on how to effectively implement this?
Found a solution to my own answer, I can use fingerprint.js to identify devices and store in mongodb. and I found an open source version for fingerprint.js that is broprint.js

How do I retrieve the "Audio in" from the api (For example, stereo 2.0, Dolby Digital Plus 5.1)

I'm looking to get some information from the Sonos API but I can't seem to find it.
In the Sonos app on the "About My System" page when you scroll down (And have a device connected to your tv) it shows "Audio in". I want that information from the API. Is that possible?
Hope to hear,
Kind regards,
Namanix
The Audio In field displays the audio format that Sonos home theater speaker is receiving. See Check the audio format in Troubleshooting low audio from surround speakers for details.
The Sonos platform enables the following line-in APIs and capabilities:
Use the loadLineIn command in the playback namespace to change the current group source to the line-in source of a specified player.
View the source type in the container object. Sonos home theater products use the linein.homeTheater type. See container in Playback Objects for details.
Products with line-in capabilities include the LINE_IN capability in the player object. See the groups object for details.
I'm not sure what you're looking for, but the Sonos Play:5 (gen1) has an UPNP service called AudioIn.
If my playbar switches to TV mode (I've turned auto switching on), than the CurrentURI changes to x-sonos-htastream:.......
Instead of building something yourself, you can also check-out this typescript/node library #svrooij/sonos.

Resolving fingerprint scanner registration in flexcodesdk

I am trying to develop an application on class attendance using fingerprint. Through rigorous research, I found out that I can use 'flexcodesdk' for my Vb.net program.
But the issue is that for every fingerprint scanner (Digitalpersona) there is needed to register it on flexcodesdk site to get series of API keys. What am I going to do about this issue because once I change the fingerprint scanner of similar product, it will complain of registration invalid.
Many developer develop applications an any body can use different scanner regardless of the serial number.
Help me out gurus in the house.
It appears that their FAQ states that each license is tied to a specific device.
How many devices that can be used in one FlexCode SDK license ?
Only the device that you submitted the registration number.
This means that each new device needs to be registered into their system in order to provide you with a new license for their SDK.
This seems quite a restricting model.
Perhaps you might want to consider the free and open source c# implementation at https://www.codeproject.com/Articles/97590/A-Framework-in-C-for-Fingerprint-Verification
I have successfully created multiple applications using this framework.

Proper method for implementing API on an ARM based firmware

I am developing a device firmware based on an LPC17XX+FreeRTOS. My development environment is Eclipse + GCC, codes are in C. The requirement of the end product is:
A "base firmware" running RTOS and performing some periodic task (eg. perform health check).
The base firmware needs to support an API which will have some functions for data manipulation/delay/timing and some functions for using the device ports and I/O.
The user can build their own app using this API.
The user app needs to reside in an empty space of the flash. (It will be sent to the device via Serial port and I plan to use IAP to save it on flash)
I want to start the app as a new task from the "base firmware".
Step 1 and 3 are fairly easy to implement. I am not sure what is the best way to implement 2,3 and 4. So far I've looked at Dynamic linking, jump tables, overlays etc and I am kind of lost. Can someone give me an overview of proper implementation steps?
Some related questions:
Any other way to develop firmware for a product which provide API based App/module development and loading?
What do I need to provide to the user for using the API? Will my API source code be open?
I am open to any ideas, thanks :)

Open Source ISDN Protocol Testing

I have a very specific requirement to test ISDN PRI interfaces for protocols like Q.931 and specific protocols like ARINC 746.
I was wondering if there are any open source tools these the above protocols. Likes of Asterisk on a Linux Box having PRI ports?
If you are to use an Open source product,First You have to connect ISDN PRI interface to a PC, through a telephony card. There are lot of Telephony cards available in the market,
Digium, Sangoma, Dialogic, Donjin, Avaya, etc.
Most of those commercial hardware products has its own testing/configuring tools for ISDN PRI, SS7, etc. So, you may not require a Open Source product extensively.
Also there are Open Source products like, FreeSwitch, AsteriX, OpenPBX, you can used to test those.
I don't know the details of the protocols you mention, but Asterisk has an impressive debug output of ISDN details when you run it with one of the Digium cards. I hope this helps.
If you can get a Sangoma telephony card you can do it using wanpipemon sangoma tool and the well known wireshark. If have a digium card will can get just q931 using dahdi_pcap -p ldap.