Finding the custom GATT services and characteristics of Movesense sensors - bluetooth

I’m using the custom gatt package found in movesense-device-lib/samples/bin/release/Movesense-custom_gattsvc_app_w_bootloader.zip for my project. I can't create my own package since there's a bug in the mac compiler.
I really need to the service and characteristic UUIDs for ECG (in fact if I could get the services/characteristics of the other features in the package that’d be great too)
There're links to a sites that give the uuid for certain characteristics and services, such as these ones:
GATT Services
GATT Characteristics
Unfortunately, since the movesense package is custom made, it uses different UUIDs. I tried backtracing them by writing a function on my client that pulls an arraylist of the services and the characteristics, but no luck :(

The custom_gattsvc_app is a sample app that shows how to use Movesense CustomGATTService to implement your own (or someone elses) GATT service. The sample shows how to do that by implementing the (partial) "Medical Thermometer" GATT service, nothing else.
To access all of the Movesense API over BLE you'll need to use the movesense-mobile-lib or implement your own protocol over your own GATT service. I'm not aware of any 3rd party ECG GATT service specifications.
The movesense-device-lib release 2.0 will include a sample that provides access to most of the Movesense API services and easy expansion over a simple GATT protocol.
Full Disclosure: I work for the Movesense team

Related

Custom Messages in Bluetooth Mesh

I am using Bluetooth Mesh technology for a project. The Bluetooth mesh works on flooding, and the message types are defined in the profile. However, I could not find whether I can include a custom payload in the messages to be delivered across the network. Is it possible to do this in Bluetooth Mesh? If yes, please suggest any resources that explain the functionality.
First of all you should visit the Bluetooth SIG. They own and publish all Bluetooth standards. They also maintain a comprehensive list of all specifications including those dealing with 'mesh':
https://www.bluetooth.com/specifications/specs/
And Nordic also provides extensive documentation with examples for its nRF5 SDK for Mesh:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fstruct_sdk%2Fstruct%2Fsdk_mesh_latest.html
Bluetooth Mesh is based on Model interaction. If your application does not fit into available (defined by SIG) models, you can create your own (Vendor) models. In that case you can define opcodes (which should not interfere with opcodes of other messages) and customize transferred data.
More information on how to create you own model, in case you are using Nordic SDKs you can find here: for nRF Connect SDK or for nRF Mesh SDK.

Are GATT Event notifications possible without pairing?

I've been pouring over the BT 4.x (LE) spec trying to figure out if this is possible or not (events without pairing/boding).
Does anyone have an insight (and link to the spec preferably) if it's possible?
As Mike Petrichenko commented, GATT communication is definitely possible without pairing. In fact most GATT servers/clients out there function without the need for pairing/bonding. The only exception is when some characteristics require authentication/authorisation in order to read some data (e.g. a medical device with a Heart rate characteristic).
If you want a specific reference to where this is mentioned in the Bluetooth spec, then I recommend looking at the Core Specification version 5.2, Vol 3, Part C, section 10.2 (LE Security Modes):-
The security requirements of a device, a service or a service request
are expressed in terms of a security mode and security level. Each
service or service request may have its own security requirement. The
device may also have a security requirement. A physical connection
between two devices shall operate in only one security mode.
It is then mentioned that LE security mode 1 has the level No security, and many GATT servers/clients work in this level.
You can test this yourself if you have two phones available. You can use the nRF Connect app to run a GATT server on one and a GATT client on the other. You will see that you can browse the GATT table and read data without having to pair.
Below are a few links that contain more information:-
Is pairing/encryption mandatory to allow a peer to write in GATT
Bluetooth Low Energy GATT security levels
How GAP and GATT work

Progressive web app beacon search

Is it possible to search for beacon data (uuid, url, ...) with a progressive web application using just web technologies that is without using native mobile technologies (Android, ios, ...)?
Thanks in advance.
Unfortunately, this is not possible as of July 2020. While Google has been working on the WebBluetooth project to bring support for many bluetooth operations to the browser, at least in Google Chrome implementations on Android 6+, Mac or ChromeOS.
Scanning for beacons is not yet possible as of this writing. The API requires that the OS scan for devices matching a requested criteria, and then let the user choose a device to connect to using a user interface. This essentially rules out beacon detection.
Bluetooth scanning APIs are still in draft form here.
EDIT: The APIs mentioned by #zurfyx in the answer below allow you to scan for and connect to an advertised GATT service, but do not allow you to read the data in the advertisement. This is a critical distinction, as reading the data in the advertisement is the key capability required for actual bluetooth beacon detection. That capability is missing from that API. Without that capability, it is impossible to detect a beacon, it is only possible to connect to a BLE device that might be an Eddystone or other service advertisement-based beacon.
UPDATE July 2020: Safari will not be getting any WebBluetooth APIs at all due to privacy concerns, according to a June 2020 announcement by Apple This makes Bluetooth scanning impossible on iOS we apps for the foreseeable future.
As of July 2020, Chrome does not support scanning arbitrary advertisements. See status here: https://github.com/WebBluetoothCG/web-bluetooth/blob/master/implementation-status.md
Disclaimer: I wrote eddystone-web-bluetooth (a library which makes it easy to read and write to an Eddystone device). github#eddystone-web-bluetooth npm#eddystone-web-bluetooth
It is possible to scan for Bluetooth devices by using the Web Bluetooth API (currently supported only by Chrome).
By using Bluetooth GATT service, you can connect to Eddystone devices and send/receive data by communicating following their public specifications (which are basically a list of request codes, and the format in which to send and expect their responses).
These services include information such as:
URL
Advertising interval
Lock state
and more
By using the Bluetooth standard information you can get to know the most generic device information, such as its id and name:
navigator.bluetooth.requestDevice
#beaufortfrancois wrote the probably first Eddystone Web Bluetooth configuration code (source code / demo), so it is probably worth a read if you want to dig more into this. I learned a lot from it.

Can you come up with your own service in BLE?

I have looked at the BLE specification, and found that the Bluetooth SIG has predefined a number of services, like heart rate. I am just wondering if it is possible for me to define a service myself? If can, is there any example available? Thanks.
yes, it's perfectly possible to define services yourself.
Services and characteristics are all identified by a UUID. For example the BLE Services page lists all standardized services and the assigned UUIDs.
As you can see the Heart Rate services uses 0x180D, which is a 16-bit short form reserved for standardized services only. The only requirement when defining your own service is that you use a 128-bit long form UUID.
Use uuidgen (available on Mac OS X) to generate a random (unique) UUID yourself:
uuidgen
# example result: 94B01578-5603-4D5A-8DFF-9365A1C4AC93
You can use this to publish and identify your own service. This can either be done on your own custom hardware, or through software on iOS (since you mention core-bluetooth).
Create your CBMutableService:
CBUUID *serviceUUID = [CBUUID UUIDWithString:#"94B01578-5603-4D5A-8DFF-9365A1C4AC93"];
CBMutableService *myService = [[CBMutableService alloc] initWithType:serviceUUID primary:YES];
// add some characteristics, also identified by your own custom UUIDs.
Finally see addService: &
startAdvertising: on CBPeripheralManager to start publishing your custom service.
After publishing this service using an iOS device you can scan for and connect to that service using another iOS device or a Mac, using the CBCentralManager class.
Here's demo app with an example of setting up your own Bluetooth LE service on an iOS device: SimpleShare
You need to generate a UUID that's unique to your app's service. This site will generate one for you to use.

How to go about developing and deploying an SCEP/MDM infrastructure for the Enterprise iOS program

I am trying to use the new OTA enrollment and device management capabilities in iOS 4 to provide wireless app distribution for the enterprise. So far, I have come across a lot of third party MDM providers that seem to charge by the device. I don't believe this is something very hard to do on our own, especially as a prototype.
My search has led me to some open source software for SCEP. Together with the OTA configuration reference from Apple, I want to believe that the next step would be to actually implement an MDM server. Now, the WWDC talk had slides on various MDM queries supported by iOS 4, including installing and removing provisioning profiles, but there's no reference implementation or even exposed API that I could find.
Does anyone have any experience trying to fully develop an enterprise distribution and management system without third party software?
MDM providers that I've seen are acting as SCEP proxies so that you don't have to expose your certificate server to the internet.
The best open source SCEP server I've found so far is Dogtag (http://pki.fedoraproject.org/wiki/PKI_Main_Page)
woops I was meaning to comment.. not answer.

Resources