Cheap WiFi modules


Closed Thread
Results 1 to 40 of 40

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,393

    Default Re: CHEAP wifi modules, at last!

    modified henriks html to this
    Code:
     < html>
     <TITLE>PBP ESP8266 demo</TITLE>
     <body>
     <H1>Testing the ESP8266</H1>
     <H3>Cool stuff!</H3> Page visits: 3 
    <inputname="v2"value="2">
     <inputvalue="1"name="v1"type="submit">
     </body>
     </html>
    it displays a input box and a button but the method of actually sending value back to the pic chip eludes me

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,393

    Default Re: CHEAP wifi modules, at last!

    success
    Code:
    < TITLE>PBP ESP8266 demo</TITLE>
     <H1>Testing the ESP8266</H1>
     <H3>Cool stuff!</H3> Page visits:  4
     <formmethod="get"action="set">
     <inputmaxlength="5"value="2" name ="MyInput"size="5">
     <inputvalue="Change MyInput"type="submit">
     </form>

  3. #3
    Join Date
    Feb 2012
    Location
    South Carolina, USA
    Posts
    18

    Default Re: CHEAP wifi modules, at last!

    Here is a link to a few free software programs that some of you may find useful when testing communication. The TCP tool should be helpful for testing getting info between two ESPs.

    https://www.simplecomtools.com/produ...p?idCategory=5

    John

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,393

    Default Re: CHEAP wifi modules, at last!

    tried this
    Code:
    < DOCTYPE htmlPUBLIC"-//W3C//DTD HTML 4.01//EN"  "http://www.w3.org/TR/html4/strict.dtd"> 
    < html><TITLE>PBP ESP8266 demo</TITLE>
     < H1>Testing the ESP8266</H1>
     < H3>Cool stuff!</H3> Page visits:3
     < formmethod="get"action="set">
     < inputmaxlength="5"value="3" name ="MyInput"size="5">
     < inputvalue="Change MyInput"type="submit">
     </ form></html>
    but I have three android devices two lockup the eps8266 instantly,the other (asus transformer) is ok
    I think as a web server these things are just too flaky , any simultaneous requests will cause instant lookup , the onboard wdt seems to ignore this state likewise for a soft reset .
    fyi the ie browser connect/response pkt is upto 324 bytes, and for the transformer 490 bytes ,its not going to be pic friendly this way.

    will try tcp/udp or even telnet next

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,529

    Default Re: CHEAP wifi modules, at last!

    Hi Richard,
    I haven't played any more so you're way ahead of me. Copy/pasting your HTML code into a .txt file (renamed to .htm of course) and opening it in IE does not look like anything really usable to me. Of course, I know very little HTML :-(

    Regarding multiple connections, did you set it up to allow that and are you servicing the second connection request or just ignoring it?

    fyi the ie browser connect/response pkt is upto 324 bytes, and for the transformer 490 bytes ,its not going to be pic friendly this way.
    Why? You don't really need to grab the buffer everything in the PIC, you can parse it on the fly as it arrives. With that said, there are plenty of PICs available with RAM to spare, you do need to go to a 28pin 18F device to "max out" though.

    /Henrik.

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,393

    Default Re: CHEAP wifi modules, at last!

    the html code is a copy and paste from "komposer" a free html editor I found on the net , its really just what you did with an input field MyInput added in to a form and levered into your setup .
    it does nothing useful just demonstrates sending data from the browser back to the pic. it works ok

    if have stepped up to a pic18f45k20 so resources aren't an issue yet , biggest problem is if a connection is made while you are serving a page the incoming link request just stops everything dead .
    and if you hit the refresh on the browser before current request (same connection ) is dealt with it all comes to a crashing halt.

    parsing the data on the fly is a bit tricky if you are looking for multiple keys eg in the server loop I am looking for ,"busy" , "OK" and "MyInput" and trying to respond appropriately ,
    I think I need to watch for "'Link", "Unlink" and "Error" too. I found it easier to swallow the lot and then pick the good bits out (a bit crude I admit but I'm looking at proof of concept here)

    I'm not sure about the "channel" thing looking on the salea all link requests are ch 0 so far ,this is probably due to the CIPCLOSE=0 at the end of the served page, but if that's removed the browser locks up .
    I know approx. nothing about http-html and it may stay that way for sanity reasons

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,393

    Default Re: CHEAP wifi modules, at last!

    managed to capture problem on the logic analyser ,I might get this yet


    ps the logicdata.txt file is a salea logic file not text , there's a wish for the forum allow logicdata files
    Attached Images Attached Images  
    Attached Files Attached Files

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,393

    Default Re: CHEAP wifi modules, at last!

    things improve if :-
    1. I serve up the webpage in one continuous string
    2. I control when the rxbuffer actually accumulates data (it auto triggers on a \r ( 0x10) ) , still needs a 350 byte buffer or 500 bytes for some browsers

    the cache toggle signal in this example toggles when a rxbyte is cached and the reply signal when the rxbuff is emptied and parsed for data.

    multiple connections still elude me , I find the behaviour of some browsers is quite baffling ,and they lock up the module upon connection .
    hitting the refresh button while the current page is still coming causes the esp module to reset and start talking at a different baud rate , I can find no cure for this other than a hardware or a power on reset.
    Attached Files Attached Files

  9. #9
    Join Date
    Dec 2010
    Posts
    409

    Default Re: CHEAP wifi modules, at last!

    FYI for those of us that remember teletype which required a CR & LF in any order, these devices do not work that way.
    You MUST send CR LF (10,13) in the correct order to work consistently. 10,13 will *sometimes* work, but not always.

  10. #10
    Join Date
    May 2013
    Location
    australia
    Posts
    2,393

    Default Re: CHEAP wifi modules, at last!

    according to the http://www.electrodragon.com/w/Wi07c web site since firmware 0.92 the terminator is \r\n previously was \n\r.
    \r\n has worked for all my ebay supplied esp2866's but the firmware needed updating for a decent result to be achievable
    ps
    cr=13=\r
    lf=10=\n
    Last edited by richard; - 30th December 2014 at 09:44. Reason: ps

  11. #11
    Join Date
    Mar 2006
    Location
    China
    Posts
    266

    Default Re: CHEAP wifi modules, at last!

    I have what might be a really stupid question.

    Is it possible (and if it is then how) to send serial data from one wifi module to an other when they are both connected to the same wifi router?

    I would like to remove some cables in a rs-485 network and replace then with uart wifi solution. I just dont know where to start.... well I have a wifi router :-) and the modules and lots of PICs and programmers . Does anyone know?

  12. #12
    Join Date
    May 2013
    Location
    australia
    Posts
    2,393

    Default Re: CHEAP wifi modules, at last!

    Is it possible (and if it is then how) to send serial data from one wifi module to an other when they are both connected to the same wifi router?
    you may not even need a router the esp modules can also act a access point . I have not tried that sort of comms yet but there are examples around on the web using TCP/UDP packets , or you could try TELNET mode . I think telnet is the closest match to what you want

  13. #13
    Join Date
    Dec 2010
    Posts
    409

    Default Re: CHEAP wifi modules, at last!

    Quote Originally Posted by Charlie View Post
    FYI for those of us that remember teletype which required a CR & LF in any order, these devices do not work that way.
    You MUST send CR LF (10,13) in the correct order to work consistently. 13,10 will *sometimes* work, but not always.
    Nothing worse than discovering a critical typo after the time to edit has expired. I've corrected it in the quote. Bottom line, use 10,13 in that order.

  14. #14
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,838

    Default Re: CHEAP wifi modules, at last!

    I think this site might be interesting for the IoT:

    https://thingspeak.com/

    After registration you get a free channel for your data to be stored, graphed or used as you want.

    Ioannis

  15. #15
    Join Date
    Oct 2004
    Posts
    448

    Default Re: CHEAP wifi modules, at last!

    True. People have done amazing things with the ESP8266, and uploading to Thingspeak. Also absolves you from having to learn HTML, I guess.

    For those yet to discover these, there have been a slew of development utilities for the ESP8266.

    And, folks have ported LUA (remember CHDK for Canon point-and-shoots?!), a scripting language to the ESP. The benefit being to be able to use the microcontroller on the module directly to store and execute simple programs. And with its own IO, one wouldnt even need a pic for simple applications.

    My favourites are ESPLORER (multi-purpose, works with stock firmware and LUA) and LuaLoader (only for LUA).

    Regards,

    Anand

Similar Threads

  1. CHEAP wifi modules, at last!
    By ardhuru in forum Ethernet
    Replies: 28
    Last Post: - 27th November 2014, 16:45
  2. Replies: 0
    Last Post: - 20th September 2011, 03:31
  3. cheap gsm modules
    By isaac in forum GSM
    Replies: 2
    Last Post: - 15th June 2007, 09:18
  4. supply FSK COB modules and FSK modules
    By Elsa zhang in forum Adverts
    Replies: 0
    Last Post: - 8th August 2006, 06:40

Posting Permissions

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