BimmerGestalt / AAIdrive

Implementations of some Android Auto features as unofficial IDrive apps
MIT License
540 stars 90 forks source link

Issues with USB connection #645

Closed biggio85 closed 6 months ago

biggio85 commented 1 year ago

I have a 2020 BMW x2 with id6, I have downloaded the aaidrive and mybmw app. If I connect the phone with Bluetooth spotify works but not WhatsApp, notifications, etc. If I connect with USB, it won't connect because it says phone doesn't give permission. When I connect it, I select file transfer on the Android phone. But nothing. I also tried transferring images or just reloading but nothing. Where am I wrong? Phone is a huawei p20lite and Android 9.1.0.4.

hufman commented 1 year ago

It's hard to say. Does your car's Mobile Devices menu show your phone's USB connection after you connect? You should be able to click into this USB connection and see an Apps option to enable. Similarly, the car's Mobile Devices menu should show your phone's Bluetooth connection, and there should be an Apps option there. What options do you see in that menu?

biggio85 commented 1 year ago

Ok, thanks for answer. After several tests, I realized that I didn't have the problem, even if I had the car connection icon on my phone, the apps must always be open and in the background. This wirelessly. Then set the apps on the phone to always stay in the background when open and everything works fine. As far as the USB connection is concerned, the problem is with the phone. He's obviously too old. I have noticed that even if I select from the file transfer settings, it stops me in upload only. Anyway I wanted to congratulate you on the job done. An awesome app.

butterflywaltz commented 11 months ago

Age of mobile phone might not be determining factor...having a Huawei P50 Pro but cannot figure out how to connect via USB. Have chosen 'file transfer mode', have even enabled USB debug mode (was wondering if that will help), but still stuck at a message saying 'need to enable storage mode, either in car setting or in phone setting' (I have rephrased). But couldn't figure out further.

hufman commented 11 months ago

USB support with MyBMW has been found to be relatively buggy, unfortunately. You could try uninstalling MyBMW and trying BMW Connected Classic or BMW Connected 6.4, which should work even without their login servers being functional.

butterflywaltz commented 10 months ago

I have a MINI F60. I tried to use the legacy MINI connected, installed via apk but launch has an error. I suspect it's just my phone as even connect to PC it needs a software called HiSuite to see all the contents.

hufman commented 10 months ago

BMW Connected will show an error when it opens, but that's fine. It still runs the background service to connect to the car and allow AAIdrive to conect, I just tested it (with Bluetooth) this week.

Biggles99 commented 6 months ago

On my 2016 F36 the connection seems to hang via usb, purely when trying to connect via android. iPhone via usb is fine (Spotify app shows & works). Android audio via Bluetooth works (no app though).

Android via usb is very unhappy: SmartSelect_20240222_191306_AAIdrive~2

I will try this: SmartSelect_20240222_223840_Chrome

hufman commented 6 months ago

The "Apps Connection is connecting" means that MyBMW or BMW Connected has detected the car and is trying to connect. Have you gone into your car's Connection Assistant and enabled Accessory mode? image

Biggles99 commented 6 months ago

Yeah it references needing to download the old connected app (I have open MyBmw): 20240222_174003~2

Biggles99 commented 6 months ago

Btw the suggestion from 'mbonus' didn't work for me. Samsung S24.

Biggles99 commented 6 months ago

a bit more info (still not resolved). Any help would be appreciated :-) AAI Connection status: image

Biggles99 commented 6 months ago

Ok interesting - I contacted BMW connected drive who advised me to do a service update, then hard reset after 24 hours. Have done that and will report back

hufman commented 6 months ago

I'm sorry, BMW is buggy with USB support. I see I previously recommended downgrading from MyBMW to BMW Connected, but which version do you have installed? You need BMW Connected 6.4, because they disabled the feature in BMW Connected 6.5. Perhaps the service update will help!

Biggles99 commented 6 months ago

Hi, I did try 6.5. I have just downloaded 6.4.1. Both versions show an error when opened (see attached).

I will try the connection again (BMW recommended wait 24 hrs).

Biggles99 commented 6 months ago

@hufman YES YES YES!! Got it to work! You legend! It was Connected Drive v4.0 (not v4.1) that seems to do the trick. I also uninstalled MyBMW (as advised), Now I have BT Audio and USB control of Apps (Spotify etc). Shame it's not audio over USB :-( But it's great that it works! THANK YOU

hufman commented 6 months ago

Glad it works!

Biggles99 commented 6 months ago

Bugger. Stopped working. Got the green connection (like below), "apps loading" on BMW, then "please download BMW connected app", and doesn't work "waiting for apps connection" on AAI :-( any ideas @hufman? SmartSelect_20240302_174556_AAIdrive

hufman commented 5 months ago

Hard to say. AAIdrive only shows that green banner if it successfully connects to the car, which means BMW Connected was passing traffic. Is BMW Connected being killed somehow? Perhaps the older version doesn't do all the latest requirements to keep the Android task killer happy, and you might have to do manual configs somewhere, especially for Samsung. Does the car show a happier connection if BMW Connected (well, it's error screen because it can't find the servers) is in the foreground?

Biggles99 commented 5 months ago

task killer happy

cheers, but yeah have tried keeping Connected in the foreground. Replicated every time is:

  1. Open AAI & Connect Drive apps
  2. Connect phone via USB (with or without BT also connecting, doesn't seem to matter. Have also tried installing Connected Drive at this moment)
  3. Connected Apps Wizard shows "Apps loading" & 'AAI green banner'
  4. But then it seems to drop the connection, BMW tells me to download Connected Drive app
  5. AAI drive says "Waiting for connection"
hufman commented 5 months ago

That's weird! I know during the initial MyBMW transition, I found that my BMW Connected 6.4 would upgrade itself to 6.5 automatically. I think that mostly stopped when they took BMW Connected off of the store, but maybe it's still happening? Otherwise, I'm not sure. The BMW Connected connection to the car needs to be solid, and AAIdrive can't help with that (beyond showing a bit of debugging info)

Biggles99 commented 5 months ago

I know, right! It worked again yesterday - but I have NO idea the replication steps. I do know that I hard rebooted the iDrive and kept Connected app on in the foreground, perhaps switched to AAI briefly to check it was still running, then back to Connected. (but I've definitely done that in the past with no joy).

I've completely disabled 'Driving Mode' which changes some of the settings (not battery!) like wallpapers and text-to-speech when connected via Bluetooth. I can't see that interfering with AAI/Connected though?

Biggles99 commented 5 months ago

@hufman is there a way I can edit the config for Connected app to make sure it doesn't get killed?

hufman commented 5 months ago

That is dependent on your phone manufacturer, many of them have custom configurations besides the standard Android battery interface. For example, Samsung has an extra screen, with these instructions.

Biggles99 commented 5 months ago

thanks @hufman done that and followed all the previous advice re. restrictions in the app settings too! Could it be any of the ID4 HUD settings, like A4A_Android (I set to Aktiv)? I'm just wondering why it connects, then drops (9+/10 times). As you can imagine an iPhone connects up via usb perfectly. but just can't get AAI + Samsung to connect 100% of the time!

hufman commented 5 months ago

As far as I know, any such settings would be found on the phone, and the IDrive settings don't impact it. For example, does BMW Connected stay running while it is in the foreground, being displayed on the phone? You could try closing other background apps to reduce memory pressure and hopefully keep it alive longer.

Biggles99 commented 5 months ago

Thanks again @hufman yeah I've tried connecting and keeping Connected in the foreground. It's very strange that it is replicated in the same manner as described above:

  1. Connect USB
  2. AAI app "Connecting"
  3. BMW "Apps Loading"
  4. AAI app Green connected w/BMW logo
  5. BMW "Please download Connected App", AAI app goes grey "Waiting for connection"

I've clicked on "Keep open" on the Connected app so will try that

Biggles99 commented 5 months ago

Thanks again @hufman yeah I've tried connecting and keeping Connected in the foreground. It's very strange that it is replicated in the same manner as described above:

  1. Connect USB
  2. AAI app "Connecting"
  3. BMW "Apps Loading"
  4. AAI app Green connected w/BMW logo
  5. BMW "Please download Connected App", AAI app goes grey "Waiting for connection"

I've clicked on "Keep open" on the Connected app so will try that

Nope didn't work. My idrive did reboot 3 times though whilst AAI trying to connect. Weird.

hufman commented 5 months ago

Curious, I've only seen the rebooting behavior when multiple BMW apps are trying to connect to the car at the same time. Otherwise, I have no further tips, and I wish BMW better supported this feature.

Biggles99 commented 5 months ago

I'm wondering if there's a 'preferred' process for getting everything to connect @hufman? Like:

  1. Turn off BT on phone
  2. Turn on car iDrive
  3. Go to Connected Assistant
  4. Plug in USB
  5. Launch AAI
  6. Launch Connected
  7. Wait
  8. Turn on BT
Biggles99 commented 5 months ago

@hufman I got word from Connected Drive helpdesk. Apparently my iDrive needs updating (and I'm unable to do it myself?). They said mine has a 2019 update:

"To get your vehicle onto the latest software you would need a BMW Centre as your vehicle is iDrive 4 which means it not able to be done by yourself."

There's no way I can flash an update myself?

Biggles99 commented 4 months ago

hey @hufman how you doing? So... software updated (July-2023 is the latest my 2016 440i can go to), and still no AAI Drive Connection. I've tried resetting iDrive, reinstalling AAIDrive/Connected/MyBMW apps. I've tried with & without Bluetooth active. I've tried starting the iDrive with & without USB connected, and plugged in at various start-up times. I've prevented all battery & memory saving operations for the apps. All to no avail.

Are there some problem-solving steps I can try to get the communication working between the phone/app and iDrive?

hufman commented 4 months ago

Unfortunately, I can't offer any help here, the USB connection is handled entirely by BMW. In fact, my car doesn't even recognize my phone when it's connected over USB, so I can't even try.

Biggles99 commented 4 months ago

Ah ha, thanks - so you only use Apps over Bluetooth? I also realised my car doesn't have 6NR as standard...

hufman commented 4 months ago

Yes, my favorite part about the BMW Apps system is that it works while my phone is in my pocket, assuming the car is newer than 2017 or so. Android Auto and Carplay have taken so long to match this feature, because they use Wifi Direct instead of Bluetooth Serial.

Biggles99 commented 4 months ago

Yes, my favorite part about the BMW Apps system is that it works while my phone is in my pocket, assuming the car is newer than 2017 or so. Android Auto and Carplay have taken so long to match this feature, because they use Wifi Direct instead of Bluetooth Serial.

Amazing! Yes my car is 2016 so I will find a way to code 6NR and get bluetooth apps working :-)