BT module sleep when not in use

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

BT module sleep when not in use

saab95
I have a small issue when my phone restarts, it tries to reconnect to the latest BT device that has been used. It turns out that the BlueSaab BT is available even if the car stereo is off.

Is it possible to disable BT (connections) when the CDC is not in use?
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

Seth
Administrator
what version of hardware do you have? and what version of software are you running?
NC, USA
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

saab95
Seth

Yes, I should have added that info...

I've got Hw rev 3.3A and running software ver 4.0
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

Seth
Administrator
So I thought about this issue before; a long time ago, before the software was really good like it is now, my phone would stay connected to the bluesaab even though I went inside my house. My car was still close enough that I wouldn't get alerts on my phone because they were playing through the car :P

A suggestion at the time was to put the rn52 to sleep after 1min of no activity. That can be changed via the programming command. But then that brought up the issue of how to wake the rn52 back up again after it was asleep, and if the module would "miss" the play command due to waking up when seeing the play command, so it wouldn't act properly...I don't think we ever went so far as to address this.

So therefore, afaik, the sleep mode has been disabled on rn52 (I think it's STP command, per the datasheet). You could change this and see if that works for you.
NC, USA
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

saab95
OK, thanks for the background info.
I'll experiment with this in spring when I have some more spare time.
sbt
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

sbt
In reply to this post by Seth
Seth wrote
A suggestion at the time was to put the rn52 to sleep after 1min of no activity. That can be changed via the programming command. But then that brought up the issue of how to wake the rn52 back up again after it was asleep, and if the module would "miss" the play command due to waking up when seeing the play command, so it wouldn't act properly...I don't think we ever went so far as to address this.
Seth, as far as I know, fixing this issue for Saab95 doesn't require re-enabling sleep mode. It's about whether the BlueSaab is connectable when the IHU/car is off. You can make arguments either way as to whether it's a good thing or not. I would argue the BlueSaab shouldn't be connectable unless the IHU is on, but it might slow down the start up process for some folks, and the phone I'm using doesn't have Saab95's issue.

This might be the sort of feature where you'd want to give users some control over the behaviour, probably via a IHU button, so that it's set one time on installation, and the BlueSaab remembers the setting after that.

Saab95, what kind of phone are you using (including software version, please?)

Cheers,
Sam.
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

saab95
Sam,
I'm running an old samsung with cyanogenmod :-)
sbt
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

sbt
saab95 wrote
Sam,
I'm running an old samsung with cyanogenmod :-)
Thanks, a few more q's if I may:

For the BlueSaab:
1) If you load the RN52-BT-PRG software, and then send the "D" command, what does the RN52 report?
2) Also, what's the result of the "G%" command? If the result is not 0084, try setting it to 0084 with S%,0084, then R,1 to reboot. You may want to mod your BlueSaab module to force 9600, so the RN52 programming is easier. Unfortunately, it's not automatic for H/W v3.3. There's detailed RN52 instructions at https://github.com/sambthompson/SAAB-CDC/wiki/Configuration-and-code-upload (this is the draft wiki). Don't forget to reinstall your patched version of the SAAB-CDC code after. I'd upgrade to 4.1 if you can. It still won't auto configure the RN52, but there are other worthwhile fixes.

For your phone:
3) I'm not familiar with features on Cyanogenmod. Is there a setting for "visibility timeout", and if so, what is it set to?
4) Does this happen everytime you restart your phone (within range of your car, obviously)?
5) Are these restarts manual, or is your phone crashing and restarting?

Cheers,
Sam.
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

saab95
Sam,

Thanx for your reply. Unfortunately I don't have any spare time at moment to play with my bluesaab. We've just been blessed with a baby boy and my spare time goes to studying for spring exam.

I'll get back to you and this issue towards summer :-)
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

homerisback
Anyway, BlueSAAB will have to wait :)
Welcome to the new born and congratulations to his parents !!
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
sbt
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

sbt
In reply to this post by saab95
Saab95,

No problem; congratulations!
9³ 5D MY02 - Stålgrå, AS3; iOS 16.1; BlueSaab v5.0-p1+Amp v1.1, SAAB-CDC v4.1 with mods
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

czabel
Alright, the kid is grown, let's get back to the BlueSaab! :D

I'm seeing this same behavior, and I'm wondering if it's something others are seeing, or if it's something I introduced when I enabled HFP on my board.

The weird thing is that my phone pauses media playback when I turn the car off, so it knows something has changed - it just doesn't disconnect from BT completely, like I think it should.

Anyone have any thoughts on this?
2000 9-5 Aero 5-Speed
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

Karlis
Administrator
Whoa, it's been a while since I've looked at v6 firmware.

So from what I'm seeing, sometime back in 2018 someone (me ) added a change in the code that will put Bluetooth module to sleep after 10 minutes of inactivity. Next time when head unit switches over to CDC mode, it sends a command "Play", which, in turn, invokes command "oh, you're not connected yet? waky-waky, connect to last known device and then Play!".

Hope this helps.
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

czabel
Thanks for taking another look Karlis. What I was curious about is this:
When I turn off the car, playback stops on my phone, but bluetooth doesn't disconnect.


I was going to ask if this was the expected behavior, but I now know that it is NOT :D

This was an artifact of my adding HFP without updating the disconnect and reconnect commands. I have since fixed it. :) Sorry for the false alarm!
2000 9-5 Aero 5-Speed
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

Karlis
Administrator
Ah, that makes sense! Yes, you need to update connect/disconnect flags in corresponding commands. Otherwise you would just disconnect A2DP/AVRCP profile but not HFP also. SD and SK commands are your friends in this case. ;)
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
Reply | Threaded
Open this post in threaded view
|

Re: BT module sleep when not in use

00Vig
Jumping onto this post because I might be seeing an issue along the same lines....  
During this "Covid lockdown" I've been spending more time in the garage and setup a little Bluetooth stereo in there.  I have noticed that the battery in my car goes dead on days when I'm listening to a lot of Bluetooth music in the garage.  My phone does not show that it is connected to the Bluesaab module, but wondering if Bluesaab could still be "listening" to my phone whenever the phone is in close proximity and streaming to a different device?
I'm not ruling out coincidence or that something else could be causing an intermittent battery draw on my car, but wondering if the above is likely or plausible.  I am using a v5.5 board running v5.1b firmware (with SID display).