Posts: 4
Threads: 1
Joined: Jan 2023
Hi,
I am new to Phyphox and to bluetooth protocols in general. I would like to build an experiment in which I can send sensors data from Arduino to Phyphox and set up the experiment via the Editor, which has lots of useful features.
In the input tab I should choose a bluetooth input type and then specify some outputs: my issue is with the characteristic UUID of each output. Where do I get these UUIDs? Should I define them in the Arduino code and in case how (examples)? Is there detailed documentation on this stuff?
I only managed to find the 128-bit service UUID when connecting Arduino to Phyphox directly via bluetooth and scanning with the nRF Connect smartphone app, but not further than that.
Any help greatly appreciated.
Many thanks.
Mauro
Posts: 52
Threads: 0
Joined: Aug 2018
Institution: RWTH Aachen University
Hey Mauro,
are you working with our phyphoxBLE-Arduino library? If so you have to insert the uuid:
Code:
cddf1002-30f7-4671-8b43-5e40ba53514a
We used these when initializing the server (
GitHub).
Furthermore you have to specify which type of data is send. If you are using our library you will probably send float values - so use the conversion function "float32LittleEndian".
Feel free to ask if you have further questions. Unfortunately we dont have written guide/tutorial on this topic since most of these parameter/terms are bluetooth low energy specific and therefore too much overhead for our normal users.
Cheers
Dominik
Posts: 4
Threads: 1
Joined: Jan 2023
(01-09-2023, 11:09 AM)Dominik Dorsel Wrote: Hey Mauro,
are you working with our phyphoxBLE-Arduino library? If so you have to insert the uuid:
Code:
cddf1002-30f7-4671-8b43-5e40ba53514a
We used these when initializing the server (GitHub).
Furthermore you have to specify which type of data is send. If you are using our library you will probably send float values - so use the conversion function "float32LittleEndian".
Feel free to ask if you have further questions. Unfortunately we dont have written guide/tutorial on this topic since most of these parameter/terms are bluetooth low energy specific and therefore too much overhead for our normal users.
Cheers
Dominik
Thank you Dominik,
I have one more question: I would like to send to Phyphox a series of data of a few seconds of duration in cycles, like I am recording a movement which is repetitive. So I would like to see specifically the graphs regenerated from scratch and restart anew. How can I achieve this in the Editor?
Thank you,
Mauro
Posts: 547
Threads: 24
Joined: Apr 2020
Institution: RWTH Aachen University
You could erase the corresponding buffer by a clever use of the clear attribute. The simplest way is perhaps when it should happen on every run of the analysis block.
Posts: 4
Threads: 1
Joined: Jan 2023
(01-09-2023, 11:09 AM)Dominik Dorsel Wrote: Hey Mauro,
are you working with our phyphoxBLE-Arduino library? If so you have to insert the uuid:
Code:
cddf1002-30f7-4671-8b43-5e40ba53514a
We used these when initializing the server (GitHub).
Furthermore you have to specify which type of data is send. If you are using our library you will probably send float values - so use the conversion function "float32LittleEndian".
Feel free to ask if you have further questions. Unfortunately we dont have written guide/tutorial on this topic since most of these parameter/terms are bluetooth low energy specific and therefore too much overhead for our normal users.
Cheers
Dominik
Hi Dominik,
I am really a beginner, so forgive me: I managed to send one value to one characteristic using the uuid you suggested. If I want to send two or more values with phyphoxBLE::write(val1, val2) for example, how do I need to configure the bluetooth outputs on the phyphox Editor? If I create two outputs with the same uuid as above I only get val1 repeated twice instead of having val1 and val2 in the two outputs of the Editor. Clearly, I have not fully grasped how the BLE device and the Editor really work in connection, so some help would be greatly appreciated.
Many thanks,
Mauro
Posts: 547
Threads: 24
Joined: Apr 2020
Institution: RWTH Aachen University
Dominik likely will not see your post until end of next week, so I (try to) answer your question.
The phyphox part for BLE is documented at
https://phyphox.org/wiki/index.php/Bluetooth_Low_Energy. You need to provide an “offset” attribute so that phyphox finds the correct place of the value. If all values in a package should end up in the same buffer, then there is a “repeating” attribute in order to achieve that.
Posts: 4
Threads: 1
Joined: Jan 2023
03-22-2023, 04:27 PM
(03-22-2023, 03:45 PM)Jens Noritzsch Wrote: Dominik likely will not see your post until end of next week, so I (try to) answer your question.
The phyphox part for BLE is documented at https://phyphox.org/wiki/index.php/Bluetooth_Low_Energy. You need to provide an “offset” attribute so that phyphox finds the correct place of the value. If all values in a package should end up in the same buffer, then there is a “repeating” attribute in order to achieve that.
Thank you Jens!
Got it. Now it works!