Walkthru of getting networking between PC using PiZero via USB
ALPHA Testers Only
Andrew Mulholland has written a blog to enable access to a PiZero via USB.
This is my précis of it that is purely designed to enable you to connect to your PiZero using just a USB lead from a Windows computer (7 or above) and be able to login to a terminal session on the Pi using USB Networking
A Windows machine connected to internet
Install Putty on Windows.
B/B+/2B Pi with keyboard/screen
Spare microSD card
Instructions for setting up USB networking on PiZero using original ethernet only method
- Download Jessie 21Nov15 and write image to a microSD card using win32diskimager.exe
- Download – https://dl.dropboxusercontent.com/u/1122948/temp/PiOTG-Test/PiZeroEthernet.tar.gz
- Copy the tar.gz file onto the SD card.
- Remove card from PC and place into B/B+/2B
- Do normal first boot stuff – login – sudo raspi-config and choose option 1, finish, reboot.
- Login again – Run sudo tar xvzfC /boot/PiZeroEthernet.tar.gz /tmp/
- Then run sudo cp -R /tmp/PiZeroEthernet/fat32/* /boot/ (to copy the kernel and device tree stuff)
- Then run sudo cp -R /tmp/PiZeroEthernet/ext4/lib/* /lib/ (to copy the kernel modules themselves)
- Next, you will need to manually assign a fixed IP to the Pi, you can do this by editing the cmdline.txt file (using
sudo nano /boot/cmdline.txt)
Add this onto the end of the long line
ip=169.254.64.64:::255.255.0.0Save it (Ctrl-X then y then Enter)
This will allow you to connect the Pi using the address
169.254.64.64from your computer.
- run sudo shutdown now and wait till green light stops flashing
- Remove card from big Pi and put in PiZero
Getting Networking running between PiZero and Windows machine
- Plug USB cable between PiZero (middle socket and PC) – the green light on the PiZero should flash once after about a second – your PC should beep like it does when you stick a device into a USB port.
Now, if you’ve not done anything like this before then a bit of configuring is needed on Windows machine.
- It will try and install a USB networking driver and may appear to succeed but best bet is to go into control panel -system -device manager and see if little yellow mark against USB ethernet in Network Adaptors. If so simply follow these instructions up to the setting ip address part https://github.com/ev3dev/ev3dev/wiki/Setting-Up-Windows-USB-Ethernet-Networking
- Then unplug/plug USB and then get into Network Adaptors and click on Change Adaptor Settings.
- If you’ve got an unidentified USB Ethernet network adaptor then you are good to go. If it says “identifying” – wait till it comes ready – can take a few minutes the first time
Actually connecting To PiZero over USB
This is where you use Putty to connect to a terminal window on the PiZero
- Run Putty
- Enter 169.254.64.64 as IP address and press Open
- Answer yes to dialog box and then you should see PiZero login
Please contact @cymplecy on twitter if it doesn’t work 🙂
Extra info – edit /boot/config.txt and add in
to sort out VNC screen size 🙂