Posts: 9
Threads: 4
Joined: Mar 2020
Hi,
I'm currently doing my first steps with great Phyphox and work on programming an ESP32 to become a small universal sensor board.
There is a lot to learn on BLE :-)
On the linked page you mention that phyphox file can also be provided directly by peripheral device (instead of coping the file to smartphone or using QR codes):
Phyphox on BLE
Is there any description or code example how BLE dialog happens to initiate transfer between smartphone and device and how file transfer is handled (e.g. is data sent by server or read by client ...) ?
Thanks
Uwe
Posts: 323
Threads: 6
Joined: Aug 2018
Institution: RWTH Aachen University
Yes, it is at the very bottom of the BLE documentation:
https://phyphox.org/wiki/index.php/Bluet...m_a_device
Your device needs to advertise a specific service UUID to let phyphox know that this is supported. Phyphox will then subscribe to a specific characteristic and your device needs to send the experiment (zipped, with some additional bytes at the beginning containing size and checksum, see wiki page) in small chunks on that characteristic.
Our Arduino library (
https://github.com/Staacks/phyphox-arduino) does this as well. So, you might check out its code to get some idea. (And I need to update this library.)
Posts: 9
Threads: 1
Joined: Mar 2020
Institution: aRbotics LLC
In addition to sending the file along with the connection, is there a method for a user to add a number of experiments to the end users collection in one action? I am having users scan QR codes for each experiment, but setting up a collection in one action would be less work on the user end.
Posts: 9
Threads: 4
Joined: Mar 2020
Hi Sebastian,
thanks a lot.
I wasn't aware of this library (may be I was too focused on ESP32).
Might take me some time to adopt to BLE library for ESP but good chance to learn more details on BLE (still struggeling with some concepts :-( )
Uwe
Posts: 323
Threads: 6
Joined: Aug 2018
Institution: RWTH Aachen University
(03-30-2020, 06:55 PM)RobertGrover Wrote: In addition to sending the file along with the connection, is there a method for a user to add a number of experiments to the end users collection in one action? I am having users scan QR codes for each experiment, but setting up a collection in one action would be less work on the user end.
Yes, both QR codes as well as the transfer discussed here may (and in most cases "should") transfer or point to zip files. These may contain multiple experiments that are offered to the user who may choose to either save them all or pick one to start only the selected one. I think this has not been tested for the Bluetooth transfer as it is already rather slow for a single experiment.
(03-30-2020, 11:58 PM)Uwe Wrote: Hi Sebastian,
thanks a lot.
I wasn't aware of this library (may be I was too focused on ESP32).
Might take me some time to adopt to BLE library for ESP but good chance to learn more details on BLE (still struggeling with some concepts :-( )
Uwe
No need to adopt it to the ESP32. You can try the repository by our PhD student who has already adopted it and who is still developing the library. I just have not yet merged it to the "official" repository as I am not entirely sure if it is currently in a working state as it is even more "work in progress" than the official repo. So, if you like, you can try
https://github.com/Dorsel89/phyphox-arduino - just be aware that this is still rather undocumented, the interface will probably still change a lot and it might currently be in a state that is not working properly.
Posts: 9
Threads: 4
Joined: Mar 2020
Sebastian, thanks.
I'm happy to give it a try !!
In case of any issues I'll let you know.
Uwe
Posts: 2
Threads: 0
Joined: May 2020
(03-31-2020, 02:03 PM)Uwe Wrote: Sebastian, thanks.
I'm happy to give it a try !!
In case of any issues I'll let you know.
Uwe
I am using the this example (
https://github.com/Staacks/phyphox-arduino) with an Arduino Ble. Now I would like to change the experiment. After a little bit of reverse engineering I found this line in the phypoxBle.cpp file "uint8_t EXPERIMENT[] = {80, 75,......};
Is this how I could define an experiment? What is the meaning of the values?
Great piece of software, but I am a lil lost.
Felix
Posts: 52
Threads: 0
Joined: Aug 2018
Institution: RWTH Aachen University
Hey,
this line represents the phyphox experiment as a byte array. Originally we had considered using the editor to output a byte array besides the QR-Code. To be honest this would not be a nice solution. Thats why I am currently working on a version where you can create the experiment directly in the Arduino IDE. You can have a look on this example to get an idea how it will looks like:
https://github.com/Dorsel89/phyphox-ardu...riment.ino
BUT BEWARE: This example will NOT work with your phyphox version! There will be a phyphox beta version (very soon?) which allow you to use this example. If you cannot wait until then I can share my java script to convert zipped phyphox files to byte array.
Dominik
Posts: 2
Threads: 0
Joined: May 2020
(05-19-2020, 06:54 PM)Dominik Dorsel Wrote: Hey,
this line represents the phyphox experiment as a byte array. Originally we had considered using the editor to output a byte array besides the QR-Code. To be honest this would not be a nice solution. Thats why I am currently working on a version where you can create the experiment directly in the Arduino IDE. You can have a look on this example to get an idea how it will looks like:
https://github.com/Dorsel89/phyphox-ardu...riment.ino
BUT BEWARE: This example will NOT work with your phyphox version! There will be a phyphox beta version (very soon?) which allow you to use this example. If you cannot wait until then I can share my java script to convert zipped phyphox files to byte array.
Dominik
Hi Dominik,
great work. I would really appreciate if you could share the java script. When is very soon?
Felix
Posts: 547
Threads: 24
Joined: Apr 2020
Institution: RWTH Aachen University
(05-20-2020, 08:58 AM)CONUCON Wrote: When is very soon?
Like Debian's “releases when ready”…
Yet we still need a beta first.