Ad Hoc networking in Corona?

I was wondering if it is possible to create an ad hoc network using Corona.

In the LUA socket library I couldn’t find anything that might do this. It assumes there is a network and that the clients have an IP address.

But what if 2 devices are not on a local WiFi and cannot use 3G?

Thanks!

We don’t have any Bluetooth support at this time.  Any networking would need to use WiFi.

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.

We don’t have any Bluetooth support at this time.  Any networking would need to use WiFi.

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.