Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please provide proper installation guide #1

Closed
NabeelUppel opened this issue Nov 4, 2024 · 142 comments
Closed

Please provide proper installation guide #1

NabeelUppel opened this issue Nov 4, 2024 · 142 comments

Comments

@NabeelUppel
Copy link

Hi!
I'm keen to give this a shot, look quite interesting. I have used aawgd before but all of a sudden stopped working for me so I'm curious to see if this will work.

With that being said, I'm quite new to all of this and have no experience with Rust but could be a good opportunity to learn.

I see that you SSH into the pi to run the script but what OS is running on your pi to make it work?

@manio
Copy link
Owner

manio commented Nov 4, 2024

Hi,
Just use WirelessAndroidAutoDongle as a base and only replace aawgd with aa-proxy-rs.
Yesterday I added a Dockerfile and instruction how to built it. Can you try to build it first?

@NabeelUppel
Copy link
Author

I managed to build it with docker and have the binary but I'm unsure how to replace aawgd with it.

@NabeelUppel
Copy link
Author

I haven't managed to uninstall aawgd but I did drop the built aa-proxy-rs onto the same path as you had and I chmod +x the binary to get it to run

I then get Bluetooth error: Bluetooth operation not permitted: UUID already registered.
I suspect it's because I haven't removed aawgd.

I also noticed the binary is not persisted on SD card.

@NabeelUppel
Copy link
Author

NabeelUppel commented Nov 4, 2024

Alright, I managed to remove aawgd from /usr/bin and also dropped aa-proxy-rs in the same folder it's now persisted between power

@NabeelUppel
Copy link
Author

So it did not work, I managed to connect to bluetooth, I get 1 usb start accesory request error it then recovers and my phone switches over to wifi. The logs then disconnects with a connection was reset by peer and my phone is stuck on looking for Android Auto.

@NabeelUppel
Copy link
Author

image

Seems as tho the wifi disconnects as my PC switches back to my home wifi

@NabeelUppel
Copy link
Author

I'm assumming the failure is on line 107
image

@NabeelUppel
Copy link
Author

I apologize for so many comments but I thought this would be a good place to be verbose about it.
Also, I am running on Pi 02w and I'm not sure if the dockerfile takes into consideration the steps your highlighted in the readme

@manio
Copy link
Owner

manio commented Nov 5, 2024

Hi!
So... from the start:

I haven't managed to uninstall aawgd but I did drop the built aa-proxy-rs onto the same path as you had and I chmod +x the binary to get it to run

Very good. That was the easiest way (to just replace aawgd) if you don't know how to make a startup script.

I then get Bluetooth error: Bluetooth operation not permitted: UUID already registered. I suspect it's because I haven't removed aawgd.

Yes, it was rather because the aawgd was still running at the same time (or maybe even the bluetoothd has this still registered).

I also noticed the binary is not persisted on SD card.

This was figured out, so OK...

I apologize for so many comments but I thought this would be a good place to be verbose about it.

This is OK. You can also edit your posts on github if you like.

Also, I am running on Pi 02w and I'm not sure if the dockerfile takes into consideration the steps your highlighted in the readme

I also have the pi02w and the Dockerfile creates an image exactly for this architecture. So you're OK with this.

Regarding the log/problem:
The log is cut exactly in the place where the phone is changing wifi network, then it should start android auto but there has to be some other problem (there was two timeouts in the middle so maybe the further timing gets drifted too much to make a successful connection)...
Unfortunately I cannot tell you more without the logs (you can also grab it later).

You could also add eg -s5 in the startup script:
/etc/init.d/S93aawgd
like this:
start-stop-daemon -S -b -q -m -p "$PIDFILE" -x "/usr/bin/$DAEMON" -- -s5
Then you should have transfer debug like here:
https://asciinema.org/a/686949

Some questions:
I assume it was working fine with aawgd for you?
Was you using AAWG_CONNECTION_STRATEGY=1. As this is the only one currently supported.
Can you try to connect several times?

@Tttyagi123
Copy link

For people like me, who dont have a clue bout coding or scripting, is it possible to provide a flashable build with this mod incorporated in it?

@NabeelUppel
Copy link
Author

Regarding the log/problem: The log is cut exactly in the place where the phone is changing wifi network, then it should start android auto but there has to be some other problem (there was two timeouts in the middle so maybe the further timing gets drifted too much to make a successful connection)... Unfortunately I cannot tell you more without the logs (you can also grab it later).

You could also add eg -s5 in the startup script: /etc/init.d/S93aawgd like this: start-stop-daemon -S -b -q -m -p "$PIDFILE" -x "/usr/bin/$DAEMON" -- -s5 Then you should have transfer debug like here: https://asciinema.org/a/686949

Some questions: I assume it was working fine with aawgd for you? Was you using AAWG_CONNECTION_STRATEGY=1. As this is the only one currently supported. Can you try to connect several times?

Thanks for the reply.

So aawgd worked initially for me and then one day it just stopped and I never managed to get it working since. I believe I was using phone first connection strategy too.
I did try several times and it always fails at the same place. I noticed from your demo video mine fails to says "Bluetooth Sequence Completed Successfully" so it fails before then.
It's also strange that the SSH session closes (I SSH using my laptop so I don't expect the pi's WiFi to disconnect like it did).
Where are aa-proxy-rs logs stored?

@manio
Copy link
Owner

manio commented Nov 5, 2024

@Tttyagi123

For people like me, who dont have a clue bout coding or scripting, is it possible to provide a flashable build with this mod incorporated in it?

will try to just grab the official image and "inject" it for you... :)

@NabeelUppel

Where are aa-proxy-rs logs stored?

cat /var/log/aa-proxy-rs.log

@manio
Copy link
Owner

manio commented Nov 5, 2024

@Tttyagi123
Here you are: https://skyboo.net/temp/aa/raspberrypizero2w-sdcard.img
btw. to be clear: I hope you read the README - it is still in a early development/beta phase - don't expect that it will just work...

@Tttyagi123
Copy link

@Tttyagi123 Here you are: https://skyboo.net/temp/aa/raspberrypizero2w-sdcard.img btw. to be clear: I hope you read the README - it is still in a early development/beta phase - don't expect that it will just work...

Sure, i also wanted to just try and see how it goes. Will give feedback after trying. Thanks a bunch 🙏

@NabeelUppel
Copy link
Author

NabeelUppel commented Nov 5, 2024

@manio
So it seems as though when it switches from default to accessory gadget the Pi loses power, I connected a powerbank to the power port and the ssh session is kept active but still does not work.

Starting to proxying data between TCP and USB...
and it hangs.

aa-proxy-rs.log

Another interesting observation, this start request is not from my car. In this scenario, the Pi was only connected to a powerbank
image

@manio
Copy link
Owner

manio commented Nov 5, 2024

@NabeelUppel
Can you try this executable?
https://skyboo.net/temp/aa/aa-proxy-rs

@NabeelUppel
Copy link
Author

The Pi doesn't lose power anymore but still hangs at
Starting to proxying data between TCP and USB...

aa-proxy-rs.log

@manio
Copy link
Owner

manio commented Nov 5, 2024

Give me a moment ... I'll prepare a version with more debug...
In the mean time please just edit your startup line in the script to this:
start-stop-daemon -S -b -q -m -p "$PIDFILE" -x "/usr/bin/$DAEMON" -- -d -s5

@manio
Copy link
Owner

manio commented Nov 5, 2024

Ok ... it's in the same place:
https://skyboo.net/temp/aa/aa-proxy-rs

@NabeelUppel
Copy link
Author

Will give this a try asap.
When you say startup line in the script where exactly is that located or is that the aa-proxy-rs binary (I doubt it)

@manio
Copy link
Owner

manio commented Nov 5, 2024

/etc/init.d/S93aawgd, same as above.

@NabeelUppel
Copy link
Author

Should I also change the DAEMON to be aa-proxy-rs or keep it as aawgd?

@NabeelUppel
Copy link
Author

Ok ... it's in the same place: https://skyboo.net/temp/aa/aa-proxy-rs

I tried this but again the pi restarts.
image

I then used a power bank while connected to my phone and I get this:
image

@manio
Copy link
Owner

manio commented Nov 5, 2024

@NabeelUppel
Please try again - new version is there...
ps. your last log is cut at the place where it is most interesting for me :)

Please do it as always but with power bank, and provide me full logs - especially after the line "Starting to proxying"

I really don't know what you're doing there ;)
I would just do it like this:
0. make a copy of aawgd: cp /usr/bin/aawgd /usr/bin/aawgd-backup

  1. Place aa-proxy-rs in its place (copy as /usr/bin/aawgd)
  2. Change the line in the startup script (this is only enabling statistics and debug)
  3. reboot - and you're done - it should work (for the first time)

...then try connect with AA - give it some time ofc; and then you can disconnect AA (if connected and you're doing it from phone) and connect afterwards to the AP via ssh and fetch the /var/log/aa-proxy-rs logs for me.

@NabeelUppel
Copy link
Author

Is there anyway to capture the start request by the car?
I feel like I'm getting a lot of false positives, as in I connected the pi to power in my house and started the script and I recieved a accessory start request when I shouldn't have receive one seeing that it was not connected to my car

@NabeelUppel
Copy link
Author

NabeelUppel commented Nov 5, 2024

@NabeelUppel Please try again - new version is there... ps. your last log is cut at the place where it is most interesting for me :)

Nothing happened below that, it hung at that message for about 2 mins and I disconnected. The message below was "Connection reset by peer" after I pulled power.

Please do it as always but with power bank, and provide me full logs - especially after the line "Starting to proxying"

Will try that now.

I really don't know what you're doing there ;) I would just do it like this: 0. make a copy of aawgd: cp /usr/bin/aawgd /usr/bin/aawgd-backup

  1. Place aa-proxy-rs in its place (copy as /usr/bin/aawgd)
  2. Change the line in the startup script (this is only enabling statistics and debug)
  3. reboot - and you're done - it should work (for the first time)

Does this make it so that aa-proxy-rs starts on boot?

...then try connect with AA - give it some time ofc; and then you can disconnect AA (if connected and you're doing it from phone) and connect afterwards to the AP via ssh and fetch the /var/log/aa-proxy-rs logs for me.

@manio
Copy link
Owner

manio commented Nov 5, 2024

I thought you are doing it in your car!
Read my last message.

@NabeelUppel
Copy link
Author

I thought you are doing it in your car! Read my last message.

I am, but there was one time I tried it disconnected from my car and yet I still received the start accessory request

@NabeelUppel
Copy link
Author

I could not access the logs when running it on startup.

Without Powerbank:
image

With Powerbank:
image
Note: I pulled the power after about 2 mins

@NabeelUppel Can you try this executable? https://skyboo.net/temp/aa/aa-proxy-rs

What did you change in this excutable to stop it from crashing?

@manio
Copy link
Owner

manio commented Nov 5, 2024

Thank you for testing!

What did you change in this excutable to stop it from crashing?

Nothing - the only thing changed was a slightly modified sequence and timing - starting USB to car later.
I still doesn't get why it was working with aawgd and now it can't with the same default strategy.
I can also see that USB is the problem here - first it is trying hard to switch to accessory, but when it finally happened, it's too late for android phone because it is disconnecting.

Ok ... I am providing you the version which is doing the opposite - trying to start USB much earlier...
please give it another try

Two things:

  1. Why are you still starting it manually? Can you just do it as I described earlier? Put it to auto start via script?
  2. I hope you don't have aawgd in the same time running?
  3. Are you able provide me aawgd logs where it was working OK?

Also can you please describe how are you testing it exactly?
Please tell me in point like:

  • I am powering it up,
  • connecting usb to car
  • logging via ssh
  • etc...

@Tttyagi123
Copy link

Tttyagi123 commented Nov 12, 2024

I just disconnected and reconnected after the command and it connected two....now three times in a row :D

@manio
Copy link
Owner

manio commented Nov 12, 2024

So ... what was the problem?

@Tttyagi123
Copy link

ok, connect manually now

I clicked on disconnect on android auto, went to bt and clicked on connect on the wireless dongle but it did not connect, android auto kept looking for device

@Tttyagi123
Copy link

So ... what was the problem?

Earlier it was not connecting after first time but manually it still does not connect

@manio
Copy link
Owner

manio commented Nov 12, 2024

Have you tried to disable wifi + bluetooth on your phone?

@Tttyagi123
Copy link

Have you tried to disable wifi + bluetooth on your phone?

Just did, does not connect

@Tttyagi123
Copy link

Connecting to 10.0.0.1 port 22, please wait...
login as: root [email protected]'s password: 
# cat /var/log/aa-proxy-rs.log
1970-01-01, 00:00:05.026 [INFO] 🛸 aa-proxy-rs is starting, build: 20241111_152920, git: 20241111-1ed273f-dirty
1970-01-01, 00:00:05.026 [INFO]  main:  📜 Log file path: /var/log/aa-proxy-rs.log
1970-01-01, 00:00:05.026 [INFO]  main:  ⚙️ Showing transfer statistics: 5s
1970-01-01, 00:00:05.090 [INFO]  proxy:  🛰️ Starting TCP server...
1970-01-01, 00:00:05.091 [INFO]  proxy:  🛰️ TCP server now listening on: 0.0.0.0:5288
1970-01-01, 00:00:05.110 [INFO]  usb:  🔌 Initializing USB Manager
1970-01-01, 00:00:05.110 [INFO]  usb:  📬 Starting UEvent listener thread...
1970-01-01, 00:00:05.120 [ERROR]  main:  🔌 USB init error: No such device (os error 19)
1970-01-01, 00:00:05.150 [INFO]  bluetooth:  🥏 Bluetooth alias: WirelessAADongle-ff101d
1970-01-01, 00:00:05.210 [INFO]  bluetooth:  🥏 Opened bluetooth adapter hci0 with address B8:27:EB:55:BA:B7
1970-01-01, 00:00:05.299 [INFO]  bluetooth:  📱 AA Wireless Profile: registered
1970-01-01, 00:00:05.302 [INFO]  bluetooth:  🎧 Headset Profile (HSP): registered
1970-01-01, 00:00:05.302 [INFO]  bluetooth:  ⏳ Waiting for phone to connect via bluetooth...
1970-01-01, 00:00:05.302 [INFO]  bluetooth:  🥏 Enumerating known bluetooth devices...
1970-01-01, 00:00:05.307 [INFO]  bluetooth:  🧲 Trying to connect to: 9C:82:81:8D:64:CA (iQOO 7 Legend)
1970-01-01, 00:00:06.744 [INFO]  bluetooth:  🎧 Headset Profile (HSP): connect from: 9C:82:81:8D:64:CA
1970-01-01, 00:00:06.746 [INFO]  bluetooth:  🔗 Device 9C:82:81:8D:64:CA (iQOO 7 Legend) connected
1970-01-01, 00:00:07.191 [INFO]  bluetooth:  📱 AA Wireless Profile: connect from: 9C:82:81:8D:64:CA
1970-01-01, 00:00:07.191 [INFO]  bluetooth:  📲 Sending parameters via bluetooth to phone...
1970-01-01, 00:00:07.192 [INFO]  bluetooth:  📨 Sending WifiStartRequest frame to phone...
1970-01-01, 00:00:07.273 [INFO]  bluetooth:  📨 Received WifiInfoRequest frame from phone
1970-01-01, 00:00:07.274 [INFO]  bluetooth:  📨 Sending WifiInfoResponse frame to phone...
1970-01-01, 00:00:07.284 [INFO]  bluetooth:  📨 Received WifiStartResponse frame from phone
1970-01-01, 00:00:11.903 [INFO]  bluetooth:  📨 Received WifiConnectStatus frame from phone
1970-01-01, 00:00:11.903 [INFO]  bluetooth:  🚀 Bluetooth launch sequence completed
1970-01-01, 00:00:11.909 [INFO]  usb:  🔌 USB Manager: Enabled default gadget
1970-01-01, 00:00:11.909 [INFO]  bluetooth:  🥷 Unregistering default agent
1970-01-01, 00:00:11.909 [INFO]  bluetooth:  📱 Removing AA profile
1970-01-01, 00:00:11.909 [INFO]  bluetooth:  🎧 Removing HSP profile
1970-01-01, 00:00:12.131 [INFO]  bluetooth:  💤 Bluetooth adapter powered off
1970-01-01, 00:00:12.466 [INFO]  proxy:  📳 TCP server: new client connected: 10.0.0.16:40644
1970-01-01, 00:00:12.466 [INFO]  proxy:  📂 Opening USB accessory device: /dev/usb_accessory
1970-01-01, 00:00:12.466 [INFO]  proxy:  ♾️ Starting to proxying data between TCP and USB...
1970-01-01, 00:00:14.910 [ERROR]  usb:  🔌 USB Manager: Timeout waiting for accessory start, trying to recover...
1970-01-01, 00:00:14.910 [INFO]  usb:  🔌 USB Manager: Enabled default gadget
1970-01-01, 00:00:16.408 [INFO]  usb:  🔌 USB Manager: Received accessory start request
1970-01-01, 00:00:16.514 [INFO]  usb:  🔌 USB Manager: Switched to accessory gadget
1970-01-01, 00:00:17.564 [INFO]  proxy:  📱 phone to car transfer: 3.3 kiB (659 B/s), 3.3 kiB total
1970-01-01, 00:00:17.564 [INFO]  proxy:  📲 car to phone transfer: 1.9 kiB (378 B/s), 1.9 kiB total
1970-01-01, 00:00:22.571 [INFO]  proxy:  📱 phone to car transfer: 822.1 kiB (164.2 kiB/s), 825.4 kiB total
1970-01-01, 00:00:22.580 [INFO]  proxy:  📲 car to phone transfer: 5.8 kiB (1.1 kiB/s), 7.6 kiB total
1970-01-01, 00:00:27.614 [INFO]  proxy:  📱 phone to car transfer: 1.4 MiB (281.7 kiB/s), 2.2 MiB total
1970-01-01, 00:00:27.620 [INFO]  proxy:  📲 car to phone transfer: 9.5 kiB (1.9 kiB/s), 17.1 kiB total
1970-01-01, 00:00:32.662 [INFO]  proxy:  📱 phone to car transfer: 1.0 MiB (211.8 kiB/s), 3.2 MiB total
1970-01-01, 00:00:32.665 [INFO]  proxy:  📲 car to phone transfer: 9.0 kiB (1.8 kiB/s), 26.1 kiB total
1970-01-01, 00:00:37.676 [INFO]  proxy:  📱 phone to car transfer: 1.1 MiB (215.2 kiB/s), 4.3 MiB total
1970-01-01, 00:00:37.681 [INFO]  proxy:  📲 car to phone transfer: 8.9 kiB (1.8 kiB/s), 35.0 kiB total
1970-01-01, 00:00:42.695 [INFO]  proxy:  📱 phone to car transfer: 1.0 MiB (214.0 kiB/s), 5.3 MiB total
1970-01-01, 00:00:42.699 [INFO]  proxy:  📲 car to phone transfer: 8.8 kiB (1.8 kiB/s), 43.8 kiB total
1970-01-01, 00:00:47.704 [INFO]  proxy:  📱 phone to car transfer: 1.1 MiB (217.4 kiB/s), 6.4 MiB total
1970-01-01, 00:00:47.709 [INFO]  proxy:  📲 car to phone transfer: 8.9 kiB (1.8 kiB/s), 52.7 kiB total
1970-01-01, 00:00:52.709 [INFO]  proxy:  📱 phone to car transfer: 1.0 MiB (214.3 kiB/s), 7.5 MiB total
1970-01-01, 00:00:52.712 [INFO]  proxy:  📲 car to phone transfer: 8.7 kiB (1.7 kiB/s), 61.4 kiB total
1970-01-01, 00:00:57.733 [INFO]  proxy:  📱 phone to car transfer: 1.1 MiB (219.2 kiB/s), 8.5 MiB total
1970-01-01, 00:00:57.738 [INFO]  proxy:  📲 car to phone transfer: 8.8 kiB (1.7 kiB/s), 70.2 kiB total
1970-01-01, 00:01:02.739 [INFO]  proxy:  📱 phone to car transfer: 1.1 MiB (216.6 kiB/s), 9.6 MiB total
1970-01-01, 00:01:02.742 [INFO]  proxy:  📲 car to phone transfer: 8.7 kiB (1.7 kiB/s), 78.9 kiB total
1970-01-01, 00:01:07.756 [INFO]  proxy:  📱 phone to car transfer: 1.0 MiB (214.3 kiB/s), 10.6 MiB total
1970-01-01, 00:01:07.761 [INFO]  proxy:  📲 car to phone transfer: 8.8 kiB (1.8 kiB/s), 87.7 kiB total
1970-01-01, 00:01:12.791 [INFO]  proxy:  📱 phone to car transfer: 1.1 MiB (216.8 kiB/s), 11.7 MiB total
1970-01-01, 00:01:12.795 [INFO]  proxy:  📲 car to phone transfer: 8.9 kiB (1.8 kiB/s), 96.6 kiB total
1970-01-01, 00:01:17.795 [INFO]  proxy:  📱 phone to car transfer: 1.0 MiB (214.0 kiB/s), 12.7 MiB total
1970-01-01, 00:01:17.797 [INFO]  proxy:  📲 car to phone transfer: 8.7 kiB (1.7 kiB/s), 105.3 kiB total
1970-01-01, 00:01:22.824 [INFO]  proxy:  📱 phone to car transfer: 1.1 MiB (219.8 kiB/s), 13.8 MiB total
1970-01-01, 00:01:22.826 [INFO]  proxy:  📲 car to phone transfer: 8.9 kiB (1.8 kiB/s), 114.2 kiB total
1970-01-01, 00:01:27.835 [INFO]  proxy:  📱 phone to car transfer: 1.1 MiB (217.7 kiB/s), 14.9 MiB total
1970-01-01, 00:01:27.837 [INFO]  proxy:  📲 car to phone transfer: 9.0 kiB (1.8 kiB/s), 123.3 kiB total
1970-01-01, 00:01:36.507 [INFO]  main:  📵 TCP/USB connection closed, trying again...
1970-01-01, 00:01:37.509 [INFO]  usb:  🔌 Initializing USB Manager
1970-01-01, 00:01:37.509 [ERROR]  main:  🔌 USB init error: No such device (os error 19)
1970-01-01, 00:01:37.510 [INFO]  bluetooth:  🥏 Bluetooth alias: WirelessAADongle-ff101d
1970-01-01, 00:01:37.520 [INFO]  bluetooth:  🥏 Opened bluetooth adapter hci0 with address B8:27:EB:55:BA:B7
1970-01-01, 00:01:37.686 [INFO]  bluetooth:  📱 AA Wireless Profile: registered
1970-01-01, 00:01:37.689 [INFO]  bluetooth:  🎧 Headset Profile (HSP): registered
1970-01-01, 00:01:37.689 [INFO]  bluetooth:  ⏳ Waiting for phone to connect via bluetooth...
1970-01-01, 00:01:37.689 [INFO]  bluetooth:  🥏 Enumerating known bluetooth devices...
1970-01-01, 00:01:37.694 [INFO]  bluetooth:  🧲 Trying to connect to: 9C:82:81:8D:64:CA (iQOO 7 Legend)
1970-01-01, 00:01:41.030 [INFO]  bluetooth:  🎧 Headset Profile (HSP): connect from: 9C:82:81:8D:64:CA
1970-01-01, 00:01:41.031 [INFO]  bluetooth:  🔗 Device 9C:82:81:8D:64:CA (iQOO 7 Legend) connected
1970-01-01, 00:01:41.701 [INFO]  bluetooth:  📱 AA Wireless Profile: connect from: 9C:82:81:8D:64:CA
1970-01-01, 00:01:41.702 [INFO]  bluetooth:  📲 Sending parameters via bluetooth to phone...
1970-01-01, 00:01:41.702 [INFO]  bluetooth:  📨 Sending WifiStartRequest frame to phone...
1970-01-01, 00:01:42.191 [INFO]  bluetooth:  📨 Received WifiInfoRequest frame from phone
1970-01-01, 00:01:42.192 [INFO]  bluetooth:  📨 Sending WifiInfoResponse frame to phone...
1970-01-01, 00:01:42.192 [INFO]  bluetooth:  📨 Received WifiStartResponse frame from phone
1970-01-01, 00:01:45.272 [INFO]  bluetooth:  📨 Received WifiConnectStatus frame from phone
1970-01-01, 00:01:45.273 [INFO]  bluetooth:  🚀 Bluetooth launch sequence completed
1970-01-01, 00:01:45.275 [INFO]  usb:  🔌 USB Manager: Enabled default gadget
1970-01-01, 00:01:45.275 [INFO]  usb:  🔌 USB Manager: Received accessory start request
1970-01-01, 00:01:45.276 [INFO]  bluetooth:  🥷 Unregistering default agent
1970-01-01, 00:01:45.276 [INFO]  bluetooth:  📱 Removing AA profile
1970-01-01, 00:01:45.276 [INFO]  bluetooth:  🎧 Removing HSP profile
1970-01-01, 00:01:45.376 [INFO]  usb:  🔌 USB Manager: Switched to accessory gadget
1970-01-01, 00:01:45.580 [INFO]  bluetooth:  💤 Bluetooth adapter powered off
1970-01-01, 00:01:45.606 [INFO]  proxy:  📳 TCP server: new client connected: 10.0.0.16:41472
1970-01-01, 00:01:45.606 [INFO]  proxy:  📂 Opening USB accessory device: /dev/usb_accessory

@manio
Copy link
Owner

manio commented Nov 12, 2024

First of all: if you want the dongle to connect to your phone you need to start it like this:
/usr/bin/aawgd -a -c -l -s5
We was only trying if it working or something has screwed, and as we can see it is able to connect and work...
so now enable the connecting code and see (step by step).

@Tttyagi123
Copy link

ok, connect manually now

I clicked on disconnect on android auto, went to bt and clicked on connect on the wireless dongle but it did not connect, android auto kept looking for device

I disconnected cable after this n it did not connect even after pi reboot

@Tttyagi123
Copy link

ok, connect manually now

I clicked on disconnect on android auto, went to bt and clicked on connect on the wireless dongle but it did not connect, android auto kept looking for device

I disconnected cable after this n it did not connect even after pi reboot

Screenshot_20241112_172251

@Tttyagi123
Copy link

Tttyagi123 commented Nov 12, 2024

There is something not right, once it fails to connect manually, it stopps connecting automatically on first boot too

I came back from parking now

@manio
Copy link
Owner

manio commented Nov 12, 2024

Sorry, I am totally lost now :(
I don't really know what command is working, what is not working.

If you would not able to figure it out yourself from your laptop, I am affraid I cannot help you.
You need to test a working command yourself from the ssh session on laptop.
First you are killing any running instance with killall, then start with below commands and see what commandline/version is working the best for you:

Here are the probable options:

/usr/bin/aawgd -a -l -s5
/usr/bin/aawgd -a -l -c -s5
/usr/bin/aawgd -l -s5
/usr/bin/aawgd -l -c -s5

@Tttyagi123
Copy link

Sorry, I am totally lost now :( I don't really know what command is working, what is not working.

If you would not able to figure it out yourself from your laptop, I am affraid I cannot help you. You need to test a working command yourself from the ssh session on laptop. First you are killing any running instance with killall, then start with below commands and see what commandline/version is working the best for you:

Here are the probable options:

/usr/bin/aawgd -a -l -s5
/usr/bin/aawgd -a -l -c -s5
/usr/bin/aawgd -l -s5
/usr/bin/aawgd -l -c -s5

Will see what i can get my hands on :) thanks for bearing with me, highly appreciated!!!!

@Tttyagi123
Copy link

@manio do check the rom i shared, that one works perfectly for me every time, the first variant which had manual connection.

@manio
Copy link
Owner

manio commented Nov 12, 2024

Just checked. The variant you are talking about is this:
/usr/bin/aawgd -a -l -s5

@NabeelUppel
Copy link
Author

Hi @manio
I got AAWirelessDongle working again by factory resetting my head unit.

Please share a base binary that I can test with. I'll report back when I get the chance.

@Tttyagi123
Copy link

Hi @manio I got AAWirelessDongle working again by factory resetting my head unit.

Please share a base binary that I can test with. I'll report back when I get the chance.

Wow, it may work for me too, i'll try it as well. Thanks

@manio
Copy link
Owner

manio commented Nov 12, 2024

@NabeelUppel
Great, the latest version is here: https://skyboo.net/temp/aa/aa-proxy-rs3

@Tttyagi123
Copy link

@NabeelUppel Great, the latest version is here: https://skyboo.net/temp/aa/aa-proxy-rs3

It's the one i have or newer than that? :D

@manio
Copy link
Owner

manio commented Nov 12, 2024

You have it here, @Tttyagi123 :
https://skyboo.net/temp/aa/raspberrypizero2w-sdcard4.img

@Tttyagi123
Copy link

Tttyagi123 commented Nov 12, 2024

You have it here, @Tttyagi123 : https://skyboo.net/temp/aa/raspberrypizero2w-sdcard4.img

You r d man!!!!!

Thinking to reset my headunit first and then connect this rom to make sure it works flawlessly

@NabeelUppel
Copy link
Author

@NabeelUppel Great, the latest version is here: https://skyboo.net/temp/aa/aa-proxy-rs3

I managed to connect now and everything works great 👌🏻

When I restart my car the bluetooth doesn't reconnect I have to manually go to bluetooth and and click on the dongle bluetooth to connect and it starts up perfectly.

@manio
Copy link
Owner

manio commented Nov 12, 2024

@NabeelUppel
Great!
Add -c to have auto-reconnect.

@NabeelUppel
Copy link
Author

@NabeelUppel Great! Add -c to have auto-reconnect.

Worked great!
I'll use this for a while and report back with any issues.

In general is this supposed to be faster than the C++ implementation? Is there any other advantages?

One thing, you should probably look into creating your own workflow that creates the images, the new versions of AAWirelessDongle (main branch) made the partition readonly so you can't replace the binary or update the start up script. Not an issue now but could be in the future.

Great work dude!

@NabeelUppel
Copy link
Author

Feel free to close this if necessary.

@manio
Copy link
Owner

manio commented Nov 12, 2024

Worked great!

Are you testing it with -c switch ?
And if we're at this: can you provide me a list of your current switches enabled?

In general is this supposed to be faster than the C++ implementation? Is there any other advantages?

It may be faster but rather due simplify compared to the aawgd and also io_uring for copying data (but this is rather not a intensive task for this bandwidth). The most important thing for me is reliability and minimize memory errors due to Rust language specifics. I am trying to have a situation where I will not wonder if my phone will connect this time or not, or if it will connect again after disconnection. For me it has to be as much reliable as it could be. This is my goal and Rust is very helpful with this :)

made the partition readonly so you can't replace the binary or update the start up script. Not an issue now but could be in the future.

It was me who proposed that change :)
It is still possible to remount in in "rw", make a change and remount "ro".
In fact I am still using the whole system in "ro" because I don't like the "rw" of any partition where a car could cut out power without any notice. This is asking for troubles IMHO, even for storage partition where writes are rare.

Preparing the whole image is out of my interests for now. Nisarg did a good job so I am just using it :)

@NabeelUppel
Copy link
Author

Worked great!

Are you testing it with -c switch ? And if we're at this: can you provide me a list of your current switches enabled?

I just add "-- -d -s5 -c" to the startup script in etc/init.d/93aawgd

In general is this supposed to be faster than the C++ implementation? Is there any other advantages?

It may be faster but rather due simplify compared to the aawgd and also io_uring for copying data (but this is rather not a intensive task for this bandwidth). The most important thing for me is reliability and minimize memory errors due to Rust language specifics. I am trying to have a situation where I will not wonder if my phone will connect this time or not, or if it will connect again after disconnection. For me it has to be as much reliable as it could be. This is my goal and Rust is very helpful with this :)

Agree with this! I'm happy to be a tester for you and help out where I can.

made the partition readonly so you can't replace the binary or update the start up script. Not an issue now but could be in the future.

It was me who proposed that change :) It is still possible to remount in in "rw", make a change and remount "ro". In fact I am still using the whole system in "ro" because I don't like the "rw" of any partition where a car could cut out power without any notice. This is asking for troubles IMHO, even for storage partition where writes are rare.

Preparing the whole image is out of my interests for now. Nisarg did a good job so I am just using it :)

Good to know!
Don't you find it it tedious to SSH into it, replace the files, remember to chmod +x, updated the start up script etc

Speaking of which perhaps it may be useful to add these steps to the readme

@manio
Copy link
Owner

manio commented Nov 12, 2024

So you're using it without legacy mode "-l" enabled. Like in my car. Good - this means that it should work faster when initiating connection :)

Don't you find it it tedious to SSH into it, replace the files, remember to chmod +x, updated the start up script etc
Speaking of which perhaps it may be useful to add these steps to the readme

I'll think of it, but maybe later!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants