2004 to 2020 Mazda 3 Forum and Mazdaspeed 3 Forums banner

The Infotainment Project

4.2M views 6.6K replies 1.1K participants last post by  bsliv  
#1 · (Edited by Moderator)
MOD EDIT 8/12/15:

INDEX FOR THE INFOTAINMENT PROECT can be found here:

http://mazda3revolution.com/forums/2014-mazda-3-skyactiv-audio-electronics/104730-index-infotainment-project.html

ONLY USE IT AS A REFERENCE. ALL QUESTIONS AND COMMENTS REGARDING THE INFOTAINMENT PROJECT SHOULD BE POSTED HERE.

----------------------------------------

So, the Infotainment system is great, but it has me thinking how much greater it could be. There's so much potential wasted right now, and I would like to untap some of that.

The original post: http://mazda3revolution.com/forums/...-mazda-3-skyactiv-discussion/39650-infotainment-system-software-components.html.
This got me thinking. This is obviously a linux-based OS running on an ARM chip. This was seen on this post as well: http://mazda3revolution.com/forums/...3-skyactiv-audio-electronics/54722-accessing-infotainment-diagnostics-menu.html

I'm a software engineer, but don't have any experience dealing with low-level linux based systems. I would love to be able to either install custom, modified linux operating systems in the car or just be able to alter parts of the system to enable hidden or disabled parts of the system.

For instance, every european market has the ability to buy connected services (live traffic, weather, etc), and the Japanese market even can play DVD's and watch live TV!

This may at least give us the ability to upgrade our own systems without visiting the dealer, or use other applications through our phones such as Waze.

What I think may help here is getting the update code dump. This would be solved easiest if someone knows a dealer that can get the update software on a USB stick. If someone could upload that somewhere, we could then start analyzing the update procedure and the software and hopefully fine some way to hijack onto that process.
 
#3,290 ·
Hello to all,

I am new here and I've been reading this topic and searching forum for a while and I couldn't find answer on my question. So I have decided to ask here.

Did somebody finally got navigation SD card copied and working on other then his/her car ( Mazda3 )? Is there a copy of SD (iso/zip/dmg) card that can be copied to other SD. Is there any way to hack it - or only option is to buy it?

Sorry for my question, it's probably not the first one. And thank you in advance for answer.

Have a nice day.
 
#3,291 · (Edited)
I don't think it is legal. It sounds like theft of a product to me.

You take away the innovation to produce something to sell and the rest of us have to suffer for your unwillingness to rightfully purchase something that someone else has paid to research, develop and produce.

If the whole country acted like this there wouldn't be jobs. What would be the point, you work hard to produce something of value then someone else copies it and gives it away for free. If you don't want to pay Mazda, buy a Garmin.
 
#3,299 ·
I'm glad to hear that it worked! It would have been 'safer' for you to track-down the -ADR firmware image and finding the 'original' files there, since they *could* be different between -ADR and -EU versions, but since they are both version "33", and because these particular files don't change very often, it's likely that they are the same.

As for copying files from the USB drive to the CMU: first of all, obviously, be CAREFUL about modifying files on the CMU - your friend is lucky that his CMU was still able to recognize the USB drive (and was able to be recovered) - there are files that you could modify in a way that will cause the system to crash very early - before it initializes the USB drive (so, it wouldn't be possible to recover over USB).

Going back to your original script, here's a modified version that will copy "sm.conf" and "opera.ini" from the 'root' directory of the USB stick to the appropriate locations on the CMU. NOTE: I'm just quickly typing this - I have NOT actually run these commands (so I may have a typo that makes it incorrect). I spent a lot of time on my (more complicated) tweaks.sh that I included with my earlier USB recovery tweak to ensure it did the right thing - using a 'whipped together' script is risky. Anyway, here's an example script:

Code:
#! /bin/sh

#
# WARNING: I just typed this script without testing it - it may have bugs, and
# may mess-up your CMU.  Use this for reference, but don't use it 'as is' 
# unless you have studied it closely/confirmed it is OK
#

# get the location of 'tweaks.sh' that is currently running (the root directory
# of the USB drive) into the variable MYDIR
MYDIR=$(dirname $(readlink -f $0))

# make the CMU filesystem read-write (so we can overwrite files)
mount -o remount,rw /

# copy sm.conf and opera.ini from USB root directory to the CMU 
# filesystem ($MYDIR points to the root of the USB drive)

cp -a $MYDIR/sm.conf /jci/sm/
cp -a $MYDIR/opera.ini /jci/opera/opera_home/

# finished copying files - make the CMU filesystem read-only again
mount -o remount,ro /

# tell user it finished
/jci/tools/jci-dialog --title="Fix Completed" --text="Please reboot now" --ok-label='OK' --no-cancel &

# leave the message up for 30 seconds, then kill 'jci-dialog' to make the 
# message go away
sleep 30
killall jci-dialog
 
#3,300 ·
Has anyone successfully got the app to work when connected to the car when it is connected to the computer?
Was there anything else you had to do besides follow the instructions on Mazda3Hacks?
It seems to be connecting the MUI is sending system information and messages but the screen just stays blank and it is not loading the system app.

A note for the guys that build the speed app, while I was poking around the objects it looked like there is something that you can get the current speed of the car, have not been able to see if it works though as it is still not all working but it would be better to get it from there instead of the GPS. I did not note which object it was as this was from the debug console in Opera.

Hopefully I can make a little more progress.
 
#3,303 · (Edited)
A note for the guys that build the speed app, while I was poking around the objects it looked like there is something that you can get the current speed of the car, have not been able to see if it works though as it is still not all working but it would be better to get it from there instead of the GPS. I did not note which object it was as this was from the debug console in Opera.

Hopefully I can make a little more progress.
Using the speed/video/reboot app from waisky2 (addon-all-fixed-auto-install-v2) I have revised it as follows;
1. Changed the logic for MPG calculation to eliminate the flickering between KPH and MPH using the method suggested by albuyeh,
2. Revised the app to pull VehicleSpeed from vdm_vdt_current_data instead of using the GPS data. This value is scaled differently so my changes in my car are only for MPG at the moment. I need to test further and then make a revision of the code to accommodate KPH. The raw data is pulled using the command "smdb-read -n vdm_vdt_current_data -e VehicleSpeed" and is scaled * 0.01 KPH.

Additional items to do;
3. Revise the app to write the temporary speed data into /data_persist folder so rootfs does not have to be in read-write mode or eliminate the need for the speed text file altogether. This may also require the video app to be revised to accommodate returning the rootfs to read-only but I've not looked at that at all.
4. Maybe display GPS speed along with vdm_vdt speed on the app.
5. Display GPS altitude on the app,
6. Stretch idea is to log the data to a USB drive ... all GPS data along with some vehicle data etc. I would not expect this data logging to be fast "real-time" like using the OBD port and Torque would give you. Probably would be once a second or so (same as speedometer app for instance).

In a quick test around the block tonight I did not see any appreciable difference in performance. This is probably due to the app read rate only happening every second and delays in the system in reading through vdm_vdt. The speed matched my cruise control set-point within 1 MPH (usually higher). The GPS version was very similar in matching the speed control displayed set-point but of course satellite signal degradation problems would have impacted it. This is all in a 2016 MX-5 so I'm assuming the tire size and speedometer are all in spec.

I want to fix item 2 and maybe 3 and then will post the above changes. I'm on the road for a week so there will be a delay.
 
#3,302 · (Edited)
Pause on mute hack.

Greetings all. I picked up a 2016 3i Touring last Thursday, and thanks to all the hard work of people here I already have an improved system. I haven't yet digested all of this enormous thread but I have a hack to offer.

Playing the children audiobooks in the car from USB, we sometimes want to pause, yet the pause is absurdly awkward on this system, unless I'm missing something, and if you mute it just continues playing the audio, muted. Great.

So here is my tweak to pause/unpause with the mute button, doing what I think everyone would have wanted mute to do.

Edit: I tested it and it works fine on FM/AM, USB, CD and Bluetooth - on the radio it doesn't do anything different from original behavior of course. I haven't tried any of the other options, though I suspect it will be fine.

In patch form:
Code:
index 6e0051a..9746306 100755
--- a/gui/common/js/Common.js
+++ b/gui/common/js/Common.js
@@ -2191,6 +2191,9 @@ Common.prototype._HandleStatusUpdateVolume = function(msg)
         {
             this._isMuted = isMuted;
             this._isMutedChanged();
+            framework.sendEventToMmui(
+                "Common",
+                isMuted ? "Global.Pause" : "Global.Resume");
         }
     }
 };
or, in more layman's terms, in /jci/gui/common/js/Common.js, in the function _HandleStatusUpdateVolume at line 2194, insert the lines:

Code:
            framework.sendEventToMmui(
                "Common",
                isMuted ? "Global.Pause" : "Global.Resume");
I'll be poking and reading around some more, so I intend to add it to the appropriate wiki, and possibly offer it in some more generally usable form.

I was thinking of working on the tweaks bundle to make it work with patches. e.g. for the wifi tweak, avoiding the wholesale copying of the .js file. Working with patch files might well mean that the tweak.sh would still be valid with later firmware versions, plus it would be easy to back out changes.
 
#3,305 ·
So here is my tweak to pause/unpause with the mute button, doing what I think everyone would have wanted mute to do.

Code:
index 6e0051a..9746306 100755
--- a/gui/common/js/Common.js
+++ b/gui/common/js/Common.js
@@ -2191,6 +2191,9 @@ Common.prototype._HandleStatusUpdateVolume = function(msg)
         {
             this._isMuted = isMuted;
             this._isMutedChanged();
+            framework.sendEventToMmui(
+                "Common",
+                isMuted ? "Global.Pause" : "Global.Resume");
         }
     }
 };
Very nice, thanks. I've thought the same thing.

So does it pause and mute? What happens when muting the radio? Does it just ignore the event since there's no pause function available?
 
#3,304 · (Edited)
To expand on the use of smdb-read mentioned in my previous post here are some more details;

Execute smdb-read -help to get the following:
smdb-read - a command-line tool for reading from shared memory databases.

smdb-read [<options>...] --baseName=<smdb> --entryName=[<entry>]

Options:
-h, --help Outputs a brief help message.
-v, --verbose Displays name, type, and size of entries.
-n, --baseName Specifies the base name. This option is mandatory.
-e, --entryName Specifies the entry name.
-i, --integer-format=<format> Specifies the base for displaying integer entries. Should be in the range 2-36. Default is 10.
-b, --binary-format=<format> Specifies the display format of binary entries. Can be 'hex' or 'raw'. Default is 'hex'. 'raw' format cannot be used together with the -v option.

When entry name is not specified all SMDB entries will be displayed. This implies verbose output.


I executed the following commands to dump all of the data into text files. NOTE: many items do not respond with real data unless the engine is running. I first had the car in ACC mode and many items were zero.

smdb-read -v -n vdm_vdt_pid_data > vdm_vdt_pid_data.txt
smdb-read -v -n traffic_stm > traffic_stm.txt
smdb-read -v -n vdm > vdm.txt
smdb-read -v -n vdm_history_data > vdm_history_data.txt
smdb-read -v -n vdm_idm > vdm_idm.txt
smdb-read -v -n vdm_idm_history > vdm_idm_history.txt
smdb-read -v -n vdm_vdt_5000DrvLog_data > vdm_vdt_5000DrvLog_data.txt
smdb-read -v -n vdm_vdt_current_data > vdm_vdt_current_data.txt
smdb-read -v -n vdm_vdt_history_data > vdm_vdt_history_data.txt
smdb-read -v -n vdm_vdt_onehrlog_data > vdm_vdt_onehrlog_data.txt
smdb-read -v -n vdm_vdt_settings_data > vdm_vdt_settings_data.txt
smdb-read -v -n vdm_vdt_current_data -e VehicleSpeed >> vdm_vdt_current_data-VehicleSpeed.txt
smdb-read -v -n vdm_vdt_current_data -e EngineSpeed >> vdm_vdt_current_data-EngineSpeed.txt

smdb-read and the XML structure files are in /jci/smdb. I wrote the resulting text files into the default folder location when first logging into the system as this is normally emptied on restart it seems. I also explicitly deleted them just to be sure I was not using up system space.

Enjoy
 
#3,307 ·
Android Auto build

I managed to compile the Android Auto build with some minor modifications to main.c (attached) to use gstreamer V0.10 instead of V1.0 (which isn't available in CMU kernel)

https://mega.nz/#!WYtmwLSL!Vk5l7faWuqfrhggGqTLs2LIVZ7wph1Xnjqd_F7OIGzE

However, I get the following messages now

Code:
/tmp/root # /jci/scripts/headunit

(gst-plugin-scanner:8246): GStreamer-WARNING **: Failed to load plugin '/usr/lib/imx-mm/parser/lib_asf_parser_arm9_elinux.so': lib_wmdrm_arm9_elinux.so: cannot open shared object file: No such file or directory
**
[B]ERROR:main.c:183:gst_pipeline_init: assertion failed: (app->convert)[/B]
Aborted (core dumped)
The warning message may not be relevant. Appreciate if someone can help debug this error message.

Someone else who tried this on a linux PC also got the same error message (see comments on youtube).
https://www.youtube.com/watch?v=ro58qFlY01A
 

Attachments

#3,309 ·
I'm unable to connect to the infotainment virtually. following this link misc:virtual [Mazda3Hacks]

Currently running v56 ADR version. The moment I key-in the ip address from my opera browser the infotainment reboots then the opera browser is showing nothing. when I hit refresh from the browser I can see the debug logs from the right side but the infotainment gets blacked-out same as the browser.
 
#3,315 ·
Just wanted to post and say hello. Picked up a CX-5 today and found this from reddit. The instructions on the OS upgrade indicate copying the files to USB 2 device from a "WINDOWS" device .. does the fact that windows was in caps indicate the process doesn't work with OS X? I know OS X can litter the device if you remove it without un-mounting properly. Anywho .. I can build a Windows VM if necessary but prefer to keep away from it as much as I can away from work.
 
#3,321 ·
We've found that most of the OSX formatted drives don't work for some reason. It's like Apples leaves something behind on the drive, no matter how it's formatted. Some people have gotten it to work from OSX, but no one is sure how or why. You could try a third-party formatting tool.

When you go to do the upgrade, the worst you'll get is that the system will say it can't read the USB drive or it can't find the update files. It won't begin the process, error out have way through and turn your car into SkyNet or anything. So if you format through OSX and your car doesn't read the update, it's most likely the OSX.
 
#3,320 ·
With a large USB collection it can be a pain to scroll through a long list of folders. Twisting the knob scrolls one at a time, but if you didn't know holding up or down on the knob will eventually start a repeated scroll, with paging afterwards. However, the default hold delay is a whopping 1.5 seconds before it starts to act, which is just ridiculous. It's easy enough to adjust this downwards. I shortened mine considerably, so it starts to page almost immediately after holding, and repeats quite quickly. Adjust to taste:

In /jci/gui/common/controls/List2/js/List2Ctrl.js (line 128 in v51):
Code:
autoscrollTier1Timeout :                150 /* was 1500*/,
autoscrollTier2Timeout :                300 /* was 5000*/,
autoscrollTier1Interval :               200, /* was 500 */
autoscrollTier2Interval :               300, /* was 1000 */
Now if only I could get it to loop around from bottom to top and vice-versa...
 
#3,324 ·
I wanted to use the userjs to create a custom app. But I want to add my custom app to the list of apps without touching the _masterApplicationDataList. My idea is to sort-off hi-jack it and append an html to the List of Apps but I couldn't find the right ID or class since I can't do virtual connection from my laptop so there's no way for me to inspect element the infotainment. Any help?
 
#3,325 ·
Just a quick note. I've had no issues using an OSX created disk, and I don't recall doing anything special other than deleting the various "dot" files such as ".DS_Store", ".Spotlight-V100", etc. using the command-line. My deleting those is probably more for superstition reasons than technical reasons. Linux has no problem with those dot-files hanging around and the JCI subsystem has no reason to even look at or for them. I suspect the real problem folks have is in formatting the drive to start with, e.g. they put a "funny" partition table on the drive so that it ends up mounting as sda instead of sda1, sda2, etc.
 
#3,331 · (Edited)
List loop

It really bugs me when lists don't loop around, forcing me to scroll through the whole thing when I know the item I want is at the bottom. I don't really understand why it's not more common, but anyway, I think I have a pretty good solution.

I am only looping from start to end or end to start when twisting the commander knob, not during knob tilt page up/down, which is consistent with the looping behavior in Kodi and MythTV. Also, if there is a disabled item at the top or bottom it will get selected when looping, whereas the normal list functions skip over these. I think this could be avoided, but you can't act on disabled items, so it doesn't really make much difference.

The base code has a lot of checks and tries to handle scrolling and focusing, etc, but I tried to keep this change simple. Basically it notes the selected item, and compares it with the selected item after the original code decides what to do. If the index hasn't changed it means no move was possible, and I send the cursor to the other end.

I've tested this on my system, which is v51. I quickly made the same changes to my copy of v55 code so I could post it here, but I have NOT tested it on v55. If anyone tries it please confirm it works for v55. The settings menus have quite a few items disabled when on the first ACC power mode, so I was able to test this on quite a few lists with various combinations of enabled/disabled items and it seems to work fine all the time.


File=jci/gui/common/controls/List2/js/List2Ctrl.js

v51 diff:
Code:
6246c6246,6247
< 
---
> 	    var currentFocussedIndex = this._getFocussedIndex();
> 	    
6263a6265,6268
> 	    if (this._getFocussedIndex() == currentFocussedIndex) { //didn't move
> 	      this._manageFocus(0);
> 	    }
>             
6339a6345
> 	    var currentFocussedIndex = this._getFocussedIndex();
6357a6364,6367
> 	    if (this._getFocussedIndex() == currentFocussedIndex) { //didn't move
> 	      if (this.dataList && this.dataList.items) this._manageFocus(this.dataList.items.length - 1);
> 	    }
>
v55 diff:
Code:
6245a6246
>             var currentFocussedIndex = this._getFocussedIndex();
6263a6265,6268
>             if (this._getFocussedIndex() == currentFocussedIndex) { //didn't move
>                 this._manageFocus(0);
>             }
>
6339a6345
>             var currentFocussedIndex = this._getFocussedIndex();
6357a6364,6367
>             if (this._getFocussedIndex() == currentFocussedIndex) { //didn't move
>                 if (this.dataList && this.dataList.items) this._manageFocus(this.dataList.items.length - 1);
>             }
>
>
EDIT: I editing v55 incorrectly. The changes should be in _handleMCCCW and _handleMCCW. I have updated the patch here.
 
#3,332 ·
It really bugs me when lists don't loop around, forcing me to scroll through the whole thing when I know the item I want is at the bottom. I don't really understand why it's not more common, but anyway, I think I have a pretty good solution.
dude, well done. you're on fire lately!
 
#3,333 · (Edited)
I have a Nav system that works but won't pick up the satellites anymore so the arrow never moves. Does this sound like a fix for 55.00.753A update.

If so, I have the cmu150_NA_55.00.753A update but I have a 2016 Mazda MX-5 and the PDF file that shows the update says it needs the cmu140_NA_55.00.753A.
I have not seen a cmu140_NA_55.00.753A update on this site, it only goes up to 750.

I noticed it when I tried the radio dial speedometer and it never got off of zero. I've already de-installed the speedometer and checked the Nav SD card through the Mazda toolbox.

I have an appointment set up for Monday to go to the dealer and find out.
 
#3,335 ·
About the firmware, our Mazda3's used to have cmu140 then suddenly the releases became cmu150, so 150 would work with your car, just make sure you have the correct version for your region.

And about your Nav, it could be something wrong with the Antenna, It's supposed to be in the back glass in the sedan and in the shark fin in the hatchback. Did you have anything done near them lately?

The speedometer uses speed info from GPS, so as long as your GPS isn't locking to satellites the speedo won't work.
 
#3,339 ·
I'm afraid as I listed it it requires you getting access (and knowledge) to edit the files - ssh access etc..

However, it's quite possible to put it in the tweaks.sh file, and I intended to do that but hadn't got around to it yet. I'll see what I can do.

Though having now learned that I can't rely on the stupid system to resume USB when you restart the car, I'm coming to realize that it's f'ing useless for audiobooks. I'm downright angry that they'd release a system with a fundamental bug like that, let alone not fix it in the last 2 years.

Apologies if this is covered earlier int he thread, but does anyone have any insight into how the failure to resume USB might be bugfixed? I assume if it tries to resume before the USB drive is mounted, it fails and then immediately 'forgets' its last position. I'll poke around the code but if someone can offer pointers before I do that would be great.
 
#3,342 ·
@waisky2 - Have you had anyone report issues with the video app not playing reliably ? I seem to have to reboot often to get the player to start...but once it plays a video, it has no issues. It's getting that 1st video to play. Videos will not play unless I have both options checked either....If one of the options, Play All or Repeat is not checked...the videos won't play. I eventually get the videos to play...but I have to reboot...uncheck the options...reboot again...etc.
 
#3,344 ·
not sure about other, once a while I would also need to reboot in order to play video successfully, may be not as much as you coz i seldom watch video unless kids in the car.

make sure to check "Play All" if you wan system automatically play next video after current video is finished.

reliability wise i think we have no choice but to bear with it.