Adding ethernet libcomposite gadgets to bluetooth_2_usb #122
xia0
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i needed to add an ethernet gadget to the raspberry pi so i could ssh into it without wifi but couldn't really find much documentation. not sure if it's the right way to do it as it doesn't use circuit python but here is my script. i have it set to run from /etc/rc.local. it needs to run in the background (add ampersand to end of command). it seems to be running fine on debian bookworm.
dnsmasq needs to be configured using the information on https://jon.sprig.gs/blog/post/2243 up to the bit where ip addresses are manually assigned. that's handled by the couple lines at the end of the script.
the script adds the configuration for the ethernet gadget before bluetooth_2_usb runs. it assigns 192.0.2.1 to the raspberry pi and uses dnsmasq to assign an ip to the host.
todo: replace ifconfig commands with ip
i used examples from the following sources:
https://jon.sprig.gs/blog/post/2243
https://forums.raspberrypi.com/viewtopic.php?t=306121
Beta Was this translation helpful? Give feedback.
All reactions