Direct Network Cable Configuration
The versions of the Luckfox Pico series that include an Ethernet port are LuckFox Pico Plus, LuckFox Pico Pro/Max, and LuckFox Pico Ultra/Ultra W. Typically, to log in using the Ethernet port's dynamic IP address, one end of the network cable needs to be connected to the development board and the other end to a router or switch. This allows the development board to obtain an IP address via udhcpc
. For setting a static IP address for the wired network, refer to the "System Configuration" section. However, in many cases, connecting to a switch or router is not convenient, and users wish to communicate with the development board through a computer. This tutorial will teach you how to share the network from a computer to the development board (buildroot system).
1. Offline Communication
In this case, only ensure that the development board and the computer are in the same local area network (LAN) to communicate with each other, but they cannot access the internet or external networks.
1.1 Development Board Setup
Set the
IP
address, subnet mask, and gateway for theeth0
interface of the development board.ifconfig eth0 192.168.10.200 netmask 255.255.252.0
route add default gw 192.168.11.1
echo "nameserver 114.114.114.114" > /etc/resolv.conf- Note: The settings in step one will be lost after reboot. If there is no need for internet connection and you do not want to set it manually every time, you can create a startup script. (For information on the startup script format, refer to the system settings section.)
Enter the system script directory and increase the priority of the built-in system scripts.
cd /etc/init.d
mv S99usb0config S90usb0config
mv S99_auto_reboot S90_auto_rebootCreate a script:
vi S99eth0_staticip
#!/bin/sh
case $1 in
start)
ifconfig eth0 192.168.10.200 netmask 255.255.252.0
route add default gw 192.168.11.1
echo "nameserver 114.114.114.114" > /etc/resolv.conf
;;
stop)
;;
*)
exit 1
;;
esacFinal result:
1.2 Computer Setup
For testing convenience, we use a USB
to Gigabit Ethernet adapter. Find the Ethernet device connected via the network cable, which might be labeled with "Realtek USB GbE Family Controller". Configure according to your actual Ethernet device.
Windows 11
- Set Network & Internet -> Advanced network settings -> Find the Ethernet adapter and edit it.
- Enter Internet Protocol Version 4 settings.
- Configure IPV4.
- Make sure to confirm the configuration.
Windows 10
Find Network & Internet, right-click Properties. The IPV4 configuration steps are the same as described for Windows 11.
1.3 Testing
Use ping
and ssh
for testing:
2. Online Communication
Ethernet bridging allows a network-connected device to share its network with a device that does not have a network connection.
Open the network adapter options and select the Ethernet adapters you want to bridge.
WLAN2
: Indicates the computer is connected to WiFi.- Ethernet 5: Indicates the development board is connected to the computer's network via a USB to Gigabit Ethernet adapter.
After setting up, Ethernet 5 will be assigned a static IP of
192.168.137.1
by default. Note: This IP cannot be manually modified, and DNS needs to be set.Power on the development board, log in via SSH, and test the network.