Actually, this is what happens for hotspot.
If there is no active WiFi connection, and you're not in the screen that says "Personal Hotspot", it turns off WiFi hotspot feature completely.
To connect your FIRST device, you MUST be in that Personal Hotspot settings page.
After that, it won't turn off until the last device is disconnected.
Quick-and-dirty workaround
I also ran into the same problem when developing an iPhone app that uses a UDP multicast message to discover devices on the network. Apparently the iPhone blocks multicast messages in personal hotspot mode.
However, iPhone seems to use the 172.20.10.0/28
subnet for devices on the personal hotspot network. This means that there are just 16 possible addresses. Of these, 172.20.10.0
is apparently not used, 172.20.10.1
is the iPhone itself, and sending messages to 172.20.10.15
fails with a 'not permitted' error. This means that only the following 13 addresses can be used by clients: 172.20.10.2
, 172.20.10.3
, ..., 172.20.10.14
.
So my work-around is pretty simple: instead of sending broadcast messages only to to 224.0.0.0
, I also send them to all the other possible addresses in the subnet (172.20.10.2
- 172.20.10.14
).
Of course, to be future-proof in a production app you should probably check the list of network interfaces, check the IP and subnet, etc., but for my personal use this method is sufficient.
Best Answer
Before I got a new iPhone, I experienced this with my Android sometimes. It may or may not work for you, but try a physical connection. I have found that this helped me.