2004 to 2020 Mazda 3 Forum and Mazdaspeed 3 Forums banner

Custom Applications SDK - Write and deploy your own applications

1 reading
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

#367 · (Edited)
Hi Guys

so i really tried it all and look everywhere but i could not find how to deploy new app to the simulator.

e.g. i wish to deploy the video player app in the simulator prior to the car deployment.
I am not a programmer so don't take this as gospel. Someone else can feel free to correct me.

Short answer: you can't.

Long answer: apps that run from the framework aren't installed onto the system like other stand alone apps. At a minimum, you would need to edit the CSS files so that they have the special structure required by the framework but unless the app runs exclusively from it's folder without needing to change or install files elsewhere, they won't work without significant modifications.
 
#368 ·
Some progress on getting MZD UI working with Volumio service on Raspberry Pi, and some issues:

- I discovered that the JCI framework enables a firewall by default which modifies the ip tables. I undid this to make sure traffic to/from my RPi gets through (ports 80 and 3000)
- I initially used an IFrame to point Opera to content on my RPi, but Opera kept displaying an Internal Communication Error even though I added IFrames=1 in opera.ini. Display/control via MZD connect simulator and via Chrome on laptop to RPi worked fine though. I changed to using <div> and the MZD display works better, but there are obvious issues still:
- Not everything gets displayed. I had one try where most items were displayed (first attachment) and I could control the Volumio service on RPi from the touch-screen. All other attempts resulted in limited items being displayed (2nd attachment) or all black. The actual HTML page which the Volumio service serves up is minimal. It references Javascript files which I suppose are responsible for displaying and serving the content.

I figure the above may be a performance issue, since the display is incomplete/inconsistent. I have checked the Opera log which CASDK has reconfigured to write to under /tmp/ I believe and nothing useful was in the log file.

So my general question is this: assuming there is some performance/timing issue, what is a good approach to probe more?
- I have been tinkering opera.ini settings which I thought might make a difference, to no avail.
- I've contemplated updating Opera to a newer version but this seems to be a specialized build and has been tweaked by JCI
- I've contemplated installing a different (additional) browser on the MZD and launching it on top of Opera but I've no idea how (or if) I'd be able to intercept the car's multicontroller events

My next plan is to install tcpdump (Volumio does not have a window manager, just a console) on RPi to examine the TCP/HTTP/Websocket packets. Any other suggestions for finding the root cause of Opera display inconsistency?
 

Attachments

#370 ·
I tried it, but my sd card is not working. I keep getting an Invalid SDcard message and the custom apps do not install. Any ideas? I tried two different SD cards with the same result. I don't have GPS in my car, so I don't have the GPS SD. I made sure the cards are formatted as FAT32. I also found on this thread and other online posts people having the same problem, but without a resolution.
 
#372 · (Edited)
I also had/have the "Invalid SD card" problem. I downloaded an ISO image of navigation and put it on the SD card - I still get "Invalid SD card" but at least it mounts my card, and the apps load.

Here's the root of my SD card:
/apps
/system
/license
/content
label.txt

The latter 3 are from the BHP1 66 EZ1C ISO image.

I'll figure out the Nav later.


As far as I know (and probably I am mistaken) originals cards have their CID binded to the .lyc file they contain.

The binding is checked when you put the original sdcard into the navi. If it is right, the navi creates a new encryted file called "device.ngg" with data such as first gps fix, vin number (...) and deletes the "cardnotused.txt.sgn" file. After this you can copy/clone the sdcard and it will work (but only in your car). Also you can update it via naviextras.

When you patch the jci-linux_imx6_volans-release you are hardcoding a CID number and doesnt matter anymore the real CID of your card. So you only need to copy the right .lyc file for the hardcoded CID number into the sdcard.

Take a look at this post from championway (he's the master of these things) :chuck_norris 1:

http://mazda3revolution.com/forums/1925906-post13.html


.
 
#371 ·
I also had/have the "Invalid SD card" problem. I downloaded an ISO image of navigation and put it on the SD card - I still get "Invalid SD card" but at least it mounts my card, and the apps load.

Here's the root of my SD card:
/apps
/system
/license
/content
label.txt

The latter 3 are from the BHP1 66 EZ1C ISO image.

I'll figure out the Nav later.
 
#373 ·
Hi anyone knows how to control radio tuner inside mazda with this SDK? (I would like to get some other values from it like signal strength and RDS PI code as well as manualy enter a desired frequency) is this posible? (and if it is how would I do that(how is FM Tuner even controlled?)

Thanks for Anwsering and Best Regards
 
#379 ·
So if we don't have NAV SD CARD can we use some empty SD Card ? How we should prepare the card to work in our cars?
I developed a test "youtube" app and I would like to see if it works in my car so I can continue developing it. https://www.youtube.com/watch?v=ysUnTamhlkI
You can use an empty card I use 2 cards both have CASDK on them one just has navigation as well (I take that one out to play videos and other memory heavy activities). To prepare the SD card you just load SD card files from releases page in the repo then run the USB installer and you're good to go: https://github.com/flyandi/mazda-custom-application-sdk. If you are down to send me your app I am interested to test it as well and I could maybe help you develop it if you want.
Hi guys I am asking for help. I really like tge speedometer app, but it doesnt run well on my mazda 3. When I use it i get audio freezes with the navigation, cause the cpu/ram slow ist. When possible I'd like a minimalistic version of it, compass is not really needes, I only need the actual speed as gauge and number, mayve some data like consumption, altitute und trip, the other things are not so important.
Could anybody please simplify the app a little?? Thanks in advance
Since you are posting this question in the CASDK thread I'm going to assume you are looking for a minimalistic speedometer app that runs on CASDK. Well its already made here it is: https://github.com/flyandi/mazda-custom-application-sdk/tree/master/apps/app.speedometer
 
#376 ·
Hi guys I am asking for help. I really like tge speedometer app, but it doesnt run well on my mazda 3. When I use it i get audio freezes with the navigation, cause the cpu/ram slow ist. When possible I'd like a minimalistic version of it, compass is not really needes, I only need the actual speed as gauge and number, mayve some data like consumption, altitute und trip, the other things are not so important.
Could anybody please simplify the app a little?? Thanks in advance

Gesendet von meinem SM-G935F mit Tapatalk
 
#381 ·
You can do that without CASDK, just use some jquery to append your DOM element to the reverse camera template then use CSS to position. And I'm pretty sure you can move the already existing overlaid elements with CSS too but I'm not 100% on that. You can definitely add elements even if you have to append to a higher level of the DOM but you don't need CASDK for that.
 
#386 ·
How to make a 'beep'?

Hi all.
Does anyone know how to make an app play a beep in the cars speakers?
I have tried something like:

beep: new Audio('beep.wav'),
...
this.beep.play();​

Where the file 'beep.wav' is in the same dirctory as the source files.

Neither the simulator or the car play anything:smile2:
 
#388 ·
Hi all.
Does anyone know how to make an app play a beep in the cars speakers?
I have tried something like:

beep: new Audio('beep.wav'),
...
this.beep.play();​

Where the file 'beep.wav' is in the same dirctory as the source files.

Neither the simulator or the car play anything:smile2:
Uhm, i think it not possible to play beep like you said...

May be you can try this system function: framework.common.beep("Short", source); ---> source: where the event to play beep...

Never try this before, please tell me if it work... :grin2:
 
#390 ·
Bringing custom application to front

Hi All,

Could you please advise how I could make a custom application - written using the CASDK framework - to appear/bring itself forward and receive focus once specified conditions become true?
To be specific, I understand that applications run in the background after CMU startup once their instance is "created". I wrote an app that tracks the GPS coordinates of the car. What I would like to achieve is the making the GUI appear as I approach home... I can't figure the appropriate functions/api calls out. Otherwise the app works fine.

Apparently I could navigate to the application menu manually, I am just too lazy. :)

Thanks for your help in advance!

Regards,
Attila
 
#392 ·
Hi All,

Could you please advise how I could make a custom application - written using the CASDK framework - to appear/bring itself forward and receive focus once specified conditions become true?
To be specific, I understand that applications run in the background after CMU startup once their instance is "created". I wrote an app that tracks the GPS coordinates of the car. What I would like to achieve is the making the GUI appear as I approach home... I can't figure the appropriate functions/api calls out. Otherwise the app works fine.

Apparently I could navigate to the application menu manually, I am just too lazy. :)

Thanks for your help in advance!

Regards,
Attila
There is an option to bring the fuel economy app forward at shutdown; you might see if you can find that trigger.
 
#391 ·
Don't mean to resurrect this thread from the dead, but I would like to resurrect this project.

I cloned the repos for the sdk and the simulator. After a bit of messing around with the simulator code, I was able to build from source and get it running on my Ubuntu computer. There were a few API breaking changes to electron in the last few years.

However, it looks like there is a bit of a difference between the source for the SDK and the latest "release" on github. For one thing, "build-runtime" does not exist within the gulp file to even build the runtime from source.

It looks like flyandi hasn't been around for awhile, but from my understanding TrezDog44 has used these casdk applications on the car. Any help figuring out where the state of things was left off and how to get back started would be appreciated.

I'd like to improve the documentation and flesh this out a bit if it would be beneficial to the community. Long term goals, I would like to port the enhanced-compass application to this framework. I would also like to support split-screen casdk applications so that you can have the enhanced-compass on one side and the speedometer or music player on the other.
 
#395 · (Edited)
#401 · (Edited)
Hi,
i was thinking about an app for the display. I thinkg that is not so difficult to implement. A sort of color picker (color palette) that can allow to chose a color and send that color to an arduino (wemos d1 mini) over wifi and turn on the ambient lights inside the car. What do you think about?
If we find a way to replicate MazdaRacerDude's libusb connection via m3 toolchain (which is a bottleneck I'm working on for two other applications), that could be possible.
The second bottleneck then is the question, can a CASDK app write a oneliner to "/tmp/mnt/data_persist/dev/bin/"? Then the app could allow you to pick a color, store the color code in that oneliner file and the microcontroller at the usb plug could look for a change every second, read the color code and drive RGB LEDs.

For that first problem, we'd need someone who could help/explain how to flash that code from MazdaRacerDude onto a RedBear Duo or Arduino Due (should work, it also has a ARM Cortex-M3 chip). Or if possible, other (easier?) ways, maybe even on other microcontroller boards?
 
#398 ·
(Where) Can I extend the monitored values that the apps can register to (for example "VehicleData.vehicle.speed")?

I know the speedometer (standalone) app has its speedometer.sh (SPEED=`smdb-read -n vdm_vdt_current_data -e VehicleSpeed`), but where do CASDK apps get these values from? Btw. the speedometer.sh is pulling the values via OBD2 PIDs (for example "VehicleSpeed"), correct? So any PID could be added there?

Thanks
 
#399 ·
Well here are the scripts getting the values and writing them to temp files: https://github.com/Trevelopment/MZD-AIO/tree/master/app/files/tweaks/casdk/scripts
this one watches them all: https://github.com/Trevelopment/MZD...ZD-AIO/blob/master/app/files/tweaks/casdk/resources/aio/autorun/mzd-casdk.start
and here are the subscription handlers so the values can be accessed by the JavaScript code: https://github.com/Trevelopment/MZD...70becfe/app/files/tweaks/casdk/resources/aio/mzd-casdk/runtime/runtime.js#L1253

So I don't know what you are looking for but I tried to include every possible available value table that could be read.