phyphox Forums
"Mashing" smartphone GSP and Arduino sensor data - Printable Version

+- phyphox Forums (https://phyphox.org/forums)
+-- Forum: Discussion (https://phyphox.org/forums/forumdisplay.php?fid=1)
+--- Forum: General (https://phyphox.org/forums/forumdisplay.php?fid=3)
+--- Thread: "Mashing" smartphone GSP and Arduino sensor data (/showthread.php?tid=2240)



"Mashing" smartphone GSP and Arduino sensor data - LordHefekloß - 03-11-2026

Hi,

not sure if this is the right subforum, please move if necessary.

I am trying to combine the data from an Arduino Uno R4 that has a dust sensor connected with GPS data from a smartphone. I fail with both possibilities:

1) Reading Arduino data in Phyphox
I cannot get the BLE handshake on phyphox working when creating own experiments with the editor. Bluetooth connection works, but then I get a "Write error on characteristics UUID cddf1002-...." error message. Tried tons on things and yes, PhyphoxBLE::poll() is called 

<bluetooth name="R4_Test" mode="poll" rate="1">
      <config char="cddf1002-30f7-4671-8b43-5e40ba53514a" conversion="float32LittleEndian">TestValue</config>
</bluetooth>

Happy if somebody has a hint, but I would prefer to get #2 working - just mentioning #1 in case #2 is not possible

2) Reading smartphone GSP data from Arduino
In the phyphoxBLE library I do not find any GPS / Location sensor

#define SENSOR_ACCELEROMETER "accelerometer"
#define SENSOR_ACCELEROMETER_WITHOUT_G "linear_acceleration"
#define SENSOR_GYROSCOPE "gyroscope"
#define SENSOR_MAGNETOMETER "magnetometer"
#define SENSOR_PRESSURE "pressure"
#define SENSOR_TEMPERATURE "temperature"
#define SENSOR_LIGHT "light"
#define SENSOR_HUMIDITY "humidity"
#define SENSOR_PROXIMITY "proximity"

Is it impossible to read GPS via phyphox library on the Arduino?

Cheers
B.


RE: "Mashing" smartphone GSP and Arduino sensor data - Sebastian Staacks - 04-10-2026

Sorry, we must have someone missed this post. Are you still trying to do this?

1) The issue here is that you are using the "config" tag. This is used to write configuration data (like setting a data rate on a sensor) right after phyphox has established a connection. So, in this case it is converting "TestValue" to a floating point value (not entirely sure, but that should turn into "Not a Number") and try to write it to the given cahracteristic on the Arduino. In order to read a value from the Arduino, this should be an output tag and the bluetooth tag should be within an input tag.

Indeed, the Arduino library currently does not include the GPS sensor, so the XML file like this:

Code:
    <input>
        <bluetooth name="..." uuid="..." id="..." autoConnect="..." mode="..." rate="..." subscribeOnStart="...">
            <output ...>...</output>
        </bluetooth>
    </input>

Also, I would not use poll if it is not strictly necessary for your Arduino code. Notifications are usually a much better solution as the timing of the sensor is usually not controlled by the phone.

2) Unfortunately, the library currently does not support GPS (I am reallizing this myself just now). Since you are already writing your own XML config, I would recommend using the output from the library for any other sensor and then replacing the "sensor" tag in the input block with a "location" tag and the channels that you are interested in.


Let me know if you are still interested in this. I have now subscribed to this thread and should not miss your next post.