Temp post PiZero Win USB netowrking

SUPERCEDED BY

Walkthru of getting networking between PC using PiZero via USB

 

copy of 2 emails sent to Andrew @gbaman1

Ok – re IP
easiest way to get static on Pi is to just add it at end of /boot/cmdline.txt
e.g.
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait ip=169.254.64.64:::255.255.0.0
(note subnet mask is 255.255.0.0)
by giving it an ip in 169.254.x.y range then it’ll automatically be available from PC as PC Usb port will default to a 169.254.x.y address as no DHCP will be found – its technique I use for connecting Pi via ethernet to school laptops 🙂
Disadvantage is that Pi can’t see T’internet but for normal ScratchGPIO use – not an issue.
BUT if we want T,internet access from Pi then enable sharing on main PC network connectioin via Network Sharing
PC  will then setup the USB with an IP – on my Win10 it gives me 192.168.137.1 (but don’t know if that is standard or random)
PC then runs DHCP server automagically on USB
PiZero gets an IP address (different one every boot unfortunately) – I use IP scanner to find out its IP but also it gets allocated raspberrypi.mshome.net name
🙂
Everything is working over USB as if I was on WiFi – I installed X11VNC and Samba and it works swimmingly
(VNC screen very small – I notice /boot/config.txt missing a lot of stuff so I don’t know if I can alter frame sizes to make screen bigger at moment – will try later)
2nd msg

Just changed cmdline..txt to

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait ip=192.168.137.2:::255.255.255.0
so that it uses same 192.168.137/24 range ip each time

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *