Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

wifi password

Status
Not open for further replies.

Wp100

Well-Known Member
Hi,

Please forgive if this seems a really dumb question , but do not normally use wifi and cannot find any answer on the web.

Was trying to set up my ESP32 to communicate with an old laptop that was given to us some years ago and just kept as a backup for the desktop etc.

Its been updated to W10 and running ok, but to run the ESP32 the code needs the laptops SSID and password, but there was no such details with the laptop and nothing written on or in the casing etc.

Seems if it was connected to another wifi pc network you can then access these details but our desktop only has wifi via the external router, so though it connects to the laptop it only shows as an ethernet connection, no such wifi details available in the router menu.

Assume when you buy a new laptop these details are printed somewhere ?

Is there any way to retrieve the details from the laptop?
 
I think you misunderstand (or maybe I do) something here.
An Esp8266 would normally connect to a router, and your laptop would normally connect to the same router, then you can communicate Esp8266 to laptop through the router.
The router itself is setup with the wifi Ssid and password.
I think you can connect a laptop to an esp8266 directly without a network connection, but I've not tried that...yet.
 
I think you misunderstand (or maybe I do) something here.
An Esp8266 would normally connect to a router, and your laptop would normally connect to the same router, then you can communicate Esp8266 to laptop through the router.
The router itself is setup with the wifi Ssid and password.
I think you can connect a laptop to an esp8266 directly without a network connection, but I've not tried that...yet.

You can set an ESP as a server, and this is VERY commonly done in order to set it up - you log on to the ESP server, and it gives you a list of any available access points to connect to, you then select the one you want, and the ESP then connects to that, Most WiFi cameras are setup that way as well.

So 'probably' the details he needs are in the ESP source code?.
 
I think you misunderstand (or maybe I do) something here.
An Esp8266 would normally connect to a router, and your laptop would normally connect to the same router, then you can communicate Esp8266 to laptop through the router.
The router itself is setup with the wifi Ssid and password.
I think you can connect a laptop to an esp8266 directly without a network connection, but I've not tried that...yet.

I think you misunderstand More than likely !! :D

So do follow what you are saying in that connecting the ESP32 and the Laptop as a 'local network' via the router would work as I have been able to connect each the the router one at a time, not tried both, yet.

Howeve the final objective is to be able to communicate with the ESP32 direct to a laptop,tablet or smart phone, which now having found this tutorial using whats called AP seems to be what we need, will give it a try.
https://randomnerdtutorials.com/esp32-access-point-ap-web-server/



Thanks
 
You can set an ESP as a server, and this is VERY commonly done in order to set it up - you log on to the ESP server, and it gives you a list of any available access points to connect to, you then select the one you want, and the ESP then connects to that, Most WiFi cameras are setup that way as well.

So 'probably' the details he needs are in the ESP source code?.

Thanks just seen your post after posting the above, lots to learn !
 
Just been trying that ESP-AP tutorial , (which is also in the Arduino/ESP/Examples) and gained wifi between the laptop and the mobile - Yay !

One other question , if I may, and thats the ESP OTA (Over the Air) update routine, while have seen a few tutorials on it, feel sure it will work as such, but wondered if its as reliable as they say when loading in several thousand lines of code, assume there are some good checksums etc going on in the background ?
 
but wondered if its as reliable as they say when loading in several thousand lines of code

if you send the OTA update via command line, make sure you enable the two flags, --hope="true" --pray="true"
 
I haven't used the ESP OTA but will do soon. I have used B4A (Basic for Android) OTA (B4A-Bridge) which was pretty reliable.

Mike.
 
if you send the OTA update via command line, make sure you enable the two flags, --hope="true" --pray="true"

I must admit, I've never even considered it - obviously it has some uses, depending on application, but generally it's simpler (and safer) to update with a lead.

If you want to do it, I'd advise doing a LOT of local OTA testing first.
 
Ok
As an ap other devices will be able to. connect to it.
 
Getting the 38 pin ESP32 served the function of more memory and i/o pins than a arduino 328, plus the chance to see what can be achieved via wifi or ble.

My code has about 50+ control variables , so would be easier to do an App or PC layout to just send those across via wifi or just amend them in the program code and send the whole thing OTA.

Also looking at things like remote camera viewing, remote control and stats, so should be finished about Y 2030 :D

Not something that has bothered us in the past, being older we do not have a problem with getting up and pressing a switch etc, but seems the rest of the world has other ideas !
 
I played with the esp32 remote camera module.
I tried to adapt the espwho example code so that I could add a camera to a network machine control system I put together on an esp8266, it worked up until I wanted to send a large json from the esp to the browser, couldnt get it to work, the esp32 camera software uses espressifs web server library, I couldnt get said library to work on larger file transfers, even using send_chunk, it just reset the esp.
Probably something I did wrong, but I gave up in the end, went another route.
 
Have set up the ESP32 / Arduino and followed this tutorial for simple Wifi Uploading and it worked fine, so incorporated it into our main program code and again seems to work well.

A note in that tutorial suggests having any Delay() in the code might cause a problem, though we do have a 1 second delay in our loop, it did not affect the wifi upload, even tried increasing it to 5 seconds, the Sending Invatation / Uploader seemed happy to wait for a response.

The only downside so far is that the Arduino Wifi code takes up 37% of memory.

https://lastminuteengineers.com/esp32-ota-updates-arduino-ide/


Edit - while testing had been monitoring the power usage with a cheapy inline USB power meter, and seems it takes up to 200ma when programming.

When our program, with OTA implemented, you could see the current increased to about 100ma for a second each time the loop came to the ArduinoOTA.handle() , about every 4seconds in our code.

That was not such a problem, but when we turned off the routers wifi, the current jumps up to 140ma and stays there , though the main code is still being executed ok, but could notice the heat spreader getting warmer.

Expected that when the router was turned back on it would reconnect, but not so - a reboot or some extra code is needed.
As can be seen in this post its an ongoing problem -
https://github.com/espressif/arduino-esp32/issues/653

However if the router is off or the signal lost for a while, even using the code they suggest, means a real problem for the running of the main program code.

Seems the advantage of a wifi code uploader is completely outweighed by the potential high power useage and rebooting a loss of wifi signal presents - unless there is a better way ??
 
Last edited:
The Esp32 is dual core, and if you use arduino ide normally one core handles the C code, and the other core handles the wifi stuff, so I'm not sure why delay would affect things, unless it causes some kind of sync issue.

Yes the esp 8266 and the '32 take lots of power, there is a way you can get that right down, using lora and a firmware modded router, but its not something I've tried, sounds tricky.

You can just use something like if(!wificonnected) {reconnnect()} to make the esp reconnect if theres a disconnect, I have used this and reset my router a few times and it reconnects fine, just put the code that makes the wifi connection is the reconnect() routine, I even put the number of reconnects on the esp's webpage so on some projects so I can tell how many times its pooped out.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top