Page 1 of 2

Network LAN

Posted: Mon Aug 19, 2019 2:07 pm
by kcoelho
Hello,

Where can I find more information / documentation about the network.LAN functionality?

Trying to use it for a project but cannot seem to find anything

Thank you

Re: Network LAN

Posted: Mon Aug 19, 2019 5:34 pm
by pythoncoder
What hardware are you using?

Re: Network LAN

Posted: Mon Aug 19, 2019 6:11 pm
by kcoelho
It's a custom board but very similar to the Olimex - e407.

Additionally, after adjusting some drivers to enable this, my ADC keeps spitting out 0 values. It used to be working perfectly before

Re: Network LAN

Posted: Wed Aug 21, 2019 9:21 pm
by kcoelho
pythoncoder wrote:
Mon Aug 19, 2019 5:34 pm
What hardware are you using?
I am still having trouble with this. Is there anywhere I could be referred to for assistance?

Re: Network LAN

Posted: Thu Aug 22, 2019 6:29 am
by pythoncoder
I assume you've seen the official docs. Implementation of the network module is port specific: look in the source tree for modnetwork.c.

Re: Network LAN

Posted: Thu Aug 22, 2019 1:03 pm
by kcoelho
pythoncoder wrote:
Thu Aug 22, 2019 6:29 am
I assume you've seen the official docs. Implementation of the network module is port specific: look in the source tree for modnetwork.c.
Thanks,

I think I understand your point. While I can import the network and usocket modules in REPL, I do not have access to the AbstractNIC class and the socket connections do not appear to be working.

So would that mean I have to write my own custom driver for the board?

Re: Network LAN

Posted: Fri Aug 23, 2019 5:55 am
by pythoncoder
This is way outside of my experience. My general approach would be:
  • Determine the chip used for the Ethernet adaptor.
  • Search high and low for a C driver for it with source code.
  • Assuming you find one, learn how the author integrates the low level driver into the network stack.
  • See how existing network adaptors (e.g. WiFi, CC3200) integrate into MicroPython.
  • Roll your sleeves up and set to work.
Not for the faint hearted and not one for me.

Re: Network LAN

Posted: Fri Aug 23, 2019 3:31 pm
by rpr
If the board uses a lan8720 chipset, the loboris fork for the esp32 has support in micropython. Loboris made some small hardware mods to the lan8720 boards he was using. There is at least a thread on his forum.

https://loboris.eu/forum/showthread.php?tid=334

Loboris commented that he thought his code should work for the olimex boards.

Re: Network LAN

Posted: Fri Aug 23, 2019 8:23 pm
by kcoelho
rpr wrote:
Fri Aug 23, 2019 3:31 pm
If the board uses a lan8720 chipset, the loboris fork for the esp32 has support in micropython. Loboris made some small hardware mods to the lan8720 boards he was using. There is at least a thread on his forum.

https://loboris.eu/forum/showthread.php?tid=334

Loboris commented that he thought his code should work for the olimex boards.
Hi rpr,

It uses a LAN8710 chipset, which should be quite similar.
I'll take a look into that and let you know the outcome.

Thank you

Re: Network LAN

Posted: Sat Aug 24, 2019 12:15 am
by rpr
kcoelho wrote:
Fri Aug 23, 2019 8:23 pm

Hi rpr,

It uses a LAN8710 chipset, which should be quite similar.
I'll take a look into that and let you know the outcome.

Thank you
Thanks. I'm interested.