Spatial Toolbox iOS App won't start when Pi builds up an access point

Hey,
first off all, impressive project and very nice that you guys make it all open source and free to use.

I am currently trying to run the spatial edge server on a Raspberry Pi which also sets up an access point. My goal is to run a setup without any additional WiFi router and/ or proper internet connection. I am able to connect to the access point as well as the spatial edge server web UI through safari on the iPad.
But unfortunately the spatial toolbox app won’t start. The screen remains grey and it’s says “loading…” in the top left corner. After a few seconds, some of the UI controls of the spatial toolbox app appears, but only the first two (interfaces button and programming button).
Running the spatial toolbox app while the iPad is in flight mode does work, so a proper internet connection seems not mandatory. When I am trying to start the app without any WiFi connection and connect to the RPi access point while the app runs (through the control center) the spatial toolbox app immediately stops working and the camera view freezes.

Thank you very much in advance for any help!

iPad Pro 2018
iPadOS 14.4
Spatial Toolbox App 1.2.4
Spatial Edge Server 3.2.2

Hi @lde – welcome to the forum and thanks for posting your issue in such detail!

A few more questions:

  1. Did you download the Spatial Toolbox app from the App Store, or did you compile the app onto your iPad using the source code from GitHub?

  2. Can you clarify, have you ever seen the app working correctly (with the camera view working and the ability to add tools into your space)? You said it works when it’s in airplane mode but not when connected to the Edge Server installed on your RPi? Does it work if your Edge Server is installed on a more typical device (e.g. Windows or Mac laptop connected to WiFi router)?

I have an iPad Pro 2020, iPad OS 14.2, running the Spatial Toolbox app v1.2.4 (downloaded from the App Store) and haven’t experienced the issue you mentioned. But I also haven’t tried anything with an RPi or setting up an access point in this way.

Hi @ben,
thanks for your response.

  1. The app is directly downloaded from the app store, I didn’t compile anything myself.

  2. Yep, I can confirm that the app, as well as the server is running correctly. The Pi is connected via LAN to my router (network with a proper internet connection). When the iPad is connected to the same network via WiFi I can access the spatial edge server via browser (safari on iPad) and the server is accessible via the spatial toolbox iOS app (can see objects).
    The Pi on the other hand builds up an on WiFi accesspoint (network without a proper internet connection, I didn’t route anything etc.). I can connect to the network with my iPad and also access the spatial edge server via the local IP from the Pi in the network (:8080). But when I’m trying to launch the Spatial Toolbox iOS app, it gets stuck while loading…

When I try to start the iOS app without any network connection at all the app is also starting.
But, when the app is still running in background and I tried to connect to the Pis access point (I didn’t leave the app, connect to the WiFi via the control center from the iPad), at the point when the connection is established the app immediately stops working and freezes.

So conclusion: the Pi, the access point, the spatial edge server as well as the spatial Toolbox app is working correctly. But not when I am connected to the access point.

Hope this helps to clarify. When you need any other information, feel free to ask.

Thank you in advance!

Hi @ben

I did some additional testing today and I wanted to let you know what is additionally not working because, spoiler: my tests were unfortunately without any success :smiley:

  1. Hotspot with an iPhone:
    • joining with Pi, iPad and computer
    • Internet in the network works
    • Pi had LAN (directly to my router, normal home network) and WiFi (iPhone hotspot) at the same time
    • could access the spatial edge servers web interface via safari on iPad
    • Spatial ToolBox app on iPad starts but spatial edge server was not found.

  2. Check if server is running correctly
    • connected the iPad to the network where the Pi is also connected with via LAN
    • app starts and server was found

  3. Test if mobile phone hotspot generally allows communication
    • connect iPad, Pi and computer to the phone’s hotspot
    • logged in to the Pi via ssh; it worked
    • I could access the Spatial Edge Server via Safari on the iPad.

  4. check if parallel network (LAN and WiFi) connection from the PI interfere the server
    • exception: should not affect the server discovery in the Toolbox app since the first test already showed this
    • plugged out the LAN cable
    • spatial toolbox app logged the disconnection
    • Pi, iPad, computer connected to the phone’s hotspot
    • spatial edge server still accessible via Safari
    • can’t find any server

Next I will try to setup the RPi’s hotspot in a different way. If this does also not working, I will try to use a decent router.

@valentin I recently saw that you were motivated in supporting a guy with a similar setup like mine. But it seems that @ MattMueller (unfortunately could not mentioned more than two people) didn’t have any problems starting the Spatialtoolbox App when the Pi is running as a hotspot without internet connection. I think at this weekend I will try setting up the hotspot in the way Matthew refers the tutorial to, to exclude any failures in this direction…

@lde this all sounds like routing issues in your network. You need to make sure that TCP/IP as well UDP broadcasting packages are routed. I am not sure if that works with your phone network.
Using the phone as a router might also bring issues down the road when you remove that “router”.
I really would suggest using a stable router for networking with the toolbox.

If you do find a solution for how to configure your phone access point network to successfully pass on UDP and TCP/IP please post the result here for others to learn from.

@valentin thank you for your quick response!

I think using the phone as a router isn’t the best idea, I just wanted to text if the Pi, spatial edge server and spatial toolbox trio is running in an other “WiF-based network” than my personal home network.

My initial problem is, that the spatial toolbox app won’t start at all if the iPad is connected to a network without any proper internet connection (see my very first post).

Sure, if I find a solution I will post it here.

@lde It could be possible that your toolbox copy needs an internet connection at its first start for vuforia engine. But in general you should not have any issues.

However you need a wifi Connection and a proper IP address to run.

I think we should add some error messages to the toolbox that can help with guidance.

Some questions:

  1. Could you open toolbox with a wifi Router connected to the internet?
  2. If you remove the internet cable from the router does the toolbox still work?
  3. Can you restart the toolbox and is it still working?

Can you describe your step by step issue a bit more?

I would love to understand it better.

Hi @valentin,

thank you for your response.

  1. the spatial toolbox app works when connected to a network with internet connection, or when the iPad’s airplane mode is active.

  2. That’s something I didn’t test for now. But I tested something similar: I disconnected the iPad from the Wifi and start the spatial toolbox app without any Network connection. The apps starts without any issue. While the app is still running in the background I pulled down the iPad’s control centre form the top right corner and connect the iPad to the RPis hotspot (without really leaving the app). After the connection is established the app immediately starts getting unresponsive and freezes.

Fortunately everything is working now without really changing things… I reinstall the hotspot on my Pi and now the spatial toolbox app is starting. I didn’t change anything regarding routing anything.
But I am sure that the missing internet connection is affecting the spatial toolbox app in a way. When connected to a network with internet connection the spatial toolbox app needs ~4/5 sec to start, when connected to the RPis hotspot the app needs around 15 sec and didn’t show the startup screen correctly. Every fourth attempt to start the app fails.

Unfortunately my Objective-C skills aren’t good enough for effectively digging through the code and identify the problem more precisely.

I think I will setup up everything again from scratch for testing purpose and give you a feedback.

Hopefully this helps to clarify things.