Code Monkey home page Code Monkey logo

headunit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

headunit's Issues

Stuck in Bootup logo

Hi, I was trying to install this tweak and my mazda is stuck in the boot up logo. Can't do anything. Any ideas?

Thanks,

A.

AA Stuck on credits

i installed AA in my 2017 Mazda 3 v59, i connect my phone to BT and USB connection, but when i open AA, it gets stuck in credits, and never pass through.

I already tested with Nexus 6P and Galaxy S6. No luck.
What can i do?

Voice command stops working after initial boot

When using the steering wheel voice button, the Google Voice command should activate.
This functionality only works on the first use of Android Auto. All consecutive uses will default back to the Mazda Voice Command functionality.

This issue is can be resolved by setting enable_input_filter in /tmp/mnt/data to 2. Setting the file to 1 will only work once, since the original developer intended it use as test to prevent bricks. Setting a value of 2 makes the voice command interception persist after a reboot.

AA version: 091b

Clear Directions on how to uninstall

Thank you to everyone who spent a lot of time on this. It has been a really cool project. I'd like to uninstall AA from it. I know there is an install attached to version .91B but I just wanted clear instructions on how to do so without bricking my car. Are the below instructions correct? I'd like to keep the tweek that allows touchscreen use while driving. Would I need to remove that also? If so how?

  1. Remove files from flash drive.
  2. format to fat32.
  3. extract uninstaller files to flash drive.
  4. Connect flash drive to car
  5. follow instructions

After doing this if I upgrade my mazda software or factory reset it, could that brick my car still?

Thank you!!

0.94 NOT_RUNNING for V56 Mazda3 [HUAWEI MATE 9] Please Help

I just install AA 0.94 at first time. I download from lasted release is v0.94 for work with Mazda Connect v.56

My Phone : HUAWEI MATE 9 (MHA-L29)
Build number : MHA-L29C636B136
Android version : 7.0
Android Auto on mobile : version 2.0.642703-release

After Install and reboot, when tap application > AA > Error Message below

NOT_RUNNING
iusb_vendor_get vendor: 0x1d6b device 0x92d1b8
iusb_vendor_get vendor: 0x1d6b device 0x92d210
iusb_vendor_get vendor: 0x0424 device 0x92d268
Error device not found iusb_best_vendor:0x0000 iusb_best_device:(nil)
Phone is not connected- Connect a supported phone and restart-
END

AA Uninstaller script not removing AA completely

The AA uninstaller script isn't moving AA completely. After using the uninstalling and installing .93 I couldn't make phone calls. I had to open AA and close (return to MZD) to make phone calls. I have to consistently do that... Trying to get back to stock .93 thus I know some script is being left over.

Uninstalling AA

Could someone please direct me to what I need to load on my USB to uninstall AA. I'll be going to the dealer and will need to uninstall.

Audio stutter when viewing map

When I turn on online radio in TuneIn and change window to google maps on headunit on , music is playing with smal pauses pr 'freezes' ( sorry for my English). When i open windows with radio or phone - music is playing fine.
The pauses depend on scale of map. Bigger part of map on the display - shorter "freezes", smaller part of map on display - it is impossible to listen music in total. I tried AA posted by mishaaq in this issue #40 (comment)

On 0.93 it works fine.

Headunit won't build for car anymore - missing libudev.h

PR #37 added dependency on libudev, but failed to update m3-toolchain with it. So now a binary for Mazda cannot be built anymore, because the toolchain is missing libudev:

../hu/hu_uti.h:26:21: fatal error: libudev.h: File or directory doesn't exist
 #include <libudev.h>
                     ^
compilation terminated.
Makefile:60: recipe for target '../hu/hu_aad.arm.o' failed
make: *** [../hu/hu_aad.arm.o] Error 1

Toolchain must be updated with proper libraries or dependency to them removed.

Support for Huawei devices

Hi,

Can you add Huawei to the supported devices list please. I am running a G8 if you need specifics.

Thanks

Error Android 7

When connecting my cell phone Samsung Galaxy S8 with Android 7 Nougat with Android Auto. Mazda Connect does not recognize it and does not start Andoid Auto.

My version of mazda firmware its 59.00.441

Thank you very much!

LG G4 Support

I am experiencing issues with my LG G4 running android 6.0. It doesn't seem to connect, the phone recognises android auto, but it keeps disconnecting. I have rolled back my google play services to the correct version as well. I'm testing on Mazda 2, running CMU 56.

Rotary Input

Ok as promised on the main thread here is how you can get rotary input instead of touchscreen.

hu_aap.c the sd_buf should look like this

byte sd_buf2 []={0x00, 0x06, 
//Touch+input CHANNEL
//This commented line is touchscreen only, active line is rotary input: 0x0A, 0x0F, 0x08, 0x01, 0x22, 0x0B, 0x0A, 0x01, 0x54, 0x12, 0x06, 0x08, 0xA0, 0x06, 0x10, 0xE0, 0x03, 
0x0a, 0x12, 0x08, 0x01, 0x22, 0x0e, 0x0a, 0x0c, 0x01, 0x02, 0x04, 0x13, 0x14, 0x15, 0x16, 0x17, 0x54, 0x80, 0x80, 0x04,

// SENSOR CHANNEL
0x0A, 0x10, 0x08, 0x02, 0x12, 0x0C, 0x0A, 0x02, 0x08, 0x01, 0x0A, 0x02, 0x08, 0x0A, 0x0A, 0x02, 0x08, 0x0D,
//                       18,  12,     10,    2,    8,    1,  10,   2,     8,    10, 10,    2,    8,    13


// Video CHANNEL
0x0A, 0x15, 0x08, 0x03, 0x1A, 0x11, 0x08, 0x03, 0x22, 0x0D, 0x08, 0x01, 0x10, 0x02, 0x18, 0x00, 0x20, 0x00, 0x28, -96, 0x01, 0x30, 0x00, 
// MIC CHANNEL
0x0A, 4+4+7,0x08, AA_CH_MIC, 0x2A, 4+7, 0x08, 1,    0x12, 7,    0x08, -128, 0x7d, 0x10, 0x10, 0x18, 1,
// CAR DEFINITION
						
                        0x12, 4, 'E', 'm', 'i', 'l',//1, 'A', // Car Manuf          Part of "remembered car"
                        0x1A, 4, 'A', 'l', 'b', 'e',//1, 'B', // Car Model
                        0x22, 4, '2', '0', '1', '6',//1, 'C', // Car Year           Part of "remembered car"
                        0x2A, 4, '0', '0', '0', '1',//1, 'D', // Car Serial     Not Part of "remembered car" ??     (vehicleId=null)
                        0x30, 0,//0,      // driverPosition
						
                        0x3A, 4, 'E', 'm', 'i', 'l',//1, 'E', // HU  Make / Manuf
                        0x42, 4, 'H', 'U', '1', '5',//1, 'F', // HU  Model
                        0x4A, 4, 'S', 'W', 'B', '1',//1, 'G', // HU  SoftwareBuild
                        0x52, 4, 'S', 'W', 'V', '1',//1, 'H', // HU  SoftwareVersion
                        0x58, 0,//1,//1,//0,//1,       // ? bool (or int )    canPlayNativeMediaDuringVr
                        0x60, 0,//1,//0,//0,//1        // mHideProjectedClock     1 = True = Hide	*/	
						
//THE LAST 3 CHANNEL KEEP THEM HERE SO WE CAN EXCLUDE THEM IF NEED BE.
0x0A, 4+6+7, 0x08, AA_CH_AU2, 0x1A, 6+7, 0x08, 1,  0x10, 2, 0x1A, 7, 0x08, -128, 0x7d,         0x10, 0x10,   0x18, 1,
0x0A, 4+6+7, 0x08, AA_CH_AU1, 0x1A, 6+7, 0x08, 1,  0x10, 1, 0x1A, 7, 0x08, -128, 0x7d,         0x10, 0x10,   0x18, 1,
0x0A, 4+6+8, 0x08, AA_CH_AUD, 0x1A, 6+8, 0x08, 1,  0x10, 3, 0x1A, 8, 0x08, -128,   -9, 0x02,   0x10, 0x10,   0x18, 02,

};

Here comes the codes for buttons on rotary:
Enter:
WRITE: 80 01 08 c8 f9 80 fd ab 87 d3 c3 14 22 0a 0a 08 08 17 10 01 18 00 20 00 ;
WRITE: 80 01 08 90 c3 aa aa ac 87 d3 c3 14 22 0a 0a 08 08 17 10 00 18 00 20 00 ;

Simulates moving the rotary controller
Down:
WRITE: 80 01 08 e8 bb be ad de 87 d3 c3 14 22 0a 0a 08 08 14 10 01 18 00 20 00 ;
WRITE: 80 01 08 f8 93 d8 e9 de 87 d3 c3 14 22 0a 0a 08 08 14 10 00 18 00 20 00 ;

Right:
WRITE: 80 01 08 c0 c4 e5 86 ed 87 d3 c3 14 22 0a 0a 08 08 16 10 01 18 00 20 00 ;
WRITE: 80 01 08 c8 eb c3 bb ed 87 d3 c3 14 22 0a 0a 08 08 16 10 00 18 00 20 00 ;

Up:
WRITE: 80 01 08 a8 fc e1 de f8 87 d3 c3 14 22 0a 0a 08 08 13 10 01 18 00 20 00 ;
WRITE: 80 01 08 e8 fe db ba f9 87 d3 c3 14 22 0a 0a 08 08 13 10 00 18 00 20 00 ;

Left:
WRITE: 80 01 08 e8 f2 97 ab 86 88 d3 c3 14 22 0a 0a 08 08 15 10 01 18 00 20 00 ;
WRITE: 80 01 08 c8 dd d0 86 87 88 d3 c3 14 22 0a 0a 08 08 15 10 00 18 00 20 00 ;

Simulates pressing the side buttons available on some rotary controllers.
Soft right:
WRITE: 80 01 08 80 e6 80 f6 f6 88 d3 c3 14 22 0a 0a 08 08 02 10 01 18 00 20 00 ;
WRITE: 80 01 08 f0 b5 ec a2 f7 88 d3 c3 14 22 0a 0a 08 08 02 10 00 18 00 20 00 ;

Soft left:
WRITE: 80 01 08 80 f2 c7 a7 88 89 d3 c3 14 22 0a 0a 08 08 01 10 01 18 00 20 00 ;
WRITE: 80 01 08 f0 ef fc fc 88 89 d3 c3 14 22 0a 0a 08 08 01 10 00 18 00 20 00 ;

Simulates rotating the rotary controller left (counter-clockwise) or right (clockwise).

rotate left:
WRITE: 80 01 08 c8 e9 d6 bb 8a 8a d3 c3 14 22 0a 0a 08 08 15 10 01 18 00 20 00 ;
WRITE: 80 01 08 b0 c0 a6 88 8b 8a d3 c3 14 22 0a 0a 08 08 15 10 00 18 00 20 00 ;

Rotate right:
WRITE: 80 01 08 b0 b8 dd ed ce 8a d3 c3 14 22 0a 0a 08 08 04 10 01 18 00 20 00 ;
WRITE: 80 01 08 b0 d4 9e ee cf 8a d3 c3 14 22 0a 0a 08 08 04 10 00 18 00 20 00 ;

Simulates a fast spin of the rotary controller to the left (counter-clockwise) or right (clockwise).
Left:
WRITE: 80 01 08 c0 9b fb 8f 93 8b d3 c3 14 32 11 0a 0f 08 80 80 04 10 ff ff ff ff ff ff ff ff ff 01 ;
WRITE: 80 01 08 80 bc d0 e2 99 8b d3 c3 14 32 08 0a 06 08 80 80 04 10 01 ;

Right:
WRITE: 80 01 08 c8 a9 f2 87 b8 8b d3 c3 14 32 11 0a 0f 08 80 80 04 10 fb ff ff ff ff ff ff ff ff 01 ;
WRITE: 80 01 08 a0 c6 94 b3 be 8b d3 c3 14 32 08 0a 06 08 80 80 04 10 05 ;

Phone calls

First of all I want to say thank you for the amazing project.

My problem is when I connected with my phone and I received a call, it's stuck and I don't hear the call not from the Bluetooth and not from my phone, it's look like the Bluetooth trying to connect to the Mazda connect, and in the same time trying to connect to the Android auto .
I found that I need to disconnect my phone from the USB and the Bluetooth just to get it work again with the phone speaker , please help .

Phone : Nexus 6P Android 6.0.1
Android auto: 0.94 latest
Car: Mazda 3 2016

Updated to latest 59 EU Firmware but Android Auto will not install

Installed the latest 59 EU firmware on my head unit. Everything went OK on the firmware install.

Installed Android Auto 0.94. Went through all the prompts on the screen to install it. Head unit reset but Android Auto does not appear on the application list.
Tried to install via the MZD All in One tool. That didnt work as well.

Please help.

Nevermind, seen the 59 firmware issue thread here. Not the only one having issues...

Make a 0.95 release

People are still downloading version 0.94A which is very old now and doesn't have any of the cool stuff contributed by @lmagder and others. This also generates bunch of complaints.

Should we package the installer and current master into a 0.95 release under downloads here so people stop downloading old stuff? :)

Night Maps wird behaviour

Hi,
For some reason maps are not working with its night version. A wird thing happened.
It was 19.00, when I was driving and suddenly maps change to its night version. Here at 19.00 hrs we still have light.
Anyway, I use the GPS again at 22.20 pm (its dark at that time) and maps didnt change to night version.

Is there a fix for this?

Regards,

Support for Blackberry Android Devices

Specifically the Priv.

Successfully installed Android Auto V0.92 into my '15 Mazda3, but when I connect my Blackberry Priv it says it is unsupported. It looks as if the hu_usb.c & hu_uti.h files in /jni need an update but personally I am not sure what the code would be to add.

If someone could help with this I'd GREATLY appreciate it.

Problem with Nexus 5

Hi,
I tried several times to make the connection work with my Nexus 5 but I didn't succeed. Curiously it worked fine with the 0.83 version. Now after connecting the device with the CMD via usb, the car screen freezes on a black screen and tries to restablish the connection several times (like in a boot-loop), without success and eventually, when I disconnect the cable, it returns an error about vendor id.
Maybe in the newer versions of AA the Nexus 5 vendor id is missing ? If that's the bug, could you please fix it?
My phone runs android 6.0.1, the AA app on the phone is the latest release and the cmd of my CX5 is the latest available .513EU.

Thanks in advance for your attention

Mark

Segmentation fault

I haven't taken the time to debug this, but it is possible for rx_buf to overflow. This was observed with the Ubuntu folder variant on a 64-bit machine. iaap_recv_dec_process received a rx_buf at offset of 1032, with a len of 16149. These two combined exceed the 16384 buffer DEFBUF and overflows the buffer. (Something somewhere isn't paying enough attention to the boundaries as such!)

Glancing at the codebase, it looks like it processes multiple chunks of data from the remote at once moving through the buffer each time it grabs a segment. It should possibly move data back to the start of buf for each sub-packet if it detects that the remaining length exceeds the receive buffer.

Here's the full backtrace from gdb:

(gdb) bt full
#0  0x00007ffff699f16c in BIO_write () from /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
No symbol table info available.
#1  0x00000000004054bd in iaap_recv_dec_process (chan=2, flags=9, buf=0x716368 <rx_buf+1032> "\027\003\003?\020\204\365C\036", len=16149) at ../jni/hu_aap.c:1256
        bytes_written = 1020
        ctr = 0
        max_tries = 2
        bytes_read = 991
        prot_func_ret = 797
#2  0x0000000000405799 in hu_aap_recv_process () at ../jni/hu_aap.c:1411
        chan = 2
        flags = 9
        enc_len = 16149
        msg_type = 0
        buf = 0x716368 <rx_buf+1032> "\027\003\003?\020\204\365C\036"
        ret = 0
        min_size_hdr = 6
        rx_len = 16384
        have_len = 16149
#3  0x0000000000408ec0 in read_data (app=0x71a6e0 <gst_app>) at main.c:63
        buffer = 0x7ffff71abda0
        ret = -143674261
        iret = 32767
        vbuf = 0x1073e00 ""
        abuf = 0x7fffdc001100 " \022"
        res_len = 0
#4  0x00007ffff71af05a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#5  0x00007ffff71af400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#6  0x00007ffff71af722 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#7  0x000000000040ab93 in gst_loop (app=0x71a6e0 <gst_app>) at main.c:806
        ret = 32767
        state_ret = GST_STATE_CHANGE_FAILURE
#8  0x000000000040b019 in main (argc=1, argv=0x7fffffffe5f8) at main.c:974
        app = 0x71a6e0 <gst_app>
        ret = 0
        ep_in_addr = 254 '\376'
        ep_out_addr = 254 '\376'
        cursor = 0x135b840
        info = {version = {major = 1 '\001', minor = 2 '\002', patch = 15 '\017'}, subsystem = SDL_SYSWM_X11, info = {x11 = {display = 0x1330cc0, window = 71303181, 
              lock_func = 0x7ffff6630ce0, unlock_func = 0x7ffff6630cf0, fswindow = 71303170, wmwindow = 71303171, gfxdisplay = 0x133ced0}}}
        screen = 0x135b750
        wmInfo = {version = {major = 1 '\001', minor = 2 '\002', patch = 15 '\017'}, subsystem = SDL_SYSWM_X11, info = {x11 = {display = 0x1330cc0, window = 71303181, 
              lock_func = 0x7ffff6630ce0, unlock_func = 0x7ffff6630cf0, fswindow = 71303170, wmwindow = 71303171, gfxdisplay = 0x133ced0}}}

Note: This goes away if I increase the DEFBUF constant. I can observe this just by interacting with the Android Auto window for a few minutes.

Android Auto Kicks back audio to bluetooth after command

I notice Android auto kicks back to FM just fine after google now or direction but it doesn't do that to bluetooth device. (i.e. if u use android auto on an android and an iphone on bluetooth all connected at the same time). The only way to get audio back to the iphone on bluetooth is to go -> home -> music -> and then go back to AA.

AA bluetooth Phone call immediately disconnect post dial or post pick up.

AA bluetooth Phone call immediately transfer to phone post dial or post pick up. When receiving phone calls via bluetooth the MZD screen will pop up and immediately transfer to phone. The only fix right now is kill AA or reboot (without AA open) to pick up calls. I'm pretty sure it's similar to dialing. I assume a fix would be related to having something conflicting with AA and MZD to disconnect right after a call is dial/pick up.

Similar to what ariehm said below, i have the option to transfer to headset but it just instantly transfers back to phone no matter how many times I hit transfer.

Solution: I have no clue :(

Android Auto FM Radio

I was just wondering if there is a possibility of having an android music app which has the ability to change the Mazda's audio options (between bluetooth and FM radio)?

Is this level of integration into the car possible with android auto?

Feel free to close/delete this if it is not the appropriate place for this discussion.

Channels mixed up

I have found a small problem in the original code, posted by Mike.

It took me a while to figure it out but eventually I did, Mike mixed up the channels when he reverse engineered the app, it's funny that it still works but that explains why we cannot get past the 6 taps limit even when the car is stopped. Here is what needs changing, I'm not submitting a commit because you might have changed things and I don't have the time to check the full code.

hu_aap.h should look like this:

 // #define AA_CH_SEN 1
  // #define AA_CH_VID 2
  // #define AA_CH_TOU 3  
  #define AA_CH_SEN 2
  #define AA_CH_VID 3
  #define AA_CH_TOU 1 

This means a few changes here and there mainly in hu_aap.c.
The aa_type_array should look like this:

 aa_type_ptr_t aa_type_array [AA_CH_MAX + 1] [3] [32] = {              // 0 - 31, 32768-32799, 65504-65535
                                                                        // Sync with hu_tra.java, hu_aap.h and hu_aap.c:aa_type_array[]
// Channel 0 Ctr Control:
    aa_pro_ctr_a00, aa_pro_ctr_a01, aa_pro_ctr_a02, aa_pro_ctr_a03, aa_pro_ctr_a04, aa_pro_ctr_a05, aa_pro_ctr_a06, aa_pro_all_a07, aa_pro_ctr_a08, aa_pro_ctr_a09, aa_pro_ctr_a0a, aa_pro_ctr_a0b, aa_pro_ctr_a0c, aa_pro_ctr_a0d, aa_pro_ctr_a0e, aa_pro_ctr_a0f,
    aa_pro_ctr_a10, aa_pro_ctr_a11, aa_pro_ctr_a12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,   //    a10, a11, a12, aa_pro_ctr_a13, aa_pro_ctr_a14, aa_pro_ctr_a15, aa_pro_ctr_a16, aa_pro_ctr_a17, aa_pro_ctr_a18, aa_pro_ctr_a19, aa_pro_ctr_a1a, aa_pro_ctr_a1b, aa_pro_ctr_a1c, aa_pro_ctr_a1d, aa_pro_ctr_a1e, aa_pro_ctr_a1f,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

// Channel 3 Tou TouchScreen:
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, aa_pro_all_a07, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, aa_pro_tou_b02, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	
// Channel 1 Sen Sensor:
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, aa_pro_all_a07, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, aa_pro_sen_b01, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

// Channel 2 Vid Video:
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, aa_pro_all_a07, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    aa_pro_snk_b00, aa_pro_vid_b01, NULL, NULL, NULL, NULL, NULL, aa_pro_vid_b07, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,



// Channel 4 Output Audio:
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, aa_pro_all_a07, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    aa_pro_snk_b00, aa_pro_aud_b01, aa_pro_aud_b02, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

// Channel 5 Output Audio1:
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, aa_pro_all_a07, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    aa_pro_snk_b00, aa_pro_aud_b01, aa_pro_aud_b02, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

// Channel 6 Output Audio2:
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, aa_pro_all_a07, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    aa_pro_snk_b00, aa_pro_aud_b01, aa_pro_aud_b02, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

// Channel 7 Mic Audio:
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, aa_pro_all_a07, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, aa_pro_mic_b01, NULL, NULL, aa_pro_mic_b04, aa_pro_mic_b05, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

  };

You will need to make sure you adjust the sd_buf array as well in the same file.

Beside that here is the exact string used by Desktop Headunit Emulator to initiate the setup (this is sd_buf array in our file)

//Channel 1
0x0A, 0x0F, 0x08, 0x01, 0x22, 0x0B, 0x0A, 0x01, 0x54, 0x12, 0x06, 0x08, 0xA0, 0x06, 0x10, 0xE0, 0x03, 
//Channel 2
0x0A, 0x10, 0x08, 0x02, 0x12, 0x0C, 0x0A, 0x02, 0x08, 0x01, 0x0A, 0x02, 0x08, 0x0A, 0x0A, 0x02, 0x08, 0x0D, 
//Channel 3
0x0A, 0x15, 0x08, 0x03, 0x1A, 0x11, 0x08, 0x03, 0x22, 0x0D, 0x08, 0x01, 0x10, 0x02, 0x18, 0x00, 0x20, 0x00, 0x28, 0xA0, 0x01, 0x30, 0x00, 
//Channel 4
0x0A, 0x11, 0x08, 0x04, 0x1A, 0x0D, 0x08, 0x01, 0x10, 0x01, 0x1A, 0x07, 0x08, 0x80, 0x7D, 0x10, 0x10, 0x18, 0x01, 
//Channel 5
0x0A, 0x11, 0x08, 0x05, 0x1A, 0x0D, 0x08, 0x01, 0x10, 0x02, 0x1A, 0x07, 0x08, 0x80, 0x7D, 0x10, 0x10, 0x18, 0x01, 
//Channel 6
0x0A, 0x12, 0x08, 0x06, 0x1A, 0x0E, 0x08, 0x01, 0x10, 0x03, 0x1A, 0x08, 0x08, 0x80, 0xF7, 0x02, 0x10, 0x10, 0x18, 0x02, 
//Channel 7
0x0A, 0x0F, 0x08, 0x07, 0x2A, 0x0B, 0x08, 0x01, 0x12, 0x07, 0x08, 0x80, 0x7D, 0x10, 0x10, 0x18, 0x01, 
//Car data (name + version + driving position + etc)
0x12, 0x06, 0x47, 0x6F, 0x6F, 0x67, 0x6C, 0x65, 0x1A, 0x11, 0x44, 0x65, 0x73, 0x6B, 0x74, 0x6F, 0x70, 0x20, 0x48, 0x65, 0x61, 0x64, 0x20, 0x55, 0x6E, 0x69, 0x74, 0x22, 0x04, 0x32, 0x30, 0x31, 0x35, 0x2A, 0x24, 0x30, 0x35, 0x38, 0x32, 0x35, 0x32, 0x31, 0x66, 0x2D, 0x38, 0x37, 0x61, 0x63, 0x2D, 0x34, 0x30, 0x65, 0x64, 0x2D, 0x38, 0x61, 0x39, 0x39, 0x2D, 0x39, 0x36, 0x35, 0x39, 0x62, 0x61, 0x32, 0x65, 0x62, 0x37, 0x66, 0x33, 0x30, 0x00, 0x3A, 0x06, 0x47, 0x6F, 0x6F, 0x67, 0x6C, 0x65, 0x42, 0x11, 0x44, 0x65, 0x73, 0x6B, 0x74, 0x6F, 0x70, 0x20, 0x48, 0x65, 0x61, 0x64, 0x20, 0x55, 0x6E, 0x69, 0x74, 0x4A, 0x12, 0x32, 0x30, 0x31, 0x35, 0x2D, 0x30, 0x39, 0x2D, 0x31, 0x36, 0x2D, 0x32, 0x32, 0x35, 0x38, 0x37, 0x34, 0x35, 0x52, 0x09, 0x31, 0x2E, 0x30, 0x2D, 0x6C, 0x69, 0x6E, 0x75, 0x78, 0x60, 0x00,

Hope this helps.

Incompatible with V59.00.330 EU N

I have a 2017 Mazda 6 with CMU version 59.00.330 EU N

I tried installing v0.94b

I followed the install steps on the releases page and it went well until the restart part. The CMU restarted fine, although AA did not show up in the applications list.

Steering wheel track audio commands Bluetooth device not Android Auto via usb

Similar to .93 the steer wheel audio button commands the Bluetooth device but in the latest test version it control the android auto via usb. I might be one of those rare people that uses android auto device (stationary) and a mobile device (personal smartphone Android/iPhone) and listen audio on my phone cause of unlimited data.

Not essential but I think it be very helpful considering if you do use android auto and audio you would be command via bluetooth.

Hope that makes sense.

Test version: #40 #40 Command

GPS stopped working after installing AA .93A

Hi,

I've successfully installed AA and worked on my Australian Mazda CX5 56.00.513. However, the original navigation system is now not getting any GPS data. I've tried uninstalling AA and still not working. I have not yet tried factory rest as I afraid I might end up in boot loop.

Has anyone experience similar issue and any work around for it?

NOTE. THERE IS NO OTHER TWICKS EVER INSTALLED ON MY CX-5

Regards,

Katsuya

Issue with running this on Ubuntu

Hello,

I have Ubuntu 16.04 LTS on my laptop and I am trying to run the Ubuntu project to connect my phone to my laptop. Compiling it was successful and I am trying to run it but I am getting errors when trying to run it. This is what I am seeing:

uname: sysname: Linux release: 4.4.0-53-generic version: #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 machine: x86_64 libprotoversion: 2.6.1 libusb_get_version: version: 1.0.20.11004 rc: describe: http://libusb.info openssl version: OpenSSL 1.0.2g 1 Mar 2016 (0x1000207f) Got gdk_screen_get_monitor_scale_factor() == 1.000000 W: ../hu/hu_usb.cpp:443: Start : Found OAP Device W: ../hu/hu_usb.cpp:451: Start : OK libusb_claim_interface usb_err: 0 (Success) W: ../hu/hu_usb.cpp:465: Start : Done get_config_descriptor config: 0xe2cab0 num_int: 1 W: ../hu/hu_usb.cpp:490: Start : iusb_ep_in: 0x81 W: ../hu/hu_usb.cpp:497: Start : iusb_ep_out: 0x02 W: ../hu/hu_ssl.cpp:210: hu_ssl_begin_handshake : SSL_do_handshake() ret: -1 W: ../hu/hu_ssl.cpp:66: send_ssl_handshake_packet : BIO_read() HS client req ret: 305 W: ../hu/hu_ssl.cpp:233: hu_handle_SSLHandshake : BIO_write() server rsp ret: 2322 W: ../hu/hu_ssl.cpp:236: hu_handle_SSLHandshake : SSL_do_handshake() ret: -1 W: ../hu/hu_ssl.cpp:66: send_ssl_handshake_packet : BIO_read() HS client req ret: 1224 W: ../hu/hu_ssl.cpp:233: hu_handle_SSLHandshake : BIO_write() server rsp ret: 51 W: ../hu/hu_ssl.cpp:236: hu_handle_SSLHandshake : SSL_do_handshake() ret: 1 W: ../hu/hu_ssl.cpp:262: hu_handle_SSLHandshake : SET: iaap_state: 2 (hu_STATE_STARTED) W: ../hu/hu_aap.cpp:1127: hu_aap_start : Starting HU thread W: ../hu/hu_aap.cpp:609: hu_handle_AudioFocusRequest : AudioFocusRequest Focus Request CTR: 4 Starting Android Auto... Error Internal data flow error. push buffer returned -2 for 10 bytes here we are W: ../hu/hu_aap.cpp:953: operator() : Sending ShutdownRequest DisconnectionOrError W: ../hu/hu_usb.cpp:227: usb_recv_thread_main : Requested to exit W: ../hu/hu_usb.cpp:236: usb_recv_thread_main : libusb_handle_events_completed: 3 (hu_STATE_STOPPIN) W: ../hu/hu_usb.cpp:238: usb_recv_thread_main : USB thread exit libusb: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know libusb: error [do_close] A cancellation hasn't even been scheduled on the transfer for which the device is closing STATUS:Press Back or Home button to close *** Error in ./headunit: free(): invalid pointer: 0x00000000009c7560 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fec5b0387e5] /lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7fec5b040e0a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fec5b04498c] /usr/lib/x86_64-linux-gnu/libprotobuf.so.9(_ZN6google8protobuf8internal28DestroyDefaultRepeatedFieldsEv+0x1f)[0x7fec5be2b8af] /usr/lib/x86_64-linux-gnu/libprotobuf.so.9(_ZN6google8protobuf23ShutdownProtobufLibraryEv+0x8b)[0x7fec5be2ab3b] /usr/lib/x86_64-linux-gnu/libmirprotobuf.so.3(+0x20329)[0x7fec542d5329] /lib64/ld-linux-x86-64.so.2(+0x10c17)[0x7fec5dc57c17] /lib/x86_64-linux-gnu/libc.so.6(+0x39ff8)[0x7fec5affaff8] /lib/x86_64-linux-gnu/libc.so.6(+0x3a045)[0x7fec5affb045] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0x7fec5afe1837] ./headunit(_start+0x29)[0x457e49] ======= Memory map: ========
I cant figure out where this goes wrong. Is it in the libraries or in the code? My system? I have tried this with developer mode off, with MTP On/off. I have also tried running 0.93A but AA is giving error 7, a security error.

Might be that the GStreamer buffer is full? Where can I change the buffer size?
Or is there an invalid pointer to libc?

Thanks in advance for your help and suggestions. If you need the memory map I can post it. Also how can I make this easier to read? I put this as code in this post but it is removing line breaks, I don see an options for a collapsible section.

Android auto doesn't start after car turns off and turns on again

I'm running latest build 5ef71ea on my 2016 3 with v55.

If AA isrunning and I turn off the car, unplug my phone, plug it in again and after a few secs turn the car on again, AA doesn't start automatically or manually. If I try to open AA manually on the car I get an error message:

_StartContextReady: Can't connect to headunit process

Only solution is to restart the headunit with back-nav-mute. I think this only happens if the "stop" is short so that the headunit doesn't go to deep sleep.

Another way to get to that error message and probably related:
If I turn on the car on accessory mode (one start button press) with my phone plugged in, AA launches OK, if I then start the car while AA is running, AA freezes and after hitting home and trying to re-launch it in the car I get the same error message "_StartContextReady: Can't connect to headunit process"

Image of error message: https://goo.gl/photos/YAU1SBwrmvf1Dwog7

Play Services proble

Hi Alex.

Your website looks to be down, so I'm not able to connect you, can you please drop me an email to [email protected] will like to share with you a fix for the app.

Raspberry PI

Hallo,

has anybody ever tried to run this on a Raspberry PI ?

I compiled the files in the Ubuntu folder with my PI, but when i start it, i get several errors.

The goal is to use AA in my 2001 BMW. Right now KODI on the Raspberry works fine and streams pictures, videos and music to the NAV screen.

Maybe I can get some help here.

Regards

Refactor AA protocol code to use protocol buffers

I did some preliminary investigation into writing proto
files instead of manually constructing the wire protocol, but only with some messages sent by the headunit to the phone so far.

For example in the function I added to send a button message

int hu_fill_button_message(uint8_t* buffer, uint64_t timeStamp, HU_INPUT_BUTTON button, int isPress)
{
    int buffCount = 0;
    buffer[buffCount++] = 0x80;
    buffer[buffCount++] = 0x01;
    buffer[buffCount++] = 0x08;

    buffCount += varint_encode(timeStamp, buffer + buffCount, 0);

    buffer[buffCount++] = 0x22;
    buffer[buffCount++] = 0x0A;
    buffer[buffCount++] = 0x0A;
    buffer[buffCount++] = 0x08;
    buffer[buffCount++] = 0x08;
    buffer[buffCount++] = (uint8_t)button;
    buffer[buffCount++] = 0x10;
    buffer[buffCount++] = isPress ? 0x01 : 0x00;
    buffer[buffCount++] = 0x18;
    buffer[buffCount++] = 0x00;
    buffer[buffCount++] = 0x20;
    buffer[buffCount++] = 0x00;
    return buffCount;
}

I saved this out with timestamp = 15, button = 32, isPress = true as buttonMessage.bin. Running this through protoc --decode_raw < buttonMessage.bin
yields

1: 1
1: 15
4 {
  1 {
    1: 32
    2: 1
    3: 0
    4: 0
  }
}

so actually you can see there are two messages concatenated here (since there can't be two field #1s).
Assuming all the fields are there the first field is pretty simple, something like

message Header
{
    enum PacketType
    {
        INPUT_EVENT = 1;
        //More here probably
    }
    required PacketType type = 1;
}

so I chopped it off to get

protoc --decode_raw < buttonMessageNoHeader.bin 
1: 15
4 {
  1 {
    1: 32
    2: 1
    3: 0
    4: 0
  }
}

so just making up names assuming what the code does and inferring types from the wire format since unfortunately protoc does not print them, despite knowing them.

message ButtonInfo
{
    required uint32 scanCode = 1;
    required bool pressed = 2;
    required uint32 unknown1 = 3 [default = 0];
    required uint32 unknown2 = 4 [default = 0];
}

message ButtonInfoWrapper
{
    required ButtonInfo button = 1;
}

message InputEvent
{
    required uint64 timeStamp = 1;
    optional ButtonInfoWrapper button = 4;
}

seems to work:

protoc test.proto --decode HU.InputEvent < buttonMessageNoHeader.bin 
timeStamp: 15
button {
  button {
    scanCode: 32
    pressed: true
    unknown1: 0
    unknown2: 0
  }
}

I did a few more like the touch event and the day/night sensor notification and you can start to see patterns. The first packet is always a single enum which is the type of second packet and then all the input events are one packet type with optional sub-structs, same with the sensor event. So it seems you can send all or any subset of the sensors at once. I attached the files.

This would definitely clean up code a lot (especially the sd_buf stuff in hu_app.c) and it shouldn't add runtime requirements since all the protoc stuff generates code you compile and link against. The only potential problem is that protoc generates C++ code by default, which is probably nicer and would work since input_filter uses modern C++, but would be a drastic change. There is a unofficial protoc-c project though
testFiles.zip

Communication error 7

Just installed the latest version (v0.92B) on my mazda 3 2015, running software version 56.00.100 4A N.
Whenever the phone is plugged in and android auto opens, it comes up with "Communication error 7 - Your car's software did not pass Android Auto security checks. For Details and support, contact the manufacturer"
I've checked that the date and time on both the car and mazda are the same.
My phone is the Samsung Galaxy S7

Uninstaller?

I don't see a way to uninstall this anywhere. Does anybody know a way? Also, the reason I'm uninstalling it is because I want to install a newer version. Is there an easier way to get the new version?

Google Maps doesn't scale properly on 2016 CX-3

img_20161002_133951
img_20161002_134105
img_20161002_134051

Wondering if anyone is having this issue. Everything else looks good, other apps, contacts list, etc. But once I open the map all the icons become huge, as if everything on the screen gets zoomed in 10 times.

I just updated the infotainment software to the latest version when I took my car in for service yesterday, and just installed version 0.94 of AA.

EDIT: Attached some photos for comparison.

AA Uninstaller script not removing AA completely

This issue hasn't been resolved my apologize for closing it.

"The AA uninstaller script isn't moving AA completely. After using the uninstalling and installing .93 I couldn't make phone calls. I had to open AA and close (return to MZD) to make phone calls. I have to consistently do that... Trying to get back to stock .93 thus I know some script is being left over."

Even using the latest installer uninstaller there is left over files on the MZD connect system. Once I uninstall everything and install .93 (didn't have the phone call issue before) and it appear again.

I believe it's the auto background start of AA that's running still. The uninstaller isn't completely removing that.

I used the uninstaller on 5ef71ea. I haven't tried the latest yet.

black screen when phone is plugged in

I have a Mazda CX5 2016, version 56.00.513 4A N, installed AA v1.02
followed all the instructions but the screen goes black when the phone is plugged in, unplugging the USB cable returns back to the credit. tried with couple of phones but all the same. Please help, thank you!

Share Audio Channel with Bluetooth & Android Auto

Is it possible to make AA share audio with the same channel as bluetooth (even if it's on a different device). Similar to .93 where they both use the same channel. I use two devices, one for android auto and one for bluetooth audio. I play music on my bluetooth audio such youtube and what not and it's not an option in android auto plus they blank the screen and you can't select your alternative music player.

Would be great with this is an option otherwise I be stick with .93 =[.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.