Go Down

Topic: Can WiFi Shield go into adhoc (infrastructure) mode? (Read 6686 times) previous topic - next topic

Kikolobo

I have no idea if this is possible but it is a most for my project. I know wifly modules can go into adhoc infrastructure mode.. But i have not clue if the WifiShield can do it...

It is a most, becuase that is how i setup my device to connect to wifi base stations... I want to startup, scan for available networks, then go into infrastructure mode so the user can connect to the module... visit a webpage and setup which network he wants to connect.....

Does anyone knows if Wifi Shield listed here (http://arduino.cc/en/Guide/ArduinoWiFiShield#toc5) can do that?

SukkoPera

There is no "adhoc infrastructure" mode. Adhoc and Infrastructure are two different (and incompatible) modes.

So make up your mind and ask again ;).

Kikolobo

adhoc mode... Where the wiFly module becomes the network advertised so computers can connect to it as the arduino module was the base station. This is for simplicity in the configuration


giantsfan3

#3
Aug 19, 2012, 05:01 am Last Edit: Aug 19, 2012, 05:04 am by giantsfan3 Reason: 1
Doesn't seem to be the case... Here is mini datasheet for the H&D module used on the shield:
http://media.digikey.com/PDF/Data%20Sheets/H&D%20Wireless%20PDFs/HDG104_Product_Brief.pdf

In your specific case, why not the alternative of setting up a network on the computer's end, and connecting to it from the Wifi shield?

epinc

I was really excited about the official wifi shield since the wifly rn-xv I am using does weird things when I try to pass a lot of data back and forth,but the official shield not only doesn't support ad-hoc mode it also doesn't seem to support udp. Frustrating.

Kikolobo


Doesn't seem to be the case... Here is mini datasheet for the H&D module used on the shield:
http://media.digikey.com/PDF/Data%20Sheets/H&D%20Wireless%20PDFs/HDG104_Product_Brief.pdf

In your specific case, why not the alternative of setting up a network on the computer's end, and connecting to it from the Wifi shield?


I am looking to do this for an end product. It seems easier if the user just hooks it up, turns up the computer see's a new network named as the device "My Thermostat" for say... and when you connect to the thermostat, any page you go to will point to a config page...

But since there's no ADHOC mode.... No go with this design.. Will look for another alternative.

Headroom

If I understand you correctly you want:

1. A WiFi shield to automatically detect networks within range and then select one to connect to automatically ?
2. Then you want the user to turn on their computer and be able to select the service the Arduino/WiFishield offers ?

1.) that can be down, however, of course this would only work for open networks. And of course you don't know what network your user sits on. Perhaps you need to study the general workings TCP/IP networking a little bit more before giving up on the project. You can run some WiFi shield in AP (Access Point) mode. that way they create their os network the user then can connect to. Or you have it connect to the users existing network. If it's a closed network the Arduino/WiFi shield will have to provide some form of authentication via passphrase/password to be able to log into the network.

2.) Sure, that technology os called ZeroConf with the most prominent implementation being Apple's Bonjour. There are libraries for Arduino that help you do that like DHCP, Bonjour libraries etc.

Having said all that. Nothing happens by itself magically. You'll have to write software to do it  ;)
http://trippylighting.com

http://ledshield.wordpress.com/

Kikolobo


If I understand you correctly you want:

1. A WiFi shield to automatically detect networks within range and then select one to connect to automatically ?
2. Then you want the user to turn on their computer and be able to select the service the Arduino/WiFishield offers ?

1.) that can be down, however, of course this would only work for open networks. And of course you don't know what network your user sits on. Perhaps you need to study the general workings TCP/IP networking a little bit more before giving up on the project. You can run some WiFi shield in AP (Access Point) mode. that way they create their os network the user then can connect to. Or you have it connect to the users existing network. If it's a closed network the Arduino/WiFi shield will have to provide some form of authentication via passphrase/password to be able to log into the network.

2.) Sure, that technology os called ZeroConf with the most prominent implementation being Apple's Bonjour. There are libraries for Arduino that help you do that like DHCP, Bonjour libraries etc.

Having said all that. Nothing happens by itself magically. You'll have to write software to do it  ;)


I don't mind writing software :) Just to clarify...

I scan the networks in range ONLy to get the names of the nearby wifi base stations.... Then i go into ADHOC mode so that the module will broadcast or advertise itself as a wifi network so that the user can see it in available wifi networks..... He connects to it and go to a webpage to configure which of the available networks wants to use and set a password for it and such....

Nextime the device boots looks for the base station specified by the user and attempts to join it...

That's how i think its simplest for my device to get configured. If i use Bonjour, it assumes the device is connected to the network... Which it is not the first time you boot it..

Headroom

Ad hoc and infrastructure modes are incompatible, meaning you cannot connect a WiFi shield Lin ad hoc mode to an Access Point (infrastructure mode).

When you are scanning you are likely scanning for infrastructure mode networks or in other words for APs within range. Most WiFi networks are operated in infrastructure mode.

From your description I am gathering that you want to provide your user with comfort functions similar to connecting your iPhone ( or Android phone) to a given WiFi network. On an iOS device you go into "Settings -> WiFi" and ther are you presented with a list of available WiFi networks that you could connect to. What you are seeing in that in that list are Access points.
Then you want the user to select which network to connect to and depending on that networks settings provide a password.

Once you are connected to a network, provided these devices Support Bonjour, you can see what services are offered and other devices can see what services are bing offered by your device.

I am, not sure that can be easily done with any WiFi shield as the Arduino DHCP/Bonjour libraries depend on the Arduino Ethernet library and thus you need an Arduino Ethernet shield. But you can easily connect a little pocket router, e.g. A TP Link TP 702 router?

However I am sure that soon the newly released Arduino WiFi shield will provide a lot of functionality that was previously not available.
http://trippylighting.com

http://ledshield.wordpress.com/

giantsfan3

@epinc and @Kikolobo:

What problems did you have with the RN-XV if/when you tried it? The setup should be very straightforward for the purpose of adhoc mode and accessing it from a remote computer/iPhone...

To put it in adhoc mode, just solder or connect a wire between Pin 8 and GND (Pin 10). Then if you provide power to the RN-XV (maybe convenient via Sparkfun USB explorer, or some other Xbee breakout), you should see the name "Wifly-GSX-..." on the wireless networks on your iPhone or your computer, etc. I believe you can also rename that to any network name you would like by configuring the RN-XV.

epinc, how much data throughput are you attempting that is giving you problems when data is going back and forth?
I had some trouble with the infrastructure mode and UDP on the RN-XV but adhoc and TCP turned out pretty straightforward.

Kikolobo


Ad hoc and infrastructure modes are incompatible, meaning you cannot connect a WiFi shield Lin ad hoc mode to an Access Point (infrastructure mode).

When you are scanning you are likely scanning for infrastructure mode networks or in other words for APs within range. Most WiFi networks are operated in infrastructure mode.

From your description I am gathering that you want to provide your user with comfort functions similar to connecting your iPhone ( or Android phone) to a given WiFi network. On an iOS device you go into "Settings -> WiFi" and ther are you presented with a list of available WiFi networks that you could connect to. What you are seeing in that in that list are Access points.
Then you want the user to select which network to connect to and depending on that networks settings provide a password.

Once you are connected to a network, provided these devices Support Bonjour, you can see what services are offered and other devices can see what services are bing offered by your device.

I am, not sure that can be easily done with any WiFi shield as the Arduino DHCP/Bonjour libraries depend on the Arduino Ethernet library and thus you need an Arduino Ethernet shield. But you can easily connect a little pocket router, e.g. A TP Link TP 702 router?

However I am sure that soon the newly released Arduino WiFi shield will provide a lot of functionality that was previously not available.


Let me see if i can explain my self better..

I want my arduino device to behave like an access point.. So that my user in his computer will see it as a wifi access point for him to connect to.. So that this is easier to configure the device with a web browser...

The problem is that my device will not have  a screen or keyboard.. So how can the user configure the device to connect to a wifi network that is protected with password? The only way or easiest way is for my arduino device to behave like an access point "ad-hoc" so that the first time the user configures the password for his home or office access point... Next boot the arduino device will attempt to connect to the configured access point....

Do you know when will the new WIFI shield be released or if theres one coming?

Go Up