Connection Failed : Activation of network connection failed. - Cant connect USB Ethernet adapter

Finding it incredibly difficult to get a new usb ethernet adapeter to work.

This is the actual adapter - USB 3.0 to RJ45 Gigabit Ethernet LAN Network Adapter Cable MAC10/100/1000MBPS UK | eBay

the network manager shows it forever stuck on Connecting - 1000Mbps

Every 2 mins or so the following notification comes up

Connection Failed : Activation of network connection failed.

Running cmd nmcli device status returns

ethernet disconnected

cmd dmesg to see if there was any errors, one line read

firmware: failed to load rtl_nic/rtl8153b-2.fw

I fixed this error by downloading rtl8153b-2.fw into /lib/firmware/rtl_nic/ and running sudo update-initramfs -u

cmd dmesg again, another error causing problems could be

xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

tried changing ethernet cables,

tried kernel parameter intel_iommu=off in grub and rebooting

tried cmd powertop going to tuneables tab, and setting all USB good to bad as this apparently stops auto-suspend.

After 7 hours of troubleshooting I cant get a working ethernet connection

any advice?

1 Like

Willing to pay BTC if somebody can help resolve this.

1 Like

Specify a bounty.

1 Like

I get that if the ethernet is correctly up but the host can’t get an IP address because the host is expecting to get an IP address via DHCP but there is no DHCP server. However it is not clear to me whether you are getting the ethernet to come up in the first place.

It is probably not worth your BTC. Spend the BTC buying such an adapter that “just works” out of the box.

I use a tplink UE305 (cost: not much - far less than 7 hours of your time) with my Librem 5 running PureOS and it just worked out-of-the-box. No messing with firmware. No messing with kernel parameters. No stuffing around. (I believe that this dongle may have been superseded by the UE306.)

See also: Suggestion for a Gigabit Ethernet Adapter

2 Likes

@FranklyFlawless make a suggestion, you know your own skill level and how long you expect to spend on it.

@irvinewade I think you are onto somthing with the DHCP, ive assigned a static ip with /etc/network/interfaces and it seems to have allowed the ethernet to finally “connect”

pinging the static ip also returns packets - not sure if its a loopback though.

2 Likes

I provide support on the Purism community forums gratis and have no interest in BTC.

3 Likes

You will need to ping the static IP address from another host on your local network. Alternatively, have this host ping another host on the local network. In either case, I would make sure that this host only has one network connection i.e. if the USB 3.0 to GbE connection is working, you want to verify that with no other ethernet, WiFi, mobile, … connections from this host.

If a host pings its own ethernet IP address then, for technical reasons I won’t bore you with, that won’t be a good test and it will use the loopback.

1 Like

@irvinewade

At the other end of the ethernet adapter, is a rasp pi, obscuring a loop reply or the pi reply.

I dont have any other hosts on the local network, I am plugging the usb-ethernet adapter into my pc, not my router.

I need to talk directly to the pi(as its possibly infected), dont want it on router.

trying to connect via ssh isnt working, its responding “timeout”, so it could be a completely false static connection.

when ive done this in windows i havnt had this problem.

if i installed a dhcp on my pureos pc, should it handle the usb-ethernet to pi ip automatically, and thus more likely be correct, unlike my static ip?

1 Like

No problem. So you just need to ping the Pi from this host or have the Pi ping this host, preferably both.

It is likely therefore that the Pi itself will need a static IP address (not DHCP). For a two host network, without a router, I would just stick with static IP addresses rather than trying to get a DHCP server working. When assigning static IP addresses for the two devices, they must be different from each other but in the same subnet e.g. 192.168.0.1 and 192.168.0.2

Try ping before trying SSH. I suspect that neither device enables an SSH server by default (so you would need to deal with that). However you would need to clarify in which direction you are attempting to ssh (i.e. Pi to host or host to Pi).

1 Like

@irvinewade

re connection direction - I only need host to pi via ssh

in my /boot/dietpi.txt config, ive modified the image defaults to

# Set to "1" to convert DHCP leased network settings into static settings automatically on first boot.
AUTO_SETUP_DHCP_TO_STATIC=1
# Enter your static network details below, if applicable.
AUTO_SETUP_NET_USESTATIC=1
AUTO_SETUP_NET_STATIC_IP=192.168.0.100
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.0.1
AUTO_SETUP_NET_STATIC_DNS=9.9.9.9 149.112.112.112
##### Software options #####
# SSH server choice: 0=none/custom | -1=Dropbear | -2=OpenSSH
AUTO_SETUP_SSH_SERVER_INDEX=0

# SSH server pubkey
# - Public key(s) for "root" and "dietpi" users, which will be added to ~/.ssh/authorized_keys
# - Use the same setting multiple times for adding multiple keys.
# - See SOFTWARE_DISABLE_SSH_PASSWORD_LOGINS below for disabling SSH password logins.
#AUTO_SETUP_SSH_PUBKEY=ssh-ed25519 AAAAAAAA111111111111BBBBBBBBBBBB222222222222cccccccccccc333333333333 mySSHkey

whilst on my host machine, changing /etc/network/interfaces to

iface eth0 inet static
 address 192.168.0.100
 netmask 255.255.255.0
 gateway 192.168.0.1
 dns-nameservers 192.168.0.1

also tried

iface eth0 inet static
 address 192.168.0.99
 netmask 255.255.255.0
 gateway 192.168.0.1
 dns-nameservers 192.168.0.1

also tried swapping nameservers on both configs above with

 dns-nameservers 9.9.9.9 149.112.112.112

still cant connect to ssh via PuTTy, returning connetion refused

When I completely remove the iface eth0 inet static block from my host pc, the ethernet adapter doesnt connect, it stays stuck on connecting and then shows failed to connect

a side note : Never use these shitty RTL8153 REALTEK chipset based ethernet adapters, they dont work out the box, and maybe causing problems here themselves.

1 Like

I can only really chip away at the edges of the problem but

That’s not going to work because you are giving both computers the same IP address. If the Pi is .100 then the other computer will need to be e.g. .99

Forget about nameservers. You aren’t going to be able to perform DNS lookups anyway on a 2-host airgapped network. Just set it to 192.168.0.1 on both computers and leave it at that.

The implication is that all communication that is initiated towards either computer should use the computer’s IP address.

That might actually be a positive sign.

ssh to an IP address that does not have a host with that IP address on the local network at all will give “no route to host”

whereas ssh to an IP address that does have a host with that IP address on the local network but no working SSH server (on the default port) will give “connection refused”.

I couldn’t really tell whether ping, in either direction, is or isn’t working. Can you clarify that?

I would guess that you have not successfully managed to start an SSH server on the Pi.

Do you have a monitor, keyboard and mouse attached to the Pi? If so, it should be straightforward to get SSH going from the GUI. On my (somewhat dated) version of Raspbian: Raspberry / Preferences / Raspberry Pi Configuration / Interfaces and then radio button “enable” for SSH. It will need a password for the default account (pi) in order to change the config but then you will want a password in order to ssh in anyway.

I’m not familiar with the way you are attempting to configure the SSH server but
AUTO_SETUP_SSH_SERVER_INDEX=0
looks suss. Why not -2?

1 Like

@irvinewade
thanks again for the continued help

you’re correct re ssh connection refused/no route to host.
unplugging pi from ethernet adapter changes the response to no route to host
replugging returns to refused

so is it possible the port 22 number could be wrong?

nmap -sV -p- 192.168.0.100 returns

Nmap scan report for 192.168.0.100
Host is up (0.00013s latency).
All 65535 scanned ports on 192.168.0.100 are closed

doesnt sound correct

I have tried changing over to a different OS image now on the memory card, had enough of dietpi.
the new image OS claims to have a DHCP server and ssh

1 Like

That wouldn’t be my first guess. I have a couple of Pi devices running here and they both default to port 22 for SSH.

I would say: your SSH just didn’t start, whether because it is not configured correctly or because it failed. You need to log in directly to the Pi and see what the situation is. You probably want something like

ss -lnt

1 Like