ethernet-less RPi0 - package installation? - Page 1
Forum section: electronics / general

author: ChristofferB
author_rank: Frequent Contributor
timestamp: December 15, 2019, 04:43:15 pm
content: Okay so this may just be me who suck at UNIX based systems but I simply can't figure this out.Problem: I just want to add the Minicom serial emulator on raspbian lite to use the pi zero as a serial terminal!On an internet connected debian/raspbian system this is like, litteraly a 5 second operation, however:-I can't fetch the packages automatically since it doesn't have wifi-I CAN find the .deb files of both minicom and dependencies (2 files total) for raspbian online manually.-I can't for the life of me figure out how to get these files onto the 'pi.>opening the boot SD in explorer (win10) and drag/dropping them in, I can't find them>making a new partition on the boot SD and putting the files there (drag/drop) yields a Rpi that won't boot.There must be a smart, simple way of doing this, because if not, isn't the Pi0 pretty much useless?It goes against my principles to get a wifi dongle just for this one move.Oh, and I only have 1 USB port, used up by my keyboard.Does anybody have the glorious insight i need?Thanks in advance!

author: Ian.M
author_rank: Super Contributor
timestamp: December 15, 2019, 05:43:02 pm
content: Configure your Pi Zero as a RNDIS device (Ethernet Gadget), so it can network to a host PC:https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/ethernet-gadgetand set up to control it from the PC - PUTTY is good if you want command line access via SSH, or install a PC VNC client if you need full GUI access. If you want to run completely headless (no screen) you may wish to set the resolution for VNC with:Code:framebuffer_width=1024framebuffer_height=768in the Pi's config.txt, as the default is fairly low - IIRC it drops back to PAL video resolutiin.On the host PC, you can then bridge the Pi RNDIS adapter with whatever adapter provides your network (and internet connectivity) and the Pi will appear on your LAN as if it was directly connected to your wired/wireless network, andsudo apt<whatever> will then be able to do the job.N.B. Vbus on the Pi Zero's power only port and its USB port are directly connected, so *DON'T* under any circumstances attempt to use an external PSU on the Zero while its connected as a USB device. If you do and forget and switch off your PC, there's a high risk of blowing some of your motherboard's USB ports.If the USB A to micro USB B cable required to tether a Pi in gadget mode is crappy the Pi may not get enough power and may fail to boot or brown out. Use a shorter better cable! Its possible to use a second cable from the same PC to the Zero's power port to reduce voltage drop, but you need to plug them in as near simultaneously as you can so it starts gadget mode cleanly.

author: ChristofferB
author_rank: Frequent Contributor
timestamp: December 15, 2019, 07:43:37 pm
content: Thanks for the quick response!Ok that might take a while to digest, I haven't worked a huge amount with the 'network' layers of abstraction.Could one 'cheat', and run raspbian on an emulator on the PC, then install the packages and transfer the image file to the real Rpi0 ?--Chris

author: Ian.M
author_rank: Super Contributor
timestamp: December 15, 2019, 08:05:23 pm
content: Possibly, but emulation, then writing the image file back out to a Pi bootable SD card is a deeper rabbit hole than networking the Pi to the PC with a simple USB cable following the tutorial I linked. Also, once you've got USB RNDIS working, there are all sorts of other benefits - e.g. you can set up a SAMBA share on the Pi and access it as a network drive from windows, and a headless RNDIS tethered Pi is a great setup for breadboarding with Pi GPIO.By the way, the same technique works on all models of Pi that don't have an onboard USB hub i.e. any Pi A or compute module.N.B. Depending on your router, you may well not need Bonjour on the PC if you bridge the adapters to make the Pi visible on the LAN.

author: ChristofferB
author_rank: Frequent Contributor
timestamp: December 16, 2019, 09:24:25 pm
content: You're right, that IS the handier solution!Works a charm now.Thanks!--Chris

author: bingo600
author_rank: Super Contributor
timestamp: December 18, 2019, 06:43:15 pm
content: I got a couple of these cheap USB ethernet adaptersNot sure if this one is the exact one i got , but they work fine on a RPIZW that needed a cable connectionhttps://www.ebay.com/itm/Micro-USB-2-0-to-100Mb-Ethernet-10-100-RJ45-Network-LAN-Adapter-Card-New-CA/291855491353/Bingo

author: guenthert
author_rank: Frequent Contributor
timestamp: December 22, 2019, 06:00:49 pm
content: Uh, sneakernet? I.e. download the needed package (here minicom) to an USB flash drive with whatever computer you're reading this and then carry it over to your raspberry Pi0. Since you want to use the Pi0 as terminal, I presume you have keyboard and monitor hooked up to it and can interact with it. Ah, the Pi0 (I got one somewhere, but never got around to try it ;-} has only a single USB port, which might be occupied by your keyboard ;-)Do you have a spare USB hub you could use for that?

author: technix
author_rank: Super Contributor
timestamp: January 20, 2020, 07:57:51 pm
content: 1. Make use of the fact that Raspberry Pi B+ and Zer are sufficiently similar, so prepare the SD card on a B+ and then move over.2. Make use of the GPIO pins: put an ENC28J60 on the SPI bus, which gives you one wired Ethernet interface at a few megabits per second.3. Use a USB Ethernet or USB wireless adapter if you are not otherwise using the USB for something.4. Make use of the GPIO pins again: for Zero (not Zero W which has onboard wireless) the second SDIO interface is available over GPIO pins, so you can add some SDIO Wi-Fi adapter (like AP6212A module, which happens to use the same BCM43438 chip inside as Zero W.)5. Make use of the USB OTG port on the Zero by running it as an Ethernet gadget, which allow you to "Internet share" it from your PC.6. Make use of the GPIO pins still, turn the serial port into a PPP or SLIP target so you can "Internet share" from your PC.