Is there support for the JL1101 PHY chip in Arduino? I purchased a relay board thinking it had a LAN8720 PHY chip and now I can't program the ethernet interface.
Thanks
JL1101 Support
-
- Posts: 210
- Joined: Fri May 07, 2021 10:35 am
Re: JL1101 Support
There is no such a driver in the ESP-IDF. However, you could try to write your own. It should not be that hard since it seems the JL1101 has standard IEEE 802.3 RMII/MII interface. You can follow the guideline at https://blog.espressif.com/esp-idf-cust ... f9d23de0ad
Edit: the ESP-IDF common IEEE 802.3 interface is only available starting from ESP-IDF v5.0 which is not supported by Arduino yet... However, you can still to get inspired by that concept and create your own driver, it will only take more effort.
Edit: the ESP-IDF common IEEE 802.3 interface is only available starting from ESP-IDF v5.0 which is not supported by Arduino yet... However, you can still to get inspired by that concept and create your own driver, it will only take more effort.
-
- Posts: 3
- Joined: Sat Feb 25, 2023 10:09 pm
Re: JL1101 Support
The vendor has a driver for the JL1101 here https://github.com/dtlzp/relay_dev_demo ... y_jl1101.c Being a novice I don't know how to use this in esp32 Arduino environment because it looks like it is for the IDF environment. any help would getting this to work with Arduino would be greatly appreciated.
Thanks
Thanks
Re: JL1101 Support
I had success copying the driver from ESPHome (https://github.com/esphome/esphome/blob ... y_jl1101.c) into esp-idf/components/esp_eth/src, adding the source to esp-idf/components/esp_eth/CMakeLists.txt and also adding the prototype of esp_eth_phy_new_jl1101() to esp-idf/components/esp_eth/esp_eth_phy.h.
Used the ESP-IDF version 5.1.2 and used it to compile MicroPython (where I added a bit more stuff to get access to JL1101 PHY).
The configuration pins were also borrowed from ESPHome and replicated to my MicroPython build:
lan = network.LAN(mdc=Pin(23), mdio=Pin(18), power=Pin(0), phy_addr=1, phy_type=network.PHY_JL1101, ref_clk=Pin(17), ref_clk_mode=Pin.OUT)
Used the ESP-IDF version 5.1.2 and used it to compile MicroPython (where I added a bit more stuff to get access to JL1101 PHY).
The configuration pins were also borrowed from ESPHome and replicated to my MicroPython build:
lan = network.LAN(mdc=Pin(23), mdio=Pin(18), power=Pin(0), phy_addr=1, phy_type=network.PHY_JL1101, ref_clk=Pin(17), ref_clk_mode=Pin.OUT)
Who is online
Users browsing this forum: No registered users and 90 guests