Cheap and Easy Arduino Wi-Fi Hack

137,849

102

42

Posted in TechnologyArduino

Introduction: Cheap and Easy Arduino Wi-Fi Hack

About: I am a hippie at heart , just got back into electronics after about 30 years away from it, by playing with an Arduino .

I was sitting around and messing with my Arduino UNO and an ENC28J60 Ethernet module, and thought to myself it would be cool to have a Wi-Fi shield, when I realized I did not have to buy a shield as I had the components and all I had to do was hook them up together ( pure intense light bulb moment!!).
When I travel carry a small Wi-Fi router to use in hotel rooms (TP-Link TL-WR702N) which is a 150Mbps access point, I remembered that it could be configured as a client among other modes it has.
I reconfigured it as a client and assigned an IP number checked I could access it over my home Wi-Fi network , by plugging into a desktop’s LAN port, also checked that it had  access to the internet .

I then plugged the TP-Link TL-WR702N into the ENC28J60 Ethernet module and the UNO and ran the etherShield web switch example which came with the etherShield library and it worked. The router runs of 5 volts via a mini USB connector which works out well with the Arduino.

I live in mainland China and this whole experiment cost me about US$20 for the ENC28J60 Ethernet module and the wireless router, I checked up on the local prices for an Arduino Wi-Fi shield and it was between US$45 to US$80.
Once I figure out what my final project will be I might splurge and buy a real Wi-Fi shield for it, till then this serves my purpose albeit a bit messy with the wires.

Any and all feedback is appreciated, I will try and answer any questions if any.

Share

    Recommendations

    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Spotless Contest

      Spotless Contest
    • Trash to Treasure

      Trash to Treasure
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    42 Comments

    Like your idea very much.
    I tried WR703N and Arduino with USB, saving ethernet shield.
    OpenWRT WiFi client config had to do in text editor without webinterface.
    https://www.instructables.com/id/How-to-set-up-OpenWRT-on-a-pocket-router-WR703N/

    So does this system create a wifi network without connecting to a laptop or wall? I'm trying to get some wifi in my car and if I power this setup through a portable battery charger pack, would I be able to connect my phone to the wifi it creates?

    1 reply

    Well, it creates an access point to where you can connect with your phone or tablet, but you won't have internet access, thus needing another device (like a laptop with a 3G card) to give it an internet connection

    this is a very Informative post, I am Glad to read this.

    http://goo.gl/LrnVuY

    It is possible to use Mr3020 with broadband 3g modem to control arduino?

    I found this and am trying a wireless setup using the arduino ethernet and the same router. Can you point me to the "etherShield web switch example which came with the etherShield library"? I cannot seem to find it. I guess i am just confused on how to get the arduino to actually connect to a wifi connection once the router is in client mode.

    2 replies

    Hi, If you look in the examples folder on the IDE ( once you have installed the library ) it's called webserverpde .
    Change the ip address according to your wifi router static uint8_t myip[4] = {192,168,0,15};
    static char baseurl[ ]="http://192.168.0.15/";



    I have mentioned below about an excellent tutorial for the ENC28J60 in 8 parts
    http://www.lucadentella.it/en/category/enc28j60-arduino/

    user

    Hi ddoss

    Thanks for posting this project.

    I’m using Arduino Uno R3, Ethernet shield and TP-Link TL-MR3020 (switch at WISP mode). I’m having trouble connecting.

    There are 3 types of connections: PPPoE, Dynamic IP and Static IP. Which one did you use? How do you figure out what IP address to use in the Arduino pde program? I’m using the Arduino 23 IDE.

    Thanks in advance.

    ENC28J60 is totally unnecessary and it is wasting Arduino's computation power. Just connect your power supply to router and connect USB from WR702 to Arduino will establish serial connection. OpenWRT is the best choice to deal with internet access issues.

    6 replies

    Dear @iamseer & @ddoss, can you plz tell how to connect arduino UNO to wireless router directly wothout ethernet shield?.i can not find any USB compatable port in router. I have already http://www.dlink.com/us/en/support/product/di-634m-wireless-108g-mimo-router. Any link or suggestion? Sorry i am new to wifi field. thanks

    @rajusaleem , Please check Janisalnis's instructables ( https://www.instructables.com/member/janisalnis/ ) he has had luck with the Arduino and serial connections. I do not have any experience with the router you have and checking the link seems dlink stopped support for it in 2008 , as suggested before invest in an Ethernet shield for the Arduino and save yourself a lot of trouble . best of luck on your quest .

    thanks ddoss .. i have already ENC28J60 shield and am working on. I just asked for more info., may be if you know about that.. Well i also found an other ethernet shield http://digipak.org/zencart/index.php?main_page=product_info&cPath=5&products_id=170. i think it could also serve this purpose and more than this..

    Hey Man, If you reread my replies I have given you links to information sources , there are differences in both shields such as the price for starters, the W5100 has a full TCP/IP stack and interface , but the ENC2860J does not and needs you to implement a TCP/IP stack in the software , search the Arduino forums and google it there is a lot of useful information there to help you get your project up and running with either of the Ethernet shields.

    I did reply but for reasons unknown it's down at the bottom of this thread.
    Apr 30, 2012. 1:28 AM

    Point noted , I would have if I could have , the WR702 uses the AR9331 chipset. which is not supported by OpenWrt for one , secondly the onboard USB is only available as the power port for the router.
    I will be cracking open the case in the near future to see if I could access the serial port connections

    @iamseer, while your tone is annoying, you're almost correct. For anyone else interested in saving a couple extra bones, check out the tl-wr703n (this instructable uses the the tl-wr702n...pay attention *702* vs *703* !!!!)

    The cheapest "wifi shield" hack I've found thus far is a Neewer 150M mini Pocket Wireless Router ($17) + the mentioned ENC28J60 (~$6) for an end cost of ~$23. The 703n is closer to $30.

    See the OpenWRT wiki page for the 702 to see why it's not supported.

    Really cool instructable.
    One question, I have a WR703 on the way with DDWRT firmware pre-installed.
    Do I have to flash OpenWRT or will DDWRT work?

    2 replies

    Thanks, it should not matter which firmware you have , as long as your device can be configured to a client mode via the firmware ui .
    I have no experience using either DDWRT or OpenWRT on the WR703/702

    Ok, client mode is an option in DDWRT.
    Thanks for the reply ddoss.

    nice idea.. :) I like it. but can you please tell me will this approach work properly for controlling LEDs/Appliances through wifi from Android Mobile..???
    thanks