Comments (7)
I agree - it looked possible when I was doing the original port. I wasn't sure about power, but I guess it doesn't hurt to try.
from nerves_system_rpi4.
I imagine it should work on decently powerful laptops, blog post sure makes it look like it works. I'm guessing it can negotiate something more juicy than the ol' micro-USB gadgets could.
from nerves_system_rpi4.
I tried, as an experiment, to emulate a USB HID device (keyboard) on Nerves Rpi4 by following the indications in this post, originally written for the Zero on Raspbian and basically similar to the post linked above.
I loaded the dwc2
and libcomposite
modules, and had to manually mount ConfigFS with mount none /sys/kernel/config -t configfs
. Still, the problem is that ls /sys/class/udc
gives empty results, so something is clearly missing but I don't know what.
Any idea about what would be needed to get that to work?
I see other efforts to get ConfigFS to work on some Pi models, like nerves-project/nerves_system_rpi0#62
It would be really great to be able to use the Rpi4 USB-C in device mode.
from nerves_system_rpi4.
An update to this, I managed to fix this issue by adding the dwc2
device tree with a custom fwup.conf
like it's done here on the RPi Zero: https://github.com/nerves-project/nerves_system_rpi0/blob/master/fwup.conf#L229
Now the USB Device Controller is properly populated in /sys/class/udc
and the /dev/hidg0
device appears (and is recognized by my laptop, to which the RPi4 is connected via USB-C). The problem is that, when I try to write HID reports to /dev/hidg0
, the write operation hangs. Any idea?
I'd be very happy to share my proof-of-concept if I get it to work end to end.
from nerves_system_rpi4.
I figured it out, the HID report description was wrong. Now it works fine.
Here is a (hacky but working) proof of concept of the RPi4 on standard Nerves using the USB-C in gadget mode (emulating a USB Keyboard): https://github.com/lucaong/nerves_rpi4_hid_gadget_poc
Ideally one would use nerves/usb_gadget
instead of the custom shell script to create and setup the USB gadget.
from nerves_system_rpi4.
So this would make it pretty likely that we could do the ethernet gadget or whatever the pi0 does to provide SSH over the wire by default?
from nerves_system_rpi4.
That definitely sounds possible. In my experiments with using the USB-C port in gadget mode, plugging it to a laptop is enough to power the Pi.
from nerves_system_rpi4.
Related Issues (14)
- Archive size quadrupled from 1.15 to 1.16 release HOT 8
- Boot hangs. HOT 4
- Support VL805 firmware updates HOT 2
- USB Serial Device not being recognised/loaded HOT 1
- Nerves Hub connection fails after upgrading to 1.19.0 HOT 14
- [bug / v1.11.0] Erlang VM not started HOT 1
- Camera Support HOT 6
- Increasing uboot size HOT 4
- v1.12.2 still looks for fixup4.dat HOT 3
- rpi3 to rpi4 project upgrade failure HOT 4
- Enable Additional UART of Raspberry Pi 4B HOT 5
- Switch to 64-bit HOT 3
- Can't connect 5GHz WiFi when using 1.13.1 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nerves_system_rpi4.