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

Changes for select mode operation #56

Merged
merged 18 commits into from
Feb 29, 2024

Conversation

Ioniq3
Copy link
Contributor

@Ioniq3 Ioniq3 commented Feb 17, 2024

The behaviour first phone or usb may changes depending on each car headunit.

The file /root/.env can use for this. It cannot be put in the /boot of the first partition of the sd because buildroot doesn't mount it by default.

aa_wireless_dongle/package/aawg/src/proxyHandler.cpp Outdated Show resolved Hide resolved
aa_wireless_dongle/package/aawg/src/aawgd.cpp Show resolved Hide resolved
aa_wireless_dongle/board/common/rootfs_overlay/root/.env Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Owner

@nisargjhaveri nisargjhaveri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some very small changes. Waiting for the build to succeed. Thanks a lot for spending time on this! :)

@nisargjhaveri nisargjhaveri merged commit 383642f into nisargjhaveri:main Feb 29, 2024
5 checks passed
@nisargjhaveri
Copy link
Owner

Thanks a lot @Ioniq3 for the PR!

@Ioniq3 Ioniq3 deleted the select_mode_operation branch March 2, 2024 20:02
sondresjolyst added a commit to sondresjolyst/AAWirelessDongle that referenced this pull request May 25, 2024
* Update README for the updated connection process

* Update build.yml to upload combined artefact as well

* Disable Bluetooth Device Identification

* Add option to changes the usb/phone connection sequence (nisargjhaveri#56)

Add option to change the initial connection. Set `AAWG_CONNECTION_WAIT_FOR_ACCESSORY` in `/etc/aawgd.env` to wait for the usb to connect first rather than connecting to the phone first.

Co-authored-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>

* Bump RPi Bluetooth and Wifi firmwares (nisargjhaveri#69)

Fixes issues with Bluetooth and Wifi on some devices

* Fix some spellings

* Reduce logging verbosity, don't log every read/write until there might be an error

* Add timeout for usb accessory start request and retry connection

- In phone-first connection, the phone seems to have a 10s timeout for the TCP connection.
- If usb takes more time than that, it will anyway fail to connect.
- Add timeout for 10s to receive the usb accessory start request, if not restart the connection.

* Retry bluetooth connection until TCP connection is established

- This should be useful in the cases where the initial bluetooth connection fails.
- Keep retrying the bluetooth connection until the TCP is connected.

* Add small delay before enabling accessory usb gadget

* Disconnect bluetooth device before retrying bluetooth connection

* Add TCP read timeout, reliably stop forwarding by interrupting the threads (nisargjhaveri#90)

- Add read timeout for the TCP connection to help detect wifi disconnection or other failures
- When USB/TCP error is detected, interrupt the other thread to stop waiting on the read/write operation

The interruption is required, especially for the usb read/right operations as it currently does not support poll/select.

Fixes nisargjhaveri#26.

* Improve logging, redirect console output from init scripts to syslog as well

* Add execute permission for /etc/init.d/rcS

* Add dongle mode connection strategy (nisargjhaveri#72)

- Android Auto has native support to connecting Wireless AA via dongles.
  - With the dongle mode, we don't need to fake the HSP profile for connection. This results in better call audio routing.
  - With this, the phone waits for headunit's bluetooth to connect. This might help in cars where power to the dongle is started much before the headunit is ready.
- Add config AAWG_CONNECTION_STRATEGY to choose other connection sequences.

* Update README for dongle mode connection

* Reduce verbosity of hostapd logs

* Add Nano Text Editor To Buildroot (nisargjhaveri#104)

* Increase bluetooth and usb connection timeouts

---------

Co-authored-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>
Co-authored-by: Ioniq3 <156689157+Ioniq3@users.noreply.github.com>
Co-authored-by: NabeelUppel <52805376+NabeelUppel@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

3 participants