Page 1 of 1

JL1101 Support

Posted: Sat Feb 25, 2023 10:18 pm
by whcir@charter.net
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

Re: JL1101 Support

Posted: Mon Feb 27, 2023 7:22 am
by ESP_ondrej
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.

Re: JL1101 Support

Posted: Mon Feb 27, 2023 8:33 pm
by whcir@charter.net
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

Re: JL1101 Support

Posted: Tue May 21, 2024 4:28 pm
by PU5EPX
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)