| *** n2klb_ is now known as n2klb | 01:48 | |
| sharks_ | I'm learning things about usb-moded / usb gadgets | 09:44 |
|---|---|---|
| sharks_ | if I run `ln -s /config/usb_gadget/g1/functions/rndis.usb0 /config/usb_gadget/g1/configs/b.1/rndis.usb0`, then `echo "" > /sys/kernel/config/usb_gadget/g1/UDC`, and `echo 4e00000.dwc3 > /sys/kernel/config/usb_gadget/g1/UDC`, I get a network interface to come up at usb0, and the computer sees it. | 09:44 |
| sharks_ | No dhcp though, and it seems like some firewall rule is blocking the computer from ssh-ing or ping-ing the phone | 09:44 |
| sharks_ | So, this all comes back to usb-moded not initialising properly? My bodgey script that I wrote to fix mtp is all well and good, but whatever was broken that meant I had to do that is also the thing that is broken and causing developer mode to not make the links and directories it is supposed to make on its own | 09:45 |
| sharks_ | and I can't just add the commands I ran to make developer mode work to my fixup script, because it brings up this ghost "developer mode" regardless of what mode is actually selected in SFOS settings. And as soon as you select some other mode, the `/config/usb_gadget/g1/configs/b.1/` directory is modified and `rndis.usb0 disappears, though the usb0 interface hangs around. | 09:48 |
| sharks_ | So I need to understand what is _supposed_ to make the `g1` directory and all its subdirectories and simlinks, and work out why it is failing? Has anyone got any ideas? | 09:49 |
| T42 | <elros34> usb-moded detect correctly usb connection? On regular build init-debug script create configfs dirs but on lvm not sure maybe you need init*usb*rc or usb-moded itself. Either way you should enable more verboslogging in usb-moded and maybe take a look how usb is handled in init*usb*rc | 10:00 |
| sharks_ | Hey Elros - see journal logs, I am fairly certain usb-moded knows when something is plugged in: https://paste.opensuse.org/pastes/7fc3b61ac65c, similarly from `journalctl -u usb-moded -b -f`, I see `/config/usb_gadget/g1/UDC: write failure: Invalid argument` and `mode setting failed, try charging_only` when in developer mode, but nothing in charging or mtp modes. | 10:16 |
| sharks_ | I am not sure how to follow what you mean about init*usb*rc, and I am also not sure how to enable more verbose logging! | 10:17 |
| sharks_ | contents of anything on device matching init*usb*rc --> https://paste.opensuse.org/pastes/60524bcf45c0 | 10:20 |
| T42 | <elros34> I dont remember how to increase verbosity but it shouldn't be hard find either usb_modded -h or in channel logs | 10:26 |
| T42 | <elros34> how do you know from that journal thhat usb-moded detects usb cable connectin correctly? | 10:28 |
| sharks_ | I know from `journalctl -u usb-moded -b` | 10:28 |
| T42 | <elros34> ok. Based on kernel log I think you should better start with testing developer mode instead mtp which might not work for other reasons | 10:30 |
| sharks_ | `usb-moded` is not in my $PATH, but I have `usb_moded_util`? Don't know what it's capable of, will investigate | 10:30 |
| T42 | <elros34> usb_moded | 10:31 |
| sharks_ | apologies, didn't realise I made that type | 10:31 |
| sharks_ | typo* | 10:31 |
| sharks_ | Haven't read it myself yet, but | 10:36 |
| sharks_ | USB_MODED_ARGS=-r /usr/sbin/usb_moded -D --systemd $USB_MODED_ARGS $USB_MODED_HW_ADAPTATION_ARGS --> https://paste.opensuse.org/pastes/8a305f513745 | 10:36 |
| sharks_ | So we're back to square one kind of, usb-moded is not making the rndis simlink | 10:40 |
| sharks_ | That's what I'm getting from that output anyway | 10:41 |
| sharks_ | Yep, I can replicate the issue! If I run `echo "" > /config/usb_gadget/g1/UDC`, `rm /config/usb_gadget/g1/configs/b.1/mass_storage.usb0/`, then `echo 4e00000.dwc3 > /config/usb_gadget/g1/UDC`, I get the same "bash: write error: Invalid argument" | 10:43 |
| sharks_ | So usb-moded does not run `ln -s /config/usb_gadget/g1/functions/rndis.usb0 /config/usb_gadget/g1/configs/b.1/rndis.usb0` before resetting the gadget | 10:44 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!