User Tools

Site Tools


digix:tutorials:wifi

This is an old revision of the document!


Setting up the WiFi connection (first time use/new location):

Attach the DigiX to a power source (USB, DC Jack, etc)

From a device with a web browser (computer, smartphone, tablet, etc) connect to DIGIX or HF-LPB network with DHCP enabled

In browser goto: 10.10.100.254

Username: admin Password: admin

If necessary - Select English in the top right

Go to Work Mode Screen

set to AP+STA for best flexibility.

AP Mode - Access Point mode allows the DigiX to function as a Access Point to WiFi client devices STA Mode - Station Mode allows the DigiX to function as a WiFi client to WiFi Access Point AP+STA - Allows the DigiX to function as a Access Point at the same time it is a client to a Access Point

Hit Save before continuing.

When it says to reboot - unless you are completely done, do not reboot but continue do your setup.

STA Setting

Enter network name or scan for it, enter security info (it will attempt to detect encryption settings) Hit Save

When it says to reboot - unless you are completely done, do not reboot but continue do your setup.

AP Setting

Set these to your liking - this is for the Access Point the WiFi module creates (for connecting with Android phones, etc). Make sure it is not on the same channel as the WiFi you selected in STA settings.

Hit Save

When it says to reboot - unless you are completely done, do not reboot but continue do your setup.

Other Settings

Don't change anything here unless you know what you are doing, the library depends on these settings.

Account

Change the username and/or password to login to this configuration panel.

Hit Save

When it says to reboot - unless you are completely done, do not reboot but continue do your setup.

When everything is set how you would like click on “Restart”

and then “OK”

You may need to power off the DigiX and power it back on the first time you change this or when you change the AP settings. (Eje_G Note: I never discovered any issues when I did my setup, but I did fairly straight forward configuration. Other configuration setups might possibly require a reboot)

Using it in your sketch

This library is very alpha, please help us fill it out, fix it up, and improve it - this is a top priority that we'd love some help with!

See the Examples→DigiFi→Basic example to get started.

Examples→DigiFi→KeyboardTweetLCD assumes you have the Bonus shield with the LCD attached and a keyboard attached via a USB OTG adapter - it turns your DigiX into a standalone twitter tweeting machine.

Resources

Datasheet on WiFi module: http://digistump.com/wiki/_media/digix/tutorials/usr-wifi232-g_en.pdf

Expanded DigiFi library by ags131: Now in the DigiFi GitHub https://github.com/digistump/DigiFi

This adds wrappers for all the AT commands. Some of the ToDo things below are easily done via these wrappers, such as server mode, which is a oneline call when in AT mode.

wifi.startATMode(); wifi.setNetParams(“TCP”,“SERVER”,20,“”); wifi.endATMode();

The above code would start the WiFi listening on port 20. all data would be linked to the serial connection.

ToDo - please help!

  1. Figure out the reasons for, solutions to, and differentiate between the intermittent timeout/no response issues (see below).
  2. Add DELETE, PUT commands to library
  3. Add lots of additional error handling
  4. General cleanup, comment, etc of library, example, and this page.
  5. Add more features to library and document on wiki.
  6. Add images to this page, especially the setup steps. - COMPLETED
  7. Implement an option to use the already connected RTS,CTS hardware flow control lines to achieve much higher speeds between Wifi module and DigiX without having buffer issues.
  8. Extend class to work with Xively, ThingsSpeak, and Temboo (based on their Arduino libs)
  9. Programing over WiFi
  10. Digistump hosted proxy for secure data transfer
  11. Digistump hosted proxy for IFTTT integration
  12. Add an implementation of the server mode of the wifi module to the library (or a separate library?) - it is relatively easy to put it in server mode and use it to server content from the Arduino.

===== Known issues ===== The biggest known issue at this point is that intermittently (and seemingly related to latency of the server you are sending the request to) the WiFi module does not send the response to the DigiX. It seems in some cases it does send the request to the other server (post requests arrive, but the response does not get back to the DigiX) this may be solved by timing or by utilizing some of the more cryptic AT commands. We've been working on it, as it cropped up when we made the module switch to this module (but this module solved many other things), but would love some help! This has been fixed by ags131! Newest code in github: https://github.com/digistump/DigiFi

Tips

You can use the solder jumper on the back of the DigiX to connect the WiFi reset to either the DigiX reset button or pin 106 (which would allow you to reset from software) - either of which would make debugging/development on the library much easier since you don't have to worry about the wifi being in a stuck state and having to power off.

digix/tutorials/wifi.1378929428.txt.gz · Last modified: 2013/09/11 12:57 by digistump