Movesense direct access to GATT endpoints - gatt

I am trying to read ECG real-time data from a movesense sensor by using another generic BT-LE module.
GATT characteristics can be used for Heart Rate (read or notify) or other predefined services : we simply send a raw command to an endpoint, for example a 0x0100 (START_NOTIFY) on the corresponding UUID for a heart rate notification streaming.
The problem is that with a micro controller and a BT LE module we can not use any of the C, Java, React... libraries since all of the underlying code is not open source ( the movesense device-lib and community-lib do define how to use and program the services, but we can not discover what to send on one of the 2 other services that are defined, the UART service or the Unknown Service, which are probably used by the movesense library to send all of the URL requests).
As a footnote, we access our generic BT-LE module with AT UART commands to communicate to the movesense platform.
Thanks for any help or guidance,
FS

Have you looked https://bitbucket.org/suunto/movesense-device-lib/src/master/samples/ble_std_services/CustomBleController.cpp
void CustomBleController::OnUartData(uint8_t * p_data, uint16_t length)
for receiving and
send_ble_nus_data(buffer, BUFFER_LENGTH);
to send using NUS (Nordic UART service).

It is possible to do your own GATT service on Movesense sensor (since v. 1.6.0) using the CustomGATTService module. Please look into latest movesense-device-lib and the sample "custom_gattsvc_app" (and with 2.0, the "gatt_sensordata_app")
Full Disclaimer: I work for the Movesense team

Related

Why use mqtt server for BLE gateway?

I have a BLE temperature sensor, which should send measurements to an ESP32 via a BLE connection and my plan was that the ESP32 could send the measurements via WiFi to my database (Firebase Realtime Database). However, I have seen from a few tutorials that a mqtt server would be neccesary (see the screenshot below - link to the video: https://www.youtube.com/watch?v=PBYCG-ypvRY). Could someone please explain to me why the mqtt component is neccesary? Currently I am measuring temperatures using my ESP32 (without the BLE temperautre sensors) and sending them directly to the database, so I am confused as to why with BLE I would need a mqtt server.
Thanks for your help in advance!
You don't need MQTT. It's just one of the IoT-friendly protocol alternatives (like HTTPS, AMQP, CoAP, homebrew, etc) available to you for device-to-server communication. There are pros and cons to each one. It's up to you to choose whatever solution is relevant to your system.
If you've already implemented the Firebase HTTPS interface and it does the job, you're done.
If you are having problems, note that the Google IoT Core also prescribes MQTT (or, alternatively HTTPS) as an underlying messaging protocol - used together with the Device SDK for Embedded C. But this is for people who want to have a large-scale authentication and management solution for their devices. By all means, stick to your existing solution if it works.

Using Gattlib package to Write without response to BLE device- RN4871

I am trying to control an LED via RN4871 BLE from microchip (http://ww1.microchip.com/downloads/en/DeviceDoc/50002466B.pdf) and I would like to provide brief pulses (below 10ms).
For this purpose I installed gattlib package for C from https://github.com/labapart/gattlib
First on my RN4871 side I define a characteristic with Write property (Write value of characteristic with acknowledgment from client to server) and using the read_write.c example from the library works just fine.
However, since I want to have a fast communication to provide short pulses of LED then I have to use write without response function. On my BLE device side, I create only one characteristic with the property of "Write without response" and associate the digital out with the UUID handle.
PS,59c88760536411e7b114b2f933d5fe66
PC,59c889e0536411e7b114b2f933d5fe66,06,01
and for the script:
#PW_ON
SHW,0072,18
#CONN
|O,08,%0072
Now when I use the example from the library (nordic_UART) to have write without response, it fails. I removed the parts for notify and rx. I am only using the tx uuid.
My question is more on the basic level, am I following the right direction for configuring my BLE device for write without response? Should I add additional characteristics (like notify)? Or the problem is how I am managing the gattlib package examples?

Advertising and connection establishment using nRF52 DK with nrf52832 chip on Segger Embedded studio

I want to know how to send out an advertisement with some specific user number and data such that a connection can be established using the the sdk 15.3.0.
could anyone suggest me what changes i need to make in the ble app beacon code given in the sdk examples.
Thanks
One idea would be to start with the ble_peripheral example of the Nordic SDK.
You can find the following two guides on their forum : https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial and https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial
This explains how to build a custom service with a custom characteristic to handle read / write and notification of values from the embedded device to a BLE central device (e.g: smartphone).

Sending and receiving data over Bluetooth Low Energy (BLE) using Telit BlueMod+SR

We are looking at using the Telit BlueMod+SR chip in a hardware idea we are working on. Towards that I've been trying to build a Bluetooth Low Energy (BLE) server simulation using the Telit BlueEva+SR evaluation board driven over USB by a Python script.
The two relevant manuals appear to be:
BlueMod+SR AT Command Reference
Terminal I/O Profile Client Implementation Guide (though I'm implementing the server)
(N.B. these are available here but are behind a register/login.)
I'm stuck on something basic: how to send or receive data. I understand that this is done by setting the value of a Generic Attribute Profile (GATT) service's characteristic. The BlueMod+SR already has the GATT service characteristics that I need (a UART data TX characteristic and a UART data RX characteristic) on its Terminal I/O Service. The UUID's of the characteristics I need are given in the Terminal I/O Profile Client Implementation Guide but I cannot see how to read from nor write to them. The AT Command Reference has a section on GATT Server commands but the only one listed, +LEATTRIB, is for defining the attributes for a service (and the ones I need are already defined).
What are the commands I need to read and write the values for the characteristics UART Data TX, UART Data RX, UART Credits TX, and UART Credits RX?
It turns out that I did not need to use the credit mechanism, that's handled for me. So to write to the TX characteristic I can either connect to BLE and just write the data, or use the multiplexing and write the data to channel 0x01 (Terminal I/O). Reading the RX characteristic si similarly just reading the serial connection.

GSM DATA INTERCHANGE

I was wondering if it is possible to send via GSM protocol and appropriate AT commands, few data through a simple GSM call (witout using data traffic).
For example my system is a PIC + GSM Module and it monitors and processes a string of data.
When the user wishes, he makes a voice call in order to interacts with the GSM module via DTMF commands for example via an APP.
My dubt is if the GSM module is able to send the data to thesmartphone in order to monitor the status of the system. The module is a Quectel M95.
During some investigation, I saw that the module can send USSD codes but I don't know if it's possible to customize the USSD and read it from the smartphone as I wish.
Or maybe is it possible to use the FAX for data exchange?
Thanks everybody in advance
Marco
There are a couple of alternatives if you want to avoid using data traffic. But they all require either a connection to a service that is capable of receiving SMS's for example Twilio. Or you can of course have a GSM Module connected to your server which could do the receiving.
You could then send your data and requests for data within an standard SMS body. Or alternatively you could send binary SMS's where you are not limited to the 7 bit character set.
USSD would only work if you have a USSD service provider (I think Twilio has this now). Because the USSD service must initiate a USSD session for your target GSM Module to respond to. USSD code sending for GSM Modules is operator specific and therefore you are limited to what they have implemented (usually for prepaid users and the topping up of accounts).

Resources