Page 1 of 1

How to use network.LAN on NUCLEO_F429

Posted: Tue Aug 13, 2019 11:25 am
by chg
Hello,

either I am too stupid or there is no explanation how exactly to use the network interface on the mentioned nucleo.

I successfully compiled the latest micropython from github with

make BOARD=NUCLEO_F429ZI -j8 MICROPY_HW_ENABLE_ETH_RMII=1

and the autocompletion shows the existance of "network.LAN" on the REPL but i don't succedd with starting the LAN and requesting an IP address using DHCP.

Any example that helps me to get started?

Re: How to use network.LAN on NUCLEO_F429

Posted: Tue Aug 13, 2019 2:11 pm
by jimmo
Can you share your code that you're using to request a DHCP lease?

I don't have one of these boards, but I think it should be something like:

Code: Select all

import network
lan = network.LAN()
lan.active(True)
lan.ifconfig('dhcp')
# use lan.ifconfig() to wait for lease

Re: How to use network.LAN on NUCLEO_F429

Posted: Fri Aug 16, 2019 3:37 pm
by kcoelho
Hi,

When I enter the command "network.LAN()" in the REPL prompt, the prompt itself shuts down.

Any ideas as to why this happens?