‎2019-09-12 12:31 AM
I am learning STM32MP157A-DK1 according to the 'STM32 MPU wiki by ST' getting started steps, but I found that the IP query command didn't work like the tutorial say:
**************** Tutorial ********************
Board $> ip addr show eth0
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
inet xx.xx.xx.xx/22 brd xx.xx.xx.xx scope global dynamic eth0
valid_lft 159045sec preferred_lft 159045sec
inet6 xx::xx:xx:xx:xx/64 scope link
valid_lft forever preferred_lft forever
***********************************************************
​
****** My board response***********************
root@stm32mp1:~# ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:80:e1:42:5d:ce brd ff:ff:ff:ff:ff:ff
inet6 fe80::280:e1ff:fe42:5dce/64 scope link
valid_lft forever preferred_lft forever
***********************************************
​
See? The Underlined part is missing;
Without IP , I can't use the SW4STM32 to do the step “ Debug As > ST's STM32 MPU C/C++ Application�?
​
Does anyone have a solution to this problem? Thanks.
​
Solved! Go to Solution.
‎2019-09-12 01:11 AM
If your PC does not run a DHCP server, you could set manually the IP address using :
Board $> ifconfig eth0 uuu.***.yyy.zzz
(IP address should be set in an accessible range according to your PC IP and mask settings)
See also https://wiki.st.com/stm32mpu/wiki/How_to_configure_ethernet_interface
‎2019-09-12 12:47 AM
MAC address is defined in OTP and in your case it is 00:80:e1:42:5d:ce you see (it is programmed during board manufacturing)
IP address is defined by your network DHCP. Is your board connected to a network with a RJ45 cable ?
‎2019-09-12 01:01 AM
Thank you for your prompt reply !
My board is connected directly to my PC with a RJ45 cable, and the LED LD3 is blinking to indicate the data transmission. But IP is still unknown.:face_with_tears_of_joy:
‎2019-09-12 01:11 AM
If your PC does not run a DHCP server, you could set manually the IP address using :
Board $> ifconfig eth0 uuu.***.yyy.zzz
(IP address should be set in an accessible range according to your PC IP and mask settings)
See also https://wiki.st.com/stm32mpu/wiki/How_to_configure_ethernet_interface
‎2019-09-12 01:52 AM
The command works!
Thank you very much.:D