Network LAN

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
kcoelho
Posts: 21
Joined: Fri Aug 02, 2019 5:40 pm

Network LAN

Post by kcoelho » Mon Aug 19, 2019 2:07 pm

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

User avatar
pythoncoder
Posts: 3651
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Network LAN

Post by pythoncoder » Mon Aug 19, 2019 5:34 pm

What hardware are you using?
Peter Hinch

kcoelho
Posts: 21
Joined: Fri Aug 02, 2019 5:40 pm

Re: Network LAN

Post by kcoelho » Mon Aug 19, 2019 6:11 pm

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

kcoelho
Posts: 21
Joined: Fri Aug 02, 2019 5:40 pm

Re: Network LAN

Post by kcoelho » Wed Aug 21, 2019 9:21 pm

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?

User avatar
pythoncoder
Posts: 3651
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Network LAN

Post by pythoncoder » 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.
Peter Hinch

kcoelho
Posts: 21
Joined: Fri Aug 02, 2019 5:40 pm

Re: Network LAN

Post by kcoelho » Thu Aug 22, 2019 1:03 pm

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?

User avatar
pythoncoder
Posts: 3651
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Network LAN

Post by pythoncoder » Fri Aug 23, 2019 5:55 am

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.
Peter Hinch

rpr
Posts: 75
Joined: Sat Oct 27, 2018 5:17 pm

Re: Network LAN

Post by rpr » 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.

kcoelho
Posts: 21
Joined: Fri Aug 02, 2019 5:40 pm

Re: Network LAN

Post by kcoelho » Fri Aug 23, 2019 8:23 pm

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

rpr
Posts: 75
Joined: Sat Oct 27, 2018 5:17 pm

Re: Network LAN

Post by rpr » Sat Aug 24, 2019 12:15 am

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.

Post Reply