TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ROBH
from: MM0FMF
date: 2018-05-05 19:11:00
subject: Re: Wrong IP address on P

On 05/05/2018 17:58, RobH wrote:
> On 05/05/18 16:13, mm0fmf wrote:
>> On 05/05/2018 15:56, mm0fmf wrote:
>>> On 05/05/2018 15:47, RobH wrote:
>>>> I have finished setting up a pi zero w for a project, and now need to
>>>> access it by ssh.
>>>> I couldn't and after connecting a monitor and keyboard, doing
>>>> 'ifconfig'
>>>>   returns eth0:
>>>> inet 169.254.156.44  netmask 255.255.0.0 broadcast 169.254.255.255.
>>>>
>>>> Is there is anywhere the IP address can be changed to 192.168.0.any
>>>> other IP number.
>>>>
>>>> I have rebooted my router and the Pi Zero several times, but no change.
>>>
>>> You have much bigger problems if your IP starts 169.254.x.x.
>>>
>>> Is your Pi meant to connect to a Wifi router and be allocated an IP
>>> address by DHCP? Because it isn't happening.
>>>
>>> Perhaps you can detail how your Pi will be using the Wifi connection in
>>> your project and people can then give you the relevant help to configure
>>> it.
>>>
>>> Also, Google link-local IPV3 address or ev169.254en just 169.254 to
>>> read more
>>> about why you have this IP address.
>>>
>>>
>> If only I could type or proof-read... link-local IPV4 address.
>
> Sorry, I should have been more clearer. The Pi Zero w is connected by a
> ethernet cable via a usb / ethernet adapter.
>

Yes you should have. :-) You still haven't said if you expect the Pi to
get its IP address by DHCP or not. Let's assume you do.

> I have power cycled the router as well shutting the Pi Zero down and
> starting again as it were, but the problem still remains.
>

OK, well that's the same setup I have on a PiW here. USB Ethernet
adaptor and the Wifi acts as an access point.

I'm running Debian 8.0 and kernel "Linux rpiw 4.9.35+ #1014 Fri Jun 30
14:34:49 BST 2017 armv6l GNU/Linux" on mine. It worked with 2 USB
Ethernet adapters out of the box, no need to add drivers or anything.

As you can access the Pi, check the dmesg log that that the USB adapter
was found.  My log shows:

[    1.358884] usb 1-1: new full-speed USB device number 2 using dwc_otg
[    1.590598] usb 1-1: New USB device found, idVendor=0fe6, idProduct=9700
[    1.590623] usb 1-1: New USB device strings: Mfr=0, Product=2,
SerialNumber=0
[    1.590635] usb 1-1: Product: USB 2.0 10/100M Ethernet Adaptor
[    8.603245] dm9601 1-1:1.0 eth0: register 'dm9601' at
usb-20980000.usb-1, Davicom DM96xx USB 10/100 Ethernet, xx:xx:.....

A bit later in the log the ethernet connects:

[   17.828327] dm9601 1-1:1.0 eth0: link up, 100Mbps, full-duplex, lpa
0xFFFF
[   17.916560] dm9601 1-1:1.0 eth0: kevent 4 may have been dropped
[   17.945909] dm9601 1-1:1.0 eth0: link up, 100Mbps, full-duplex, lpa
0xFFFF
[   18.041115] dm9601 1-1:1.0 eth0: link up, 100Mbps, full-duplex, lpa
0xFFFF

I had to do nothing else as my /etc/network/interfaces already contained:

allow-hotplug eth0
iface eth0 inet dhcp

So check the log that the USB adapter is found and initialised. If it is
then you should check the Ethernet cable and the router is setup to
perform DHCP.

There is normally a big giveaway with these USB Ethernet devices, they
have LEDS that come on when the device gets enumerated. I have several,
the good ones have activity LEDS and link status LEDS (full / half
duplex / 10 / 100). This DM9601 is a dog of device as some UARTs are
faster than it is. It has a single LED that lights when enumerated and
the driver loads. The LED flashes on any activity.

Maybe you should say now whether you have tinkered with any of the
network files?

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.