CHEAP wifi modules, at last!


Closed Thread
Results 1 to 29 of 29
  1. #1
    Join Date
    Oct 2004
    Posts
    448

    Default CHEAP wifi modules, at last!

    Couldnt decide where this post should go, but I thought Ethernet would be appropriate.

    Has anybody noticed this new gem yet?

    http://hackaday.com/2014/08/26/new-c...-module-its-5/

    Seems very easy to use, and its cheap! Hoping to lay my hands on one soon...

    Regards,

    Anand

  2. #2
    Join Date
    Oct 2004
    Posts
    440

    Default Re: CHEAP wifi modules, at last!

    I have two on order.
    At present the documentation is in Chinese only however.
    Google translator?


    Norm

  3. #3
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Sparkfun seems to have a basic minimalistic writeup.

  4. #4
    Join Date
    Oct 2004
    Posts
    440

    Default Re: CHEAP wifi modules, at last!

    Quote Originally Posted by ardhuru View Post
    Sparkfun seems to have a basic minimalistic writeup.
    A SparkFun search for ESP8266 draws a blank.
    Link?

    Norm

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default Re: CHEAP wifi modules, at last!

    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Sep 2009
    Posts
    737

  7. #7
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Thanks for the forum link, Pedja. Didnt realize they'd already have a forum dedicated to this chap.

    BTW, there seem to be a couple of versions (different form-factors) available on ALiExpress. I notice a version that can also take external antennas.

    Regards,

    Anand

  8. #8
    Join Date
    Sep 2009
    Posts
    737

    Default Re: CHEAP wifi modules, at last!

    It seems like that all firmware is in SPI FLASH memory, so there is no need for specific programmer. Compiler, firmware and some IoT example are available... So you can write your custom firmware... Or just write your own commands so PIC can do other task.
    Also it doesn't require almost any external component's so chip it should be very easy to integrate WiFi into product.
    I can't wait to get one and try it.

  9. #9
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    637

    Default Re: CHEAP wifi modules, at last!

    Excuse my ignorance here. But, how exactly does this work? Does it send data to a Web page that you need to set up first? Or, does it send data in form of a file to a remote server?
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  10. #10
    Join Date
    Sep 2009
    Posts
    737

    Default Re: CHEAP wifi modules, at last!

    For client app, you connect to your AP, like you do with laptop, mobile phone, tablet.
    So you have access to internet.
    Then you connect to some address, eg google.com on port 80. And then using HTTP commands request page. You can use GET or POST command to get web page. Or you can post data to PHP script, using that two methods.
    Here is some HTTP examples http://www.jmarshall.com/easy/http/
    Other way is to use EMAIL, you connect to SMTP server to send email. You connect to port 25 of your server, eg smtp.yahoo.com port 25, and then log in using BASE 64 protocol for password, and send email.
    https://www.cs.cf.ac.uk/Dave/PERL/node175.html
    You can use putty to learn how to handle communication with server.

    If you are using module in AP mode, you connect to module with your tablet, or other device, and then create web page in pic, and than display it on your tablet.
    To do this, PIC must handle basic HTTP protocol. This is like setup page on router or AP.

    All this protocol are text based, so if you are familiar with using UART and parse string, this wouldn't be to hart to master. It isn't too hard. There is example with different module:
    http://www.picbasic.co.uk/forum/show...8906#post88906
    http://mackrackit.com/mac/ichip/ichip.html
    It's similar to GSM modem it isn't complicated as it might look.

  11. #11
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    637

    Default Re: CHEAP wifi modules, at last!

    Ooh, I see. Thank you for your nice explanation.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

  12. #12
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Almost 2 months after placing my order, and almost after giving up hopes of delivery, the modules arrived today!

    I tried googling for any reference to PBP and EN8266, but did not get anything meaningful.

    Wondering if anybody has managed to make any progress in this direction?

  13. #13

    Default Re: CHEAP wifi modules, at last!

    Join esp8266.com (I'm assuming you made a typo), all the info available, bugs, translation, projects. Oh, I see somebody already said that, my bad.

    George

  14. #14
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Oops! ESP8266 it is.

    I did visit that forum, and its rich with information.

    Quite a learning curve, though..

  15. #15
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517

    Default Re: CHEAP wifi modules, at last!

    Got three in the mail today, ordered a couple of weeks back. Will have to wait and see when I get time to play with them....

  16. #16
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Great! Looking forward to your observations.

  17. #17
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Well folks, this comes close enough to get you started.

    http://www.instructables.com/id/Usin...SP8266-module/

  18. #18
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517

    Default Re: CHEAP wifi modules, at last!

    Yes, found that too and have now been able to "manually" connect to my WiFi and serve up a most basic web-page using the terminal program in MCSP and a USB to UART dongle (no PBP code involved yet).
    Couple of random notes partly from info I've found and partly from experience.

    My module is the little blue one with a 2x4 pin header on it.

    * Make sure you use a dongle/adapter that outputs 3.3V, not 5V!
    * If you have a red and a blue LED on the board it's a V090 (using 115200 baud), if you don't have the LEDs you have a V080 (using 57600). (See here
    * On the V090 module the Ch_PD I/O needs to be tied to (or pulled up to) Vcc.
    * The USB dongle I was using wasn't able to provide enough power at it's 3.3V Vcc setting. Had to use external power supply.
    * Watch the Tx and Rx markings. Mine seems to reversed (ie I had to connect Tx on the module to Tx on the dongle) or I was just very tired and confused at the time. I haven't yet figured out if it's the module or the dongle that's marked incorrectly. Good thing is that nothing get damaged (as long as you're using 3.3V signals) so if it doesn't seem to want to talk to you you can always TRY reversing the connections.

    Next step will be to make up some sort of test rig with a PIC with two USARTs, one for interfacing to the module and one for interfacing to the PC.

    /Henrik.

  19. #19
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Thats good valuable information, Henrik. Thanks.

  20. #20
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Henrik, I'm trying to connect the module to a terminal emulator. I have a true serial port on my PC (not a USB-to-serial).

    I understand I'll have to use a level shifter. But, would I also need to invert the signals? Or just resistor(s) in the Tx/Rx lines?

  21. #21
    Join Date
    Sep 2009
    Posts
    737

    Default Re: CHEAP wifi modules, at last!

    You need MAX3232.

  22. #22
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517

    Default Re: CHEAP wifi modules, at last!

    Hi,
    You'd need to invert and level shift them.
    I'd recommend using something like this. (Many many alternatives available of course but make sure it's designed to work at 3.3V).

    I'd like to clarify that the dongle I used isn't a "USB to RS232" one but a "USB to UART", this one to be precise.

    /Henrik.

    EDIT: Oops, pedja089 posted while I was typing and getting distracted with other things....

  23. #23
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Thanks, guys! Got the chap running. Extra thanks to Henrik for pointing out that Ch_PD I/O needs to be pulled high. I had missed that.

    Serial comms with terminal work ok.

    Can see the module on my Android.

    COULD see the routers (mine, and ones in the vicinity) with the AT+CWLAP.

    Could connect with my router after specifying SSID and the password.

    BUT, after that, AT+CWLAP no more lists the routers around; module seems to hang with a "busy now' response to any query.

    All other AT commands still work.

    Wonder what is happenning? (Module is connected to my router, confirmed that using AT+CWJAP?)

    Wonder how to erase my router from the module's eeprom? That might make the AT+CWLAP start listing the routers around again.

    Perhaps time to enlist on the ESP82666 forum.

  24. #24
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Okay, problem solved.

    I had inadvertently given a wrong password for my router, and the module would keep on trying to log on continuously.

    Used the AT+CWQAP, re-defined my SSID and password, and it works as it should.

  25. #25
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Not trying to be pushy, but I wonder if you have had any success, Henrik?

    I ran into a wall after getting the basic comms working (connecting to my router). Of course, the fact that I know nothing about TCP or HTML doesnt help, either.

    Although, the module is now connected to the router (i can ping it remotely), I cant see it thru the browser.

  26. #26
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517

    Default Re: CHEAP wifi modules, at last!

    Hi,
    No, I haven't worked on it, don't know what to do with them.... :-)
    Simply getting them connected to your Wifi doesn't mean you can "browse to them" - there's a little more to it than that (but not much really). Unfortunatley I don't remember off the top of my head and I don't have access to my notes right now.

    What exactly is it you want to do?

    I'll see if I can get something simple cobbled together tonight perhaps.

  27. #27
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Well, for starters, I would like to connect a pic to the 8266's UART outputting some data, and expect it to be seen in the browser. And then, perhaps, feed in data into the browser, to be read by the pic?

  28. #28
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517

    Default Re: CHEAP wifi modules, at last!

    Hi,
    OK, this was and is a bit frustrating, trying to get this going on a PIC with only one USART. Anyway, this seems to work OK but it's meant ONLY as a startingpoint, I do NOT claim this to be the proper way of doing it.
    Initially I did have HSERIN type stuff instead of the PAUSE statments but sometimes it just locked up and without any means of seeing what actually happened it got a bit a frustrating and I'm running out of time right now. So again, this does seem to work but it's not very robust nor elegant. When I get more time I'll rig something up with another PIC or get a bitbanged UART going for debugging purposes.

    Oh, and since there is no connection back to the PC there's no way to see what IP the module gets assigned by the accesspoint so I used my accesspoints web interface to find that out. I found that if I did a "manual test run" first, ie using a serial terminal, it usually gets assigned the same IP number after that.

    As I said, not elegant....

    Code:
    dummy VAR BYTE
    Hits VAR BYTE
    
    Main:
        ' Issue a module reset
        HSEROUT["AT+RST", 13, 10]
        ' Module should respond with a bunch of data and finally 'ready'
        HSERIN[WAIT ("ready"), dummy]
    
        ' Set the mode, module may respond differently depending on if it's
        ' already IN the current mode so we simply delay (not good practise).
        HSEROUT["AT+CWMODE=3", 13, 10]
        PAUSE 100
    
        ' Join the accesspoint, module should respond with 'OK'
        ' Replave mynetwork and password with actual SSID and password
        HSEROUT["AT+CWJAP=", 34, "mynetwork", 34, "," ,34, "password", 34, 13, 10]
        HSERIN[WAIT ("OK"), Dummy]
    
        ' Allow multiple connections, module should respond with 'OK'
        HSEROUT["AT+CIPMUX=1", 13, 10]
        HSERIN[WAIT ("OK"), Dummy]
    
        ' Open port 80 (normal port for HTTP), module should respond with 'OK'
        HSEROUT["AT+CIPSERVER=1,80", 13, 10]
        HSERIN[WAIT ("OK"), Dummy]
    
        ' Here we need to wait for a client to connect and request data.
        ' When that happens the module will outout the HTTP header on the
        ' UART, we'll trig on the GET keyword.
        HSERIN[WAIT("GET"), Dummy]
        Hits = Hits + 1
    
        ' Prepare to send 33 bytes
        HSEROUT["AT+CIPSEND=0,33", 13, 10]          
        PAUSE 100
        ' Send the actual data
        HSEROUT["<TITLE>PBP ESP8266 demo</TITLE>", 13, 10]
        PAUSE 100
    
        ' Prepare to send 30 bytes
        HSEROUT["AT+CIPSEND=0,30", 13, 10]
        PAUSE 100
        ' Send the actual data
        HSEROUT["<H1>Testing the ESP8266</H1>", 13, 10]
        PAUSE 100
    
        ' Prepare to send 22 bytes
        HSEROUT["AT+CIPSEND=0,22", 13, 10]
        PAUSE 100
        ' Send the actual data
        HSEROUT["<H3>Cool stuff!</H3>", 13, 10]
        PAUSE 100
        
        ' Prepare to send 18 bytes
        HSEROUT["AT+CIPSEND=0,18", 13, 10]
        PAUSE 100
        ' Send the actual data
        HSEROUT["Page visits: ",DEC3 Hits, 13, 10]
        PAUSE 100
    
        ' Now disconnect
        HSEROUT["AT+CIPCLOSE=0", 13, 10]
        PAUSE 1000
    
    Goto Main
    Attached Images Attached Images  

  29. #29
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    Henrik, thanks a lot for sharing your work. It looks very interesting indeed.

    I'm away from my base till mid next week. Cant wait to get back and give it a try.

    I'll report my experience soon as I get back.

    Regards.

Similar Threads

  1. 2.4 ghz WiFi ID
    By tazntex in forum Ethernet
    Replies: 30
    Last Post: - 16th January 2013, 18:01
  2. Replies: 0
    Last Post: - 20th September 2011, 04:31
  3. cheap gsm modules
    By isaac in forum GSM
    Replies: 2
    Last Post: - 15th June 2007, 10:18
  4. supply FSK COB modules and FSK modules
    By Elsa zhang in forum Adverts
    Replies: 0
    Last Post: - 8th August 2006, 07:40

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts