WirelessAndroidAutoDongle icon indicating copy to clipboard operation
WirelessAndroidAutoDongle copied to clipboard

Update raspberrypizero2w_defconfig

Open KadenK opened this issue 1 year ago • 16 comments

Update to use the 64-bit rpi02w defconfig consistently.

This seems to fix rpio2w connection issues noticed in #118 , #116, #86, and others focusing on the lagging/connectivity issues when using a rpi02w

KadenK avatar Jun 22 '24 04:06 KadenK

@KadenK did you have another uncommitted change? maybe you updated the submodule? couldn't get this to build for zero2w

Can't find default configuration "arch/arm/configs/bcm2710_defconfig"!

douset avatar Jun 23 '24 14:06 douset

@d--bisset, did you use git clone --recurse-submodules https://github.com/KadenK/WirelessAndroidAutoDongle.git to get the submodules?

KadenK avatar Jun 23 '24 14:06 KadenK

Although I do have to admit, it is possible that this change isn't actually what fixes it, it could be any other change since the v0.4.0 release. I'm not exactly sure why this would fix it, seeing as I have little experience with embedded systems, but I don't think it is impossible. All I know is that this build seems to work fine for me.

KadenK avatar Jun 23 '24 15:06 KadenK

@d--bisset, did you use git clone --recurse-submodules https://github.com/KadenK/WirelessAndroidAutoDongle.git to get the submodules?

@KadenK I'm also getting the same error: Can't find default configuration "arch/arm/configs/bcm2710_defconfig"! Could you check if there are any commits you missed pushing?

Suhailakl avatar Jun 23 '24 15:06 Suhailakl

it seems like there's no bcm2710_deconfig and 2709 is just fine so if it works it might be because of v0.4.0

https://github.com/raspberrypi/linux/issues/4865#issuecomment-1027999503

it' mentioned here also

https://www.raspberrypi.com/documentation/computers/linux_kernel.html#default_configuration

(i was getting the same error while waiting for my zero 2w to get delivered ;) i'll give 0.4.0 a try as soon as i get it)

anegrin avatar Jun 23 '24 16:06 anegrin

Yeah, although from my understanding (although it being limited and this stuff relatively new to me) bcm2709 is the 32-bit version and bcm2710 is the 64-bit. 2710 should exist and is mentioned throughout buildroot, but just not as a defconfig. The odd thing is, in my original clone of this repo (not my fork) I have these exact same changes and I'm able to build it just fine in that repo (using 2710), but not in a fresh clone of my own fork.

It also seems, according to the documentation you linked, to use 64-bit on a rpi02w you can use 2711, which does seem to build, but I have yet to test it in use.

KadenK avatar Jun 23 '24 16:06 KadenK

The odd thing is, in my original clone of this repo (not my fork) I have these exact same changes and I'm able to build it just fine in that repo (using 2710), but not in a fresh clone of my own fork.

i was in fact building from the PR

i'll give 2711 build a try then i'll wait to get my 2w by the end of upcoming week i hope

anegrin avatar Jun 23 '24 17:06 anegrin

Honestly, I'm kind of lost now. Something changed on my local version of the fork that is not tracked by git and now I can build there with 2710 as well. I made another fresh clone and tried to build, but it failed. I then set BR2_LINUX_KERNEL_DEFCONFIG to bcm2711, built successfully, and then changed it back to bcm2710 and built it successfully. It must either be downloading and caching the bcm2710 or on error defaulting to the previous successful one, but I can't seem to find anything that supports either conclusion.

KadenK avatar Jun 23 '24 22:06 KadenK

then it might just be that the build env is not properly cleared across builds

buildroot version changed in v0.3.0

anegrin avatar Jun 24 '24 07:06 anegrin

v0.4.0 seems to work just fine i will test it these weeks, also checking the boot partition shows how bcm2710-rpi-zero-2-w.dtb is bundled so it seems consistent.

my setup is:

  • rpi zero 2w
  • headunit is Limcet box (retrofit)
  • i changed country_code to IT in /etc/hostapd.conf
  • i changed /etc/aawgd.env to AAWG_CONNECTION_STRATEGY=2 (it's more convenient for me)
  • i hardened the system after the first connection/config as described in this PR #109

anegrin avatar Jun 27 '24 12:06 anegrin

i will test it these weeks<

Looking forward to hearing the results. I have vicious problems with interference, skipping, lagged audio everywhere, though I didn't notice it until using CarStream which always worked well directly wired, when using the pi2w it's quite off, maybe under a second to a second, I'd have to time it. Fairly consistent, with load and actual interference being considered as well, seems to just always be in that sweet spot which is true for audio too, though that's just the track changing a second off which is no big deal, other than though, not sure if maps does it, that'd make me plug in lol so I guess if it does lag behind I can handle it.

selfdestructer avatar Jul 02 '24 05:07 selfdestructer

I have vicious problems with interference

I'd sees it works just great, I'm wondering if it might depend on the phone as I've got a behavior similar to what you are describing when I connected to the dongle the very first time and then the phone "adapted" the streaming.

You might wanna try developer mode in Android Auto as described here and change the Video Resolution or some other settings

anegrin avatar Jul 02 '24 07:07 anegrin

You might wanna try developer mode in Android Auto as described here and change the Video Resolution or some other settings <

Ah, good idea. I do use developer mode, though hadn't thought to adjust resolution or codec. I suppose turning it off is worth a shot too.

It's definitely worth noting that my phone is frequently close to max storage capacity too. Sometimes I'm very close, which likely is half of my issue half of the time. I'm very curious, so I'll be sure to report back after clearing some space and running some tests with your suggestions. Thank you!

selfdestructer avatar Jul 04 '24 20:07 selfdestructer

I was able to build a 64bit version for 02w and 3a+... I will do 4 and test it... I will open a PR also if it is ok with you all.

hkfuertes avatar Jul 10 '24 19:07 hkfuertes

If anyone is interested, I managed to build them here... but at least, with the 02w that I tested, It seems that the usb gadget does not get activated...Long time ago I read that usb-gadget was only compatible with 32bit (something to do with dwc2 driver) I don't know whats the status right now, maybe this has changed. Anyway, If anyone is interested, this branch has 64bit images for 02w, 3a and 4. https://github.com/hkfuertes/AAWirelessDongle/tree/64bit_versions_02_3a

hkfuertes avatar Jul 10 '24 21:07 hkfuertes

If anyone is interested, I managed to build them here... but at least, with the 02w that I tested, It seems that the usb gadget does not get activated...Long time ago I read that usb-gadget was only compatible with 32bit (something to do with dwc2 driver) I don't know whats the status right now, maybe this has changed. Anyway, If anyone is interested, this branch has 64bit images for 02w, 3a and 4. https://github.com/hkfuertes/AAWirelessDongle/tree/64bit_versions_02_3a

ssh [email protected]
[email protected]'s password: 
# dmesg | grep dwc2
[    0.698787] dwc2 3f980000.usb: supply vusb_d not found, using dummy regulator
[    0.700631] dwc2 3f980000.usb: supply vusb_a not found, using dummy regulator
[    0.702480] dwc2 3f980000.usb: Configuration mismatch. dr_mode forced to host
[    0.754856] dwc2 3f980000.usb: DWC OTG Controller
[    0.756546] dwc2 3f980000.usb: new USB bus registered, assigned bus number 1
[    0.758263] dwc2 3f980000.usb: irq 51, io mem 0x3f980000
[    0.766884] usb usb1: Manufacturer: Linux 6.1.61-v8 dwc2_hsotg

hkfuertes avatar Jul 10 '24 21:07 hkfuertes

I am facing difficulties in building the image following the instructions provided in the BUILDING.md file. Specifically, I am trying to build an image for the Raspberry Pi Zero 2W. This is the error i am getting from console

make BR2_EXTERNAL=../aa_wireless_dongle/ O=output/raspberrypizero2w raspberrypizero2w_defconfig
/bin/bash: /app/buildroot/support/scripts/setlocalversion: /bin/sh^M: bad interpreter: No such file or directory
/usr/bin/env: 'bash\r': No such file or directory
mkdir -p /app/buildroot/output/raspberrypizero2w/build/buildroot-config/lxdialog
PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
   obj=/app/buildroot/output/raspberrypizero2w/build/buildroot-config -C support/kconfig -f Makefile.br conf
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"  -MM *.c > /app/buildroot/output/raspberrypizero2w/build/buildroot-config/.depend 2>/dev/null || :
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"   -c conf.c -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf.o
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"  -I. -c /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.c -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.o
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"   /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf.o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.o  -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf
rm /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.c
/bin/bash: /app/buildroot/support/scripts/mkmakefile: /bin/sh^M: bad interpreter: No such file or directory
make[1]: *** [Makefile:1051: outputmakefile] Error 126
make: *** [Makefile:82: _all] Error 2

after changing some file type to dos2unix i am able to resolve issue but now getting another error as below

+ make BR2_EXTERNAL=../aa_wireless_dongle/ O=output/raspberrypizero2w raspberrypizero2w_defconfig
/usr/bin/env: 'bash\r': No such file or directory
  GEN     /app/buildroot/output/raspberrypizero2w/Makefile
'none>:0:warning: ignoring unsupported character '
'onfig.in:3:warning: ignoring unsupported character '
'onfig.in:3:warning: ignoring unsupported character '
'onfig.in:5:warning: ignoring unsupported character '
'onfig.in:6:warning: ignoring unsupported character '
'onfig.in:7:warning: ignoring unsupported character '
'onfig.in:7:warning: ignoring unsupported character '
'onfig.in:9:warning: ignoring unsupported character '
'onfig.in:10:warning: ignoring unsupported character '
'onfig.in:11:warning: ignoring unsupported character '
'onfig.in:11:warning: ignoring unsupported character '
'onfig.in:13:warning: ignoring unsupported character '
'onfig.in:14:warning: ignoring unsupported character '
'onfig.in:15:warning: ignoring unsupported character '
'onfig.in:15:warning: ignoring unsupported character '
'onfig.in:17:warning: ignoring unsupported character '
'onfig.in:18:warning: ignoring unsupported character '
'onfig.in:19:warning: ignoring unsupported character '
'onfig.in:19:warning: ignoring unsupported character '
'onfig.in:22:warning: ignoring unsupported character '
Config.in:22: can't open file "/app/buildroot/output/raspberrypizero2w/.br2-external.in.paths"
make[1]: *** [Makefile:1012: raspberrypizero2w_defconfig] Error 1
make: *** [Makefile:82: _all] Error 2

ankitpatel8055 avatar Nov 06 '24 13:11 ankitpatel8055

@ankitpatel8055 How you get sources, that you need to make dos2unix. Just do a fresh git clone and you're done.

manio avatar Nov 06 '24 14:11 manio

I have clone this repo using below git command

$ git clone --recurse-submodules https://github.com/nisargjhaveri/WirelessAndroidAutoDongle

After that i run below command to build image using docker

$ docker compose run --rm rpi02w

But this gives me below error

make BR2_EXTERNAL=../aa_wireless_dongle/ O=output/raspberrypizero2w raspberrypizero2w_defconfig
/bin/bash: /app/buildroot/support/scripts/setlocalversion: /bin/sh^M: bad interpreter: No such file or directory
/usr/bin/env: 'bash\r': No such file or directory
mkdir -p /app/buildroot/output/raspberrypizero2w/build/buildroot-config/lxdialog
PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
   obj=/app/buildroot/output/raspberrypizero2w/build/buildroot-config -C support/kconfig -f Makefile.br conf
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"  -MM *.c > /app/buildroot/output/raspberrypizero2w/build/buildroot-config/.depend 2>/dev/null || :
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"   -c conf.c -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf.o
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"  -I. -c /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.c -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.o
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"   /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf.o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.o  -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf
rm /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.c
/bin/bash: /app/buildroot/support/scripts/mkmakefile: /bin/sh^M: bad interpreter: No such file or directory
make[1]: *** [Makefile:1051: outputmakefile] Error 126
make: *** [Makefile:82: _all] Error 2

Please help me to find and resolve issue to build image I am using docker desktop in windows machine

ankitpatel8055 avatar Nov 06 '24 14:11 ankitpatel8055

Heh - I was about to ask you if you're building from windows :stuck_out_tongue_winking_eye: I bet you have wrongly set line endings: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

manio avatar Nov 06 '24 15:11 manio

... btw: can I ask for a reason you're building it yourself instead of using pre-built sd card images?

manio avatar Nov 06 '24 15:11 manio

I have already tried below command with github

git config --global core.autocrlf input

But still no luck.

And reason is I just want to rename bluetooth and wifi name that's all nothing else

ankitpatel8055 avatar Nov 06 '24 16:11 ankitpatel8055

I just want to rename bluetooth and wifi name that's all nothing else

This could be done in configuration, you don't need to compile your own image.

manio avatar Nov 06 '24 16:11 manio

I will try that.I don't know it until now Thanks bro you saved my day

ankitpatel8055 avatar Nov 06 '24 16:11 ankitpatel8055

@manio i know it's silly question to ask but can you explain how to configure the wifi name, password and bluetooth name? I am not able to do so

ankitpatel8055 avatar Nov 08 '24 12:11 ankitpatel8055

@ankitpatel8055 Wifi name: /etc/hostapd.conf Bluetooth suffix: /etc/aawgd.env

manio avatar Nov 08 '24 14:11 manio