Power & Source of Big Ideas

M1 IP address, not setting one?

Moderators: chensy, FATechsupport

Hi
having an odd problem with my M1, it did work last time I tested it out, but today I came to use it, and hooked it up to my laptop before powering it up

After powering up, I went to a terminal to enter ifconfig so I could set up an SSH connection via Visual Studio, but the M1 does not seem to have an IP address, even though it powered up will connected to my PC

Any ideas why I can't get an IP address?
Brian Beuken wrote:
Hi
having an odd problem with my M1, it did work last time I tested it out, but today I came to use it, and hooked it up to my laptop before powering it up

After powering up, I went to a terminal to enter ifconfig so I could set up an SSH connection via Visual Studio, but the M1 does not seem to have an IP address, even though it powered up will connected to my PC

Any ideas why I can't get an IP address?


:) hello,
Could the M1 ping external network ? And you have to make sure that you can ping external network and the board can internet access .
And can you send me the start information?
Brian Beuken wrote:
Hi
having an odd problem with my M1, it did work last time I tested it out, but today I came to use it, and hooked it up to my laptop before powering it up

After powering up, I went to a terminal to enter ifconfig so I could set up an SSH connection via Visual Studio, but the M1 does not seem to have an IP address, even though it powered up will connected to my PC

Any ideas why I can't get an IP address?


:) hello,
Could the M1 ping external network ? And you have to make sure that you can ping external network and the board can internet access .
And can you send me the start information?
Hi, sorry but I have no idea how to provide start info, I'm not a linux user and find the OS confuising, I only boot it up to allow SSH access to the machine for my projects


But I did manage to get it to aquire its IP if I left for a few minutes or hooked it up to a shared router.
from friendlyarm wiki "" If the NanoPi M1 is connected to a network via Ethernet before it is powered on it will automatically obtain an IP (of course through dhcp) after it is powered up. If it is not connected via Ethernet or its DHCP is not activated obtaining an IP will fail and system will hang on for about 15 to 60 seconds ""

the debian image is configured to obtain an address from a dhcpd, in your case, a shared router.

if you need a static ip address, try;

# vi /etc/network/interfaces.d/eth0
auto eth0
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.254

then activate new settings;
# systemctl restart networking.service

or

# reboot

Who is online

In total there are 36 users online :: 0 registered, 0 hidden and 36 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 36 guests