TehEdge
Posts: 2
Joined: Sat Oct 13, 2018 8:19 pm

SSH dropout after Ethernet gadget ICS

Sat Oct 13, 2018 8:29 pm

Hi all,

Im having an issue getting my Pi zero connected to the internet via USB and Ethernet gadget. Im running stretch lite and i installed it using the directions here: https://learn.adafruit.com/turning-your ... net-gadget
I can SSH into the pi just fine following boot, but if i try to bridge the connection with my PC ethernet adapter SSH will disconnect and I cant reconnect until the the bridge connection is disabled.
Ive tried setting a static IP on the PI and configuring usb0 but that didnt have an impact.
Additionally, ive noticed that when i log in via ssh and view the usb0 connection im getting RX dropped packets every single time.

[email protected]:~ $ ifconfig usb0
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.215.71 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::aa4:dba4:adc5:a345 prefixlen 64 scopeid 0x20<link>
ether 92:9f:8f:a8:85:21 txqueuelen 1000 (Ethernet)
RX packets 1282 bytes 170932 (166.9 KiB)
RX errors 0 dropped 5 overruns 0 frame 0
TX packets 961 bytes 103424 (101.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0[/code][/code]

I have no idea what could be causing this, and i havent found any posts that have been helpful.
Can you guys help me figure this out?
Thanks in advance!

Ernst
Posts: 675
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: SSH dropout after Ethernet gadget ICS

Sun Oct 14, 2018 7:09 am

It would be helpful if you mention what operating system is installed on your PC.
Check your ICS configuration because you are not receiving a DHCP address from your PC, instead a local address 169.254.215.71 has been configured.
My first computer was an ICT1500, my first "personal" computer was the Science of Cambridge Mk14, followed by a TRS-80 Model I later

fruitoftheloom
Posts: 17450
Joined: Tue Mar 25, 2014 12:40 pm

Re: SSH dropout after Ethernet gadget ICS

Sun Oct 14, 2018 8:51 am

TehEdge wrote:
Sat Oct 13, 2018 8:29 pm
Hi all,

Im having an issue getting my Pi zero connected to the internet via USB and Ethernet gadget. Im running stretch lite and i installed it using the directions here: https://learn.adafruit.com/turning-your ... net-gadget
I can SSH into the pi just fine following boot, but if i try to bridge the connection with my PC ethernet adapter SSH will disconnect and I cant reconnect until the the bridge connection is disabled.
Ive tried setting a static IP on the PI and configuring usb0 but that didnt have an impact.
Additionally, ive noticed that when i log in via ssh and view the usb0 connection im getting RX dropped packets every single time.

[email protected]:~ $ ifconfig usb0
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.215.71 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::aa4:dba4:adc5:a345 prefixlen 64 scopeid 0x20<link>
ether 92:9f:8f:a8:85:21 txqueuelen 1000 (Ethernet)
RX packets 1282 bytes 170932 (166.9 KiB)
RX errors 0 dropped 5 overruns 0 frame 0
TX packets 961 bytes 103424 (101.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0[/code][/code]

I have no idea what could be causing this, and i havent found any posts that have been helpful.
Can you guys help me figure this out?
Thanks in advance!

The tutorial you are following is for Raspbian Jessie :?
Adieu

User avatar
HawaiianPi
Posts: 2764
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: SSH dropout after Ethernet gadget ICS

Sun Oct 14, 2018 7:39 pm

TehEdge wrote:
Sat Oct 13, 2018 8:29 pm
Hi all,

Im having an issue getting my Pi zero connected to the internet via USB and Ethernet gadget. Im running stretch lite and i installed it using the directions here: https://learn.adafruit.com/turning-your ... net-gadget
I can SSH into the pi just fine following boot, but if i try to bridge the connection with my PC ethernet adapter SSH will disconnect and I cant reconnect until the the bridge connection is disabled.
Are you bridging adapters or using ICS? The info you supplied is confusing (they're not the same thing).

Ive tried setting a static IP on the PI and configuring usb0 but that didnt have an impact.
The old guide you followed won't work to set a static IP in Stretch, since that is no longer done the same way.

I have a pre-configured 2018-06-27 Raspbian Stretch Lite image that will boot your Pi Zero in USB Gadget mode, if you'd like to try that.
https://drive.google.com/uc?export=down ... 0d34fWUmiQ

Although it sounds like your problem is the way you are trying to grant Internet access to your Pi0 Gadget. To enable Internet Connection Sharing in Windows you go to your network adapters (control panel), open the properties of the one you use for Internet access, select the sharing tab, check the Allow other network users to connect through this computer's Internet connection box, and choose your new Ethernet Gadget adapter.
Windows_10_ICS.jpg
Windows_10_ICS.jpg (77.76 KiB) Viewed 139 times
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

TehEdge
Posts: 2
Joined: Sat Oct 13, 2018 8:19 pm

Re: SSH dropout after Ethernet gadget ICS

Sun Oct 14, 2018 11:00 pm

Awesome! Thanks Hawaiian,
Yes, Im running windows 10. I was trying to bridge connections so that my Pi could use my PC wifi while my Ethernet would be dedicated for the PC. Your suggestion worked perfectly.
Anyway i now have internet on my pi! Thanks!

User avatar
HawaiianPi
Posts: 2764
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: SSH dropout after Ethernet gadget ICS

Mon Oct 15, 2018 12:17 am

Your welcome.

You may find that after a reboot you have to disable and re-enable ICS to get the Pi0 gadget connected again. That happens because the Pi0 is not a true USB Ethernet adapter and does not have a fixed MAC address. I used to have that problem with earlier versions of Raspbian and Win10, but I haven't seen it lately. Not sure if that's because the issue has been fixed, or something else is going on with my system.

If you run into that, let us know (there are options to assign a fixed MAC address to your Pi0 Gadget).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Return to “Troubleshooting”

Who is online

Users browsing this forum: drgeoff and 47 guests