• FAQSolved
  • Connecting to a Bela set up as WiFi access point from iPhone

Hi,

We want to establish a connection to Bela from an iPhone by setting up the Bela as a WiFi access point, and connecting to it from an iOS device.
Setting up the Bela as an AP worked like a charm (thanks to this helpful guide: https://learn.bela.io/using-bela/bela-techniques/connecting-to-wifi/).

However, iOS devices (since iOS v10) seem to disconnect when they can't access the internet through whatever access point they connect to (the wifi connection in settings then gets the default Apple 169... address).

I know there has to be a way around this, as I use at least one other device set up as an AP (without internet access) that does allow iOS devices to connect (an ADSB transmitter receiver called "SkyEcho") - I assume there must be some obscure DHCP setting to pass along with the lease.

Has anyone managed to get this working?

    adriaan However, iOS devices (since iOS v10) seem to disconnect when they can't access the internet through whatever access point they connect to (the wifi connection in settings then gets the default Apple 169... address).

    I remember Apple marketing this as a feature ............

    adriaan I know there has to be a way around this, as I use at least one other device set up as an AP (without internet access) that does allow iOS devices to connect (an ADSB transmitter receiver called "SkyEcho") - I assume there must be some obscure DHCP setting to pass along with the lease.

    I don't know really ... an intuition I have is that it could be some of the settings in /etc/hostapd/hostapd.conf ? I don't know what each of those means, or if there are others, but that would seem a reasonable starting place. As usual, if you find any other Linux board that can actually do that, we should be able to replicate it on Bela.

      Thanks giuliomoro , that's a good call. I've been fiddling with dhcpd.conf, but completely forgot about hostapd.
      I'm pretty sure the ADSB device I'm talking about runs on an RPi, so I'm still hopeful there's one way or another ... I'll reply if I have any luck.

        That would be ideal! Unfortunately it's a £400 consumer device (so no ssh telnet etc) I'm using for flying, so I'm not too keen to crack it open yet ...

        Fair point. You could do something like iwlist wlan0 scanning from a third machine and compare the results for the Bela access point vs the device's access point and see if you spot anything there?

        Also another thing: as far as I understand, there are two access point-like modes on Linux. One through hostapd, as explained in the guide and another one that involves wireless-mode ad-hoc. I don't remember the details, but the latter didn't work for me. What I remember it showed up on my mac with the same icon as my iphone's wireless access point used to, instead of as a wireless network like all the others (and the one created with hostapd). So there was something fundamentally different about that, but I am not sure what. It may be worth exploring? A series of failed attempts is described here.

          That's a very good idea (scanning from 3rd machine). I'll try that as soon as I have the ADSB device with me again (it's currently in the a/c at the airfield).

          I thought about trying ad-hoc mode, but from what I could see, iOS did not support it.
          However, I just searched a bit more, and I get conflicting results - it might be supported after all.

          I'll park this for a few days until I have the ADSB device with me again.
          Thanks for all your help & ideas - that's awesome - I now have a few new avenues to explore, which makes me happy!

          9 days later

          With a bit of faffing around I've figured out that the issue which prevented the iphone from staying connected to the AP was completely unrelated to the "no internet connection" message. I can actually connect to the Bela just fine, despite the fact that iphone complains about no internet connection.

          Thanks again for your help giuliomoro!

          so to clarify which configuration are you using ?

          This config works perfectly (the "Using Bela as a wi-fi hotspot" section): https://learn.bela.io/using-bela/bela-techniques/connecting-to-wifi/

          Issues I faced:
          - Old TP_LINK wifi dongle (the linux driver of which do not support AP mode)
          - The first time I connected from an iPhone I saw the "no internet connection" message, and the iPhone's interface then got assigned the "default" iOS 169.x.y.z address (which gets assigned if DHCP fails). I then wrongly assumed that iOS released the DHCP IP after detecting that it can't connect to the internet, but in retrospect that must have been an intermittent issue, or misconfiguration.

          It works now, despite the "no internet connection" message.