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

#325 ·
Hey,
I have plugged the USB stick into the USB port, started the car (but not the engine) and waited. And nothing happens. No "Installation successful / completed" message. Basically, nothing different than usual at all. Car doesn't seem to even do anything with the USB stick.

I formatted it as FAT32 and copied the directories from "deploy" category into the stick. So I had install and uninstall in the main dir. Then, tried to copy everything from install into the main dir and still nothing.

What did I do wrong? :)

P.S. Great work on the framework and simulator itself. Can't wait to give it a try :)
 
#326 · (Edited)
The long story is some operating systems will place hidden files on a drive, so that when you delete everything, you think everything is actually deleted when there may be another directory there you don't see, such as .trash or something. On Linux, it is easy to see these hidden directories and fully delete them with terminal commands. On Windows and OSX you just won't see everything there. ANY other files or directories can cause the car system to not run the tweaks.sh file, ans so you will wait forever and see nothing happen.

The short story is to just make sure the USB flash drive is totally empty of files and directories before you copy stuff over. With Windows, the easy way is to just reformat (clears the file allocation table), however you can also "show hidden files" and then see what to delete. On Linux command line, do "cd <dir>", where <dir> is the path to the root of your flash drive ("mount" will show you the path), "ls -al" to see everything, and do "rm -rf *" and "rm -rf .*" to delete all.
 
#327 ·
I've been using my scanning tool (HPTuners) to find out what parameters the computer is reporting. I was really hoping to find Oil Temp, Oil PSI and Trans Temp but these were all I could find that were of any importance to me. Anyway, I thought this layout in the tool would make a great app for us gearheads that like to know all this useless crap ;) I have been using this SDK for a couple days trying to wrap my head around how it all works. I get it? I think? I don't have the knowhow to try and make something like this myself. I thought I would just put it out there if someone would like to tackle it. I know others would want it.

Also, I tried to get the SDK apps installed on my CMU but I'm aparently not doing something right. I have the system and app folders on the root of my Nav card and I ran the install. I can see the apps in the menu, but they won't launch. What did I miss?
 

Attachments

#329 ·
I swear I tried to find the edit button for my post above but I just can't find it :)
As others wrote here before and as in my post from just a few minutes ago - try uninstalling some other apps you installed.


I think it would be really helpful to add a ' troubleshooting' page to the CASDK wiki, will save some redundant questions here ;) I tried cloning the repo and created a new page for this, but had no permissions to push my changes. I guess I need to perform a pull request...
 
#330 ·
Using Mazda infotainment system as web browser

I've downloaded this and played with the sample apps. What a great thing!

I'm working on a car setup with a Raspberry Pi 3 with external DAC and plan to use Volumio as the media controller/player. Basically, a supporting web browser can be used to connect to the Volumio service.

What I'd like to do is use the Mazda touch-screen as a web browser pointed at the Pi.
I think networking will be no problem (USB to Ethernet adapter from car to Pi) but I have no clue about how or whether it would be possible to create an app in the Mazda connect to use as a web browser. I understand that the Mazda interface is built around a web browser (Opera) but that's about it.

Any thoughts on how to pursue this?

Other options are using a dedicated touch-screen display with the Pi or controlling via smart phone but those are less integrated and not what I'd prefer.
 
#333 ·
Made incremental progress on my post from page 33. I was able to get the Volumio web interface working with the Mazda connect simulator! Just needed a refresher on my HTML experience from 15 years ago LOL. So the touch-screen controls work, next I wonder about the center console and steering wheel controls. I realize the events can be intercepted in the .js file but I haven't a clue how I could map them to trigger actions as if they occurred on the touch-screen (for e.g. volume up/down, track up/down, maybe some special mappings for other things in Volumio like playlist and favorites).
Any thoughts?
 

Attachments

#336 ·
I have MZD system version 51.x and as per this thread I need to upgrade to 55.x or greater.

For those who are using these apps successfully on MZD, what are known working versions? I heard there are security restrictions on some of the newer f/w versions so I'd like to use 55.x though I have no web references to back this up, just going by memory.

In post 19 there is mention of a code change needed for CX-5. Is a code change needed for Mazda 6? If so, please advise where to make this change.
 
#337 ·
I added some extra information to the demo speedometer (Fog light control status, rain sensor, current gear, etc.) My question though, I tried to access an entry from the PID related to the WiperControl (which I found elsewhere mentioned but doesn't show up in the VDD). It is a binary value and when I try to access it, it seems to crash the framework and it stops updating all values. Does anyone know why this might be? Or should I only be referencing the values shown in the VDD?
 
#339 · (Edited)
I'd like to confirm the installation process for the car before giving this a go. I do not have any "tweaks" installed. I'll be upgrading my firmware from 51.xx to 55.xx because I have heard later versions have clamped down on SSH access, Wifi, etc., and 55.xx has been tested in this thread.

1) Contents of /deploy/install/ go onto a USB to run the install script. Should this go on the root folder of a USB 2.0 FAT32 formatted USB stick?

2) /system/ and /apps/ folders go onto the root of your SD. Be sure to copy over those folders and not the entire /sdcard/ folder. Note that my car didn't some with an SD card (no NAV) so I will be trying this with a freshly FAT32 formatted SD card. Does anyone know if it will work? Also, in older posts there was discussion about being able to install everything from USB. Did that materialize?

3) In case something didn't go right in step 1) is the process to remove /deploy/install from the USB and copy /deploy/uninstall to the USB?


Note: the CASDK Wiki at https://github.com/flyandi/mazda-custom-application-sdk/wiki/Installation only mentions about USB and not SD card for car deployment hence my confusion.
 
#341 ·
1) Contents of /deploy/install/ go onto a USB to run the install script. Should this go on the root folder of a USB 2.0 FAT32 formatted USB stick?

2) /system/ and /apps/ folders go onto the root of your SD. Be sure to copy over those folders and not the entire /sdcard/ folder. Note that my car didn't some with an SD card (no NAV) so I will be trying this with a freshly FAT32 formatted SD card. Does anyone know if it will work? Also, in older posts there was discussion about being able to install everything from USB. Did that materialize?

3) In case something didn't go right in step 1) is the process to remove /deploy/install from the USB and copy /deploy/uninstall to the USB?
1) Yes, to the root of the USB.

2) Yes, both folders to the root of the SD card (not in an "sdcard" folder.) Not sure if you need to have the original NAV sd card; I have the nav so I already had the SD card. I assume it would still work. Re: USB, so far as I've seen, no you still put the apps on the SD card. USB is only for installing the framework.

3) haven't uninstalled it, but yes that is the procedure.
 
#343 ·
Battery_StateofCharge but I can't tell if it is actually useful yet as I've only checked it with the vehicle running it is always shows at 255. So I coded it to hide it at 255 and show a percent if below 254. One day I'll try and leave my car in accessory for a while and see if it goes down, but haven't yet.
 
#344 · (Edited)
I have patched my speedometer and will check what values I will get.
I can compare the MZD value with the real BAT_SOC from PCM module, which I can retrieve with my OBD2 adapter and FORScan on my notebook.

My car outputs value 176 and after 1 km trip 177.
177 / 255 = 69%. But my iStop is working and afaik iStop stops working at SOC below 75%.
I'll try to compare this with OBD value on the weekend.
 
#346 ·
My car outputs value 176 and after 1 km trip 177.
177 / 255 = 69%. But my iStop is working and afaik iStop stops working at SOC below 75%.
I'll try to compare this with OBD value on the weekend.
Mine only ever reads 255, so I just assumed that was the full charge (At least for my own vehicle.) That is what it reads with the engine running anyway. I haven't checked it after sitting or using accessories with the vehicle off (it is winter in New England where I am so I use the remote start a lot.)

I note that the fuel level on my vehicle maxes out at 184, so I used that as the basis to calculate my percentage.
 
#345 ·
GPS Speedometer

Like others before me, I have tweaked the original speedometer app, tailoring it to my own needs to practise programming in js. Some of the features are:
- Revs on the rim
- Max trip speed indicated
- Altitude
- Rotating compass rose
- Date
- Historical data using:
- A. Histogram
- B. Graph
- Option to see how much you drive too fast (by setting tatget speed using the dial)
- A help feature

All can bee seen in the screenshots below. And it works in both mph and kmh - and is tested in my CX-3. If you want to try yourself (at your own risk!), the source files are there too.

Any feedback is highly appreciated!

BR Peter
 

Attachments

#347 ·
Do you have iStop?
Maybe some values doesn't work if your car hasn't some features. I have a export of all MZD values from summer. At this time the values was 188 on my car. Now in German winter it is lower. I have a complete export from another user from this forum and in his car the value was also 255. Maybe both of your cars are fully charged, but in winter time I had never a SOC value with 100% (retrieved by FORScan over OBD). Even with connected battery charger. But the SOC value in PCM is not updated in real time. So, it can be that FORScan retrieves a SOC value 74% although a battery charger is connected over 12 hours.

I will have a look at this some days.
 
#350 ·
My battery age is 704 days (checked with FORScan), but the 188 value I had some months ago. Last week my car was at the dealer because iStop & i-Eloop doesn't work. They have checked my battery and is was fully charged and the acid concentration is perfect. Only the stored SOC value in PCM was at 25% and the system had to be re-initiated.
If your doesn't drive your car at least 100 km per day, your battery capacity will decrease each day a little bit in the winter time with temperatures around 0°C.
After a cold night, the value can never be 100% if it is a working value in your MZD.

I guess, that your value will never change because you have no iStop and the MZD doesn't need that value. If you have an OBD adapter, you can check the real value with FORScan.

Tonight I have plugged the battery charger. Tomorrow morning I can see the MZD value with fully charged battery. Theoretically it has to be 255. We will see.
 
#357 · (Edited)
Dealer never being developer as you.. or car maker.... any one have right to write and call what he want........i am here to tell only what i know of sure... "MOSFET" if you take this part as sensor do it as you like ...
.......looking forward for your next result LOL

edit.... why you lasting you battery for nothings,,, go tomorrow and bring dead battery..it read over 12 volts but it had no ore than 10Amp. and put it on your car and let see your caller sensor what it read with out engin start and after.
 
#358 · (Edited)
Maybe dealer are wrong. But what about the original Mazda document?
Does your Mazda has iStop & i-Eloop or from where do you know what parts does exist in different Mazda models?

For the moment I can only wait until I have drove some more with the new value in speedometer.

btw: the sensor ist not directly at minus pole, but there is a small black connector at the pole that goes to the sensor.

edit: OBD2 value for BAT_SOC is at the moment 88% and MZD value is 175.
Doesn't match if 255 should be 100%.
 
#359 ·
Maybe dealer are wrong. But what about the original Mazda document?
Does your Mazda has iStop & i-Eloop or from where do you know what parts does exist in different Mazda models?

For the moment I can only wait until I have drove some more with the new value in speedometer.
sorry friends.. you have lack with electronic knowledge .. "MOSFET" can be called sensor but its ( ON/ OFF ) its self depended circuit .. no back signal to any where because we have here Benzine Engin / Diesel ..electric generator always on so no need this back signal to reduce generation....... if it were Hybrid or electric Car. then this part no need because the Battery will function in different way and will have full function sensor to read battery level to switch generator to switch on for charge or cut off ( generator not as you know ) .... this you don't have on your car
 
#361 ·
Is there a market where these apps can be purchased and loaded onto the SDcard? I tried following along and am not a programmer in the least. I'd love to be able to buy an app, download it to the SD in my car and have it work. The whole "Applications" feature is really bogus if their isn't anything you can add to the car.
 
#362 · (Edited)
Sadly, there is no such market. Mazda execs, are you listening?

For right now, there aren't really any useful apps available through the SDK that you can't get from the AIO installer. At least not any that are worth the effort. There are versions of Tetris and Breakout, but both are more proof-of-concepts than games that you are likely to play more than once. The other apps that came with the SDK are all items that are aimed at programmers to show the SDK rather than stuff that you would actually use.

On the off chance that you aren't familiar with the AIO, go here http://mazdatweaks.com or
read the forum thread here