Shop OBEX P1 Docs P2 Docs Learn Events
P1 WiFi module limitations for sockets and background tasks - Page 2 — Parallax Forums

P1 WiFi module limitations for sockets and background tasks

2»

Comments

  • RsadeikaRsadeika Posts: 3,824

    Mike I am having a little trouble. I downloaded your esp8266 from the obex, not sure if the lib is the latest one. In the zip file I have a simple C program which does not compile. If you get a chance...

    Thanks
    Ray

  • iseriesiseries Posts: 1,454

    To use this library, you need to place it in the Learn folder in a folder I call Custom.

    In that folder called Custom install the zipped files in a folder called libesp8266.

    Then from simpleIDE open the libesp8266.side program. The OBEX only contains the code and not the compiled library objects.

    You need to compile this sample program which will create the library object needed to run your code.

    In the html folder is documentation for this library starting with index.html

    Mike

  • RsadeikaRsadeika Posts: 3,824

    Thanks Mike. I will give it try, and see what happens.

    Ray

  • RsadeikaRsadeika Posts: 3,824

    I thought I followed your instructions, but when I tried to compile libesp8266.side, i got an error. Below the zip contains a file 'build error.txt' which has the compile error stuff. I think I have all the information that you need.

    Ray

  • iseriesiseries Posts: 1,454

    I think that's a dummy error. Did you try compiling it again to see if showed the same error.

    The library was created so the only think that did not compile is the test program which you do not need.

    Mike

  • RsadeikaRsadeika Posts: 3,824

    Boy, this was a steep learning curve to get this done. At first I was getting an error when I tried to add the library, it turns out it needed a cmm folder with the compiled esp8266 file in it. Now it adds the esp8266.h to my code. Now to test it to see if it works.

    Ray

  • dgatelydgately Posts: 1,621

    I guess I am a slow learner Mike, I will see if I can find it in OBEX. Your hints were way to subtle for me.

    I think it is here: https://obex.parallax.com/obex/skinned-down-parallax-wifi-driver/

  • RsadeikaRsadeika Posts: 3,824

    My impressions, excellent work Mike. Do not take this the wrong way, Mike, the actual setting up of esp8266 has to be made some how simpler. Maybe a compiled library should be included.

    After looking through the html folder, I think a listing of all the functions with some solid examples should be included there. This probably is more work than you would like to put into this project. If that is the case maybe another C expert could help out in that area.

    Finally this project is worth an automatic insertion into the Learn folder by Parallax, and then made available for everybody.

    Now thinking about a functional WiFi for the P2...

    Thanks
    Ray

  • iseriesiseries Posts: 1,454
    edited 2024-03-20 14:06

    The Wifi works just fine with the P2. You need to change a few things as the P2 works at 230400 instead of the 115200 used by the P1.

    Otherwise loading programs is a snap over Wifi and controlling it.

    Here are the libraries for the P2 such as ESP8266 library. No compiled objects include as you need to use FlexProp to compile, and everything is compiled so no precompiled libraries are used. Works like Arduino does.

    Again, you need to tell the compiler where your libraries are put so it can include them.

    I use Visual Studio to work with FlexProp as it actually will help you write code.

    You can compile right from Visual Studio with a couple of simple TASK add ins.

    Mike

    Oops Link to the P2 Libraries: P2Custom

  • MicksterMickster Posts: 2,611

    For 8266

    For ESP32

    More capable than the WebMite

    Craig

  • RsadeikaRsadeika Posts: 3,824

    I decided to use filezilla to move some .csv files between computers. This is working very well, but when I tried to use it too access the WiFi module, it did not work. Anybody have a better experience with filezilla and the WiFi module.

    Ray

  • iseriesiseries Posts: 1,454

    There is no FTP server on the WiFi module so that is a no-go option.

    My remote weather app over the WiFi works great and I'm able to graph the results on the Zero.

    Mike

  • RsadeikaRsadeika Posts: 3,824

    So, now I am thinking... Since I have SimpleIDE installed on my Win 10 PC, and I believe Win !0 has a FTP server, is there anyway of getting the SimpleIDE to store files to the Host PC. I know Flexprop has that capability, maybe use some Flexprop code and bolt it on to the SimpleIDE. It would be interesting if there was a Host lib that could be added to SimpleIDE. But, I think this would be impossible to accomplish.

    Ray

  • iseriesiseries Posts: 1,454

    SimpleIDE is just a compiler and does not know how to load code onto the P1.

    SimpleIDE uses proploader.exe to load the code onto the P1.

    Not sure of what you're trying to do. You can load data into the upper 32K of the flash chip on the P1 and then access it through another program as this area is not cleared by the loader. You would have to write your own code to load this upper region though.

    Mike

Sign In or Register to comment.