Products > Embedded Computing

ethernet-less RPi0 - package installation?

(1/2) > >>

ChristofferB:
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!

Ian.M:
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-gadget
and 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=1024
framebuffer_height=768
--- End code ---
in 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, and sudo 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.

ChristofferB:
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

Ian.M:
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.

ChristofferB:
You're right, that IS the handier solution!

Works a charm now.

Thanks!

--Chris

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version