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?
Re: How to use network.LAN on NUCLEO_F429
Posted: Wed Sep 11, 2019 7:58 am
by ta1db
jimmo wrote: ↑Tue Aug 13, 2019 2:11 pm
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
This worked well on STM32F7DISC without any error. Now I have a connection on my LAN named as mpy.local but there is no any service yet. I am working on.
By the way @jimmo you helped me very much once again, thank you so much, if I'm correct I don't need to install the Ethernet module
https://github.com/forester3/micropytho ... net-F7DISC for a LAN connection.
ps. >>>lan.ifconfig() produces the following:
('192.168.1.58', '255.255.255.0', '192.168.1.1', '192.168.1.1')
without any network interface .
Re: How to use network.LAN on NUCLEO_F429
Posted: Mon May 11, 2020 4:48 pm
by greg161
Did run MQTT on this board ?