sensors-software icon indicating copy to clipboard operation
sensors-software copied to clipboard

Support of Ethernet (Olimex ESP32 POE ISO)

Open tilman1 opened this issue 5 years ago • 8 comments
trafficstars

Hi I would like to run the sensor firmware on Olimex ESP32 POE ISO via ethernet rather than WiFi. I have cloned beta branch and added the ethernet support there. I would like to put it back into this repository as new branch, so that I can test it more for side effects before it can be merged onto the beta branch. I have little to none experience with github. I seem not to have permission to add a branch -- how can I add a branch?

Thanks TIlman

tilman1 avatar Jun 04 '20 08:06 tilman1

Please also add support for wESP32. Same as Olimex, only difference is that the Ethernet module is connected to pin 16 for mdc and 17 for mdio.

nagyrobi avatar Jun 27 '20 21:06 nagyrobi

Use pull requests

DeeKey avatar Jul 20 '20 15:07 DeeKey

I have little to none experience with github. I seem not to have permission to add a branch -- how can I add a branch?

In short:

  • fork the opendata-stuttgart archive into your own account, on github
  • clone it locally on your machine: git clone
  • checkout the beta branch: git checkout beta
  • create a branch from beta: git checkout -b <name_of_your_feature>
  • commit your changes with a clear description, e.g.: git commit .
  • push it to your own archive : git push (and follow the instructions to push to a branch on your github account)
  • on your github account you'll see a message that you just pushed to a new branch, follow that to create a merge request towards the opendata-stuttgart project

The above is not meant as a complete guide, just a summary of the steps.

bertrik avatar Jul 20 '20 15:07 bertrik

Easy, yeah.

nagyrobi avatar Jul 20 '20 15:07 nagyrobi

Hi guys, I did all steps suggested by bertrik but the last step. I would like to do some more testing before issuing a pull request. If somebody would want to test -- the branch is called OlimexEthernet. @bertrik Thanks for the hints. That helped

@nagyrobi Fpr supporting the wESP32 would need to capable of distinguishing between the different hardwares. Any idea how the program can find out whether it runs on an olimex or an wESP32?

Thanks and best regards Tilman

tilman1 avatar Jul 22 '20 22:07 tilman1

I think this should be done manually. Put a checkbox in settings: "Ethernet support: ( ) Olimex (x) wEESP32". This would allow further addition of supported hardware later.

nagyrobi avatar Jul 24 '20 08:07 nagyrobi

I have implemented the configuration via ethernet in analogy to that of the WLAN, i.e. if the device is not configured, both, the ethernet and the WLAN become active. In the moment one network type gets connected, the other one is deactivated, and the device can be configured using the WEB GUI. If one does not want to give up on that concept, the fw needs to know on which device it is running.

tilman1 avatar Aug 10 '20 22:08 tilman1

@nagyrobi mdc and mdio are part of the Media Independent Interface Management (MIIM). https://en.wikipedia.org/wiki/Media-independent_interface

Maybe, there is not really a problem. For configuring the ethernet, I use the standard infrastructure provided via the arduino IDE, i.e. the configuration code of the ESP32 pins to communicate with a LAN7810 is not really visible or accessible on the application layer. Apparently this is encapsulated by the board support packages: (see also https://wesp32.com/software/#warning-gpio-pin-configuration). Can you try to get one of the ethernet examples delivered with the arduino IDE to run? Once you have configured your board , you should find it in File->Examples->Wifi->ETH_LAN8720

tilman1 avatar Nov 08 '20 09:11 tilman1