Ethernet
Pigeon computers are equipped with a single Ethernet interface operating at 10/100 Mbps. The connection status is visually indicated by two LEDs integrated into the connector. Each Pigeon is assigned a unique 48-bit MAC address, which is stored in EEPROM memory.
By default, the system configuration for Pigeon is set up to obtain an IP address automatically from the network via DHCP. This allows for seamless integration into various network environments without requiring manual IP configuration.
To check the status of the Ethernet interface on your Pigeon computer, you can use the following command:
ifconfig eth0
This command will provide detailed information about the Ethernet interface, including its current configuration, such as IP address, netmask, and network status.
ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:50:c2:b7:70:00
inet addr:192.168.1.14 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:c2ff:feb7:7000/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2080 errors:0 dropped:0 overruns:0 frame:0
TX packets:484 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:695976 (679.6 KiB) TX bytes:96478 (94.2 KiB)
GPIO6 is connected to RESET signal of Ethernet controller and USB hub (LAN9514 chip). The assertion time for the RESET input (low state) must be at least 1 μS.
LEDs
The LEDs incorporated into the Ethernet socket are as follows:
-
Green (LINK): This LED is illuminated when a valid link is detected. It also blinks to indicate transmit or receive activity.
- Yellow (SPEED): The SPEED LED is lit when the Ethernet operates at a speed of 100 Mbps or during auto-negotiation. It remains off during 10 Mbps operation or line isolation.
Static IP
A network configuration file is situated at /etc/network/interfaces. The default configuration for eth0, when DHCP is utilized for wired Ethernet, typically resembles the following:
iface eth0 inet manual
To manually configure a static IP address for the Ethernet interface, you'll need to edit the /etc/dhcpcd.conf file.
nano /etc/dhcpcd.conf
and add the following lines:
interface eth0
static ip_address=192.168.1.111/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8
If you've configured a static IP address, you'll also need to manually specify a DNS server. To do this, you can edit the /etc/resolv.conf file:
nano /etc/resolv.conf
and add the following line:
nameserver 192.168.1.1
Replace 192.168.1.1 with the IP address of your DNS server.
IPv6
If you don't want to use IPv6, you'll need to add the following line:
net.ipv6.conf.all.disable_ipv6 = 1
in /etc/sysctl.conf file.
SSH
The SSH server on Pigeon is enabled by default. If you wish to disable the SSH server, you can do so using raspi-config.
- run raspi-config,
- navigate to Advanced Options,
- navigate to SSH,
- select "Disable".
SSH root login is disabled by default. If you want to enable SSH login for the root user, you need to open the /etc/ssh/sshd_config file.
nano /etc/ssh/sshd_config
and change the following line:
PermitRootLogin without-password
to
PermitRootLogin yes
After making changes, you'll need to restart the SSH server.
/etc/init.d/ssh restart
nmap
If you want to connect via SSH but don't know the IP address (and the serial console is not accessible), you can use nmap to find the Pigeon's IP address. To install nmap on Mac OS or Windows, visit the nmap.org download page. Alternatively, on Linux, you can install it using the following command:
apt-get install nmap
nmap -sn 192.168.1.0/24
192.168.1.0/24 covers 192.168.1.0 to 192.168.1.255.
The Pigeon MAC address typically starts with "00:50:C2:B7".
ip-flash script
This script locates the first non-loopback IPv4 address and flashes it on the system LED (USER by default).
1 - 9 short flashes indicate the digits 1 - 9
10 short flashes indicate the digit 0
a long flash indicates an octet separator (dot)
a brief pause separates digits
The original version of the ip-flash script is available here.
If you want to run the script after boot:
wget https://raw.githubusercontent.com/kristech/pigeon-documentation/master/usage-guide/ethernet/ip-flash
chmod +x ip-flash
mv ip-flash /usr/bin/
nano /etc/rc.local
Add the following line before exit 0.
/usr/bin/ip-flash &