Tiny Core Base > Raspberry Pi
USB gadget kernel module with RPi zero
ladnar:
Ugh! Failure.
sudo poweroff. Count to five so the electrons can all find their homes. Slide the card out. Put it in the laptop. Un-dtoverlay=dwc2 the config.txt file.
Now, I did try the:
[RPI0]
dtoverlay=dwc2
version of that line; somebody else mentioned trying that . Maybe I will try it under the [ALL] heading instead? Or erase, or comment-out, the [RPI3] line?
I dunno? Otherwise, I have to dig through all the other modules, maybe try g_multi like johannkraus did? Or see what the other g_ether fella did to get it working?
I dunno? I guess I'll have to learn lsmod, modprobe, depmod, dmesg, and a hundred other things?
ladnar:
Tried commenting out [RPI3] AND commenting out line below it AND asserting the [RPI0] line AND asserting the proper line below it. No dice.
I think this is not the right direction (though I could try asserting [ALL] AND asserting the proper line below it ; deleting RPI0 line and commenting out RPI3 line).
No, I think I need some more fundamental understanding of what is going on here; how all the "moving parts" work together? RTFM? Yup.
ladnar:
OK, gbaman says:
"g_ether - Using virtual ethernet, you should simply be able to ssh into the address of your Raspberry Pi. To do this, there is a little extra configuration required though. There is a few ways we could set up the point to point networking. The proper way would be to set up a DHCP server on one of the ends. A far simpler way though is just to give the Raspberry Pi a fixed IP address. To do this, you will need to run echo -e "interface usb0 \nstatic ip_address=169.254.64.64" | sudo tee -a /etc/dhcpcd.conf. You can then access the Raspberry Pi Zero by connecting to 169.254.64.64, or by using raspberrypi.local if your computer has Bonjour installed (Mac and most Linux OSs including Raspbian). Note this method does not support adding a fixed address to the cmdline.txt file. For that, you have to use the Ethernet only kernel below."
This, I should try next. Static IP address.
Right after I make certain I know what lsmod and modprobe and depmod does. And install modules.dep? I wonder where to put this file?
OK, I just this second, fixed one issue. My modules.dep file, had mostly HID and net entries; very few or none, for "gadget". So definitely need to update/replace/save a new modules.dep file. Step 1 identified. Step 1 accomplished!
ladnar:
OK, even worse (better, now I know!). My modules.dep file was insufficient, because I did things wrong. I think I should take the WHOL:E FOLDER for 4.9.22-piCore from the picore scr, unzip it, and replace the WHOLE FOLDER on the picore-slave card. Then modules.dep will point to all the extra modules I could possibly want. (g_ether, g_serial, g_multi, etc.)
Last night, I just grabbed the few that I thought I would want/need. Apparently, I need "the whole structure"? I suppose if I was good with modprobe and depmod, commands, I could figure out a frugal way, but I am fairly certain the extra MB will not be onerous?
OK, maybe I'm smart enough to be frugal, but forgetful about persistence? Forgot to make my modules.dep "update" permanent last time. So I have reinstalled the 1000-2000 lines of modules.dep (vs. 100-200 from standard install, picore modules.dep). Around line 189, g_ether is described as having four dependencies; rndis, udc-core, libcomposite, and u_ether (not exact names; but you get the picture; .ko, object files, I guess?).
So I can probably be frugal if I just am certain to include these four files?
This is the point of depmod, right? to update the modules.dep file?
The "WHOLE FOLDER" (updated, scr, /lib/modules/4.9.22-piCore/) is 50 MB, which, for a normal picore install of 50 to 100 MB, is significant; nearly doubling the size of the operating system? But if that is the only way that I can get it to work, that is what I will do.
ladnar:
Boy I hate software. My USB books always spoke of Host vs. Device, and sometimes, master vs. slave, but all this "gadget" stuff seems REALLY imprecise? Maybe its just my poor old biologist-brain?
So I have the master-picore booted up, and it LACKS the g_ether modules. Is this OK? I assume the point of updating the slave-picore to have g_ether modules incorporated into its core, is to teach the slave, or "USB-Device", how to not be master, AKA how to not be "USB-host"? So, the master, the USB-host, doesn't need this lesson. It should be able to go on doing its "Host" thing.
There was an error when I booted the two boards up (simultaneously; I throw one big power switch. But I could leave the slave board "USB-info-wire" unplugged until they both get booted up? And THEN, try to plug slave/device to master/host? I will try this next.). The error said something about usb timeout?
I will boot again, with info-wire unplugged. If error messages go away, Hooray! If ifconfig reads a usb0 entry, Hooray! If not, then I will try again to provoke the error message by booting with everything hooked together. Then maybe a dmesg to find out what the error means? or further "internet-sleuthing"?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version