AsteroidOS / meta-lenok-hybris

OpenEmbedded layer that provides libhybris support for the LG G Watch R. (Merged to: https://github.com/AsteroidOS/meta-smartwatch)
GNU General Public License v2.0
4 stars 3 forks source link

Make layer compatible with gatesgarth. #13

Closed jrtberlin closed 3 years ago

LittleFox94 commented 3 years ago

USB Ethernet DHCP server is not working, connected via adb shell to check whats going on

# systemctl list-units --failed
  UNIT                       LOAD   ACTIVE SUB    DESCRIPTION
* adbd-prepare.service       loaded failed failed functionfs setup for adbd
* systemd-remount-fs.service loaded failed failed Remount Root and Kernel Fil...
* udhcp-daemon.service       loaded failed failed udhcpcd DHCP server

Log of udhcp-daemon

# journalctl -u udhcp-daemon
-- Logs begin at Sat 2020-08-01 02:24:15 UTC, end at Tue 2021-01-19 23:25:41 UTC. --
Jan 18 21:51:54 lenok systemd[1]: Started udhcpcd DHCP server.
Jan 18 21:51:54 lenok udhcpd[468]: udhcpd: started, v1.32.0
Jan 18 21:51:54 lenok udhcpd[468]: udhcpd: is interface rndis0 up and configured?: Cannot assign requested address
Jan 18 21:51:54 lenok systemd[1]: udhcp-daemon.service: Main process exited, code=exited, status=1/FAILURE
Jan 18 21:51:54 lenok systemd[1]: udhcp-daemon.service: Failed with result 'exit-code'.

The interface rndis0 does not exist, but since I'm connected via adb this is probably expected ..

Probably unrelated other logs:

# journalctl -u adbd-prepare.service
-- Logs begin at Sat 2020-08-01 02:24:15 UTC, end at Tue 2021-01-19 23:28:01 UTC. --
Jan 19 23:22:33 lenok systemd[1]: Starting functionfs setup for adbd...
Jan 19 23:22:33 lenok systemd[1]: adbd-prepare.service: Failed with result 'protocol'.
Jan 19 23:22:33 lenok systemd[1]: Failed to start functionfs setup for adbd.
Jan 19 23:22:42 lenok systemd[1]: Starting functionfs setup for adbd...
Jan 19 23:22:42 lenok systemd[1]: adbd-prepare.service: Failed with result 'protocol'.
Jan 19 23:22:42 lenok systemd[1]: Failed to start functionfs setup for adbd.

# journalctl -u systemd-remount-fs.service
-- Logs begin at Sat 2020-08-01 02:24:15 UTC, end at Tue 2021-01-19 23:28:21 UTC. --
Aug 01 02:24:15 lenok systemd-remount-fs[224]: mount: /dev/pts: mount point not mounted or bad option.

Happy to help debugging more

MagneFire commented 3 years ago

@LittleFox94 Thanks for testing!

These logs are from a first boot of the new gatesgarth? If so, the default mode is developer mode. So rdnis0 should have been setup anyway.

I think the issue is somewhere in usb-moded. usb-moded should setup the rndis0 interface. The strange thing is that this bump to gatesgarth didn't change anything related to usb-moded.

Can you maybe check if usb-moded has errors?

Also, can you try something simple like re-plugging the usb cable, to see if that changes things. Or maybe go from developer mode to adb mode and back.

FlorentRevest commented 3 years ago

Does it really start happening with gatesgarth ? Could this be related to https://github.com/AsteroidOS/asteroid/issues/149 interestingly @BigB84 also has a lenok and similar symptoms. I suppose that the usb interface, for some reason, has a different name on lenok and we start udhcpd with a hard coded config that sets it up on the rndis0 interface.

Like MagneFire suggested, have a look at the usb-moded config, maybe you can change the rndsi interface setup in the "developer mode" scripts or maybe you could dump the available interfaces somewhere and then check it from adb

LittleFox94 commented 3 years ago

After start today*, I reconfigured it to Developer mode and it works. So maybe a first boot or a "disable and enable again" thing

*: which had some problems, maybe battery faulty, maybe panics due to long time on fastboot mode and then trying to boot? Worked after I selected "Power Off" in bootloader and it automatically started again. Also was very slow after start and the still selected ADB mode didn't work

dmesg is full with adb messages, so maybe that slowed everything down

jrtberlin commented 3 years ago

Thank you for looking into this. Just to clarify, the Developer Mode works as it should after a reboot but ADB is broken and spits out errors? The bad performance on start is probably related to a regression in rng-tools and unrelated to ADB.

LittleFox94 commented 3 years ago

After reboot I got a new IP via DHCP, so this works. But watch isn't reachable, seems to have no IP itself. Also still very slow, watch face loaded for two minutes or something (x 2 y 3 in watch face selection x) )?

LittleFox94 commented 3 years ago

Selecting "charge only" and then "developer mode" again helps to reach the watch after the first reboot.

Shall I try this with another first boot?

LittleFox94 commented 3 years ago

oh interestingly there are still adb errors in dmesg:

[  204.296708] read descriptors
[  204.296818] read strings
[  204.296918] start adbd only in ADB composition

over and over again, one such cycle per second