JeanetteMueller / Huyang_Remote_Control

Software for ESP8266 and ESP32 to control Huyang from DroidDivision via Browser/Mobile Device
Creative Commons Zero v1.0 Universal
3 stars 2 forks source link

Cannot connect to webserver #5

Open xanathon opened 2 weeks ago

xanathon commented 2 weeks ago

I have successfully installed the latest version and I am able to connect to the Access Point the ESP board provides (I use it directly, not via a WiFi network).

However: If I try to open the web UI I only get a "connection refused" message:

With the earlier version of HuyangControl this worked without any problems.

What could be the problem here?

TIA!

JeanetteMueller commented 2 weeks ago

please check your config.h file. maybe you have overridden your old config. then connect via USB and check the serial monitor. maybe huyang got a different ip adress.

xanathon commented 2 weeks ago

in config.h I can only set the WiFi settings and webserver port, right? But Wifi is not the problem here. I can see the IP address when successfully connecting to the hotspot in Chrome on Android. The IP address is correct and shows that the WiFi connection was successful. What does not answer is the webserver.

Edit: The serial monitor does not show me any IP address:

image

JeanetteMueller commented 2 weeks ago

your Huyang tries to connect to a local Wifi. after counting to 120 he change the setting to access point. Maybe you want to do the accesspoint thing directly?

define WiFiDefaultMode JxWifiManager::WifiModeHotspot

instead of

define WiFiDefaultMode JxWifiManager::WifiModeNetwork

but this does not solve your problem...

the code show there should be a "Wifi Adress: " followed by the ip adress. please try to change to HotSpot and try again.

JeanetteMueller commented 2 weeks ago

then only way to change the ip adress at the moment is to change it at /src/system.h in line 10 (only hotspot). but this may be overridden wen you update the software

xanathon commented 2 weeks ago

My config IS already set to Hotspot mode, I always only use that mode ...

image

JeanetteMueller commented 2 weeks ago

have you changed the port? is it still 80?

define WebServerPort 80

xanathon commented 2 weeks ago

Yes, the port is still 80

JeanetteMueller commented 2 weeks ago

don't know how to fix this. cant reproduce your problem. very soon i will release 1.9. this fixes a lot of stuff and brings new options. i hope you can wait a week for this. please excuse these circumstances.

xanathon commented 2 weeks ago

No need for excuses.

Anyway I really do not understand this, in the version before this one I could access the webserver to control the eyes just fine. So this should work as it did before imho.

Isn't there a log somewhere or something like that that could point to the cause of this problem?

Since I only have a bust and not a full robot controlling the eyes really is everything I need.

JeanetteMueller commented 2 weeks ago

no mor logs than you can see at the serial monitor. the next version allow to reduce the complexity by selecting what your installation allows. so you can then disable the body movement interface via config. want to add some debug informations to the webservice and wifi

xanathon commented 2 weeks ago

More info on this: if I connect to my local WiFi network by configuring it in the config.h, the serial monitor shows me the correct IP address and I am able to reach the webserver. This seems to be a problem only with the Hotspot mode. Unfortunately at the event where I want to showcase him I will not have WiFi access (and also no direct connection to the board to see any IP addresses), so it needs to be the Hotspot mode.

But maybe it helps in finding the bug that this works via WiFi but not via Hotspot mode.

JeanetteMueller commented 2 weeks ago

as you can see, the ip address is 192.168.10.1 set at the system.h line 10. you try to connect to .100 why? please try the 1 as last ip address part.

JeanetteMueller commented 2 weeks ago

and you are right, checking if connection is established and only on connected state to write the ipadress is a problem. i removed this check for the next release

xanathon commented 2 weeks ago

Ah, now we are getting somewhere. :) I had no chance to see what IP address was used for the webserver (since it was not shown in the serial monitor), so I assumed it would be the IP address of the Hotspot (192.168.10.100). I did not know that the webserver IP address was 192.168.10.1, maybe it would be a good idea to include that in the docs.

I'll try again later. Thanks so far.

xanathon commented 5 days ago

Any news on the next version? I have an event next weekend where I would like to showcase Huyang. ATM I get only a partial web interface because it does not load completely ... (same problem that other members of the Facebook group mentioned).