Serial WiFi module


Closed Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Aug 2003
    Posts
    985

    Default Serial WiFi module

    Hi Guys
    I ordered a couple of these cheap all in one wifi modules today:
    http://www.ebay.com.au/itm/Serial-Wi...QAAOSwm8VU0BGp

    I’m wondering has anyone here used them, and perhaps have any code to donate?
    I’d like to start with acquiring time from a time server and writing software for the bigger platform to set it’s system clock.
    Assuming it’s a pic or Atmel on the board, I guess I’ll find out when it arrives.

    Does anyone have another wifi module to suggest for a PBP pic?
    There doesn’t appear to be a specific forum section for wifi.
    Cheers, Art.

  2. #2
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427

    Default Re: Serial wifi module

    no time for a lengthy reply right now, Art, but I have played with them a bit.

    Check out youtube and search on "allaboutee" and/or "esp8266"


    some are working to get a version of BASIC working on them...
    http://www.esp8266basic.com/

    I'll post more this evening.
    Last edited by Heckler; - 12th November 2015 at 20:09.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  3. #3
    Join Date
    Aug 2003
    Posts
    985

    Default Re: Serial wifi module

    Nice Looking at other threads that were put in here for opening this section,
    starting out with zero networking experience is going to be a pain in the bum

    I aim to get one connected to a serial port of an old Commodore Amiga,
    with software on the Amiga side to update it’s system clock from the internet.
    Supposing the chip in the module can do the work, and simply send the time to
    whatever the big computer is, so long as the wifi module doesn’t have to do anything else.

  4. #4
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427

    Default Re: Serial WiFi module

    Hi Art,

    These esp8266 modules are NOT 5V tolerant! you must use 3.3v

    I highly recommend one of these... (also available on Tindie) as it makes it much easier to program and has a breadboard friendly header strip to access the pins of the module. Has a spot for the module to plug into it, a 3.3v regulator on board, reset button and jumpers to put it into flash mode, etc

    http://www.ebay.com/itm/CP2102-USB-T...QAAOSwBahVAS39

    Since the pin spacing does not fit a typical breadboard you may need to buy or build one of these...

    Name:  2015-11-12_220658.jpg
Views: 1209
Size:  14.9 KB

    I've seen some of your prototyping work so should be no problem for you :-)


    There are several ways to go as far as programming, first you can choose to use the native OS that comes with them which responds to old school modem like commands that begin with "AT"

    or you can load a different OS, for example one that is very popular is NODEMCU and then program in a language called LUA

    or you could try the BASIC (I have not)

    I have mostly had success with the LUA but I am terrible at anything other than BASIC so it has been a real struggle.

    there is a pretty nice tool called ESPLORER...
    http://esp8266.ru/esplorer/

    to load the NODEMCU OS I have used esp8266flasher.exe
    which allows you to flash a different OS like NODEMCU

    these little modules are amazing!! some have shown using them at a range of >1000 ft in ideal conditions.

    using the LUA language I have been able to read a ds18b20 temp sensor connected directly to the module (with pull up resistor) and generate an email sent directly from the module via my email provider

    Lots of possibilities, not enough time (or knowledge)

    good luck
    Last edited by Heckler; - 13th November 2015 at 06:30.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

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

    Default Re: Serial WiFi module

    If you are looking for PBP code to drive them via the "stock" AT commands I did a very short test/example in this post. And as I'm sure you've figured out by now there's no PIC or AVR on the module. The chip is the ESP8266 which is complete SoC with processor, TCP/IP, Wifi and everything.

    /Henrik.

  6. #6
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67

    Default Re: Serial WiFi module

    Some more PBP code: http://www.picbasic.co.uk/forum/showthread.php?t=20178
    and a (stupid?) project: http://www.picbasic.co.uk/forum/showthread.php?t=20083

    For time service the easy way I found was to put a dead simple web page on my Windows Home Server

    default.aspx:
    Code:
    <%
    response.write("*" & Format(now, "yyyy-MM-dd HH:mm:ss") & "J")
    
    select case Format(now, "ddd")
    	case "Sun"
    		response.write("1")
    	case "Mon"
    		response.write("2")
    	case "Tue"
    		response.write("3")
    	case "Wed"
    		response.write("4")
    	case "Thu"
    		response.write("5")
    	case "Fri"
    		response.write("6")
    	case "Sat"
    		response.write("7")
    	case else
    		response.write("0")
    end select
    response.write("*" & VbCrLf)
    
    'response.write("*" & Format(now, "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
    'response.write("*" & Format(dateadd("d", 1, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
    'response.write("*" & Format(dateadd("d", 2, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
    'response.write("*" & Format(dateadd("d", 3, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
    'response.write("*" & Format(dateadd("d", 4, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
    'response.write("*" & Format(dateadd("d", 5, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
    'response.write("*" & Format(dateadd("d", 6, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
    'response.write("*" & Format(dateadd("d", 7, now), "yyyy-MM-dd HH:mm:ss ddd") & "<BR>")
    
    %>
    Web.Config:
    Code:
    <?xml version="1.0"?>
    <configuration>
    	<appSettings/>
    	<system.web>
    		<compilation debug="true"/>
    	  	<customErrors mode="Off"/>
    		<authentication mode="Windows"/>
    		<identity impersonate="true"/>
    		<httpRuntime enableVersionHeader="false" />
    	</system.web>
    </configuration>

    and the response is:
    Code:
    *2015-11-13 10:05:40J6*
    The "J" in the response means "Jour" (french word = "day").

    If you find de way to call a SNTP server with PBP please share!

  7. #7
    Join Date
    Aug 2003
    Posts
    985

    Default Re: Serial WiFi module

    Thanks for the replies
    I don’t have too many rock solid goals with it as a project, but getting time will be essential. This is where I can get help from someone who has done time and weather.
    It was C++ he used if I recall correctly, and extra pins on the chip were used to drive an LCD to print it on which was pretty cool.

    This video was sent to me personally, but I have checked it’s ok to share relating to my projects:


    In fact, the fellow that wrote it wanted to get my LCD graphics working with it, and I shared the code,
    but he gave me the impression there is little RAM left on the chip for that.

    ps. It looks like that one int he video can take 5V supply, but I got the cheaper one
    Last edited by Art; - 13th November 2015 at 18:55.

  8. #8
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427

    Default Re: Serial WiFi module

    I forgot to mention that you can also, apparently, use the Arduino IDE to program them in the C-like language that Arduino uses.
    (never tried it though)

    Here is one way of getting time using the NODEMCU OS and Lua code...
    Name:  2015-11-14_150203.jpg
Views: 1134
Size:  67.6 KB
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  9. #9
    Join Date
    Aug 2003
    Posts
    985

    Default Re: Serial WiFi module

    Thanks for the extra code. I can go a fair way with just getting the time
    and talking serial.
    These old Amiga computers, their RTC batteries leaked,
    and some leaky batteries damage the RTC as well,
    but the system clock still works when the computer is running.
    So just a simple thing like telling the computer the time and date
    at bootup is very practical.

  10. #10
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427

    Default Re: Serial WiFi module

    Hey Art,

    I've been reading quite a bit over at esp8266basic.com and I am actually quite impressed!

    I think I am going to give BASIC a try on my esp8266 module.

    The command documentation seems to be a bit behind so check out the forum and read the "NEWS" topic as he has announced a couple of new commands there. And ongoing development seems to be quite active.

    You now can read an ds18b20 temp sensor ("temp" command). Write to an I2C OLED display, etc.

    Fun Stuff!
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  11. #11
    Join Date
    Aug 2003
    Posts
    985

    Default Re: Serial WiFi module

    Nice I’ll check it out!
    Mine have arrived, but now thinking I might as well buy the unit with the supply and USB-serial converter on board
    like the unit in the video. Then use the bare ones I have when it comes to use in a project.

  12. #12
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427

    Default Re: Serial WiFi module

    Hi Art,

    If you haven't had a chance to check out the ESPBASIC yet... well,

    with this simple bit of ESPBASIC code
    memclear
    cls
    button "GetTime" [GetTime]
    button "Exit " [Exit]
    wait

    [GetTime]
    print time()
    bla = time()

    dw = mid(bla,1,3) 'dow
    mh = mid(bla,5,3) 'month
    dt = mid(bla,9,2) 'date
    hh = mid(bla,12,2) 'hour
    mm = mid(bla,15,2) 'min
    ss = mid(bla,18,2) 'sec
    yr = mid(bla,21,4) 'year

    print dw
    print mh
    print dt
    print hh
    print mm
    print ss
    print yr
    print
    print "Heap"
    print flashfree() 'how much mem left
    wait

    [Exit]
    end
    it will get you the date and time (not sure from where, yet (i have asked)) but it seems to be accurate.
    It will spit it out both on a webpage and to the serial port of the ESP module at 9600 baud.

    you can modify the espbasic code and use "serialprint" instead of "print" if you just want it to go to the serial port.

    it really helps to start a terminal window and connect it to the usb serial port for your module when running the basic as there is a lot of feedback sent to the serial port as well as what ever web page the module sets up.

    It should be no problem at all to have your PICBASIC code receive the serial data from the esp module and act on it.
    you don't really have to use the web page features of espbasic if you don't want to (other than to get your code into the module and truoble shoot and test it. then depending on how you write your code the module will just interact with your PIC as you desire via the serial port of the module.

    I have found the ESPBASIC to truly be easy to learn and interact with because of the unique fact that all your development is via a webpage served up by the module itself.

    you can connect to the module acting as an access point or have the module connect to your home wifi and access it's ip address.
    it will tell you what ip it gets from your home network via the serial port output as it boots up, so connect up a terminal program to view it.
    give it a go and ask questions or send me a pm if you need more help.
    Last edited by Heckler; - 30th November 2015 at 06:14.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  13. #13
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427

    Default Re: Serial WiFi module

    Hi Art,

    Just an update on the espbasic.
    They have now updated the Network Time function to allow you to specify what ever time zone you want, daylight saving on/off and you can request just the part of the time string you want to access.

    http://www.esp8266basic.com/functions-timedate.html

    dwight
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

Similar Threads

  1. PIC with WIFI module
    By JAWORSKI in forum Schematics
    Replies: 2
    Last Post: - 3rd December 2008, 04:19

Posting Permissions

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