This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

"Mashing" smartphone GSP and Arduino sensor data
#3
[BUG] <location> sensor produces no data in BLE experiments on iOS

Hi, following up on this thread — I'm running into the exact issue described in point 2, where the library doesn't support GPS, and I've implemented the recommended workaround (replacing <sensor> with <location> in the input block). However, the GPS data never arrives on iOS, even though it works perfectly in standalone phyphox experiments.

Setup
  • Board: Arduino Nano 33 BLE
  • phyphox BLE library: 1.3.0
  • phyphox app: version 1.2, build 17272, file format 1.19
  • Device: iPhone 13 mini
  • iOS: 26.4.2

What works
  • The BLE IMU data streams perfectly — accelerometer and gyroscope graphs update in real time
  • The built-in phyphox Location experiment gets a GPS fix immediately outdoors
  • The GPS tab in my custom experiment renders correctly (shows Latitude/Longitude/Altitude axes) — meaning phyphox parses the <location> block fine

What doesn't work
  • The GPS graphs remain completely empty. No data points ever appear, even after 60+ seconds outside with a clear sky

Current XML (relevant excerpt)

Code:
<data-containers>     <container size="0" static="false">tGPS</container>     <container size="0" static="false">lat</container>     <container size="0" static="false">lon</container>     <container size="0" static="false">alt</container> </data-containers> <input>     <location>         <output component="lat">lat</output>         <output component="lon">lon</output>         <output component="altitude">alt</output>         <output component="time">tGPS</output>     </location>     <bluetooth name="BikeDetector" id="phyphoxBLE"               mode="notification" subscribeOnStart="true">         <output char="cddf1002-30f7-4671-8b43-5e40ba53514a"                 conversion="float32LittleEndian" offset="0">aX</output>         <!-- ... remaining channels ... -->         <output char="cddf1002-30f7-4671-8b43-5e40ba53514a"                 extra="time">t</output>     </bluetooth> </input>

Arduino loop (no poll, as recommended)

Code:
static const unsigned long SEND_INTERVAL_MS = 33; // ~30 Hz void loop() {     if (PhyphoxBLE::currentConnections == 0) {         delay(10);         return;     }     static unsigned long lastSend = 0;     unsigned long now = millis();     if (now - lastSend < SEND_INTERVAL_MS) return;     lastSend = now;     if (!IMU.accelerationAvailable() || !IMU.gyroscopeAvailable()) return;     float ax, ay, az, gx, gy, gz;     IMU.readAcceleration(ax, ay, az);     IMU.readGyroscope(gx, gy, gz);     PhyphoxBLE::write(ax, ay, az, gx, gy); }

Things I have already tried  

  1. Location permission set to "While Using" with Precise Location enabled in iOS Settings
  2. Testing outdoors with clear sky for 60+ seconds Swapping element order — putting <location> before <bluetooth> in the input block in case iOS initializes sensors in declaration order
  3. Loading the experiment via a .phyphox file transferred by AirDrop instead of receiving the XML over BLE — in case file-loaded experiments initialize CLLocationManager differently than BLE-received ones 
  4. Removing PhyphoxBLE::poll() from the loop entirely, as recommended in this thread 
  5. Deleting and re-adding the experiment in phyphox to force a fresh XML fetch

In all cases: BLE IMU data works, GPS tab renders, GPS containers remain empty.  Is this a known iOS-specific limitation? The standalone Location experiment works fine, so location permission and hardware are not the issue — it seems specifically related to how the location manager is initialized in the context of a BLE experiment.
Reply


Messages In This Thread
RE: "Mashing" smartphone GSP and Arduino sensor data - by justus.goergens@gmx.net - 05-22-2026, 12:07 PM

Forum Jump: