Notifications
Clear all

Don't see anything on 192.168.4.1

28 Posts
5 Users
1 Likes
3,192 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@bob207 I think a little clarification will get you over the learning hump.

The esp32 is the server, the transmitter, a radio, that silver thing on the board about 1/2" x 1/2" is the wifi chip. The transmission antenna may or not be visible, it will be behind the wifi chip and if visible will look like a square wave. Both the computer and phone need to 'connect' to the server to receive the data, that is done by touching, clicking whatever it takes to 'select' the server which in my case is 'Ron' then you set the web browser to 192.168.4.1. Done.

Summary: One radio sending (server) on the esp32

One or two or more radio's receiving (client) on each device as in computer and phone.

Got it?????

BTW, it is very normal for these small devices to not always work when we use simple code. If you want 100% repeatability a lot more code is needed. Normally it works, but depending on circustances it can fail. When it does, just try again (press the reset button). Sometimes due to the fact I am in a place with a lot of wifi signals I have to kill the IDE and reupload the sketch again. Not sure why but it happens. 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@bob207 It just occurred to me that a bit more information might get you in the loop. If you remove the cable from the ESP32 and instead plug a 5V phone charger in, then power off your router, then both the phone and computer will still connect to the esp32 etc etc.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@bob207)
Member
Joined: 3 years ago
Posts: 16
Topic starter  

Yes, I know very little about networks.

If I go to settings/networks and internet I see nothing resembling "YourAP" which is what I see on the phone.

My computer is hard wired to my server so I am wondering if my computer has no wifi capability?


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@bob207 That's a possibility.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@bob207 

Use your phone to check for available WiFi networks.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@will He did that as part of the phone test, and it still won't tell you if there is a wifi card in the computer. If he is connected via ethernet to the router it's almost a sure thing he has no wireless.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

It was just to check what wifi networks were in that area. I thought the ESP could access wifi via the (suitably equipped) router even if the computer doesn't itself have wifi built in (built on ?).

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@bob207 Go into Device Manager and expand the section called 'Network Adapters', take a screen capture of that part of the device tree and post it here. Or maybe better open 'Network and Sharing' and grab the part of the screen about Active Networks as in the attached picture here. I have a virtual Windows 11 on my Mac so the network is a virtual Ethernet although the Mac is wireless.

Screenshot 2022 12 18 at 19.56.15

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@will No the esp32 is an access point, it replaces the router so to speak. See pic 1. In pic2 the esp32 is set to STA mode so connects to the router access point. Since the laptop or phone are not themselves access points, they do not broadcast an SSID.

Screenshot 2022 12 18 at 20.02.30
Screenshot 2022 12 18 at 20.03.05

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@will If you want your phone to be like the esp32, an access point you turn on Hotspot on your phone, there is a similar setting in windows if there is a wifi card but I don't recall what it is called. I don't know of any such setting for a Mac, and maybe there isn't one for windows but then what is Internet Sharing for?

EDIT Found it for the Mac see pic mine is disabled for security reasons. it's an Apple thing, called Content Caching. For those interested this is what my setup looks like (see pic 2 and 3). Notice the part that says share the internet with devices connected via USB. This is how I back up my iPhone, it is plugged into the Mac and I choose back up important (not all) stuff like Documents to the cloud. In this case sharing the net is considered secure since you need physical possession of the Mac to do the sharing which is rather moot in that case.

Screenshot 2022 12 18 at 20.14.48
Screenshot 2022 12 18 at 20.18.25
Screenshot 2022 12 18 at 20.18.35

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@zander

Posted by: @zander

@will No the esp32 is an access point,

It is only an access point, if you set it so... it can be either (and both) at the same time!

Cheers


   
ReplyQuote
(@bob207)
Member
Joined: 3 years ago
Posts: 16
Topic starter  

 

Sorry about the delay in replying. My network was due for renewal at the end of December and I have been spending the last fortnight trying to negotiate a renewal with false and incorrect promises and lies I have renewed and cancelled quite few times. I think it is stable now but I am still expecting an e-mail saying there is a problem.

Posted by: @zander

My phone connects to the computer/server via wifi so I am assuming I have a wifi service on the computer/server but I can't find it in the computer settings?

NO, your phone is NOT connecting to your PC. NO, your PC does NOT have a WiFi service (server)

Yes my phone is connected to my pc via WiFi using the network and password codes supplied by the server company.

Posted by: @zander

It sounds like you have a lot of gaps in your education regarding networks. If the phone connects then so should your computer. The fact that it doesn't has nothing to do with the sketch or the esp32, that is proven by the fact that the phone works. You have proven beyond any doubt that you have a problem with the computer. Maybe a VPN? Can you see the SSID you put in the sketch o the computer? Have you selected it? What did it say?

 

I am comparing two sketches, the one in the article you advised me to read which sends a signal of two boxes to the computer to turn LED's on. I have altered it slightly so it switches the onboard LED on, I have called the sketch   randomnerds.

The other sketch, again I have altered slightly so it turns the onboard LED on is the one in examples called WiFiAccessPoint.

If I send randomnerds to the computer using the servers SSID and password then it appears on 192.168.0.43. I assume this IP address is held in the file WiFi.h or one of its associated files and is called when you have    WiFi.begin(ssid, password)   in the sketch.

If I comment out WiFi.softAPP(ssid.password) from the sketch WiFiAccessPoint and replace it with WiFi.begin(ssid,password) then it also shows on my computer at 192.168.0.43

So your comment above that it has nothing to do with the sketch seems incorrect.

I think the line refers to the type of connection, in the case of the computer it is a direct connection whereas in the phone it is an access point and needs a different software command. The library 'WiFi.h' decides which IP address it goes to. WiFi.begin goes to 192.168.0.43 whereas WiFi.softAP goes to 192.168.4.1.

That being said I can get the WiFiAccessPoint to go to both computer and phone but randomnerds to only go to the computer (the phone looks to connect but shows nothing on the screen) by using WiFi.begin and WiFi,softAP in the sketches?

 

 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6968
 

@bob207 I am sorry, the following has me totally confused

Yes my phone is connected to my pc via WiFi using the network and password codes supplied by the server company.

Server company? So you are a business, with a contract to a server company like Amazon using AWS or IBM and Azure? Please tell us the name of the company and server service as it may be relevant.

Did the 'server' company install hardware and software in your PC to allow what you are mentioning? It is certainly possible to set up a server on a PC, that is perfectly normal but in your context makes no sense. Can you tell me what server software you are running on your PC, Apache, NGINX?

Perhaps it would be advisable to screen print the relevant page of your Windows 11 PC, probably around Networking etc showing your PC network. It's been a while since I used windows so don't recall the exact page.

Here is a great example of how flawed your education is. You said

I assume this IP address is held in the file WiFi.h 

IP's can be hardcoded and could even conceivably be in a .h file but you are talking about an address assigned at run time that is dynamic. A .h header file is a text file and has no possible effect on run time code, it has to go through a compile step plus other technical steps to become an ip address.

I thought this issue was already resolved a while ago, your PC is connected via a LAN cable IIRC to your router, so therefore it is unlikely to also have WiFi, it's generally one or the other.

Let's start over with a diagram showing wireless connections with zig zag lines, cat5/6 cables with normal lines, pc, router, esp32 labelled as such. Where known the 'names' and associated IP addresses of each device. For instance on my PC if I type hostname in a command prompt I get

LAPTOP-2BAVT8IN.localdomain, The image is the entire output of a lanscan from 192.168.0.0 to 192.168.0.255 notice how my PC is NOT in that list, the only thing I recognize is the router at the standard address 192.168.0.1

Once your setup is working the lanscan will show all your devices on your class C private network. See pics for the standards on this.

A little googling will tell you that although it is possible (with sufficient education on the technical matters) to connect to a private network from the internet, but is not normal and is potentially very dangerous. I have over 50 years experience and have seldom done this but do know what to look for to do it, I doubt you know that. I did at one time have access to my 5 PC node network from the net for a network intensive contract I was doing but I dismantled it when the contract was over.

Screenshot 2023 01 01 at 10.42.17
Screenshot 2023 01 01 at 10.33.03
Screenshot 2023 01 01 at 10.33.34

 

 

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Page 2 / 2