2004 to 2020 Mazda 3 Forum and Mazdaspeed 3 Forums banner

Custom Applications SDK - Write and deploy your own applications

237K views 426 replies 112 participants last post by  Sid Meyer  
#1 · (Edited)
The Custom Application SDK for the Mazda Infotainment System

It's finally coming. Instead of figuring out each application individually, I created this minimalistic micro framework and runtime that allows you to write and deploy custom applications to the Mazda Infotainment System without the hassles.

It also comes with a 1:1 simulator that allows you to run and debug your applications locally without having to deploy to the Infotainment system.

This project is currently under heavy development but hey, we got an alpha release available. There is little documentation available at this point.

Please contribute if you have the time and the energy.

We have an active Trello board running for organization:

https://trello.com/b/rBEWRDdg/alpha-sprint

If you find CMU values that actually provide meaning, please add them here:

https://docs.google.com/spreadsheets/d/1lkVUzhLEMglb7eFglne1iDiJ5vKMpaoxXKW-7bSZ6Ws/edit#gid=0

---

IF YOU USE THIS IN YOUR CAR, PLEASE MAKE SURE YOU HAVE A FIRMWARE VERSION OF V55.x OR HIGHER INSTALLED

Earlier version might be compatible but have not been tested.

---

https://github.com/flyandi/mazda-custom-application-sdk

Download the Simulator:

OSX: https://github.com/flyandi/mazda-cu...plication-sdk/releases/download/0.0.1-alpha/casdk-simulator-0.0.1-alpha-osx.zip

Win: https://github.com/flyandi/mazda-cu...ication-sdk/releases/download/0.0.1-alpha/casdk-simulator-0.0.1-alpha-win32.zip

The runtime SDK with USB installers: https://github.com/flyandi/mazda-cu...azda-custom-application-sdk/releases/download/0.0.1-alpha/casdk-alpha-0.0.2.zip - also needed for the Simulator.

---

To get started:

1) Download the runtime SDK which contains the deploy images. Copy and paste the files in deploy/install to an USB stick, plug the stick on your infotainment and reboot your Infotainment system.

2) Download the Simulator

3) Follow the tutorial in the wiki page on GitHub

4) Copy the contents of the folder sdcard to an SDCard and reboot your system.

5) Enjoy your custom applications
 

Attachments

Discussion starter · #17 ·
Discussion starter · #22 ·
So two bugs that I know of right now - and I am trying to fix them tonight:

1) Sometimes after recovery (when your system just went to sleep) it might stall and the screen locks up. Workaround is right now to hold down MUTE+NAV+BACK for 10s to manual reboot the system. It's something with the SD Card not mounted yet and the system trying to read from it. This will fix as soon I have implemented USB support. It's a design issue from the initial concept.

2) When you switch between apps (native and custom) the DataHandler stops working and your app doesn't receive any values anymore. I will fix this today.

Thx,

Andy
 
Discussion starter · #24 ·
So do apps actually go on the SD card, as in the root directory of the SD card for navigation? Sorry if that is obvious.
No worries - basically copy the contents of the sdcard/ folder in the release package to the root of your SD Card.

Also if it isn't obvious you need to install the proxy patch to your Infotainment system by preparing a USB stick and copy the contents of deploy/install to it. Plug in the USB stick to your Infotainment system and reboot and wait.

If there is any issues, you can use the deploy/uninstall script to remove everything.

The scripts "should" be pretty safe since there are many checks in there and really is a minor modification to the system - other than changing the opera configuration on your system.


I probably installed/removed/installed/removed .. about a 100 times and never had an problem :)
 
Discussion starter · #28 ·
Is there a way to have the data as Metric instead of imperial system?

I see that when set to North America the speed and the like are set to Mph, but here in Mexico we use Km/h

What do you mean? The Simulator operates all on metric values. The apps have a duty to convert that themselves.

The framework is data helpers that help to convert these, e.g.

Code:
 var mph = DataTransform.toMPH(speed);
 
 var mpg = DataTransform.toMPG(kmpl);
If you talk about the speedometer .. if the region is NA - than yeah the default is imperial but that app is just an example and if you hit the center button of the multicontroller (in the Sim or Car) it converts these.
 
Discussion starter · #32 · (Edited)
so I did install the casdk with the USB Installer script on the car and did copy the SDCARD folder in the zip on the SD-Card.
The apps are now listed in the Application menu of the Mazda however I can't launch them. When I press select nothing happens...

Andy
What version do you have installed?

SSH in and tail the running log in /var/log/running_log and hit the button. Look for the event SelectDriveRecord .. and send me the line what it says.
 
Discussion starter · #35 ·
Thanks for all of this Andy,
Are you updating the master zip files linked to at the start of this thread for all the changes or would we need to install the sources and rebuild them for now?
Looking forward to the use of websocketdto see if the CMU performance is better, :smile2:
I am updating as I fix stuff. This recovery bug really bothers me. There is no error thrown anywhere. Debugging in the car sucks :)
 
Discussion starter · #37 ·
Yeah I am getting the recovery bug maybe every 1 in 5 starts, but at least a manual reboot gets it going straightaway. And it's usually pretty obvious when it happens on boot because it hangs before loading the custom background.
I am sitting in the car right now and do debugging .. I got the error:

Code:
undefined at undefined in undefined
Yeah .. maybe I should define it?
 
Discussion starter · #47 ·
Great job, now the rebooting is working perfectly, but ....
In the application screen they appear but the I try to start any of that nothing happen.
The application does't start.

Is there anything missing ? some authorization on the SD card ?
I copy Apps and System folder in to the original NAVI card of the car.
Whats your region / firmware version?

This is currently only tested on 55.x-NA .. the EU or other region version might need some adjustments.

Also again, if you SSH into the infotainment, there is a log file in /tmp/root/casdk-error.log that contains all errors from Opera. OPen it up and see if you see anything unusual or send me the file.

To copy it to your system do this:

Code:
scp root@<IPADDRESS_OF_INFOTAINMENT>:/tmp/root/casdk-error.log .