|
Forum Index : Microcontroller and PC projects : More ESP8266 woes.
| Author | Message | ||||
| OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 1013 |
I thought as an entry into using the ESP modules I would try and achieve something fairly simple. The challenge was to operate one of the ESP GPIO's from an android device and my research indicated that I could do this using ESPBasic, some update to settings to have the units auto log onto the wifi network and some simple basic code saved on the units. I purchased some ESP and Serial-USB converters as shown. ![]() The first thing I did was to upgrade the ESP unit with ESP-Basic v3 and this all went ok. ![]() The units boot up with the following messages on the terminal program. ![]() I can log onto the ESP WiFi without any problems. ![]() ![]() Before I can update the ESP with logon details and ESPBasic code I need to be able to reliably connect to the pages. Occasionally I can get the main page up (But very occassionaly) and if I do I cannot navigate to the SETTINGS or EDIT pages. I have tried 3 different android devices and get the same result. Can anyone assist with where I am going wrong? |
||||
| lew247 Guru Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
On your computer change the ESP so it's on your local network and not using it's own SSID I think it's called station mode instead of using it's own access point Then you'll be able to log in using any device connected to your Wifi SSID |
||||
| OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 1013 |
Thankyou lew247 but I believe that I need to be able to access the \SETTINGS page to do that...……… OA47 |
||||
| CYBERLAB Newbie Joined: 08/08/2017 Location: MexicoPosts: 26 |
hello OA47, you need to connect to the access point of your esp8266, in the list of wireless networks of your pc, connect to the one that starts with ESPxx, once the connection is done open your internet browser and in the address bar use the ip address by default: 192.168.4.1 |
||||
| OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 1013 |
Thanks for the reply CYBERLAB. I am connecting to the access point mode of the ESP8266 as the android screen shot shows "Current Network ESPCE:50:E3:2B:52:70" and it is awarding the IP address of 192.168.4.2 to the android device. OA47 |
||||
| CYBERLAB Newbie Joined: 08/08/2017 Location: MexicoPosts: 26 |
The way I mention is so you can access the ESPbasic page and make the settings you need so you can work from your application. |
||||
| OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 1013 |
CYBERLAB, I am sorry if I have not understood your post. The issue I have is that I cannot bring up the page 192.168.4.1 to configure the ESP8266. OA47 |
||||
| MikeO Senior Member Joined: 11/09/2011 Location: AustraliaPosts: 275 |
Greame, sorry I have just not had sufficient free time unfortunately to check out your code etc for you but will do that as soon as I can however I just wonder if you are giving yourself an extra layer of difficulty initially by using your phone. I feel you should firstly be using a pc connected to the ESP in Access Point mode. Please make sure after you have flashed the ESP that you then remove the flashing link and power cycling the module. After connecting the pc to the ESP access point you should be able to connect via 192.68.4.1 , then via the UI menu select setting to set up your preferred network details. I just wonder when you were using the phone if it was trying to switch back to the cell network rather than local wifi? Also I know from experience on my own network that consists of several laptops that one of these laptops will consistently give me wifi connection errors for no fathomable reason, so I can happen. Mike Codenquilts |
||||
| OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 1013 |
Mike, thankyou for your reply. I have tried 3 android devices (2 phones and 1 tablet) as well as wife's W10 laptop and all have the same problems. I purchased 4 ESP units and have re flashed and tried 3 of them. I can get some at commands to work before I flash them with ESPBasic so I believe the units are functional to start with. OA47 |
||||
| CYBERLAB Newbie Joined: 08/08/2017 Location: MexicoPosts: 26 |
Hello, the most likely thing that is happening is that it is not loading well the espbasic file, to be honest every time I try it with the application ESP_Basic_Flasher.exe, it never worked. luckily at that time I started using micropython in the ESP8266, which by the way I recommend you take a look. use the same steps to load the micropython to load the ESPBASIC and in the first attempt it works, I comment the steps in case you want to try it. First download the latest version of python, for your operating system there are 32 and 64 bits, at this moment it is 3.08.0a1, when starting the installation check the box: add python 3.8 to path, everything else accepts what you propose by default. Once installed, open the DOS COMMAND window and execute the following:pip install esptool once finished the process connects your nodemcu and verify what port number your pc assigns. in the same window execute the following:esptool.py --port com3 erase flash replace com3 with the port number assigned to your nodemcu, this step is to completely erase the flash. Download the ESP8266Basic.cpp.bin file from the page and save it to c: \ users \ name \ replace name with the username of your pc. then run this command: esptool.py --port com3 --baud 460800 write_flash --flash_size = detect -fm gave 0 ESP8266Basic.cpp.bin again replace com number. wait until it finishes and in some moments you will see in the wireless networks of your pc one that starts with ESP connect to that network opens a session with your browser and in the address bar enter:192.168.4.1 click enter and voila the page of your esp8266 appears. |
||||
| MikeO Senior Member Joined: 11/09/2011 Location: AustraliaPosts: 275 |
Setting up ESPbasic successfully on a ESP8266 module can be a little challenging sometimes. In order to help out one of our forum members I found that my documentation for this process was sadly lacking and mostly "in my head" so I have gathered the tools together , created a pdf describing the process and even made a few more code changes to my ESP8266-MCU library for the module. I have updated my web page so if anyone would like to have a go please visit here for the information. The ESP8266-MCU does not need a uMite to be connected, has its own UI and could be used as the basis for your own application. ![]() Codenquilts |
||||
| Tinine Guru Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
FYI: If you want to write faster BASIC code for these devices, take a look at: B4R (BASIC for Arduino) |
||||
Quazee137![]() Guru Joined: 07/08/2016 Location: United StatesPosts: 600 |
I have been more or less playing with Micropython and two Wemos EPS8266 and can do all kinds of things with gpio's and the ADC on each ESP. What I am trying to do is have the 1st ESP8266 read GPIO14,13,12,2 and send data to 2nd ESP8266 so it can output the send data to its GPIO14,13,12,2. The 2nd will be reading GPIO4 and 5 and sending to 1st ESP8266 to output to its GPIO4 & 5 The two only talking to each other. I think that the mac's can be used for that. I have been reading about MQTT and haven't got very far understanding how to use it. All the tutorials I have studied wants to talk to my network using a browser. I can not find a forum that will help. They keep referring to the "connect to my network way". I did have a try with ESPBasic but the example was very slow to respond to a button press on ESP-01 A to LED on ESP-01 B. Any code I get working will be posted here. |
||||
| viscomjim Guru Joined: 08/01/2014 Location: United StatesPosts: 925 |
I don't have experience, but take a look at ESP NOW. Doesn't need a router and I think you can have up to 20 peers or something of that nature. |
||||
Timbergetter![]() Regular Member Joined: 08/10/2018 Location: AustraliaPosts: 55 |
I have recently started to play around in the MQTT world. I have a mix of ESP-01 and ESP-07 devices. I think what you need is a MQTT broker to facilitate the communication and control logic among these devices. I have the Mosquitto broker/server now installed on a Raspberry Pi Zero and that seems to be achieving your objectives. |
||||
| MikeO Senior Member Joined: 11/09/2011 Location: AustraliaPosts: 275 |
Recently I revisited ESPeasy for the ESP8266 etc, I had looked at it in the past but this time spent some time investigating and have found it really good. The major improvement was its ability to manage the wifi connection properly , it manages dropout and reconnects to available networks automatically . It also has a built in device to device communication so you can make a mesh albeit simple. It has built in support for MQTT, HTTP, UDP protocols , thinkspeak (where I send data to) etc. I have now replaced my own software in the devices I am using on my Weather Station and Garden Solar power system , I have also worked out method of getting data in and out of the attached micromites. I have also started using Node-Red on a raspberry Pi for communication directly with the ESP8266 nodes, I am using JSON formatted data (via UDP) from the nodes as the Node-Red server has a very simple method of parsing the fields from the data stream. Mike Codenquilts |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |