Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HUD Navigation #135

Open
silverchris opened this issue Sep 3, 2018 · 65 comments
Open

HUD Navigation #135

silverchris opened this issue Sep 3, 2018 · 65 comments

Comments

@silverchris
Copy link

Hey Everyone,
Not sure if this is the best place to ask, but I am debating installing this on my car (Mostly being lazy, as I have to dig out the serial console connection :) ), and was wondering if there has been any research into getting navigation directions onto the little HUD display in some cars?

Haven't had a chance to dig into the code to see if this is something android auto passes to the car, but I would assume it may be possible on the car side, as factory navigation does it?

@silverchris
Copy link
Author

After some more digging, I think it is supported by android auto?
https://android.googlesource.com/platform/packages/services/Car/+/master/car-support-lib/src/android/support/car/navigation/

Guess my next step is trying to take a look at how the factory navigation does it.

@larsoner
Copy link

larsoner commented Sep 5, 2018

This would be excellent to have. I'm happy to help test if you get something working.

@lmagder
Copy link
Collaborator

lmagder commented Sep 6, 2018

Yeah, I'm pretty sure AA will send this info if we report it's supported when we enumerate at startup. No idea how to get this to the right spot in the CMU or even where it will show up since I don't have the stock nav system 😃 and we don't have the proto definitions for those messages yet. If you make any progress pull requests are welcome since this would be a really cool addition!

@silverchris
Copy link
Author

silverchris commented Sep 6, 2018

Figure I will just share what I discover as I go... Finally got around to getting the serial connection going, so I now actually have access to mine for testing.

I set up dbus-monitor, and went for a short drive with navigation running on the cmu.

There seemed to be a few relevent entries.

signal sender=:1.138 -> dest=(null destination) serial=1012 path=/com/NNG/Api/Server; interface=com.NNG.Api.Server.Guidance; member=GuidanceChangedForHUD
   int32 3
   int32 1500
   int32 1
   string "Centre St"
   int32 0
   int32 0
   int32 0
   int32 0
   int32 0
   int32 0
   int32 0
   int32 0
   int32 0
   int32 0
signal sender=:1.138 -> dest=(null destination) serial=1013 path=/com/NNG/Api/Server; interface=com.NNG.Api.Server.NotificationBar; member=Notify
   int32 0
   int32 1500
   int32 1
   string "Centre St"
   int32 1
method call sender=:1.93 -> dest=com.jci.vbs.navi serial=1447 path=/com/jci/vbs/navi; interface=com.jci.vbs.navi; member=SetHUDDisplayMsgReq
   struct {
      uint32 3
      uint16 1500
      byte 1
      uint16 0
      byte 0
      byte 5
   }
method call sender=:1.93 -> dest=com.jci.vbs.navi serial=1448 path=/com/jci/vbs/navi; interface=com.jci.vbs.navi.tmc; member=SetHUD_Display_Msg2
   struct {
      string "Centre St"
      byte 5
   }

I was able to send a message using

dbus-send --address=unix:path=/tmp/dbus_service_socket /com/NNG/Api/Servercom.NNG.Api.Server.Guidance.GuidanceChangedForHUD int32:25000 int32:3000 int32:1 string:"I can send nav" int32:0 int32:0 int32:0 int32:0 int32:0 int32:0 int32:0 int32:0 int32:0 int32:0

This resulted in this on the HUD
image

it seems the first int32 is the navigation symbol, the second is the distance in m*1000, the third is unknown but values of 0 and 2 resulted in nothing being displayed

So it this is looking plausible to me

@silverchris
Copy link
Author

More data.
I was able to get it running on linux, and connected to my phone. I added a channel for the navigation, and managed to get some output dumped out.

[root@localhost chris]# cat headunit/hu.log |grep AA_CH_NAVI
D: /home/chris/headunit/hu/hu_aap.cpp:1075: iaap_msg_process : AA_CH_NAVI msg_type: 32771  len: 2  buf: 0x7f166c040ed2
D: /home/chris/headunit/hu/hu_uti.cpp:170: hex_dump : AA_CH_NAVI 00000000 08 01
D: /home/chris/headunit/hu/hu_aap.cpp:1075: iaap_msg_process : AA_CH_NAVI msg_type: 32772  len: 35  buf: 0x7f166c040ed2
D: /home/chris/headunit/hu/hu_uti.cpp:170: hex_dump : AA_CH_NAVI 00000000 0a 07 4a 6f 68 6e 20 53 74 10 02 18 04 28 ff ff ff ff ff ff ff ff ff 01 30 ff ff ff ff ff ff ff ff ff 01
D: /home/chris/headunit/hu/hu_aap.cpp:1075: iaap_msg_process : AA_CH_NAVI msg_type: 32773  len: 27  buf: 0x7f166c040ed2
D: /home/chris/headunit/hu/hu_uti.cpp:170: hex_dump : AA_CH_NAVI 00000000 08 d6 01 10 ff ff ff ff ff ff ff ff ff 01 18 ff ff ff ff ff ff ff ff ff 01 20 01
D: /home/chris/headunit/hu/hu_aap.cpp:1075: iaap_msg_process : AA_CH_NAVI msg_type: 32772  len: 36  buf: 0x7f166c040ed2
D: /home/chris/headunit/hu/hu_uti.cpp:170: hex_dump : AA_CH_NAVI 00000000 0a 08 42 72 6f 61 64 77 61 79 10 02 18 04 28 ff ff ff ff ff ff ff ff ff 01 30 ff ff ff ff ff ff ff ff ff 01
D: /home/chris/headunit/hu/hu_aap.cpp:1075: iaap_msg_process : AA_CH_NAVI msg_type: 32773  len: 27  buf: 0x7f166c040ed2
D: /home/chris/headunit/hu/hu_uti.cpp:170: hex_dump : AA_CH_NAVI 00000000 08 aa 01 10 ff ff ff ff ff ff ff ff ff 01 18 ff ff ff ff ff ff ff ff ff 01 20 01

The first message with msg_type 32772, does contain the street name that was displayed. "John St."
The second msg_type 32772 had the correct street name as well, "Broadway"

the last mesg_type 32733 seems to contain the distance in the second position 0xAA == 170 which was the distance in meters displayed.

@silverchris
Copy link
Author

Did some more digging, and this is what I think the two messages are so far. Both unsurprisingly(?) seem to be encoded by protobuf

msg 32772:
    1 <chunk> = "John St" // EventName
    2 <varint> = 2 // TurnSide
    3 <varint> = 4 // TurnEvent
    5 <varint> = -1 (18446744073709551615) // TurnAngle/TurnNumber?
    6 <varint> = -1 (18446744073709551615) // TurnAngle/TurnNumber?

msg 32773:
    1 <varint> = 214 // distance
    2 <varint> = -1 (18446744073709551615)
    3 <varint> = -1 (18446744073709551615)
    4 <varint> = 1 // DistanceUnit? 

Using the naming convention from https://android.googlesource.com/platform/packages/services/Car/+/master/car-support-lib/src/android/support/car/navigation/CarNavigationStatusManager.java

@lmagder
Copy link
Collaborator

lmagder commented Sep 8, 2018

Nice, it seems like you're making some good progress! I dumped a bunch of the dbus xml from scraping the car's binaries and we are generating wrappers in mazda\dbus\generated_cmu.h. It seems there is already the com.jci.vbs.navi interface with SetHUDDisplayMsgReq method although it's missing stuff like SetHUD_Display_Msg2 unfortunately. Maybe the v55 version I dumped from didn't have all the stuff? You can edit https://github.com/gartnera/headunit/blob/master/mazda/dbus/cmu_interfaces.xml to add new stuff manually or rerun the python script to regenerate it from a new dump.

At least for SetHUDDisplayMsgReq it seems like

<method name="SetHUDDisplayMsgReq">
	<annotation name="com.jci.type_ref.hudDisplayMsg" value="VBS_NAVI_HUD_Display_s_t"/>
	<annotation name="async" value="client"/>
	<arg direction="in" name="hudDisplayMsg" type="(uqyqy)"/>
	<arg direction="out" name="return_status" type="y"/>
</method>

there are weird annotations specific to CMU which can tell you the params

<annotation name="com.jci.def_struct_names.VBS_NAVI_HUD_Display_s_t" value="nextManeuverInfo,distanceValue,distanceUnit,displaySpeedLimit,displaySpeedUnit"/>
<annotation name="com.jci.def_struct_types.VBS_NAVI_HUD_Display_s_t" value="               u,            q,           y,                q,               y"/>

which is uint32, uint16, uint8, uint16, uint8 in this case (https://dbus.freedesktop.org/doc/dbus-specification.html#basic-types) which matches what you saw in the dump.

The proto definitions we are using are in https://github.com/gartnera/headunit/blob/master/hu/hu.proto. The names we have sometimes dont totally match offical sources since a lot of was deduced from the raw datastream. Sometimes you can get clues by dumping symbols from the Linux binary of the desktop headunit emulator since the protoc generated code follows some patterns.

Probably the best way to connect these would be to add new methods to IHUConnectionThreadEventCallbacks so that we can also stub these out on Linux to debug (rendering to another window, terminal etc.)

@lmagder
Copy link
Collaborator

lmagder commented Sep 8, 2018

I did some poking around in the binaries and compared that with the dump you posed. It seems things are starting to match up? At least it looks like a "usual" AA channel, which is a good sign.


//First three are usually 0x8000, 0x8001, 0x8002, not what's what from your dump
//32771 (0x8003)?
message StartNAVMessages
{
    
}

//32771 (0x8003)?
message StopNAVMessages
{
    
}

//32771 (0x8003)?
message NAVMessagesStatus
{
    enum NAV_MESSAGE_STATUS
    {
        //????
    }
    optional NAV_MESSAGE_STATUS status = 1;
}

//32772   (0x8004)
message NAVTurnMessage
{
    optional string event_name = 1;
    enum TURN_SIDE
    {
        TURN_SIDE_1 = 1;
        TURN_SIDE_2 = 2; //????
    }
    optional TURN_SIDE turn_side = 2;
    enum TURN_EVENT
    {
        TURN_EVENT_1 = 1;
        TURN_EVENT_2 = 2;
        TURN_EVENT_3 = 3;
        TURN_EVENT_4 = 4;
    }
    optional TURN_EVENT turn_event = 3;
    optional bytes image = 4; //No idea how to interpret this Maybe maps to existing NavigationStatusService image data
    optional int32 turn_number = 5;
    optional int32 turn_angle = 5;
};

//32773   (0x8005)
message NAVDistanceMessage
{
    optional int32 distance = 1; //meters
    optional int32 time_until = 2; //seconds
};

@silverchris
Copy link
Author

Nice, that gives me a lot to go on!
When I set up the channel in my testing code, I set our type to 2, which I believes disables the navigation images from AA. I may try getting a dump with it set to 1, which I believe turns the images on

@silverchris
Copy link
Author

Making some progress!

V: /mnt/Files/Mazda/headunit/hu/hu_aap.cpp:1120: iaap_msg_process : AA_CH_NAVI
V: /mnt/Files/Mazda/headunit/hu/hu_aap.cpp:1121: iaap_msg_process : AA_CH_NAVI msg_type: 8004  len: 38  buf: 0x7f6d7802c2d2
V: /mnt/Files/Mazda/headunit/hu/hu_aap.cpp:1130: iaap_msg_process : AA_CH_NAVI: HU_NAVI_CHANNEL_MESSAGE::Turn
Clarke AveV: callbacks.cpp:207: HandleNaviTurn : AA_CH_NAVI: Clarke Ave, TurnSide: 2, TurnEvent:4, TurnNumber: 0, TurnAngle: -1
V: /mnt/Files/Mazda/headunit/hu/hu_aap.cpp:1120: iaap_msg_process : AA_CH_NAVI
V: /mnt/Files/Mazda/headunit/hu/hu_aap.cpp:1121: iaap_msg_process : AA_CH_NAVI msg_type: 8005  len: 11  buf: 0x7f6d7802c2d2
V: /mnt/Files/Mazda/headunit/hu/hu_aap.cpp:1134: iaap_msg_process : AA_CH_NAVI: HU_NAVI_CHANNEL_MESSAGE::TurnDistance
V: callbacks.cpp:210: HandleNaviTurnDistance : AA_CH_NAVI: Distance: 220

@lmagder
Copy link
Collaborator

lmagder commented Sep 9, 2018

Awesome! if setting the type doesn't work you might need to populate the image_options field of NavigationStatusService. I'm not sure if there is way of displaying these images in CMU though, but at least we would have a full understanding of the protocol.

Another thing we should consider is that not all cars have this display (AFAIK my 2016 MX5 does not unless I get a nice surprise when I run this code 😄 ) so hopefully there is some kind of CMU API we can use to detect the presence of the screen so we can decide to report support for the NavigationStatusService or not. Maybe it's the existence of com.jci.vbs.navi.tmc? I'm not sure.

@silverchris
Copy link
Author

Enough to make an initial push of what I have done :D
silverchris@286d9b7

@silverchris
Copy link
Author

I generated a new cmu_interfaces.xml, and it looks like we can check for the HUD's existence with a call to com.jci.navi2IHU.HUDSettings.GetHUDIsInstalled(), I have checked, and on my car that returns true. I feel it would be a good guess that it returns false on cars without it :)

I was also able to get a bit of interface code working, and it looks like SetHUDDisplayMsgReq and SetHUD_Display_Msg2 are exactly what we need.

I think I now need to figure out what all the icon values are... which will probably be fun!

@silverchris
Copy link
Author

Progress silverchris@9aa519e
It is working! I need to actually test the part that handles roundabouts, but it is successfully showing navigation data on my HUD.

It also probably needs a lot of cleanup still :)

@ryoncy
Copy link

ryoncy commented Sep 18, 2018

i so excited to seeing this, hope it can run on my Mazda 2 soon.

@Tommy544
Copy link

How is this feature coming along? It would be really awesome to have it working!

@cubexg
Copy link

cubexg commented Oct 14, 2018

Seems to be working - just installed AA .1.10 on my M3 and saw the hud pop directions up. It's showing in KM instead of MPH - not sure how to change that - but cool that it's there.

@silverchris
Copy link
Author

silverchris commented Oct 15, 2018

I have been running it on my car for a little bit now.
There are some notable flaws, that I haven't had a chance to correct yet.

  • Only works in km, as I haven't found a way to detect if the car is in km/h or mph
  • probably need to refresh the display ever 1 or 2 seconds, instead of every time it is sent a message, as the HUD seems to clear itself periodically(seems to be pretty close to 2 seconds?)
  • pretty sure my roundabout code is completely broken, haven't had a chance to dig in to it.
  • need a way to set/detect if the car is left hand or right hand drive, for roundabout direction
  • Waze only seems to send the navigation messages if I start navigating before connecting my phone for android auto.

I am hoping I will have a few quiet nights this week or next to do some fixes

@amrmori
Copy link

amrmori commented Oct 15, 2018

Guys am I missing something I have installed the AA V1.10 but i dont see anything on the hud even in KM, is there a way to activate it or something !?

@beauchar
Copy link

beauchar commented Oct 15, 2018 via email

@silverchris
Copy link
Author

Do you have factory navigation? It may be helpful to test with that, and make sure it is all working?
If you know how to use SSH on the car, I could also upload my test app, that I use for manually sending things to the display to test?

It could be that it works differently on the 6. I also haven't actually tried it without the navigation SD card in(I don't think that should be needed, but who knows!)

@GekoCH
Copy link

GekoCH commented Oct 16, 2018

I would have both: The old Navigation software via SD-Card an SSH access to my Mazda
I have a 6er from 2015 but the latest version (1.10) does not show anything. So if you can share your test app I would test it.

@silverchris
Copy link
Author

silverchris commented Oct 16, 2018

Here is the test app https://github.com/silverchris/headunit/blob/WiFi/mazda/hud-test
to test, you should be able to run it as
hud-test Test 4 1 -1 -1 100 -1 1
Which should show a left turn, with the street name "Test" in 100 meters

It should also show if it detects the HUD, by printing "hud installed 1"

@beauchar
Copy link

beauchar commented Oct 17, 2018 via email

@silverchris
Copy link
Author

Hi Chris, Ran the test app, it did pop up on the HUD - but no street name, see https://imagebin.ca/v/4JReLMePCHyU # /mnt/sdb1/hud-test Test 4 1 -1 -1 100 -1 1 DBUS::Glib::BusDispatcher attached hud installed 1 Event Name: Test Turn Event: 4 Turn Side: 1 Turn number: -1 Turn angle: -1 distance: 100 time: -1 msg: 1 # So looks like it should work. I've installed AA using mzd-aio v2.8.1 which says it is installing AA v1.10 - is there a good way to double check which version I have running? (Just in case!). Thanks, Rich

On Wed, 17 Oct 2018 at 00:24, Chris @.***> wrote: Here is the test app https://github.com/silverchris/headunit/blob/WiFi/mazda/hud-test to test, you should be able to run it as hud-test Test 4 1 -1 -1 100 -1 1 Which should show a left turn, with the street name "Test" in 100 meters — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#135 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AMGSrlmMGX4Dyh9bSMBfT9McFCPT0EgTks5ulmqOgaJpZM4WX4Q9 .

Interesting, your display seems to be laid out in a different way than mine. Do you get street names when you use the factory nav? If you do, we may need to use dbus-monitor to see if there are any differences in the way they communicate?

@beauchar
Copy link

beauchar commented Oct 18, 2018 via email

@GekoCH
Copy link

GekoCH commented Oct 18, 2018

Hi Chris, Ran the test app, it did pop up on the HUD - but no street name, see https://imagebin.ca/v/4JReLMePCHyU # /mnt/sdb1/hud-test Test 4 1 -1 -1 100 -1 1 DBUS::Glib::BusDispatcher attached hud installed 1 Event Name: Test Turn Event: 4 Turn Side: 1 Turn number: -1 Turn angle: -1 distance: 100 time: -1 msg: 1 # So looks like it should work. I've installed AA using mzd-aio v2.8.1 which says it is installing AA v1.10 - is there a good way to double check which version I have running? (Just in case!). Thanks, Rich

On Wed, 17 Oct 2018 at 00:24, Chris @.***> wrote: Here is the test app https://github.com/silverchris/headunit/blob/WiFi/mazda/hud-test to test, you should be able to run it as hud-test Test 4 1 -1 -1 100 -1 1 Which should show a left turn, with the street name "Test" in 100 meters — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#135 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AMGSrlmMGX4Dyh9bSMBfT9McFCPT0EgTks5ulmqOgaJpZM4WX4Q9 .

Interesting, your display seems to be laid out in a different way than mine. Do you get street names when you use the factory nav? If you do, we may need to use dbus-monitor to see if there are any differences in the way they communicate?

I also have the factory Navi but I don't get the street names in the HUD (Mazda 6 2015)

@cubexg
Copy link

cubexg commented Oct 18, 2018 via email

@beauchar
Copy link

beauchar commented Oct 19, 2018 via email

@mishan
Copy link

mishan commented Nov 5, 2018 via email

@mellda
Copy link

mellda commented Nov 6, 2018

There's info on https://mazdatweaks.com/ Since you're on v70 firmware, you won't be able to use it without first getting root on your CMU via the serial console method. It's kind of a PITA unless you're comfortable with running a couple of wires and doing serial console. The alternative is you could also just buy the OEM Android Auto / Apple Carplay upgrade. You're already on the correct firmware for it. I just bought it and installed it myself, it was pretty easy. There's step by step guides for how to do it all if you're so inclined. http://shop.mazmart.com/en/apple-carplayandroid-kit-for-2014-skyactiv-models

On Mon, Nov 05, 2018 at 02:19:01PM -0800, mellda wrote: Yes, it supports 2014+. I have a 2014. [1]… On November 4, 2018 2:40:29 PM PST, mellda @.***> wrote: Guys, is there any chance to run it on Mazda 3 2014? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: [2]#135 (comment) -- Sent from my Android device with K-9 Mail. Please excuse my brevity. That's great! I am totally new in this area. Is there any info, what this project/SW is and how to build it, how to flash it to the car and so on? Or where or how to search? Is this complete replacement of the Mazda firmware in the car infotainment? I have the new version 70 so I am not sure, if there is some extra feature I will miss when I reflash this firmware but if the process is reversible, I will try it :) I really appreciate any help and of course the huge work you did on this great project guys. — You are receiving this because you commented. Reply to this email directly, [3]view it on GitHub, or [4]mute the thread. References Visible links 1. file:///tmp/mutt-xanadu-1000-10706-1385037618951532720# 2. #135 (comment) 3. #135 (comment) 4. https://github.com/notifications/unsubscribe-auth/AAwIYTGGWuFN19uLlh0rC5XV9O6ffGZ7ks5usLlVgaJpZM4WX4Q9
-- Misha Nasledov misha@nasledov.com GPG: A063 B99A 2BD3 2D48 F2D7 8E68 0F27 4D21 948F 8F06

I already have this upgraded unit. They installed it to my car and updated the official firmware to the version 70. I don't use (and have never used) the "Mazda AIO Tweaks". When I run google maps or waze, there are no info from navigation on HUD. So what should I do? To install the Mazda AIO Tweaks and then this? Or only the Mazda AIO Tweaks?

@silverchris
Copy link
Author

Made some fairly major changes to the HUD code, trying to track down why the navigation sometimes gets cleared off the HUD. Looks like the factory nav periodically sends the intersecting street names to the HUD with zero for the distance and icon, which blanks out our navigation data.

I have to look and see if there is a way to turn that feature off, or possibly try and catch it, and rapidly resend the proper navigation data

@leonunix
Copy link

leonunix commented Nov 7, 2018

Made some fairly major changes to the HUD code, trying to track down why the navigation sometimes gets cleared off the HUD. Looks like the factory nav periodically sends the intersecting street names to the HUD with zero for the distance and icon, which blanks out our navigation data.

I have to look and see if there is a way to turn that feature off, or possibly try and catch it, and rapidly resend the proper navigation data

Can you give me a link to download binary?
I want to test it.
It is hard to compile for me now.
thank you very much

@ryoncy
Copy link

ryoncy commented Nov 8, 2018

@silverchris can you share the installer to us, i not able to compile. Thanks

@silverchris
Copy link
Author

After some testing... I don't think you want this build, as it still suffers from the display being cleared of navigation data too frequently. Thought I had that fixed!

@silverchris
Copy link
Author

Still having a lot of issues with the navigation getting cleared off the hud, at least in my car
AndroidAuto_v1.05-67-gfe1f508.zip
built from commit silverchris@4902914

@leonunix
Copy link

leonunix commented Nov 12, 2018

Still having a lot of issues with the navigation getting cleared off the hud, at least in my car
AndroidAuto_v1.05-67-gfe1f508.zip
built from commit silverchris@4902914

I try to use this commit app. Same problem with you. I think if distance rather than 1000. It will only display once.And clear the hud screen. until distance less than 1000. It will work very good.
One hypothesis i think is same command can not be send twice. On offical nav maybe have a clear command will be send before send command.
ps. I try to compile your code .But something error on it. So i can not compile it by myself.
/root/headunit/hu/hu_aap.cpp:1129:11: error: ‘hex_dumpv’ was not declared in this scope
hex_dumpv("AA_CH_NAVI", 80, buf, len);
^~~~~~~~~
/root/headunit/hu/hu_aap.cpp:1129:11: note: suggested alternative: ‘hex_dump’
hex_dumpv("AA_CH_NAVI", 80, buf, len);
^~~~~~~~~
hex_dump
Makefile:50: recipe for target '/root/headunit/hu/hu_aap.x64.o' failed

I think you lost upload some files

@leonunix
Copy link

Still having a lot of issues with the navigation getting cleared off the hud, at least in my car
AndroidAuto_v1.05-67-gfe1f508.zip
built from commit silverchris@4902914

I think navi_data->previous_msg+1
must be do every time. In your code . distance change part have not msg id change.
So i think case this problem. I change hex_dumpv to hex_dump and finish compile.
So I will do a test this weekend.

@silverchris
Copy link
Author

Still having a lot of issues with the navigation getting cleared off the hud, at least in my car
AndroidAuto_v1.05-67-gfe1f508.zip
built from commit silverchris@4902914

I think navi_data->previous_msg+1
must be do every time. In your code . distance change part have not msg id change.
So i think case this problem. I change hex_dumpv to hex_dump and finish compile.
So I will do a test this weekend.

The factory navigation doesn't change the msg number unless it is changing the street name
Here is what I have parsed from my dbus-monitor log when navigating using the factory navigation.
factory (2).txt

I am starting to think it has something to do with the distance traveled. The factory navigation seems to keep it at intervals of 100m. I think the HUD module is keeping track, and if it doesn't get an updated distance every 100m it clears the navigation message off the display?

@leonunix
Copy link

leonunix commented Nov 12, 2018

Still having a lot of issues with the navigation getting cleared off the hud, at least in my car
AndroidAuto_v1.05-67-gfe1f508.zip
built from commit silverchris@4902914

I think navi_data->previous_msg+1
must be do every time. In your code . distance change part have not msg id change.
So i think case this problem. I change hex_dumpv to hex_dump and finish compile.
So I will do a test this weekend.

The factory navigation doesn't change the msg number unless it is changing the street name
Here is what I have parsed from my dbus-monitor log when navigating using the factory navigation.
factory (2).txt

I am starting to think it has something to do with the distance traveled. The factory navigation seems to keep it at intervals of 100m. I think the HUD module is keeping track, and if it doesn't get an updated distance every 100m it clears the navigation message off the display?

Thank your send log. I have not offical nav .So this a very useful log
Can we think this.
If msg id is the same distance must count down.
like
googe map send you 1840m --> send 18
googe map send you 1830m --> send 18
So same msg send twice.

The old version of this.
msg id change very time. So hud will not clean off.

@leonunix
Copy link

Still having a lot of issues with the navigation getting cleared off the hud, at least in my car
AndroidAuto_v1.05-67-gfe1f508.zip
built from commit silverchris@4902914

I think navi_data->previous_msg+1
must be do every time. In your code . distance change part have not msg id change.
So i think case this problem. I change hex_dumpv to hex_dump and finish compile.
So I will do a test this weekend.

The factory navigation doesn't change the msg number unless it is changing the street name
Here is what I have parsed from my dbus-monitor log when navigating using the factory navigation.
factory (2).txt

I am starting to think it has something to do with the distance traveled. The factory navigation seems to keep it at intervals of 100m. I think the HUD module is keeping track, and if it doesn't get an updated distance every 100m it clears the navigation message off the display?

I have make a request pull to you github.
Maybe you can try this fix. If I think is right.
And I will test it on weekend.

@leonunix
Copy link

leonunix commented Nov 19, 2018

Still having a lot of issues with the navigation getting cleared off the hud, at least in my car
AndroidAuto_v1.05-67-gfe1f508.zip
built from commit silverchris@4902914

I think navi_data->previous_msg+1
must be do every time. In your code . distance change part have not msg id change.
So i think case this problem. I change hex_dumpv to hex_dump and finish compile.
So I will do a test this weekend.

The factory navigation doesn't change the msg number unless it is changing the street name
Here is what I have parsed from my dbus-monitor log when navigating using the factory navigation.
factory (2).txt

I am starting to think it has something to do with the distance traveled. The factory navigation seems to keep it at intervals of 100m. I think the HUD module is keeping track, and if it doesn't get an updated distance every 100m it clears the navigation message off the display?

agree with you .After many test on weekend. I think hud trace distance by it self.
One way to solve this .Is change message id every time.
Another way is send like factory navi.

Some big found.
System will send some hud signal

signal,:1.138,(null destination),1544,/com/NNG/Api/Server,com.NNG.Api.Server.Guidance,GuidanceChangedForHUD,,,,,,,," int32 3
int32 19
int32 3
string ""Porterfield Rd (HWY 136/RR 136)""
int32 80
int32 3
int32 0
int32 0
int32 0
int32 0
int32 0
int32 0
int32 0
int32 0
"

@k0da
Copy link

k0da commented Dec 28, 2018

any progress on this issue? IIUC official AA integration also doesn't have this implemented

@GekoCH
Copy link

GekoCH commented Jan 9, 2019

just a note. After I cleared the cache of google maps I now have turn by turn navigation on my HUD!
I use a Nokia 8 with Android 9.
In the city the turn-by-turn navigation works quite good but on the highway there are too many direction changes displayed that are not needed.
How can I help to improve this?

Andy

@zahitkara
Copy link

zahitkara commented Jan 14, 2019

Mine started to work all of a sudden today after the google maps update i think. I haven't updated AA or CMU. Latest AA installed with CMU 56.00.513 and 2015 Mazda 3 with mono color hud.

Could be related with this:
https://productforums.google.com/forum/?noredirect=true#!topic/android-auto/9U2N6d5mYV0

@mellda
Copy link

mellda commented Jan 15, 2019

U. Latest AA installed with CMU 56.00.513 and 2015 Mazda 3 with m

Do you have the stock CMU and AA in CMU?

@zahitkara
Copy link

U. Latest AA installed with CMU 56.00.513 and 2015 Mazda 3 with m

Do you have the stock CMU and AA in CMU?

No. Using AIO version of AA v1.10+.

@mellda
Copy link

mellda commented Jan 15, 2019

U. Latest AA installed with CMU 56.00.513 and 2015 Mazda 3 with m

Do you have the stock CMU and AA in CMU?

No. Using AIO version of AA v1.10+.

Is the hud navigation reliable? I mean if it is accurate. Same as in the navigation displayd on infotainment screen.

I have installed the upgrade of USB unit and got the official AA in FW version 70. I cannot go back to 59 to use the AIO version of AA.

@GekoCH
Copy link

GekoCH commented Jan 15, 2019

for me it is only "accurate" during city driving. On the speedway there are a lot of strange turn signals displayed...

@zahitkara
Copy link

I haven't test it long enough to decide whether it's reliable or not.

@ryoncy
Copy link

ryoncy commented Jan 20, 2019

for me it is only "accurate" during city driving. On the speedway there are a lot of strange turn signals displayed...

same with me on speedway a lot wrong turn signals

@frtnrn
Copy link

frtnrn commented Feb 18, 2019

i have tested with android auto 3.9.5850 / mazda3 2017 with colored HUD everything works but main problem is too many direction.This problem root cause is HUD not displayed 3.4km and over.I think minor fix resolved this issue and works perfectly

@beauchar
Copy link

Spontaneous genesis for me as well a couple of days ago in my 6!
No updates to the CMU (59.00.449 EU N) or the AIO AA install (v2.8.3 AIO, AA1.10) but I recently had an Android update and Google Maps updated to v10.10.1 about the same time, so I'm guessing it's a side effect of that.

I also now see that the directions displayed on the HUD don't match the main maps display.
There seems to be a couple of things going on that may be causing this:

  1. Mismatch in display units. Maps is displaying in miles and the HUD is displaying in Km
  2. HUD seems to be displaying in chunks of 3.4km, when there are no turns in the main display. So main display shows straight ahead for 80 miles. HUD will display a turn in 3.4km, count it down and then start again.

I'll take a closer look at the work @leonunix did to diagnose this but was wondering if any updates were made to the code in the end as it wasn't clear to me from this thread. I will try and see if I can get a better view of what's going on and report back.

@ryoncy
Copy link

ryoncy commented Jun 4, 2019

Any update for this HUD, now my HUD is no showing turn by turn navigate after android auto and google maps update. any facing the same problem?

@kennethgp
Copy link

kennethgp commented Feb 25, 2020

I have CMU 56.00.100A and latest headunit AndroidAuto_v1.05-52-g54b38d6 (the one someone compiled to fix the restarts caused by Google's AA update) and HUD navigation does not work; it only shows the intital arrow for the first turn and it gets stuck, will not go away until you exit AA and switch CMU Navigation enabled setting on and off again. I leave this setting Off all the times but it does not prevents the arrow to appear. This also happened in headunit AA-v1.12 and it is very annoying. I read somewhere CMU 59.x was needed to HUD to work, is this true? If so, for all of us that can't upgrade it would be nice HUD navigation is either fixed or a setting to shut it off is available. I'd prefer to have that HUD off/on setting because I think it also contributes to Spotify stutter when maps auto-zoom or re-positions on a turn. I see stutter is almost all fixed by that latest 'user-compiled' version and turning off Waze auto-zoom, but still it happens on hard turns, for example in roundabouts, so I think maybe the HUD functionality is related.

@xeacott
Copy link

xeacott commented Apr 21, 2020

Hey guys how is this going? Is there any way I can offer some help? Testing or development.

@silverchris
Copy link
Author

I have been meaning to get back to this for awhile.
I have ordered a bricked CMU off ebay, to hopefully help with testing it. I was getting a bit nervous using my daily driver as a test rig! :)

@silverchris
Copy link
Author

Update:
Got a CMU running on my bench. Need to see if I can source a cluster with HUD from an auto wrecker around here., and maybe the HMI controls lol

I do think the HUD code does need an option to turn it off and on, as I can understand people not wanting to use it for what ever reason.

@silverchris
Copy link
Author

silverchris commented Nov 4, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests