nisargjhaveri / WirelessAndroidAutoDongle

Use Wireless Android Auto with a car that supports only wired Android Auto using a Raspberry Pi.
MIT License
315 stars 41 forks source link

Dongle Mode Connection Loop #98

Open admiralspeedy opened 3 months ago

admiralspeedy commented 3 months ago

I switched to 0.4.0 this morning to try the new connection fixes with dongle mode and immediately had issues.

The very first connection took nearly a full minute before Android Auto started on my head unit, and then it would immediately freeze, time out and restart over and over. I had to unplug the dongle and plug it back in and now it appears to be working fine.

I was unable to get logs since I was driving but I suspect it has something to do with the connection process of dongle mode and the newly introduced timeouts because it seemed to be freezing and timing out on the same interval (probably 10 seconds).

Inrovero commented 3 months ago

Try changing your car or your phone, it works like a charm for me.

Maybe the problem is you, try it out !

th873 commented 3 months ago

I have the same problem after upgrading too :/

admiralspeedy commented 3 months ago

Try changing your car or your phone, it works like a charm for me.

Maybe the problem is you, try it out !

See, I'm here to actually assist with the development of this project. I answered your question on #97 properly and there is absolutely no reason to be salty with sarcastic comments like this.

Nobody here is going to spoon feed you instructions on how to actually set up your development and building environment.

Ioniq3 commented 3 months ago

Same problem, the first connection is normally ok, but after turn off the car and turn on 5 minutes after they enter into loop. I have some extra features, so some lines of the log are not the usual regarding img mount. messages.zip

I made this changes to get a second test, revert in 6e6a1da commit the 110 line : #

- disableGadget(accessoryGadgetName);

in aa_wireless_dongle/package/aawg/src/usb.cpp

and increase in 184 line:

    struct timeval tv = {
        .tv_sec = 10,
        .tv_usec = 0,
    };

to 30 sec to permit more idle time and reduce the loop in aa_wireless_dongle/package/aawg/src/proxyHandler.cpp

admiralspeedy commented 2 months ago

@Ioniq3 you jinxed me. I only had this issue the first time I set up dongle mode and it never did it again, but this morning when I was leaving for work shortly after you commented, I got in my car and it kept looping again until I unplugged it and plugged it back in.

I changed the title to reflect that it isn't just during first time setup.

NemesisXB commented 2 months ago

First time user. I have the same issue.

tiliarou commented 2 months ago

didn't fully test it but after upgrading, I had to associate the bluetooth again (I assume it's the normal behavior), then it started to work properly and loaded quite fast in my Renault (with R link 2). It seems to work properly. My use case is that I always try to unplug the usb since it seems my car always powers the usb port even when it's locked and I'm away from the car...

Ioniq3 commented 2 months ago

didn't fully test it but after upgrading, I had to associate the bluetooth again (I assume it's the normal behavior), then it started to work properly and loaded quite fast in my Renault (with R link 2). It seems to work properly. My use case is that I always try to unplug the usb since it seems my car always powers the usb port even when it's locked and I'm away from the car...

Yes, modern cars remain 10 , 15 minutes the power in the accesory line after close the car

tiliarou commented 2 months ago

didn't fully test it but after upgrading, I had to associate the bluetooth again (I assume it's the normal behavior), then it started to work properly and loaded quite fast in my Renault (with R link 2). It seems to work properly. My use case is that I always try to unplug the usb since it seems my car always powers the usb port even when it's locked and I'm away from the car...

Yes, modern cars remain 10 , 15 minutes the power in the accesory line after close the car

Oh ok, I see. Today I tried a trip with 0.4 and in the middle android auto disconnected. I reconnected the wifi manually and it worked back right away. Not sure what's happening, if it's the 0.4 version or if it's something else, it never happened with previous version...

tiliarou commented 2 months ago

I'm having more issues with some disconnect sometimes. Couldn't get log yet. When I check the WiFi networks I can see 2 with exactly the same ssid, if I disable WiFi, it re-enables (as it should) automatically after some time, and then it works again properly when connecting to the WiFi network

admiralspeedy commented 2 months ago

@tiliarou Not sure this relates to the issue here.

I have had no connections issues other than as described in this issue. Three times now I have had to unplug the dongle and then plug it back in because it got stuck in a loop of connecting and disconnecting when I got in my car. I have never had any random disconnects.

tiliarou commented 2 months ago

@tiliarou Not sure this relates to the issue here.

I have had no connections issues other than as described in this issue. Three times now I have had to unplug the dongle and then plug it back in because it got stuck in a loop of connecting and disconnecting when I got in my car. I have never had any random disconnects.

Not sure as well... But it never happened with the previous version... Never a single "android auto has encountered an error" prior to 0.4

Edit: when I see the log in https://github.com/nisargjhaveri/WirelessAndroidAutoDongle/issues/98#issuecomment-2036514713 It seems related to WiFi and/or USB though

Ioniq3 commented 2 months ago

Same problem, the first connection is normally ok, but after turn off the car and turn on 5 minutes after they enter into loop. I have some extra features, so some lines of the log are not the usual regarding img mount. messages.zip

I made this changes to get a second test, revert in 6e6a1da commit the 110 line :

- disableGadget(accessoryGadgetName);

in aa_wireless_dongle/package/aawg/src/usb.cpp

and increase in 184 line:

    struct timeval tv = {
        .tv_sec = 10,
        .tv_usec = 0,
    };

to 30 sec to permit more idle time and reduce the loop in aa_wireless_dongle/package/aawg/src/proxyHandler.cpp

I test that changes and no longer appers the loop, but I prefer that Nisarg review

tiliarou commented 2 months ago

I can't find a way to retrieve logs... How do you get to ssh to the raspberry from android ? Target IP shall be 10.0.0.1, right ? On port 22 ? I get a timeout using juicessh on my phone...

admiralspeedy commented 2 months ago

I can't find a way to retrieve logs... How do you get to ssh to the raspberry from android ? Target IP shall be 10.0.0.1, right ? On port 22 ? I get a timeout using juicessh on my phone...

I only tried SSHing once from my phone but was unsuccessful because I think the Android classifies the network differently knowing that it's an AA network. To pull logs I connect to the dongle's network from my PC and SSH in that way, which is a bit tough to do because I either have to have a laptop with me or be in my driveway so I can connect from my desktop in my house.

tiliarou commented 2 months ago

I can't find a way to retrieve logs... How do you get to ssh to the raspberry from android ? Target IP shall be 10.0.0.1, right ? On port 22 ? I get a timeout using juicessh on my phone...

I only tried SSHing once from my phone but was unsuccessful because I think the Android classifies the network differently knowing that it's an AA network. To pull logs I connect to the dongle's network from my PC and SSH in that way, which is a bit tough to do because I either have to have a laptop with me or be in my driveway so I can connect from my desktop in my house.

Oh OK I see... No way to build an image that would dump logs to sd card? That way I could get logs properly after driving sessions. But I'm a bit off topic here, sorry

admiralspeedy commented 2 months ago

Oh OK I see... No way to build an image that would dump logs to sd card? That way I could get logs properly after driving sessions. But I'm a bit off topic here, sorry

It could be done, I just haven't had time to make it happen myself and I think @nisargjhaveri has focused more on just fixing things without because honestly the logs are not that incredibly helpful and there is some worry that constantly writing logs to the SD card could cause issues.

Ioniq3 commented 2 months ago

I can't find a way to retrieve logs... How do you get to ssh to the raspberry from android ? Target IP shall be 10.0.0.1, right ? On port 22 ? I get a timeout using juicessh on my phone...

I only tried SSHing once from my phone but was unsuccessful because I think the Android classifies the network differently knowing that it's an AA network. To pull logs I connect to the dongle's network from my PC and SSH in that way, which is a bit tough to do because I either have to have a laptop with me or be in my driveway so I can connect from my desktop in my house.

I use daremote from Google play. You have to disconnect the WiFi ssid of Android auto and connect to the wifi, same ssid/name but different connection.

tiliarou commented 2 months ago

Finally managed to get logs... It's very difficult since android auto automatically connects to the WiFi which can't SSH. A debug flag with log writing would be so good. Off by default to not always write on the sd card.

# nano /var/log/messages
-sh: nano: not found
# cat /var/log/messages
Jan  1 00:00:02 buildroot syslog.info syslogd started: BusyBox v1.36.1
Jan  1 00:00:02 buildroot kern.notice kernel: klogd started: BusyBox v1.36.1 (2024-03-30 17:22:14 UTC)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Booting Linux on physical CPU 0x0
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.000000] Linux version 6.1.61-v7 (runner@fv-az735-94) (arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot -g7a59c3a4) 12.3.0, GNU ld (GNU Binutils) 2.40) #1 SMP Sat Mar 30 17:55:00 UTC 2024
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] CPU: div instructions available: patching division code
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] OF: fdt: Machine model: Raspberry Pi Zero 2 W Rev 1.0
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.000000] random: crng init done
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Memory policy: Data cache writealloc
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Reserved memory: created CMA memory pool at 0x15800000, size 64 MiB
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Zone ranges:
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000]   DMA      [mem 0x0000000000000000-0x0000000019bfffff]
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000]   Normal   empty
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Movable zone start for each node
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Early memory node ranges
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000019bfffff]
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000019bfffff]
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] percpu: Embedded 12 pages/cpu s18004 r8192 d22956 u49152
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.000000] pcpu-alloc: s18004 r8192 d22956 u49152 alloc=12*4096
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 104545
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_headphones=0 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EB:EF:DA:EE vc_mem.mem_base=0x1ec0000
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] Memory: 337224K/421888K available (9216K kernel code, 718K rwdata, 2316K rodata, 1024K init, 520K bss, 19128K reserved, 65536K cma-reserved)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] rcu: Hierarchical RCU implementation.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000]      Tracing variant of Tasks RCU enabled.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000001] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000018] Switching to timer-based delay loop, resolution 52ns
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000344] Console: colour dummy device 80x30
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000854] printk: console [tty1] enabled
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000906] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.000947] CPU: Testing write buffer coherency: ok
Jan  1 00:00:02 buildroot kern.info kernel: [    0.001005] pid_max: default: 32768 minimum: 301
Jan  1 00:00:02 buildroot kern.info kernel: [    0.001133] LSM: Security Framework initializing
Jan  1 00:00:02 buildroot kern.info kernel: [    0.001255] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.001293] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.002331] cgroup: Disabling memory control group subsystem
Jan  1 00:00:02 buildroot kern.info kernel: [    0.002851] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Jan  1 00:00:02 buildroot kern.info kernel: [    0.003617] cblist_init_generic: Setting adjustable number of callback queues.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.003648] cblist_init_generic: Setting shift to 2 and lim to 1.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.003783] Setting up static identity map for 0x100000 - 0x10003c
Jan  1 00:00:02 buildroot kern.info kernel: [    0.003918] rcu: Hierarchical SRCU implementation.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.003939] rcu:         Max phase no-delay instances is 1000.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.004575] smp: Bringing up secondary CPUs ...
Jan  1 00:00:02 buildroot kern.info kernel: [    0.005373] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Jan  1 00:00:02 buildroot kern.info kernel: [    0.006182] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
Jan  1 00:00:02 buildroot kern.info kernel: [    0.006909] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
Jan  1 00:00:02 buildroot kern.info kernel: [    0.006996] smp: Brought up 1 node, 4 CPUs
Jan  1 00:00:02 buildroot kern.info kernel: [    0.007069] SMP: Total of 4 processors activated (153.60 BogoMIPS).
Jan  1 00:00:02 buildroot kern.info kernel: [    0.007094] CPU: All CPU(s) started in HYP mode.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.007111] CPU: Virtualization extensions available.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.007724] devtmpfs: initializedJan  1 00:00:02 buildroot kern.info kernel: [    0.020026] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
Jan  1 00:00:02 buildroot kern.info kernel: [    0.020248] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
Jan  1 00:00:02 buildroot kern.info kernel: [    0.020298] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.022914] pinctrl core: initialized pinctrl subsystem
Jan  1 00:00:02 buildroot kern.info kernel: [    0.023900] NET: Registered PF_NETLINK/PF_ROUTE protocol family
Jan  1 00:00:02 buildroot kern.info kernel: [    0.026163] DMA: preallocated 1024 KiB pool for atomic coherent allocations
Jan  1 00:00:02 buildroot kern.info kernel: [    0.030717] audit: initializing netlink subsys (disabled)
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.030962] audit: type=2000 audit(0.030:1): state=initialized audit_enabled=0 res=1
Jan  1 00:00:02 buildroot kern.info kernel: [    0.031460] thermal_sys: Registered thermal governor 'step_wise'
Jan  1 00:00:02 buildroot kern.info kernel: [    0.031729] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.031778] hw-breakpoint: maximum watchpoint size is 8 bytes.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.031983] Serial: AMBA PL011 UART driver
Jan  1 00:00:02 buildroot kern.info kernel: [    0.037496] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
Jan  1 00:00:02 buildroot kern.info kernel: [    0.050017] raspberrypi-firmware soc:firmware: Attached to firmware from 2023-10-17T15:42:39, variant start
Jan  1 00:00:02 buildroot kern.info kernel: [    0.060032] raspberrypi-firmware soc:firmware: Firmware hash is 30f0c5e4d076da3ab4f341d88e7d505760b93ad7
Jan  1 00:00:02 buildroot kern.info kernel: [    0.098329] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.100008] bcm2835-dma 3f007000.dma: DMA legacy API manager, dmachans=0x1
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.101621] SCSI subsystem initialized
Jan  1 00:00:02 buildroot kern.info kernel: [    0.101827] usbcore: registered new interface driver usbfs
Jan  1 00:00:02 buildroot kern.info kernel: [    0.101893] usbcore: registered new interface driver hub
Jan  1 00:00:02 buildroot kern.info kernel: [    0.101952] usbcore: registered new device driver usb
Jan  1 00:00:02 buildroot kern.warn kernel: [    0.102140] usb_phy_generic phy: supply vcc not found, using dummy regulator
Jan  1 00:00:02 buildroot kern.info kernel: [    0.102472] pps_core: LinuxPPS API ver. 1 registered
Jan  1 00:00:02 buildroot kern.info kernel: [    0.102495] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
Jan  1 00:00:02 buildroot kern.info kernel: [    0.102540] PTP clock support registered
Jan  1 00:00:02 buildroot kern.info kernel: [    0.103823] clocksource: Switched to clocksource arch_sys_counter
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.104113] VFS: Disk quotas dquot_6.6.0
Jan  1 00:00:02 buildroot kern.info kernel: [    0.104186] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.104338] FS-Cache: Loaded
Jan  1 00:00:02 buildroot kern.info kernel: [    0.104567] CacheFiles: Loaded
Jan  1 00:00:02 buildroot kern.info kernel: [    0.112918] NET: Registered PF_INET protocol family
Jan  1 00:00:02 buildroot kern.info kernel: [    0.113145] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.114869] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.114937] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.115019] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.115105] TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.115290] TCP: Hash tables configured (established 4096 bind 4096)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.115413] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.115464] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.115670] NET: Registered PF_UNIX/PF_LOCAL protocol family
Jan  1 00:00:02 buildroot kern.info kernel: [    0.116133] RPC: Registered named UNIX socket transport module.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.116159] RPC: Registered udp transport module.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.116179] RPC: Registered tcp transport module.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.116197] RPC: Registered tcp NFSv4.1 backchannel transport module.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.117179] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.118277] Initialise system trusted keyrings
Jan  1 00:00:02 buildroot kern.info kernel: [    0.118434] workingset: timestamp_bits=14 max_order=17 bucket_order=3
Jan  1 00:00:02 buildroot kern.info kernel: [    0.124632] zbud: loaded
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.126495] NFS: Registering the id_resolver key type
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.126542] Key type id_resolver registered
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.126562] Key type id_legacy registered
Jan  1 00:00:02 buildroot kern.info kernel: [    0.126670] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
Jan  1 00:00:02 buildroot kern.info kernel: [    0.126696] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.127753] Key type asymmetric registered
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.127778] Asymmetric key parser 'x509' registered
Jan  1 00:00:02 buildroot kern.info kernel: [    0.127925] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.127958] io scheduler mq-deadline registered
Jan  1 00:00:02 buildroot kern.info kernel: [    0.127979] io scheduler kyber registered
Jan  1 00:00:02 buildroot kern.info kernel: [    0.130639] bcm2708_fb soc:fb: FB found 1 display(s)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.142290] Console: switching to colour frame buffer device 90x30
Jan  1 00:00:02 buildroot kern.info kernel: [    0.148879] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 720x480
Jan  1 00:00:02 buildroot kern.info kernel: [    0.154562] bcm2835-rng 3f104000.rng: hwrng registered
Jan  1 00:00:02 buildroot kern.info kernel: [    0.157045] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.171109] brd: module loaded
Jan  1 00:00:02 buildroot kern.info kernel: [    0.178182] loop: module loaded
Jan  1 00:00:02 buildroot kern.info kernel: [    0.181019] Loading iSCSI transport class v2.0-870.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.184621] usbcore: registered new interface driver lan78xx
Jan  1 00:00:02 buildroot kern.info kernel: [    0.186982] usbcore: registered new interface driver smsc95xx
Jan  1 00:00:02 buildroot kern.info kernel: [    0.189218] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.191537] dwc_otg: FIQ enabledJan  1 00:00:02 buildroot kern.debug kernel: [    0.191544] dwc_otg: NAK holdoff enabled
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.191551] dwc_otg: FIQ split-transaction FSM enabled
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.191562] Module dwc_common_port init
Jan  1 00:00:02 buildroot kern.info kernel: [    0.191755] usbcore: registered new interface driver usb-storage
Jan  1 00:00:02 buildroot kern.info kernel: [    0.194176] mousedev: PS/2 mouse device common for all mice
Jan  1 00:00:02 buildroot kern.info kernel: [    0.197681] sdhci: Secure Digital Host Controller Interface driver
Jan  1 00:00:02 buildroot kern.info kernel: [    0.199993] sdhci: Copyright(c) Pierre Ossman
Jan  1 00:00:02 buildroot kern.info kernel: [    0.202418] sdhci-pltfm: SDHCI platform and OF driver helper
Jan  1 00:00:02 buildroot kern.info kernel: [    0.205357] ledtrig-cpu: registered to indicate activity on CPUs
Jan  1 00:00:02 buildroot kern.info kernel: [    0.207836] hid: raw HID events driver (C) Jiri Kosina
Jan  1 00:00:02 buildroot kern.info kernel: [    0.210166] usbcore: registered new interface driver usbhid
Jan  1 00:00:02 buildroot kern.info kernel: [    0.212425] usbhid: USB HID core driver
Jan  1 00:00:02 buildroot user.info console: Starting klogd: OK
Jan  1 00:00:02 buildroot kern.info kernel: [    0.214732] bcm2835_vchiq 3f00b840.mailbox: there is not valid maps for state default
Jan  1 00:00:02 buildroot kern.info kernel: [    0.220493] Initializing XFRM netlink socket
Jan  1 00:00:02 buildroot kern.info kernel: [    0.222815] NET: Registered PF_PACKET protocol family
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.225239] Key type dns_resolver registered
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.227675] Registering SWP/SWPB emulation handler
Jan  1 00:00:02 buildroot kern.info kernel: [    0.230130] registered taskstats version 1
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.232366] Loading compiled-in X.509 certificates
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.235147] Key type .fscrypt registered
Jan  1 00:00:02 buildroot kern.notice kernel: [    0.237254] Key type fscrypt-provisioning registered
Jan  1 00:00:02 buildroot kern.info kernel: [    0.243926] uart-pl011 3f201000.serial: cts_event_workaround enabled
Jan  1 00:00:02 buildroot kern.info kernel: [    0.246193] 3f201000.serial: ttyAMA1 at MMIO 0x3f201000 (irq = 114, base_baud = 0) is a PL011 rev2
Jan  1 00:00:02 buildroot kern.info kernel: [    0.250756] serial serial0: tty port ttyAMA1 registered
Jan  1 00:00:02 buildroot kern.info kernel: [    0.254298] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
Jan  1 00:00:02 buildroot kern.info kernel: [    0.256890] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
Jan  1 00:00:02 buildroot kern.info kernel: [    0.260372] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 mmc_debug2:0
Jan  1 00:00:02 buildroot kern.info kernel: [    0.262761] mmc-bcm2835 3f300000.mmcnr: DMA channel allocated
Jan  1 00:00:02 buildroot kern.info kernel: [    0.293287] sdhost: log_buf @ e30bb677 (d5910000)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.343879] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.346422] of_cfs_init
Jan  1 00:00:02 buildroot kern.info kernel: [    0.348912] of_cfs_init: OK
Jan  1 00:00:02 buildroot kern.info kernel: [    0.352071] Waiting for root device /dev/mmcblk0p2...
Jan  1 00:00:02 buildroot kern.warn kernel: [    0.409842] mmc0: host does not support reading read-only switch, assuming write-enable
Jan  1 00:00:02 buildroot kern.info kernel: [    0.417507] mmc0: new high speed SDHC card at address aaaa
Jan  1 00:00:02 buildroot kern.info kernel: [    0.420549] mmcblk0: mmc0:aaaa SE32G 28.8 GiB
Jan  1 00:00:02 buildroot kern.info kernel: [    0.426232] mmc1: new high speed SDIO card at address 0001
Jan  1 00:00:02 buildroot kern.info kernel: [    0.428618]  mmcblk0: p1 p2
Jan  1 00:00:02 buildroot kern.info kernel: [    0.431273] mmcblk0: mmc0:aaaa SE32G 28.8 GiB (quirks 0x00004000)
Jan  1 00:00:02 buildroot kern.info kernel: [    0.471548] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
Jan  1 00:00:02 buildroot kern.info kernel: [    0.473951] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
Jan  1 00:00:02 buildroot kern.info kernel: [    0.498724] EXT4-fs (mmcblk0p2): orphan cleanup on readonly fs
Jan  1 00:00:02 buildroot kern.info kernel: [    0.501211] EXT4-fs (mmcblk0p2): recovery complete
Jan  1 00:00:02 buildroot kern.info kernel: [    0.505793] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Quota mode: none.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.510560] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
Jan  1 00:00:02 buildroot kern.info kernel: [    0.513989] devtmpfs: mounted
Jan  1 00:00:02 buildroot kern.info kernel: [    0.518085] Freeing unused kernel image (initmem) memory: 1024K
Jan  1 00:00:02 buildroot kern.info kernel: [    0.544242] Run /sbin/init as init process
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.546576]   with arguments:
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.546582]     /sbin/init
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.546589]   with environment:
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.546594]     HOME=/
Jan  1 00:00:02 buildroot kern.debug kernel: [    0.546600]     TERM=linux
Jan  1 00:00:02 buildroot kern.info kernel: [    0.696418] EXT4-fs (mmcblk0p2): re-mounted. Quota mode: none.
Jan  1 00:00:02 buildroot kern.notice kernel: [    1.024292] cfg80211: Loading compiled-in X.509 certificates for regulatory database
Jan  1 00:00:02 buildroot kern.notice kernel: [    1.079189] cfg80211: Loaded X.509 cert 'benh@debian.org: 577e021cb980e0e820821ba7b54b4961b8b4fadf'
Jan  1 00:00:02 buildroot kern.notice kernel: [    1.086701] cfg80211: Loaded X.509 cert 'romain.perier@gmail.com: 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'
Jan  1 00:00:02 buildroot kern.notice kernel: [    1.094467] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
Jan  1 00:00:02 buildroot kern.debug kernel: [    1.211277] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
Jan  1 00:00:02 buildroot kern.info kernel: [    1.215823] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
Jan  1 00:00:02 buildroot kern.info kernel: [    1.221925] usbcore: registered new interface driver brcmfmac
Jan  1 00:00:02 buildroot kern.info kernel: [    1.413503] Bluetooth: Core ver 2.22
Jan  1 00:00:02 buildroot kern.info kernel: [    1.416529] NET: Registered PF_BLUETOOTH protocol family
Jan  1 00:00:02 buildroot kern.info kernel: [    1.419323] Bluetooth: HCI device and connection manager initialized
Jan  1 00:00:02 buildroot kern.info kernel: [    1.422142] Bluetooth: HCI socket layer initialized
Jan  1 00:00:02 buildroot kern.info kernel: [    1.424921] Bluetooth: L2CAP socket layer initialized
Jan  1 00:00:02 buildroot kern.info kernel: [    1.427643] Bluetooth: SCO socket layer initialized
Jan  1 00:00:02 buildroot kern.info kernel: [    1.436533] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Jun 14 2023 07:27:45 version 7.45.96.s1 (gf031a129) FWID 01-70bd2af7 es7
Jan  1 00:00:02 buildroot kern.info kernel: [    1.455671] Bluetooth: HCI UART driver ver 2.3
Jan  1 00:00:02 buildroot kern.info kernel: [    1.458481] Bluetooth: HCI UART protocol H4 registered
Jan  1 00:00:02 buildroot kern.info kernel: [    1.461345] Bluetooth: HCI UART protocol Three-wire (H5) registered
Jan  1 00:00:02 buildroot kern.info kernel: [    1.464220] Bluetooth: HCI UART protocol Broadcom registered
Jan  1 00:00:02 buildroot kern.warn kernel: [    1.464383] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator
Jan  1 00:00:02 buildroot kern.warn kernel: [    1.469587] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator
Jan  1 00:00:02 buildroot kern.info kernel: [    1.592462] uart-pl011 3f201000.serial: no DMA platform data
Jan  1 00:00:02 buildroot kern.info kernel: [    1.844623] Bluetooth: hci0: BCM: chip id 94
Jan  1 00:00:02 buildroot kern.info kernel: [    1.847560] Bluetooth: hci0: BCM: features 0x2e
Jan  1 00:00:02 buildroot kern.info kernel: [    1.851214] Bluetooth: hci0: BCM43430A1
Jan  1 00:00:02 buildroot kern.info kernel: [    1.853562] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0000
Jan  1 00:00:02 buildroot kern.info kernel: [    1.859494] Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.raspberrypi,model-zero-2-w.hcd' Patch
Jan  1 00:00:02 buildroot kern.warn kernel: [    2.310591] dwc2 3f980000.usb: supply vusb_d not found, using dummy regulator
Jan  1 00:00:02 buildroot kern.warn kernel: [    2.313023] dwc2 3f980000.usb: supply vusb_a not found, using dummy regulator
Jan  1 00:00:02 buildroot kern.info kernel: [    2.416265] dwc2 3f980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
Jan  1 00:00:02 buildroot kern.info kernel: [    2.505139] Bluetooth: hci0: BCM: features 0x2e
Jan  1 00:00:02 buildroot kern.info kernel: [    2.506620] Bluetooth: hci0: BCM43436 37.4MHz Class 1.5 RaspBerry Pi Zero2 [Version: 1017.1042]
Jan  1 00:00:02 buildroot kern.info kernel: [    2.512653] Bluetooth: hci0: BCM43430A1 (001.002.009) build 1042
Jan  1 00:00:02 buildroot kern.info kernel: [    2.513236] Bluetooth: hci0: BCM: Using default device address (43:43:a1:12:1f:ac)
Jan  1 00:00:02 buildroot user.info console: Running sysctl: OK
Jan  1 00:00:02 buildroot daemon.notice haveged: haveged starting up
Jan  1 00:00:02 buildroot user.warn console: haveged: command socket is listening at fd 3
Jan  1 00:00:02 buildroot user.info console: Starting haveged: OK
Jan  1 00:00:02 buildroot daemon.info rngd: Initializing available sources
Jan  1 00:00:02 buildroot daemon.info rngd: [hwrng ]: Initialized
Jan  1 00:00:02 buildroot daemon.info rngd: [jitter]: JITTER timeout set to 5 sec
Jan  1 00:00:02 buildroot user.info console: Starting rngd: OK
Jan  1 00:00:02 buildroot user.info console: Starting system message bus: done
Jan  1 00:00:02 buildroot user.info console: Starting bluetoothd: OK
Jan  1 00:00:02 buildroot daemon.info bluetoothd[166]: Bluetooth daemon 5.68
Jan  1 00:00:02 buildroot daemon.info bluetoothd[166]: Starting SDP server
Jan  1 00:00:02 buildroot daemon.warn bluetoothd[166]: src/plugin.c:plugin_init() System does not support csip plugin
Jan  1 00:00:02 buildroot daemon.warn bluetoothd[166]: src/plugin.c:plugin_init() System does not support bass plugin
Jan  1 00:00:02 buildroot daemon.warn bluetoothd[166]: profiles/network/bnep.c:bnep_init() kernel lacks bnep-protocol support
Jan  1 00:00:02 buildroot daemon.warn bluetoothd[166]: src/plugin.c:plugin_init() System does not support network plugin
Jan  1 00:00:02 buildroot daemon.info bluetoothd[166]: Bluetooth management interface 1.22 initialized
Jan  1 00:00:02 buildroot kern.info kernel: [    2.908652] Bluetooth: MGMT ver 1.22
Jan  1 00:00:02 buildroot kern.info kernel: [    2.935483] NET: Registered PF_ALG protocol family
Jan  1 00:00:02 buildroot kern.info kernel: [    2.971929] cryptd: max_cpu_qlen set to 1000
Jan  1 00:00:03 buildroot user.info console: Starting network: OK
Jan  1 00:00:03 buildroot kern.info kernel: [    3.347127] NET: Registered PF_INET6 protocol family
Jan  1 00:00:03 buildroot kern.info kernel: [    3.372553] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Jan  1 00:00:03 buildroot kern.info kernel: [    3.375068] Segment Routing with IPv6
Jan  1 00:00:03 buildroot kern.info kernel: [    3.379518] In-situ OAM (IOAM) with IPv6
Jan  1 00:00:03 buildroot authpriv.info dropbear[222]: Running in background
Jan  1 00:00:03 buildroot user.info console: Starting dropbear sshd: OK
Jan  1 00:00:03 buildroot daemon.info dnsmasq[226]: started, version 2.89 cachesize 150
Jan  1 00:00:03 buildroot daemon.info dnsmasq[226]: compile time options: IPv6 GNU-getopt DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset no-nftset auth no-cryptohash no-DNSSEC loop-detect inotify dumpfile
Jan  1 00:00:03 buildroot daemon.info dnsmasq-dhcp[226]: DHCP, IP range 10.0.0.2 -- 10.0.0.20, lease time 12h
Jan  1 00:00:03 buildroot daemon.info dnsmasq[226]: read /etc/hosts - 2 names
Jan  1 00:00:03 buildroot user.info console: Starting dnsmasq: OK
Jan  1 00:00:03 buildroot user.info console: Starting bt-agent: OK
Jan  1 00:00:03 buildroot kern.info kernel: [    3.611583] file system registered
Jan  1 00:00:03 buildroot user.info console: Setting up usb_gadgets: OK
Jan  1 00:00:03 buildroot kern.info kernel: [    3.675704] read descriptors
Jan  1 00:00:03 buildroot kern.info kernel: [    3.677433] read strings
Jan  1 00:00:03 buildroot daemon.info rngd: [jitter]: Initializing AES buffer
Jan  1 00:00:04 buildroot user.info console: Starting umtprd: OK
Jan  1 00:00:04 buildroot user.info console: Starting aawgd: OK
Jan  1 00:00:04 buildroot daemon.info : starting pid 266, tty '/dev/tty1': '/sbin/getty -L  tty1 0 vt100 '
Jan  1 00:00:04 buildroot user.info aawgd[265]: AA Wireless Dongle
Jan  1 00:00:04 buildroot user.info aawgd[265]: Starting uevent monitoring
Jan  1 00:00:04 buildroot user.info aawgd[265]: Uevent monitoring started
Jan  1 00:00:04 buildroot user.info aawgd[265]: Initializing USB Manager
Jan  1 00:00:04 buildroot user.info aawgd[265]: USB Manager: Disabled all USB gadgets
Jan  1 00:00:04 buildroot user.info aawgd[265]: USB Manager: Found UDC 3f980000.usb
Jan  1 00:00:04 buildroot user.info aawgd[265]: Using bluetooth adapter at path: /org/bluez/hci0
Jan  1 00:00:04 buildroot user.info aawgd[265]: Bluetooth AA Wireless profile active
Jan  1 00:00:05 buildroot kern.info kernel: [    5.003938] Bluetooth: RFCOMM TTY layer initialized
Jan  1 00:00:05 buildroot kern.info kernel: [    5.005593] Bluetooth: RFCOMM socket layer initialized
Jan  1 00:00:05 buildroot kern.info kernel: [    5.007199] Bluetooth: RFCOMM ver 1.11
Jan  1 00:00:05 buildroot user.info aawgd[265]: Bluetooth adapter was powered onJan  1 00:00:05 buildroot user.info aawgd[265]: Bluetooth adapter is now discoverable and pairable
Jan  1 00:00:05 buildroot user.info aawgd[265]: BLE Advertisement started
Jan  1 00:00:05 buildroot user.info aawgd[265]: Connection Strategy: 0
Jan  1 00:00:05 buildroot user.info aawgd[265]: Starting tcp server
Jan  1 00:00:05 buildroot user.info aawgd[265]: Tcp server listening on 5288
Jan  1 00:00:05 buildroot user.info aawgd[265]: Found 1 bluetooth devices
Jan  1 00:00:05 buildroot user.info aawgd[265]: Trying to connect bluetooth device at path: /org/bluez/hci0/dev_E0_C3_77_7C_1A_E3
Jan  1 00:00:05 buildroot user.info aawgd[265]: Bluetooth device already connected, disconnecting
Jan  1 00:00:07 buildroot user.info aawgd[265]: AA Wireless NewConnection
Jan  1 00:00:07 buildroot user.info aawgd[265]: Path: /org/bluez/hci0/dev_E0_C3_77_7C_1A_E3, fd: 11
Jan  1 00:00:07 buildroot user.info aawgd[265]: Sending WifiStartRequest (ip: 10.0.0.1, port: 5288)
Jan  1 00:00:07 buildroot user.info aawgd[265]: Sent WifiStartRequest, messageId: 1, wrote 17 bytes
Jan  1 00:00:07 buildroot user.info aawgd[265]: Read WifiInfoRequest. length: 0, messageId: 2
Jan  1 00:00:07 buildroot user.info aawgd[265]: Sending WifiInfoResponse (ssid: AAWirelessDongle, bssid: d8:3a:dd:37:d4:fb)
Jan  1 00:00:07 buildroot user.info aawgd[265]: Sent WifiInfoResponse, messageId: 3, wrote 70 bytes
Jan  1 00:00:07 buildroot user.info aawgd[265]: Read WifiStartResponse. length: 2, messageId: 7
Jan  1 00:00:07 buildroot daemon.info rngd: [jitter]: Unable to obtain AES key, disabling JITTER source
Jan  1 00:00:07 buildroot daemon.err rngd: [jitter]: Initialization Failed
Jan  1 00:00:11 buildroot daemon.info hostapd: wlan0: STA 56:9d:96:3c:60:38 IEEE 802.11: associated
Jan  1 00:00:11 buildroot daemon.info hostapd: wlan0: STA 56:9d:96:3c:60:38 WPA: pairwise key handshake completed (RSN)
Jan  1 00:00:14 buildroot daemon.info dnsmasq-dhcp[226]: DHCPDISCOVER(wlan0) 56:9d:96:3c:60:38
Jan  1 00:00:14 buildroot daemon.info dnsmasq-dhcp[226]: DHCPOFFER(wlan0) 10.0.0.17 56:9d:96:3c:60:38
Jan  1 00:00:14 buildroot daemon.info dnsmasq-dhcp[226]: DHCPDISCOVER(wlan0) 56:9d:96:3c:60:38
Jan  1 00:00:14 buildroot daemon.info dnsmasq-dhcp[226]: DHCPOFFER(wlan0) 10.0.0.17 56:9d:96:3c:60:38
Jan  1 00:00:14 buildroot daemon.info dnsmasq-dhcp[226]: DHCPDISCOVER(wlan0) 56:9d:96:3c:60:38
Jan  1 00:00:14 buildroot daemon.info dnsmasq-dhcp[226]: DHCPOFFER(wlan0) 10.0.0.17 56:9d:96:3c:60:38
Jan  1 00:00:14 buildroot daemon.info dnsmasq-dhcp[226]: DHCPREQUEST(wlan0) 10.0.0.17 56:9d:96:3c:60:38
Jan  1 00:00:14 buildroot daemon.info dnsmasq-dhcp[226]: DHCPACK(wlan0) 10.0.0.17 56:9d:96:3c:60:38 S21-Ultra-de-Robin
Jan  1 00:00:15 buildroot user.info aawgd[265]: Tcp server accepted connection
Jan  1 00:00:15 buildroot user.info aawgd[265]: USB Manager: Enabled default gadget
Jan  1 00:00:15 buildroot kern.info kernel: [   15.188268] dwc2 3f980000.usb: bound driver configfs-gadget.default
Jan  1 00:00:15 buildroot user.info aawgd[265]: Read WifiConnectStatus. length: 2, messageId: 6
Jan  1 00:00:15 buildroot user.info aawgd[265]: Bluetooth launch sequence completed
Jan  1 00:00:15 buildroot kern.info kernel: [   15.524637] dwc2 3f980000.usb: new device is high-speed
Jan  1 00:00:15 buildroot kern.info kernel: [   15.588833] android_work: sent uevent USB_STATE=CONNECTED
Jan  1 00:00:15 buildroot kern.info kernel: [   15.603629] dwc2 3f980000.usb: new device is high-speed
Jan  1 00:00:15 buildroot kern.info kernel: [   15.668164] dwc2 3f980000.usb: new address 6
Jan  1 00:00:15 buildroot kern.info kernel: [   15.701031] android_work: sent uevent USB_STATE=CONFIGURED
Jan  1 00:00:15 buildroot user.info aawgd[265]: USB Manager: Received accessory start request
Jan  1 00:00:15 buildroot kern.info kernel: [   15.924279] android_work: sent uevent USB_STATE=DISCONNECTED
Jan  1 00:00:15 buildroot kern.info kernel: [   15.926064] android_work: did not send uevent (0 0 00000000)
Jan  1 00:00:16 buildroot user.info aawgd[265]: USB Manager: Switched to accessory gadget from default
Jan  1 00:00:16 buildroot user.info aawgd[265]: Opening usb accessory
Jan  1 00:00:16 buildroot user.info aawgd[265]: Forwarding data between TCP and USB
Jan  1 00:00:16 buildroot kern.info kernel: [   16.028378] dwc2 3f980000.usb: bound driver configfs-gadget.accessory
Jan  1 00:00:16 buildroot kern.info kernel: [   16.303878] dwc2 3f980000.usb: new device is high-speed
Jan  1 00:00:16 buildroot kern.info kernel: [   16.368847] android_work: sent uevent USB_STATE=CONNECTED
Jan  1 00:00:16 buildroot kern.info kernel: [   16.383644] dwc2 3f980000.usb: new device is high-speed
Jan  1 00:00:16 buildroot kern.info kernel: [   16.448706] dwc2 3f980000.usb: new address 7
Jan  1 00:00:16 buildroot kern.info kernel: [   16.486442] android_work: sent uevent USB_STATE=CONFIGURED
Jan  1 00:01:29 buildroot daemon.info hostapd: wlan0: STA 56:9d:96:3c:60:38 IEEE 802.11: disassociated
Jan  1 00:02:03 buildroot daemon.info hostapd: wlan0: STA 28:c2:1f:f4:73:ea IEEE 802.11: associated
Jan  1 00:02:03 buildroot daemon.info hostapd: wlan0: STA 28:c2:1f:f4:73:ea WPA: pairwise key handshake completed (RSN)
Jan  1 00:02:06 buildroot daemon.info dnsmasq-dhcp[226]: DHCPDISCOVER(wlan0) 28:c2:1f:f4:73:ea
Jan  1 00:02:06 buildroot daemon.info dnsmasq-dhcp[226]: DHCPOFFER(wlan0) 10.0.0.6 28:c2:1f:f4:73:ea
Jan  1 00:02:06 buildroot daemon.info dnsmasq-dhcp[226]: DHCPDISCOVER(wlan0) 28:c2:1f:f4:73:ea
Jan  1 00:02:06 buildroot daemon.info dnsmasq-dhcp[226]: DHCPOFFER(wlan0) 10.0.0.6 28:c2:1f:f4:73:ea
Jan  1 00:02:06 buildroot daemon.info dnsmasq-dhcp[226]: DHCPREQUEST(wlan0) 10.0.0.6 28:c2:1f:f4:73:ea
Jan  1 00:02:06 buildroot daemon.info dnsmasq-dhcp[226]: DHCPACK(wlan0) 10.0.0.6 28:c2:1f:f4:73:ea S21-Ultra-de-Robin
Jan  1 00:02:35 buildroot authpriv.info dropbear[276]: Child connection from 10.0.0.6:57054
Jan  1 00:02:36 buildroot authpriv.info dropbear[276]: Generated hostkey /etc/dropbear/dropbear_ed25519_host_key, fingerprint is SHA256:gNA8lt0RoO1ya/52kMjxXZ7SnB/eH/PpQJd/GN9q2zI
Jan  1 00:02:37 buildroot authpriv.info dropbear[277]: Child connection from 10.0.0.6:57068
Jan  1 00:02:37 buildroot authpriv.notice dropbear[277]: Password auth succeeded for 'root' from 10.0.0.6:57068
Jan  1 00:02:41 buildroot authpriv.info dropbear[276]: Exit before auth from <10.0.0.6:57054>: Exited normally
Jan  1 00:03:07 buildroot daemon.info hostapd: wlan0: STA 28:c2:1f:f4:73:ea IEEE 802.11: disassociated
Jan  1 00:03:11 buildroot daemon.info hostapd: wlan0: STA 28:c2:1f:f4:73:ea IEEE 802.11: associated
Jan  1 00:03:11 buildroot daemon.info hostapd: wlan0: STA 28:c2:1f:f4:73:ea WPA: pairwise key handshake completed (RSN)
Jan  1 00:03:11 buildroot daemon.info dnsmasq-dhcp[226]: DHCPREQUEST(wlan0) 10.0.0.6 28:c2:1f:f4:73:ea
Jan  1 00:03:11 buildroot daemon.info dnsmasq-dhcp[226]: DHCPACK(wlan0) 10.0.0.6 28:c2:1f:f4:73:ea S21-Ultra-de-Robin
Jan  1 00:06:28 buildroot daemon.info hostapd: wlan0: STA 28:c2:1f:f4:73:ea IEEE 802.11: disassociated
Jan  1 00:06:31 buildroot daemon.info hostapd: wlan0: STA 28:c2:1f:f4:73:ea IEEE 802.11: associated
Jan  1 00:06:31 buildroot daemon.info hostapd: wlan0: STA 28:c2:1f:f4:73:ea WPA: pairwise key handshake completed (RSN)
Jan  1 00:06:31 buildroot daemon.info dnsmasq-dhcp[226]: DHCPREQUEST(wlan0) 10.0.0.6 28:c2:1f:f4:73:ea
Jan  1 00:06:31 buildroot daemon.info dnsmasq-dhcp[226]: DHCPACK(wlan0) 10.0.0.6 28:c2:1f:f4:73:ea S21-Ultra-de-Robin
Jan  1 00:06:54 buildroot authpriv.info dropbear[280]: Child connection from 10.0.0.6:49884
Jan  1 00:06:55 buildroot authpriv.notice dropbear[280]: Password auth succeeded for 'root' from 10.0.0.6:49884
#
Ioniq3 commented 2 months ago

Same problem, the first connection is normally ok, but after turn off the car and turn on 5 minutes after they enter into loop. I have some extra features, so some lines of the log are not the usual regarding img mount. messages.zip

I made this changes to get a second test, revert in 6e6a1da commit the 110 line :

- disableGadget(accessoryGadgetName);

in aa_wireless_dongle/package/aawg/src/usb.cpp

and increase in 184 line:

    struct timeval tv = {
        .tv_sec = 10,
        .tv_usec = 0,
    };

to 30 sec to permit more idle time and reduce the loop in aa_wireless_dongle/package/aawg/src/proxyHandler.cpp

I test that changes and no longer appers the loop, but I prefer that Nisarg review

No, this morning made the loop in the first setup, so the problem have to be other issue.

th873 commented 2 months ago

What are you guys running it on? I am using pi zero w. was thinking if that could have something to do with it?

Inrovero commented 2 months ago

Hi everyone, I'm using the 4.0 version for 1 week now, and I'm almost having no issue, just sometimes but if i reconnect my bluetooth or wifi, it started working like a charm, but just 2 or 3 of 10 times that i get in the car.. I'm using raspberry pi zero 2w + Samsung Galaxy S20fe

I'm having some laggy experience in audio or touchscreen using spotify + maps, but that's another issue in discussion.

I'll try to downgrade to 2.0 version to test this issues

tiliarou commented 2 months ago

Hi everyone, I'm using the 4.0 version for 1 week now, and I'm almost having no issue, just sometimes but if i reconnect my bluetooth or wifi, it started working like a charm, but just 2 or 3 of 10 times that i get in the car.. I'm using raspberry pi zero 2w + Samsung Galaxy S20fe

I'm having some laggy experience in audio or touchscreen using spotify + maps, but that's another issue in discussion.

I'll try to downgrade to 2.0 version to test this issues

My setup is quite similar, Raspberry pi zero 2W + Samsung galaxy S21 ultra.

Same issues for me, sometimes it works like a charm, sometimes I have to disable wifi and let it reconnect, sometimes I have to unplug and plug again the raspberry... The point is to have a reliable dongle, so it's still an issue even if it's workable with these problems.

admiralspeedy commented 2 months ago

What are you guys running it on? I am using pi zero w. was thinking if that could have something to do with it?

I am using a Pi 0 W as well. Also, I think my Pi died this morning because it is no longer appears as a BT or Wi-Fi device for me despite lighting up when powered on. Checked the SD card and it appears fine.

Inrovero commented 2 months ago

What are you guys running it on? I am using pi zero w. was thinking if that could have something to do with it?

I am using a Pi 0 W as well. Also, I think my Pi died this morning because it is no longer appears as a BT or Wi-Fi device for me despite lighting up when powered on. Checked the SD card and it appears fine.

Have u tried giving usb power in the power connector and connecting the otg to the car? Maybe the power of the otg car isn't enough now.. idk, just saying!

admiralspeedy commented 2 months ago

What are you guys running it on? I am using pi zero w. was thinking if that could have something to do with it?

I am using a Pi 0 W as well. Also, I think my Pi died this morning because it is no longer appears as a BT or Wi-Fi device for me despite lighting up when powered on. Checked the SD card and it appears fine.

Have u tried giving usb power in the power connector and connecting the otg to the car? Maybe the power of the otg car isn't enough now.. idk, just saying!

Nah, I've been using it for like 2 months and I can't get it to show up when plugged into a USB port on my work PC either.

I'm going to re-flash the SD card and see if something did get messed up there (it's an old SD card and it gets pretty cold in my car at night still).

admiralspeedy commented 2 months ago

Yah, it was my SD card. No idea what happened but reflashing fixed it.

nisargjhaveri commented 2 months ago

From the conversation above, I see two issues.

  1. Connection loop: it gets into some loop while trying to connect. This could be some mistake in the dongle side if it was working well before v0.4.0
  2. Disconnection: sometimes the android auto stops after being connected. If this was not happening before v0.4.0, we might need to tweak some timeouts.

For the connection loop, think we need some more investigation into where it gets stuck. Logs should help in this case.

For disconnection also, logs might help, but my hunch is that the 10s timeout in tcp read might be too small and in some cases there might be a genuine delay more than that. We can increase the TCP read timeout as @Ioniq3 suggested above.

nisargjhaveri commented 2 months ago

Oh OK I see... No way to build an image that would dump logs to sd card? That way I could get logs properly after driving sessions.

/var/log is currently symlinked to /tmp, you can remove the symlink, and it should start storing the logs in sd card. I haven't tried this yes, but I believe this should just work.

For a long term solution, I was thinking about adding/removing this symlink based on some config. But for that to work, we need to read the config much earlier in boot. This needs some more changes. I have some local changes in that direction, but needs some more attention. I'll try to create a PR sometime next week.

Ioniq3 commented 2 months ago

To add more information @nisargjhaveri ,

When it starts to loop, I try to restart /etc/init.d/S92usb_gaget and S93 and in this new implementation of the dongle mode and TCP restarts from Commits from Mar 12, 2024 and it doesn't work, when in the previous impletentation of the dongle feature it works perfect to avoid the physical reboot of the raspberry.

So some of the resources like bluetooth connection or usb now remains blocked when the S92 and S93 stop or restart when in the previous behaviour you can restart the process and it recovers, maybe in the thread restart has the same problem.

admiralspeedy commented 2 months ago

From the conversation above, I see two issues.

1. Connection loop: it gets into some loop while trying to connect. This could be some mistake in the dongle side if it was working well before v0.4.0

2. Disconnection: sometimes the android auto stops after being connected. If this was not happening before v0.4.0, we might need to tweak some timeouts.

For the connection loop, think we need some more investigation into where it gets stuck. Logs should help in this case.

For disconnection also, logs might help, but my hunch is that the 10s timeout in tcp read might be too small and in some cases there might be a genuine delay more than that. We can increase the TCP read timeout as @Ioniq3 suggested above.

I think the disconnections should probably be moved to their own issue because I've never experienced that (in the entire time I've used this project). The most I have ever experienced is a brief drop in audio quality or a hard stutter for a fraction of second, but I'm sure that's just wireless interference where I'm driving.

Also, I don't think there is any normal use case where a 10 second delay could happen once connected. If people are experiencing 10+ second hangs on the connection there is either something wrong with their head units, the Pi, or one of the connections between the device (poor signal to the Pi, bad USB cable to the head unit, weak Bluetooth to the head unit).

I do think that 10 seconds may not be enough during the connection process though and that may be part of the reason the issue I've described here with the looping happens seemingly randomly, because sometimes it may just take more than 10 seconds to connect fully. That doesn't explain though why it gets stuck in a loop instead of recovering properly.

OrdenKrieger commented 2 months ago

I'm having the same issue since 0.4. Funnily I tested my pi zero 2 w first at my computer with Desktop Head Unit and there it would work just fine. In my car it would connect show aa on my screen and then disconnect until my car would show the device is unrecognized. It only helps to re-plug the device until it would eventually work. Might be that the board computer is much slower then running Desktop Head Unit on my computer, which causes the connection to timeout.

tiliarou commented 2 months ago

Oh OK I see... No way to build an image that would dump logs to sd card? That way I could get logs properly after driving sessions.

/var/log is currently symlinked to /tmp, you can remove the symlink, and it should start storing the logs in sd card. I haven't tried this yes, but I believe this should just work.

For a long term solution, I was thinking about adding/removing this symlink based on some config. But for that to work, we need to read the config much earlier in boot. This needs some more changes. I have some local changes in that direction, but needs some more attention. I'll try to create a PR sometime next week.

Understood, I will try to remove the symlink.

I found an old fork of the AAwireless repo (I suppose it is before they launched the kickstarter), maybe there are some stuff in the 3 branches that can help : https://github.com/chutchi2/aawireless

admiralspeedy commented 2 months ago

Well, increasing the timeouts does not fix this looping issue, but also I think it has something to do with the phone side as well.

I am running my own build with both timeouts increased to 30 seconds and this morning when I got in my car it did the loop thing, I unplugged the dongle and plugged it back in, it started looping again and I disconnected it the dongle again. Finally on the third attempt it worked fine.

Two things of note:

  1. It seems like if a loop is going to happen, the initial connection takes much longer than normal (like a full minute or more).
  2. The loop happened twice in a row for me after unplugging the dongle once. This would lead me to believe the phone is doing something strange that is causing it, unless I just happened to hit this bug twice back to back out of pure luck.
tiliarou commented 2 months ago

I believe I managed to log the loop, which ended up in a proper and valid connection by itself (after or connection/disconnection cycle, I never unplugged the pi)
10.0.0.1_20240419093849.txt 10.0.0.1_20240419093910.txt

Ioniq3 commented 2 months ago

I believe I managed to log the loop, which ended up in a proper and valid connection by itself (after or connection/disconnection cycle, I never unplugged the pi) 10.0.0.1_20240419093849.txt 10.0.0.1_20240419093910.txt

Yes, I think , as I see in my log, is something related to "buildroot user.info aawgd[264]: Bluetooth device already connected, disconnecting"

nisargjhaveri commented 2 months ago

Thanks for some logs @tiliarou.

The logs suggests that the phone repeatedly connects via BT to start the Android Auto when the dongle thinks it is already connected. I can see multiple "AA Wireless NewConnection" logs even when TCP is already connected and hasn't timed out.

Once TCP times out, we try to force reconnection with the phone and also see the "Bluetooth device already connected, disconnecting". Interestingly this log is seen even on first connection on boot, maybe the phone connected faster even before we tried connecting first? This should not be needed for the first time, but I don't think this should cause any major issues. For investigations, we can try removing the disconnection. For context, it was needed to actually force the phone to reconnect via BT in case the the connection fails for some reason. If we don't disconnect and reconnect BT, the phone never retries once successfully connected.

My hunch is that on the phone side, the phone was able to detect some problem in the TCP connection and is retrying, but on the RPi, we're still waiting for the timeout. One way to investigate more might be to kill existing session on "AA Wireless NewConnection" and restart the USB with fresh connection and see if that helps.

nisargjhaveri commented 2 months ago

Also, does this loop also occur if you change the connection strategy to phone first? Does it connect more reliably in phone first, or instead of loop there are more failure in phone first with otherwise same setup?

tiliarou commented 2 months ago

Also, does this loop also occur if you change the connection strategy to phone first? Does it connect more reliably in phone first, or instead of loop there are more failure in phone first with otherwise same setup?

I have yet to try other modes, I remained with the default mode so far, I will try to change that. But the dongle mode is the only one able to not fake HSP profile?

nisargjhaveri commented 2 months ago

But the dongle mode is the only one able to not fake HSP profile?

Yes, for dongle mode we don't need the fake HSP profile. For other modes we do need the fake HSP profile for connection. But in those cases, we disconnect BT as soon as the connection is established to make sure phone audio is routed to the headunit and not the dongle.

th873 commented 2 months ago

I have tried all modes and it is just dongle mode that is not working.

hkfuertes commented 1 month ago

Don't know if it is the same issue, but I also had a bootloop when in dongle mode (well, maybe in all modes) that I get a "USB unrecognized" for 5-6 times in a row. Setting this to higher (or infinite, 0) seems to solve the issue: https://github.com/nisargjhaveri/WirelessAndroidAutoDongle/blob/9565add3d8abcc2cc378ac3b500e3dd28494ca9e/aa_wireless_dongle/package/aawg/src/proxyHandler.cpp#L172

I can try to create a pr to move this number to the .env file, if it helps...

manio commented 1 month ago

Yah, it was my SD card. No idea what happened but reflashing fixed it.

I had something similar. See here :)

ProtectiveManEgg commented 1 month ago

Don't know if it is the same issue, but I also had a bootloop when in dongle mode (well, maybe in all modes) that I get a "USB unrecognized" for 5-6 times in a row. Setting this to higher (or infinite, 0) seems to solve the issue:

https://github.com/nisargjhaveri/WirelessAndroidAutoDongle/blob/9565add3d8abcc2cc378ac3b500e3dd28494ca9e/aa_wireless_dongle/package/aawg/src/proxyHandler.cpp#L172

I can try to create a pr to move this number to the .env file, if it helps...

I just want to add on here; this did "fix" it for me, however now having seemingly random issues and intermittent issues with warm boots.

I may have a different issue and if/when I get a chance to grab logs I will open my own. Using dongle-mode however makes my head unit's BT act up telling me to turn off BT and reconnect to the head unit (doesn't actually work), but it appears to work fine while it's saying that (Pi 0w2, Pixel 7 and 2020 Honda Civic).