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

Feature idea: Companion app for BT support of older vehicles #320

Open
drm87 opened this issue Jun 12, 2021 · 3 comments
Open

Feature idea: Companion app for BT support of older vehicles #320

drm87 opened this issue Jun 12, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@drm87
Copy link

drm87 commented Jun 12, 2021

Hi, here is a feature idea, I would be happy to know what you all think about it:

Problem:

Might be a real "first world problem", but I do not particularly love the fact that I need to connect my phone via USB in my iDrive 4 (ID4) equipped car. I often forget it when I enter the vehicle and also often forget my phone when I leave the car. Having it all connect wireless via Bluetooth (BT) would be great, so my phone can just stay in my pocket or bag.

Solution idea:

I have a bunch of old Android phones still lying around. Using one of them (Phone_2), connect it via USB to the car, my daily phone (Phone_1) would connect to this phone via BT.

Phone_1 <---BT---> Phone_2 <---USB---> Car

Phone_2 would have installed the Connected app, as well as a additional proxy app that would be able to communicate over BT with another app/module on Phone_1. In the best case, this module would be part of AAI. This module/AAI would then just send the data it would normally send to the connected through this BT connection to the proxy app, which would forward it to the Connected app.


What do you think about this idea? Would it be feasable?
I am not sure how much effort needs to be put into the "proxy app" for connecting to the Connected app. I think the communication between the two apps via Bluetooth (using a serial connection or similar) should not be a big problem.

@drm87 drm87 changed the title Feature idea: Companion app for BT support for older vehicles Feature idea: Companion app for BT support of older vehicles Jun 12, 2021
@hufman hufman added the enhancement New feature or request label Jun 13, 2021
@hufman
Copy link
Collaborator

hufman commented Jun 13, 2021

My favorite aspect over ID5 is indeed the automatic connection without needing to pull the phone out of my pocket.
Because the Connected app hosts a TCP service to talk to the car, there are many feasible possibilities. The ACCESSORY_ATTACHED intent includes a hostname and port to connect to, and AAI also supports just probing the ports that the car service normally listens at. However, Connected only binds the service to localhost, so some proxy method on your Phone_2 will be needed.
One approach which might be quick to experiment with: If you have sshd on Phone_2, you could have Phone_1 just ssh to Phone_2 and -o LocalForward 4004:localhost:4004, and AAI's port probing on Phone_1 should automatically probe and connect through the SSH tunnel to BMW Connected on Phone_2. Then you would just need to figure out other transport-level things (Wifi-Direct connection, tunneling the car TCP connections through a single Bluetooth connection somehow, maybe something with Bluetooth PAN). Trying to proxy audio through such a system would be an extra complication (keep in mind that AAI's MusicAppMode will assume it can successfully get audio context depending on the port that it is connected to).
So yes, it is technically feasible! I've even tried it a few months ago, as a way to try to sniff traffic on my non-rooted phone (with both phones being on the same wifi, which wouldn't work for your goal).

@LACNR
Copy link

LACNR commented Jun 13, 2021

I personally think it is simply easier to just connect via USB rather than using a second phone that is constantly connected to the car and works as an in-between. I have either an iPhone or Android plugged in so whenever I get into the car it is ready to grab and operate.

Of course just using Bluetooth would be even better, but I lay my phone on top of the cup holders inlays by default.

One major flaw in the idea imo is you will have to make sure the second phone is always charged up and actually operating, and of course that you will need a second phone lay around in your car.

But the thought itself sure is cool, but personally a weird detour.

@6i6i
Copy link

6i6i commented Sep 5, 2023

@hufman now implemented an option to add an additional ip address and port to search for listening car connection servers.
The featuer is currently in the latest open beta.
For me the wireless solution is now working as desribed in
#510

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

No branches or pull requests

4 participants