-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add USB Ethernet Gadget toggle #933
base: qml
Are you sure you want to change the base?
Conversation
Signed-off-by: paulober <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - a handful of cleanup tasks, but otherwise a great addition
IIRC this USB Ethernet Gadget mode only works for those Pis where there's not a USB Hub chip in between the SoC and the USB port (e.g. it will work on Pi Zero or Pi 3A+, but won't work on Pi 2B or Pi 3B+). And given that RPi Imager now asks the user which Pi they're going to be running on, I guess we could make this option conditional on that? 🤔 (or at least make it not-selectable on those Pis where we know it definitely won't work?) |
Yes, the sensible gate is probably to exclude the Pi 3 series entirely rather than introduce the distinction between 3A+ and 3B+. So, make it work on Pi Zero, 4, 5 |
Ok, I will implement that.
|
Signed-off-by: paulober <[email protected]>
…on and help arguments Signed-off-by: paulober <[email protected]>
Shouldn't features like this come after cloud-init support? Why is it enabling a different network configuration service when NM is used for all other interfaces? rpi-imager implementing things that should happen on the OS side instead has only caused headaches in the past. |
This is a pretty straightforward win that can tide people over until the cloud-init work is completed on the OS (something else @paulober might want to look at). An earlier version did use a NetworkManager configuration file - @paulober, is there any reason that hasn't made it into this PR? |
I have tried creating a NM config file but didn't work so I defaulted back to my systemd-networkd config since it's still on all Rbpi OSs and I haven't found any good resource to get the NM config up and running without wasting to much time. (my approach can be found in the DEB package repo) |
The current setup has one drawback: On the RPi zero if this config is applied the USB port can only be used of this ether gadget and not for HID devices like keyboard and mouse. This would require the manual config approach with |
If people are making custom HID devices, perhaps they're more likely to be doing that with Raspberry Pi Pico (microcontroller) rather than Raspberry Pi Zero (computer)? 🤷♂️ |
I'm not sure what you mean by this? The HID functionality is also need so that normal keyboards and mice work with that port so after enabling this feature they won't be able to connect any of those devices any more until they uninstall the package. |
Signed-off-by: paulober <[email protected]>
Ahhh, I misunderstood what you were saying - I thought you meant that you wanted to simultaneously enable both USB Ethernet and HID gadget modes, so that the you could SSH from your laptop to your Pi Zero, whilst also allowing the Pi Zero to act as a virtual keyboard input-device to your laptop. But you're actually saying that if you enable this Ethernet gadget mode (which puts the USB OTG port into device mode), then you can't then later connect a real USB keyboard (which would require the USB OTG port to be in host mode). Isn't that expected behaviour? 🤔 |
@XECDesign
is ment? Would you suggest writing a new kernel USB gadget, adding an option to |
I guess you're right. That sure be the reason why the Sorry for the confusion. I guess this is something that needs to be noted somewhere like in the UI and the DEB pkg description + README? |
…d OSes + fix minor QML bug Signed-off-by: paulober <[email protected]>
da8ed5f
to
2c0da0d
Compare
I assume the |
When image customisation was added, it was just the firstrun.sh script doing all the work. This caused problems because it made a ton of assumptions about the OS. When we moved away from dhcpcd, for example, the wifi config option broke. So I added I have previously proposed that the json file could have a field matching imager_custom version to determine what customisations the image supports. However, since firstrun.sh was just temporary and we should be using cloud-init to do all of this anyway, it was deemed necessary. But since this isn't a feature I'm comfortable adding to Raspberry Pi OS as-is, it's probably better for rpi-imager to handle it itself in this case. |
@paulober Something that occurred to me this morning (following on from the earlier HID discussion) - maybe there should also be some shell scripts on the Pi that you can use to easily "enable / disable" this USB Ethernet functionality, so that if you're using USB Ethernet gadget on a Zero and you later want to use a real USB keyboard with the same Zero, you could connect to the Zero over SSH over the USB-ethernet, run the "disable usb ethernet" script, and then the next time you boot up the Zero it'll be running in "normal" mode (so you could directly-connect keyboard/mouse/monitor). And if you then later wanted to switch it back into USB Ethernet gadget mode, you could run the "enable usb ethernet" script? |
@lurch Sounds like a good addition. I'll add a script to toggle and get the status. |
…t controll script Signed-off-by: paulober <[email protected]>
The script i just added is not completely ready yet. |
Signed-off-by: paulober <[email protected]>
Signed-off-by: paulober <[email protected]>
Signed-off-by: paulober <[email protected]>
Signed-off-by: paulober <[email protected]>
How about replacing |
No description provided.