[USB-ETH] How to transfer files if you have unstable wifi

macos
windows
howto
wifi
usb

#1

Many of you have probably experienced that the wifi signal is weak specially if you have the router behind walls (compared to other devices, like smartphones).

That in some cases makes it a pain to transfer files or download the from the internet. If you get random disconnects you could try this

Hal posted how to set up the USB Ethernet here and it´s a great solution to the wifi problem, after you follow the steps you can ssh to the clockwork pi from the usb eth and also share your computer internet.

The download speed is also better than wifi: image

How to get it working?

First step is to turn off your clockwork pi and remove the SD to connect it to your pc with a card reader, so we can update the kernel, the kernel is located in the first partition that pops up when you plug it on your pc and its called uImage I suggest to back up this file to your computer just in case.

Next we download the updated kernel from: https://github.com/clockworkpi/Kernel/raw/master/uImage and replace the old one.

After this, put your cpi back and turn it on and connect it to the wifi for ssh access for the next step.

Setting up USB ETH on the ClockworkPi

For this part we will follow this steps https://github.com/clockworkpi/USB-Ethernet/blob/master/README.md

  1. install isc-dhcp-server
  2. Edit file “isc-dhcp-server”
  3. Edit file “dhcpd.conf”
  4. Edit file “interfaces”

Setting up Windows driver

After you had updated your kernel and booted the system, when you connect the cpi to your computer via usb cable you should see this on the device manager:
image

USB Serial Device (COMX)

Next we will have to download the windows drivers from here. The zip contains 2 files: image we should unzip them somewhere.

Last step: Installing Windows driver

Right click the serial device on the device manager and then click update driver:
image

Select “Install drivers manually”

image

Then we should select directory of the drivers we just unzipped and click next:

image

It should show this when it finishes:
image

And congratulations by now, if you have it plugged you PC will recognize the USB as a ethernet device:
image

Now we can SSH and SCP with the IP we set 192.168.10.1

For example using PuTTY:
image

EDIT: July 29, 2018

Installing drivers on Mac OS

Thanks to @lasvegas for providing the instructions on how to install the drivers on Mac OS

Sorry for spanish screenshots, if someone has english ui and want to take some screenshots I will update them.

Hope it helps! :man_mechanic:


Connect directly to GameShell (without router)
[Solved] Update 1.21 fixed WiFi connect, but
How to setup CPI USB Ethernet
Wi-Fi (wireless) issues
Reformatting help?
Wi-Fi (wireless) issues
Connect directly to GameShell (without router)
[SOLVED] GS seems to fail booting
Connect directly to GameShell (without router)
Can't ssh to GameShell
#2

sudo iw wlan0 set power_save off

Also you said to turn off the “WIF power saving mode” that is a very clever way. Thank you!


#3

Yes but as I said here its not persistent, when you power off and power on the system the WIFI power saving its back to ON

I´ve tried to make a cron with a script to set that on boot but didn´t work, any suggestion on how to make it permanent?

This is what ive tried so far:

crontab -e

@reboot /path/to_script/wifiScript.sh


#4

OK, we will integrate this feature into “power options”.


#5

Nice! Looking forward to it.


#6

Thank you for the Tutorial! Works a charm. I’m using a Mac so the Computer setup is a bit different…

All that’s needed is the HoRNDIS driver from: https://joshuawise.com/horndis
Once the GameShell connects with the USB cable, go to System Preferences -> Sharing and enable Internet Sharing to RNDIS.

LasVegas


#7

Wow that was fast, glat it would work.

I will add your tips to the main post.


#8

I would like to reconfigure this to receive dhcp or setup a static configuration if the host computer is supplying a bridge network. My computer creates a bridge at 192.168.2.1, so the static address of 192.168.10.1 is unavailable for connecting.

LasVegas


#9

Edit file “interfaces”

/etc/network/interfaces

Add this:

allow-hotplug usb0
auto usb0
iface usb0 inet static
address 192.168.2.1
netmask 255.255.255.0


Understanding Clockwork OS v0.2 (Unoffical Change-log)
#10

Perhaps 192.168.2.2? Since that address is being used by the Bridge…

Las Vegas


#11

Yeah I forgot about that


pinned #12

#13

Is there a way to inform all apps that use the network that the USB Ethernet is available. I’m unable to access RetroArch cores or even check for Launcher updates without Wifi connected.

LasVegas


#14

Perhaps a way to incorporate USB-ETH into the dbus environment so that it’s managed using dhcp from the router and is recognized as a legitimate connection by the rest of ClockworkOS?


#15

If you have configured the files the right way you should have internet on the whole system.
There is just a issue, in the launcher when checking for cores update its hardcoded to check for wifi even if you have other source of internet.


#16

I’ve figured out how to setup dhcp client for USB-ETH. This sets up the Gameshell to use the shared network from the host computer or phone getting the dhcp address rather than serving it.

Install isc-dhcp-client

apt-get install isc-dhcp-client

Edit file "interfaces"

Open the file: /etc/network/interfaces

Add this:

allow-hotplug usb0
auto usb0
iface usb0 inet dhcp

Reboot

You still need to install the uImage file from Hal’s post above and the NDIS driver on the computer, but simply setting the computer to share its network connection through the NDIS will allow the Gameshell to connect automatically.

LasVegas


#17

DHCP client on the GameShell:
My host times out when it wants to lease a DHCP address to the GameShell, even though I installed the isc-dhcp-client on the GameShell with your config. :confused:

DHCP server on the GameShell:
When I follow these steps my host can SSH to the static 192.168.10.1 :smiley: but after logging in:

  1. The GameShell does not detect my host (i.e. 192.168.2.3). (i.e. the other way around)
  2. The host shows interface enp3s0f0u5 with 192.168.10.10 (or higher), although I can SSH to 192.168.10.1.

How can my GameShell get access to my host?


#18

When GameShell is setup with dhcp server, the GameShell is the host. The connected device then acts as a client.


#19

Thanks @lasvegas,

I see now I only have dhcpcd (client) installed on my host. I do not have dhcp (server) installed on my host.

I guess I need that first.


#20

By ‘host’, you’re referring to the computer the GS is connected to? If so, you simply need to install an RNDIS driver and use the hosts Network Sharing features with the USB port.