I’ve got a RC15 board all set up and working, currently with wifi and that’s worked fairly well but had a few connection issues so I’d like to get ethernet working. I have a Hiletgo W5500 ethernet module and the module itself lights up but the data lights are extremely dim and I cannot get it to communicate. I’ve tried two modules, both behave the same. Is there a setting somewhere I am missing to enable ethernet instead of wifi communication?
I would check the serial monitor, there you can see if the W5500 is detected during RC15 startup.
I couldn’t find a serial monitor in the rate controller app, I did find an activity log though that indicated that the Ethernet is connected and I’ve got a flashing green light on the switch as well on that port so it’s doing something.
Maybe this is why, I’ve got the right subnet hit the local IP is the same as the IP for the network when I look at the Ethernet connection in the windows settings… but it won’t let me change it to something unique…
Does W5500 have static IP on ESP side? If your tablet is in 192.168.5.0/24 network and tablet IP is .10 then anything except .10 is acceptable in ESP config.
Is it this firmware?
Line 49 has
uint8_t IP3 = 50;
but if you see lines 93…103 then it seems it is configured as 192.168.1.255. This should actually be broadcast address so it’s not clear what IP address it uses
// ethernet
EthernetUDP UDP_Ethernet;
IPAddress Ethernet_DestinationIP(MDL.IP0, MDL.IP1, MDL.IP2, 255);
bool ChipFound;
// wifi
WiFiUDP UDP_Wifi;
IPAddress Wifi_DestinationIP(192, 168, 100, 255);
IPAddress AP_Subnet(255, 255, 255, 0);
WiFiClient client;
WebServer server(80);
That should be what I’m running, looks like there may have been an update since I installed it though. I will try updating it and see if that makes a difference.
The only other option I have had for an IP address in the Rate Controller is 192.168.200.2 when I am connected via wifi, which doesn’t make sense either since according to that it is supposed to be 192.168.100.255…
But now that I’m thinking about it, when everything was working on wifi I am pretty sure that it was running on 192.168.200.2 and working fine… Which shouldn’t be possible since it’s not on the same subnet as everything else on the network??
Here DoSetup() method configures those values defined previously. Ethernet starts at line 71. Look at lines 73 and 81. Basically your gateway is .1 (If you have no router then your tablet can be .1 and everything is sent to tablet, should be ok if you have sim card slot - opens backdoor for ESP32 chip ).
Anyway, if your tablet is 192.168.1.10 then AOG_RC/Modules/ESP32 Rate/RC_ESP32/RC_ESP32.ino at master · SK21/AOG_RC · GitHub file
uint8_t IP0 = 192;
uint8_t IP1 = 168;
uint8_t IP2 = 1;
uint8_t IP3 = 50;
sets up esp32 with 192.168.1.50 and they end up in same network and can see each other at IP level. But first make sure you have connection at lower level, link level. Does link up led is on?
If you have serial over usb connected to any computer, then you can see over terminal how ethernet is configured in DoSetup() method. There are lines like
if (ChipFound)
{
if (Ethernet.linkStatus() == LinkON)
{
Serial.println("Ethernet connected.");
}
else
{
Serial.println("Ethernet not connected.");
}
Serial.print("IP Address: ");
Serial.println(Ethernet.localIP());
}
else
{
Serial.println("Ethernet hardware not found.");
}
Connect to RC15 / ESP32 via usb, then use Arduino IDE - Serial Monitor
you will get something similar during ESP boot ( this is a snap shot from a different board)
Thanks! I used the PCBSetup app to install it so I didn’t give that a thought Ethernet does connect, but on 192.168.200.50, wifi starts on 192.168.200.1. when I connect to the WiFi I have the option in the local IP to use 192.168.200.2, but when I disconnect from WiFi with the Ethernet connected, that up address disappears and nothing else pops up…
Going to try a new board with the most current firmware and see if that makes any difference. When I have the W5500 Plugged in and the serial monitor open it shows the correct ip addresses assigned to ethernet and wifi on a new board.
Tried the new board with new software and at first the Ethernet started at 192.168.5.50, when I tried to set the subnet to 192.168.5 upon it restarting the Ethernet was connecting on 192.168.200.50…
Connected to the WiFi(with the Ethernet still plugged in) and it connected, but it changed to 192.168.202.2, updated the subnet to that and unplugged the Ethernet and I was able to get it to come back online at least. But still no success with Ethernet.
Is the rate controller supposed to be on the same subject as ag open to work? I assumed it did but apparently it doesn’t?
The rate module and rate app can be on the same network as AOG. Each module will be xxx.xxx.xxx.50+module ID. Module 0 is 50, module 1 is 51, etc.
There was a bug in the esp ethernet code. It was sending the wrong # of bytes. Here is the fixed ino. AOG_RC/Modules/ESP32 Rate at Development · SK21/AOG_RC · GitHub
Thanks, that solved it! One question though, In the local IP I still only have 192.168.5.10 as an option which is what the network adapter is set as, but everything is working and communicating fine it would seem!
The rate module will still have the hotspot enabled. If your pc isn’t connected to the hotspot it won’t show up in the list.