Thanks. Figured as much.
Now I want to try to have 1 device that uses Personal Hotspot and then have the other devices connect to that “central” device.
My problem now is how to find the IP address of the Personal Hotspot on this “server” device.
When I connect an other device to the Hotspot I can see the IP address (172.20.10.5) on my Wifi settings, so I guess it’s something within this range.
But when I check the IP address on the Hotspot device (iPhone5) I only get the external 3G Ip address from my provider and not the local Hotspot IP address.
Is there a way to scan through the IP addresses a device has?
What I do now is:
[lua]
local someRandomIP = “192.168.1.122” --Just random
local someRandomPort = “3102” --This port you make up
local mySocket = socket.udp() --Create a UDP socket like normal
mySocket:setpeername(someRandomIP,someRandomPort)
local tmpIP, tmpPort = mySocket:getsockname()
[/lua]
But this only picks up the 3G address.