Introduction: APDuino on WiFi / 3G - Workaround
Many times there is no convenient wired connection possibility at the desired location of the automation unit. As APDuinOS (from the APDuino Project) only supports wired Ethernet as of now, the following workaround can be applied to get a wireless (WiFi or even 3G) connection "converted" to wired Ethernet that can be plugged into the Arduino EtherShield fit on the Arduino Mega 2560.
Step 1: APDuino on WiFi / 3G - Overview
* Arduino Mega 2560 + EtherShield
* Wireless Repeater (TP-Link TL-WR702N used in this example)
* Ethernet cables
* Respective power adapters
The following image shows an APDuino Device (in the enclosure: Arduino Mega 2560 + W5100 Arduino EtherShield + 2-channel relay switch allowing control of two independent 220V AC devices) connecting to a WiFi wireless network, using a TP-Link Nano wireless router that supports WiFi repeater/bridge mode.
In repeater or bridge mode, the TP-Link Nano (or other such product) connects to an existing wireless network provided by your Wireless Home Gateway or Broadband Router and in effect it connects wireless and wired clients (connected via the RJ-45 socket on the Nano) connecting to the Nano into the network provided by the repeated/bridged Access Point.
So the Nano's RJ-45 socket will become a LAN port, that can be used to hook the Arduino to your network. :-)
Step 2: Wireless Repeater Setup / Wireless Mode
Key things for the Wireless Repeater configuration, shown on the TP-Link Nano Admin Interface -- other products may differ, but settings should be more or less the same.
The default IP address of the TL-WR702N 150Mbps Wireless N Nano Router is 192.168.0.254, and the default Subnet Mask is 255.255.255.0.
You first need to configure your PC to have an IP address from this subnet, in order that you can access the web-based administration interface of the TP-Link Nano.
See the Manufacturer's User Guide - chapter 3.1 for connecting (or the respective User Manual of a selected similar networking equipment)
Recommendation: on any new networking equipment, do not forget to change the default administration username and password!
Once connected, configure the Wireless Mode Settings first.
Select the Wireless mode: Repeater or Bridge will do. Since Repeater is simpler (and assume you don't want new WiFi AP's in your network), we will go with that.
The TP-Link has to be rebooted upon wireless mode change, as prompted.
Step 3: Wireless Repeater Setup / Wireless Settings
Setting up the Repeater Wireless Configuration is simple: use Survey to find (or provide parameters manually for) the WiFi Access Point you want to connect to.
If setting up a Bridge Mode, in addition you must set up the AP for the Bridging Device too.
TP-Link needs another reboot upon changing the wireless configuration, as prompted.
Step 4: Wireless Repeater Setup / DHCP Settings
Dynamic Host Configuration Protocol (DHCP) is being used to assign IP addresses to devices automatically. Most likely (unless designing a multi-subnet topology, when you likely know what you are doing, anyway) you will want your existing DHCP server on your LAN to serve addresses to the APDuino device (or other networking equipment) to be connected to the Repeater LAN port.
Therefore disable DHCP in order that the DHCP requests sent by the APDuino device get served from the DHCP server that is (likely) in your existing Wireless Access Point / Broadband Router.
Otherwise (if you know what you are doing) you can enable it and set it to your liking.
The same goes for the other parameters, that are not discussed in this mini-howto (left to default) but can be customized to your liking.
Step 5: Enjoy!
Additional Options (3G):
Given that modern cell phones can tether Internet as a WiFi AP, the bridged access point might as well be a 3G-connected Android mobile providing ultimate mobility for your APDuino device.
Also, there are various other WiFi Repeater models with 3G USB Modem support, so that can be an even more convenient option. Check out the APDuino Shop for networking devices (watch out for cellular standards, etc.).
Finally, a side image of this sample APDuino Device that shows what's plugged where in this workaround.
Good luck building your own mobile APDuino Device! :-)
We have a be nice policy.
Please be positive and constructive.