IHU status message?

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

IHU status message?

Da Bear
Can we somehow see if the IHU is on/off, or in CD/radio mode?

I'm thinking that when the microphone is working we'll want to be able to receive calls regardless if CDC is active or not. IE listening to radio - incoming call forces IHU to change to CDC and routes the sound to the adapter.
And if the IHU is off - the module is not accepting bluetooth connections.

Possible solution: Maybe in a future hardware revision we connect the module in both the canbus- and handsfree connector directly inside the center console?
Saab 9-5 Aero MY01 AS3 - 270hp/240hp Biopower
Saab 9-5 SE    MY00 AS1 - 210hp+
Reply | Threaded
Open this post in threaded view
|

Re: IHU status message?

Karlis
Administrator
Da Bear wrote
Can we somehow see if the IHU is on/off, or in CD/radio mode?
Yes, we can. There's a specific CAN frame that appears on the bus that we also use to determine if the CDC is active (IHU is pushed into CDC mode) or not (IHU is in Radio mode).

Da Bear wrote
I'm thinking that when the microphone is working we'll want to be able to receive calls regardless if CDC is active or not. IE listening to radio - incoming call forces IHU to change to CDC and routes the sound to the adapter.
And if the IHU is off - the module is not accepting bluetooth connections.
This, currently, won't be possible, as we assume that once IHU is not in CDC mode, the RN52 chip is pushed into 'discoverable/connectable' mode. Meaning, that it disconnects from whatever device it was previously connected to till IHU switches back to CDC mode.

Da Bear wrote
Possible solution: Maybe in a future hardware revision we connect the module in both the canbus- and handsfree connector directly inside the center console?
We're trying to use mic-in connector for this purpose. Once an incoming telephone takes place, RN52 mutes audio and switches mic-in on. Then we should be able to use the mic built into the console.
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
Reply | Threaded
Open this post in threaded view
|

Re: IHU status message?

homerisback
Is there a CAN frame telling that the IHU is OFF (no matter if car is running or not) ?
Maybe we could use it, in case it exists, to send a "after 30 seconds standby command" to RN52 (S^,30).
I thought about that because as I use Tasker on my android phone, as soon as it detects a known car bluetooth device, is switches wifi off, data on, adjusts brightness, volumes and auto-replies to incoming SMS to say that I'm driving and can't reply right now...
By the way, yesterday I was in my house and enough close from my car to have a BT connection and Tasker did its job while it wasn't necessary.

If this can be implemented, we would need a wake-up command as soon as the IHU is switched on...
An idea to give extra work to Karlis
01' 9.3 SE Conv - AS3 - Nexus 5 Android M 6.0.1 - BlueSaab v4.2 + Amp - Latest CDC repo.
Reply | Threaded
Open this post in threaded view
|

Re: IHU status message?

Seth
Administrator
I think this issue has been address/fixed in the latest release (3.0, & with proper rn52 settings applied)
NC, USA
Reply | Threaded
Open this post in threaded view
|

Re: IHU status message?

Karlis
Administrator
In reply to this post by homerisback
Whenever IHU is switched away from CDC mode (back to Radio, Tape or OFF at all), it puts a frame with ID "0x3C0" on the bus. We handle that frame in the code and whenever we see it with the first byte being "0x14" we know the IHU is in "non-CDC" state. In this case we mark the BlueSaab module as "inactive" in the code and send the "disconnect" command to RN52 which tells RN52 to disconnect from the last known device and remain in "connectable/non-discoverable" state.

Now for the "S^" command part, it might get tricky. I have experimented and did some coding. It might be possible to send the module to sleep after "X" seconds of inactivity (not being connected to any device) and then wake it up on demand. This would be possible on v3.3 boards only though as they have a dedicated PWREN pin connected to ATMEGA328 which we can manipulate via code. On prior PCB versions I believe PWREN pin of RN52 is directly connected to 3.3V thus always staying high and we can't manipulate it via code.

Seth, am I right?
2001 9-5 SE V6; 2006 9-5 Wagon; iOS; BlueSaab version = "latest and greatest" :)
Reply | Threaded
Open this post in threaded view
|

Re: IHU status message?

Seth
Administrator
yes, v3.2 pcb and prior have the PWREN pin hard wired to 3.3vdc so the RN52 will never go to sleep (in theory).
NC, USA