Re: Conceptual USB doc?
Mouse <[email protected]> Sun, 8 Mar 2026 12:27:58 -0400 (EDT)
| Newsgroups | gmane.os.netbsd.devel.kernel |
|---|---|
| Message-ID | <[email protected]> |
> You are wanting to talk to a "USB device". You need specs about what > the device does. Until then, it's sort of like "I have this device > that you talk to via ethernet". That much I did know. I didn't go into details here because it's only tangentially relevant; I'd rather *understand* it, with making it work following naturally from that, rather than just making it work by invoking ununderstood magic. > ugen is a kernel driver for doing reads/writes to endpoints from user > space. For many odd devices that attach via USB, that's useful. That might be suitable. The device is a Teracube 2e, an open smartphone (supposedly open, at least; I haven't gotten close enough to it to know just how open it actually is - on the maker's webpages I did not manage to find pointers to anything useful for building my own software for it, only the digital version of end-user-targeted four-colour glossies). The software that's on it at present is of negative value to me - it appears to be a variant of Android which, among other things refuses to complete its initial setup without making me agree to a ToS even though I told it to disable all the things which might be a basis for needing that ToS. I did manage to find the nerve pinch to get it to drop into ROM code on powerup. But the bootloader just says "connect to host and run fastboot", with a webpage pointer which indicates that fastboot is a fragment of an Android dev environment, and I want to have as little to do with Android as I can manage here. I did find a _little_ doc on the protocol fastboot speaks over USB, but it assumes knowledge of concepts I don't have, saying things like Basic Requirements</h2><ul><li><p>USB</p><ul><li>Two bulk endpoints (in, out) are required</li><li>Max packet size must be 64 bytes for full-speed, 512 bytes for high-speed and 1024 bytes for Super Speed USB.</li><li>The protocol is entirely host-driven and synchronous [...]. Setting up "two bulk endpoints", even with the help of something like libusb atop ugen, requires knowing enough about what that means to find and make the appropriate calls. (If I can even find a libusb that works on the host I want to use; there is usually some level of bludgeoning required to make others' software work on my machines.) Also, I've found that, even when working at higher levels, knowledge of the lower levels always becomes important eventually. Hence my asking for documentation instead of just "how do I do this?". /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML [email protected] / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B