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

What is the status of this project #6

Open
YouHusam opened this issue Apr 10, 2022 · 69 comments
Open

What is the status of this project #6

YouHusam opened this issue Apr 10, 2022 · 69 comments

Comments

@YouHusam
Copy link

Hi what is the status of this project?
I stumbled upon it while looking for wireless AA. I managed to install it on my cmu v59.00.545, it seems to work, but I don't see anything on my screen. It's just stuck at the home screen. Pressing buttons seems to be interacting with AA, but still couldn't see the AA interface.
Are there any plans for future updates/fixes?

@silverchris
Copy link
Owner

I am actually working on it right now, it does have some issues with different versions of the cmu firmware currently.

@YouHusam
Copy link
Author

That is great news, thank you very much!
Do you accept donations by chance?

@rudcode
Copy link

rudcode commented Apr 17, 2022

Great to hear that this project continues. I have mazda 2 2015, my mzd connect version is v56.00.513C. I tried version 1.0.1 but got black screen everytime I tried to connect to my phone. I haven't tried your new commit but will try soon.

@silverchris
Copy link
Owner

Great to hear that this project continues. I have mazda 2 2015, my mzd connect version is v56.00.513C. I tried version 1.0.1 but got black screen everytime I tried to connect to my phone. I haven't tried your new commit but will try soon.

I wouldn't try it just yet!
As most of my changes right now are experimenting with using some of the components for the Mazda AA implementation instead of my own for video switching, it will likely not work very well on the older firmware.

I need to figure out a way to support both.

I need to also test if upgrading to 70.00.100 does anything to lock me out on my actual car which is running a 59.something version, as that might be the best way going forward?

@silverchris
Copy link
Owner

That is great news, thank you very much! Do you accept donations by chance?

I will consider it, if I get this working well enough to feel it's deserved :)

@rudcode
Copy link

rudcode commented Apr 26, 2022

Great to hear that this project continues. I have mazda 2 2015, my mzd connect version is v56.00.513C. I tried version 1.0.1 but got black screen everytime I tried to connect to my phone. I haven't tried your new commit but will try soon.

I wouldn't try it just yet! As most of my changes right now are experimenting with using some of the components for the Mazda AA implementation instead of my own for video switching, it will likely not work very well on the older firmware.

I need to figure out a way to support both.

I need to also test if upgrading to 70.00.100 does anything to lock me out on my actual car which is running a 59.something version, as that might be the best way going forward?

Yeah I think that's maybe the best way to go. I can't find v59 firmware for my region (ADR). I succesfully compiled your new commit (without test file, can't find it, so I comment it), but still don't have time to test it on my car. Now I use your old wifi autoconfig headunit from nov 2020, but not that stable, because sometimes wifi connected but sometimes doesn't.
Do you plan to add wifi autoconfig to this openauto as well?

@rudcode
Copy link

rudcode commented Apr 27, 2022

I use his openauto-mazda-build repo, just build the dockerfile and compile from there. But need to comment out some line in dockerfile, ctng config, and cmakefile. My email is [email protected], I hope I can help this project with testing some stuff.

@silverchris
Copy link
Owner

I use his openauto-mazda-build repo, just build the dockerfile and compile from there. But need to comment out some line in dockerfile, ctng config, and cmakefile. My email is [email protected], I hope I can help this project with testing some stuff.

Always happy to have people testing it :)

I am hoping to upgrade my cars firmware so I can try the latest changes in a full car, instead of on my test CMU on my desk.

@silverchris
Copy link
Owner

Always happy to have people testing it :)

@silverchris

I ran into issue with your new commit for openauto...

17-- Checking for module 'dbus-cxx-2.0'

18-- Package 'dbus-cxx-2.0', required by 'virtual:world', not found

19CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:545 (message):

20 A required package was not found

21Call Stack (most recent call first):

22 /usr/share/cmake/Modules/FindPkgConfig.cmake:733 (_pkg_check_modules_internal)

23 CMakeLists.txt:34 (pkg_check_modules)

24

25

26-- Configuring incomplete, errors occurred!

are you able to help rectify this issue?

Can you verify that dbus-cxx got built in the docker container, and that cmake is using the tool chain from docker to build with?

@silverchris
Copy link
Owner

installer.zip
Here is a version that will only work on CMU firmware 70.00.100+ as it relies on some of the built in android auto stuff.
You don't need the upgraded usb hardware, as we aren't using that part.
You should take a look at https://github.com/silverchris/openauto/blob/master/src/installer/main.cpp to be sure you understand what is being changed on your CMU!
This is based on commit a95c9e3

I need to work on detecting the CMU version and it deciding to use the old way or the new way for video switching

@silverchris
Copy link
Owner

silverchris commented Apr 28, 2022

Always happy to have people testing it :)

@silverchris
I ran into issue with your new commit for openauto...
17-- Checking for module 'dbus-cxx-2.0'
18-- Package 'dbus-cxx-2.0', required by 'virtual:world', not found
19CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:545 (message):
20 A required package was not found
21Call Stack (most recent call first):
22 /usr/share/cmake/Modules/FindPkgConfig.cmake:733 (_pkg_check_modules_internal)
23 CMakeLists.txt:34 (pkg_check_modules)
24
25
26-- Configuring incomplete, errors occurred!
are you able to help rectify this issue?

Can you verify that dbus-cxx got built in the docker container, and that cmake is using the tool chain from docker to build with?

@silverchris How to build dbus-cxx into docker container, and make cmake to use tool chain from docker build? Is there an instructions guide or could you write up a pdf guide on how to and tools required please.

All I did was imported your openauto and ran action (ci) and thats the error message. Are you able to update your container image (development.yml ci) so it works with the new dbus--cxx, or new release on your openauto repo that it works from actions. Thank you.

I thought I had that automated. Just pushed a new version to logo
thesilverchris/openauto-mazda-build:development on the docker hub :)

@rudcode
Copy link

rudcode commented Apr 29, 2022 via email

@rudcode
Copy link

rudcode commented Apr 29, 2022

13.311 I [VideoService.cpp] [VideoService] video focus indication.
13.314 I [VideoService.cpp] [VideoService] video focus indication.
13.323 I [InputService.cpp] [InputService] binding request, scan codes count: 19
13.323 I [InputDevice.cpp] [InputDevice] start.
13.332 I [InputService.cpp] [InputService] binding request, status: 0
13.340 I [VideoService.cpp] [VideoService] start indication, session: 0
[AaSdk] [BluetoothServiceChannel] message handler [AaSdk] [BluetoothServiceChannel] pairing request 14.323 I [BluetoothService.cpp] [BluetoothService] pairing request, address: 38:78:62:F0:C9:59
[AaSdk] [BluetoothServiceChannel] pairing response [AaSdk] [BluetoothServiceChannel] receive 16.201 I [Pinger.cpp] [Pinger] Ping missed. Count: 1
19.758 I [GSTVideoOutput.cpp]
(gst-plugin-scanner:18596): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libmfw_gst_mpeg2dec.so': lib_mpeg2_dec_arm11_elinux.so.2.2.0: cannot open shared object file: No such file or directory
20.093 I [GSTVideoOutput.cpp]
(gst-plugin-scanner:18596): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libmfw_gst_h264dec.so': lib_H264_dec_arm11_elinux.so.2.6.1: cannot open shared object file: No such file or directory
20.301 I [GSTVideoOutput.cpp]
(gst-plugin-scanner:18596): GStreamer-CRITICAL **: gst_pad_template_new: assertion caps != NULL' failed
20.306 I [GSTVideoOutput.cpp]
(gst-plugin-scanner:18596): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion GST_IS_PAD_TEMPLATE (templ)' failed
20.749 I [GSTVideoOutput.cpp]
(gst-plugin-scanner:18596): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libmfw_gst_mpeg4aspdec.so': lib_MPEG4ASP_dec_arm11_elinux.so.1.2.1: cannot open shared object file: No such file or directory
21.036 I [GSTVideoOutput.cpp]
(gst-plugin-scanner:18596): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libmfw_gst_mpeg2dec.so': lib_mpeg2_dec_arm11_elinux.so.2.2.0: cannot open shared object file: No such file or directory
21.048 I [GSTVideoOutput.cpp]
(gst-plugin-scanner:18596): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libmfw_gst_h264dec.so': lib_H264_dec_arm11_elinux.so.2.6.1: cannot open shared object file: No such file or directory
21.067 I [GSTVideoOutput.cpp]
(gst-plugin-scanner:18596): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libmfw_gst_mpeg4aspdec.so': lib_MPEG4ASP_dec_arm11_elinux.so.1.2.1: cannot open shared object file: No such file or directory
21.088 I [GSTVideoOutput.cpp] MAX resolution 800x480
21.169 I [GSTVideoOutput.cpp]
(gst-plugin-scanner:18786): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libmfw_gst_mpeg4aspdec.so': lib_MPEG4ASP_dec_arm11_elinux.so.1.2.1: cannot open shared object file: No such file or directory
21.372 I [GSTVideoOutput.cpp] MFW_GST_V4LSINK_PLUGIN 3.0.5 build on Nov 19 2015 21:34:26.
21.381 I [GSTVideoOutput.cpp] WARNING: erroneous pipeline: no element "h264parse"
[AaSdk] channel error: AaSdk error code: 10, native code: 1, channel: control
[AaSdk] channel error: AaSdk error code: 10, native code: 1, channel: 3
[AaSdk] channel error: AaSdk error code: 10, native code: 1, channel: 8
[AaSdk] channel error: AaSdk error code: 10, native code: 1, channel: 7
[AaSdk] channel error: AaSdk error code: 10, native code: 1, channel: 1
[AaSdk] channel error: AaSdk error code: 10, native code: 1, channel: 11
[AaSdk] channel error: AaSdk error code: 10, native code: 1, channel: 4
[AaSdk] channel error: AaSdk error code: 10, native code: 1, channel: 2
[AaSdk] channel error: AaSdk error code: 10, native code: 1, channel: 5

Hi @silverchris, I just tested your latest commit in my car, I got this error. I think the gstreamer on old firmware is broken and thats why the old headunit app needs to build gst. What do you think?

@silverchris
Copy link
Owner

@silverchris
Copy link
Owner

Try adding this file to https://github.com/silverchris/headunit/blob/master/mazda/installer/config/androidauto/data_persist/dev/bin/headunit_libs/libgsth264parse.so to /data_persist/dev/lib on the cmu.

I lied, it needs to go into
/mnt/data_persist/dev/bin/headunit_libs

@rudcode
Copy link

rudcode commented Apr 30, 2022

DSC_0294
Nice, got it working, even the wireless aa is working with wifiap tweaks. However the exit is not working for me, when I click exit it still in android auto not back to mazda menu. If I disconnect the wifi or the cable manually the screen is frozen and I need to force restart it. Sorry can't take log, if I run the app from ssh the autoapp will error core dumped.

@silverchris
Copy link
Owner

For wifi you just need to install the tweak from AIO tools. I am debating on just including it in the installer.

Want to open individual issues for the other problems? I am aware of some of them, but having the tracked will probably remind me to actually look into them! :)

@YouHusam
Copy link
Author

YouHusam commented May 4, 2022

Hi Jack, Sorry for the late reply, I saw your comment, for me I need to add this include_directories(include/Mazda/Dbus/com.jci.bca) to cmakelist.txt. After that I was able to compile successfully

Can you explain how did you make it build? I keep getting the same error about dbus-cxx-2.0 not found
I'm most likely missing environment variables or something.

Thank you

@rudcode
Copy link

rudcode commented May 4, 2022

Can you explain how did you make it build? I keep getting the same error about dbus-cxx-2.0 not found I'm most likely missing environment variables or something.

Thank you

Clone openauto-mazda-build repository or just cd to external/openauto-mazda-build and run docker build. Compile fhe file with that container.

@YouHusam
Copy link
Author

YouHusam commented May 4, 2022

Can you explain how did you make it build? I keep getting the same error about dbus-cxx-2.0 not found I'm most likely missing environment variables or something.
Thank you

Clone openauto-mazda-build repository or just cd to external/openauto-mazda-build and run docker build. Compile fhe file with that container.

cd to external/openauto-mazda-build worked! Thank you very much. I will test it later and post the results here

@YouHusam
Copy link
Author

YouHusam commented May 5, 2022

Hi @rudcode @silverchris are you able to clone and build from this open-mazda-build repo branch for me please 23a734c and possibly push to your docker hub if you have one and post the tag name so I can pull or use that/your container image (for sdbus version). I'm experiencing plenty of bugs on the new dbus version.

Is there also a how to instruction explaining how to build offline?? Building online is painly slow waiting time is at least 15mins to completion.

Thank you.

@Pixelslot I managed to build an image from commit 23a734c I had to change some things in the dockerfile and edit the file scripts/16-boost.sh.

here is the dockerfile that succeeded:

FROM alpine:latest
ARG CTNG_UID=1000
ARG CTNG_GID=1000
RUN addgroup -g $CTNG_GID ctng
RUN yes password | adduser -h /home/ctng -G ctng -u $CTNG_UID -s /bin/bash ctng
# Activate community and testing repositories
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories
RUN apk update
RUN apk add alpine-sdk wget xz git bash autoconf automake bison flex texinfo help2man gawk libtool ncurses-dev gettext-dev python3-dev rsync coreutils
RUN git clone https://github.com/crosstool-ng/crosstool-ng.git

RUN mkdir -p /home/ctng/src

# Manually download files that ct-ng source failed to get
RUN wget -P /home/ctng/src https://github.com/libexpat/libexpat/releases/download/R_2_2_6/expat-2.2.6.tar.bz2
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/make/make-4.2.1.tar.bz2
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.xz
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.xz
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/binutils/binutils-2.26.1.tar.bz2
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.xz
RUN wget -P /home/ctng/src http://ftp.jaist.ac.jp/pub/Linux/kernel.org/linux/kernel/v3.x/linux-3.16.85.tar.xz
RUN wget -P /home/ctng/src https://netix.dl.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.xz
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz
RUN wget -P /home/ctng/src https://libisl.sourceforge.io/isl-0.15.tar.bz2
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/ncurses/ncurses-6.1.tar.gz
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz
RUN wget -P /home/ctng/src https://ftp.gnu.org/gnu/gettext/gettext-0.19.8.1.tar.xz
RUN wget -P /home/ctng/src https://www.musl-libc.org/releases/musl-1.1.24.tar.gz

RUN cd crosstool-ng && ./bootstrap && ./configure --prefix=/opt/ctng/ && make && make install
ENV PATH="/opt/ctng/bin:${PATH}"
RUN mkdir /opt/x-tools && chown ctng /opt/x-tools && chmod 777 /opt/x-tools

USER ctng
RUN mkdir -p /home/ctng/build

WORKDIR /home/ctng/build
ADD .config .
RUN ls /home/ctng/src

RUN ct-ng source
RUN ct-ng build || ( cat build.log && exit 1 )

FROM alpine:latest
COPY --from=0 /opt/x-tools /opt/x-tools
RUN apk update && apk add alpine-sdk wget xz git bash autoconf automake bison flex texinfo help2man gawk libtool ncurses-dev gettext-dev rsync coreutils libtool pkgconfig meson ninja gperf cmake linux-headers expat expat-dev zip popt popt-dev python3 openssh gdb-multiarch
RUN mkdir /root/build
WORKDIR /root/build
COPY scripts ./scripts
COPY cross_file.txt cross_file_systemd.txt arm-mazda-linux-musleabi.toolchain ./
COPY patches ./patches
RUN sh scripts/09-protobuf.sh
RUN sh scripts/10-openssl.sh
RUN sh scripts/11-protobuf.sh
RUN sh scripts/12-libusb.sh
RUN sh scripts/13-alsa.sh
RUN sh scripts/14-asio.sh
RUN sh scripts/15-sigc++.sh
RUN sh scripts/16-boost.sh
RUN sh scripts/18-libevdev.sh
RUN sh scripts/100_libcap.sh
RUN sh scripts/101_util-linux.sh
RUN sh scripts/102-systemd.sh
RUN sh scripts/103-sdbus-cpp.sh
RUN sh scripts/104-sdbus-c++-xml2cpp.sh
RUN ( \
    echo 'LogLevel DEBUG2'; \
    echo 'PermitRootLogin yes'; \
    echo 'PasswordAuthentication yes'; \
    echo 'Subsystem sftp internal-sftp'; \
  ) > /etc/ssh/sshd_config_test_clion \
  && mkdir /run/sshd
RUN yes password | adduser "user"
RUN cd /etc/ssh && ssh-keygen -A
CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config_test_clion"]
#
##   docker build -t mazdabuild/cmake:0.5 -f Dockerfile .
##   docker run -d --cap-add sys_ptrace -p 127.0.0.1:2222:22 --name openauto-mazda-build_remote_env openauto-mazda-build:latest

I tried to take changes from the old and the new file. The docker image file ended up being 3GB, maybe some optimisations can be done, but it's 3 AM right now and I spent maybe 4 hours trying to get it to work.
I want to upload an image to dockerhub, but I can't seem to sign up, waiting for confirmation email.

There was only one change in the file 16-boost.sh and that to make it use a different url to pull the sources, just change the third line to:

wget -q https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.gz

For building I tried the following:

export CMAKE_SYSTEM_NAME=Linux
export CMAKE_SYSTEM_PROCESSOR=arm
export CMAKE_SYSROOT=/opt/x-tools/arm-mazda-linux-musleabi/arm-mazda-linux-musleabi/sysroot
export tools=/opt/x-tools/arm-mazda-linux-musleabi
export CMAKE_C_COMPILER=${tools}/bin/arm-mazda-linux-musleabi-gcc
export CMAKE_CXX_COMPILER=${tools}/bin/arm-mazda-linux-musleabi-g++
export CMAKE_PREFIX_PATH=${tools}/arm-mazda-linux-musleabi/sysroot/usr/lib/cmake
export CXX=$CMAKE_CXX_COMPILER
export CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
export CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
export CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
export CMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY
export PKG_CONFIG_DIR=""
export PKG_CONFIG_LIBDIR=${CMAKE_SYSROOT}/usr/lib/pkgconfig
export PKG_CONFIG_SYSROOT_DIR=${CMAKE_SYSROOT}

git clone https://github.com/silverchris/openauto
cd openauto
git checkout 23a734ce8ee5f723dc6297425f78e5860ca47e7c
git submodule update --init --recursive

cmake -DCMAKE_BUILD_TYPE=Release -DRPI3_BUILD=TRUE -DAASDK_INCLUDE_DIRS="./external/aasdk/include" \
-DAASDK_LIBRARIES="./external/aasdk/lib/libaasdk.so" -DAASDK_PROTO_INCLUDE_DIRS="./external/aasdk" \
-DAASDK_PROTO_LIBRARIES="./external/aasdk/lib/libaasdk_proto.so" .

make -j2

make install

I don't know if this will work, but I hope it does. Good luck.
I uploaded the run file:
openauto_installer.run.zip

I do not take responsibility for any damage that this file might make, it's 4:25 AM now and I documented all the steps that I've taken.

@YouHusam
Copy link
Author

YouHusam commented May 6, 2022

@Pixelslot I can't tell what's wrong, I was building the image on a macbook, I just contacted the docker hub support I still didn't get the confirmation email and my account is not enabled.

Maybe you could try building in a linux vm in the meantime. I will upload as soon as I get a response

@YouHusam
Copy link
Author

YouHusam commented May 6, 2022

@Pixelslot I just uploaded the file on OneDrive, here's the link:
https://1drv.ms/u/s!Aha0RkmyXRDdnT0lOeZpzAGtwjeV?e=9L57z4

and here's instructions how to use it:
https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-using-a-repository

Good luck

@YouHusam
Copy link
Author

YouHusam commented May 9, 2022

@Pixelslot for wireless AA install the tweak from the aio mazda tweak app

@YouHusam
Copy link
Author

I finally got the time to test it a little, it seems works nice even with wireless. But as everyone else, I am having issues with black screen after reverse camera is turned on. And exit is not working.

Another minor issue is the installer seems to be uninstalling all the other tweaks and need to reinstall them every time

@YouHusam
Copy link
Author

I finally got the time to test it a little, it seems works nice even with wireless. But as everyone else, I am having issues with black screen after reverse camera is turned on. And exit is not working.
Another minor issue is the installer seems to be uninstalling all the other tweaks and need to reinstall them every time

Im on fw70.00.100 and never can get the installer to install AA, always says install openauto failed, and never can get wireless to work either. Maybe you can write a step by step how you managed to install it on your system and setup wireless guide. Do you get good audio/video for wireless? Is there and lag or stuttering? Thank you.

I am running on fw 59.00.545. All I did to get wireless to work is use the mzd aio tool to compile files, select android auto and wifi support, then remove the androidauto directory from the _copy_to_usb/config directory. copy files to usb and install as normal.
I didn't drive my car so I don't know if there will be lag or stuttering. There was a little stuttering when I opened waze initially, moving the screen around didn't cause it to happen again but I don't think it's enough testing

@YouHusam
Copy link
Author

I did some more tests, wireless is a little more laggy and slower than wired. If waze is open it's too slow, not sound stutter, but very low fps and the location of the arrow is behind where the actual vehicle is. I didn't try google maps, but I assume it's faster because waze is heavy. I didn't get any black screens while switching to reverse. I'm running the latest commit.

@silverchris
Copy link
Owner

Hey sorry for the delayed response from me.
I injured my back and had to go into surgery, and am still recovering.

I don't really have access to any of my normal tools where I am right now so I can't really contribute/investigate, but I am looking forward to getting back to it when I am able.

If you do get things figured out, make sure to create a branch and pull request it, so I can test and merge when able!

Also, thanks for the interest in the project, it really helps motivate :)

@silverchris
Copy link
Owner

I did experience the backup camera issue as well, I think it's not being signaled to return when the camera is done.
You can get it back by holding the back button for a few seconds to release video focus, and then holding the home button to regrab it

@rudcode
Copy link

rudcode commented May 17, 2022

Sorry to hear that, hope you get well soon. Now when I start navigation using google maps, AA will freeze and then bluetooth disconnected. Have no idea what happens, because I haven't change anything, tried clearing maps data, reinstall android auto in phone but still no luck. Haven't tried the old aa app. Anyone experience the same issue?

@silverchris
Copy link
Owner

I can confirm that installing the USB retrofit works with this repo Spent the whole day installing it, I got a some scratches and a whole lot of mosquito bites 😅

I got a Chinese one from AliExpress

20220730_193053

20220730_193129

I can confirm that installing the USB retrofit works with this repo Spent the whole day installing it, I got a some scratches and a whole lot of mosquito bites 😅

I got a Chinese one from AliExpress

20220730_193053

20220730_193129

@YouHusam and it's using our version of the app, and not the factory one? Can I grab a copy of the autoapp.log to see if there is anything interesting? :D

@YouHusam
Copy link
Author

@silverchris yes, it's not the factory one because it has touch screen and the audio bugs.

I'll grab the logs next time I'm in the car

@Pixelslot
Copy link

@silverchris

Could you please push a new version to logo thesilverchris/openauto-mazda-build:development on the docker hub, thank you, as can not build latest commit due to aac audio:

Could not find a package configuration file provided by "fdk-aac" with any

23 of the following names:

24

25 fdk-aacConfig.cmake

26 fdk-aac-config.cmake

@silverchris
Copy link
Owner

@Pixelslot it's been updated as of now

@CodeFusion
Copy link

CodeFusion commented Aug 9, 2022

Hey there, I was really happy to see there's still someone working on a better version of Android Auto in 2022. Piecing together the various instructions above, I was able to get a build made from master (fe792e9). The map screen is visually functional, but neither touch or the command wheel/buttons work.

I'm on OS 59.00.504 NA N on a 2015 Mazda 3 Sport GT. Happy to help with this project however I can. My C++ is a bit rusty, but I can at the very least offer some insight into how it runs in an actual car.

@silverchris
Copy link
Owner

Hey there, I was really happy to see there's still someone working on a better version of Android Auto in 2022. Piecing together the various instructions above, I was able to get a build made from master (fe792e9). The map screen is visually functional, but neither touch or the command wheel/buttons work.

I'm on OS 59.00.504 NA N on a 2015 Mazda 3 Sport GT. Happy to help with this project however I can. My C++ is a bit rusty, but I can at the very least offer some insight into how it runs in an actual car.

I probably broke something, as my test unit is on 70.00.100, and uses a different video focus method. Will take a look at it tomorrow, it's probably something simple and silly

@CodeFusion
Copy link

That's awesome, thanks! I have no problem updating to 70 if it's easier/better (though I'm not sure where to get the files now that Mazda has thoroughly scrubbed the internet of the files) or remaining on 59 to test the earlier version for you, whichever makes more sense

@silverchris
Copy link
Owner

That's awesome, thanks! I have no problem updating to 70 if it's easier/better (though I'm not sure where to get the files now that Mazda has thoroughly scrubbed the internet of the files) or remaining on 59 to test the earlier version for you, whichever makes more sense

I think 70 works better from switch too and from the backup camera, as we are using a bit of the Mazda interface for Android Auto, instead of our own "legacy" method which involves javascript, an http server, and a bit of luck lol

Try 35ea19c

@Pixelslot
Copy link

Pixelslot commented Aug 9, 2022

@silverchris HUD not showing/working on latest 35ea19c any chance to get it working again? And also bug still remains from other commit if passenger unplug usb cable while navigating HUD direction image frozen and must reboot cmu. Hopefully you can look into it. Thank you.

@silverchris
Copy link
Owner

@silverchris HUD not showing/working on latest 35ea19c any chance to get it working again? And also bug still remains from other commit if passenger unplug usb cable while navigating HUD direction image frozen and must reboot cmu. Hopefully you can look into it. Thank you.

That's the next thing on my list! I haven't refactored it to be in line with the new Manager system. Hoping to get to that soon :)

@silverchris
Copy link
Owner

Created a new release https://github.com/silverchris/openauto/releases/tag/v1.0.2-r1 with it prebuilt!

@CodeFusion
Copy link

That's awesome, thanks! I have no problem updating to 70 if it's easier/better (though I'm not sure where to get the files now that Mazda has thoroughly scrubbed the internet of the files) or remaining on 59 to test the earlier version for you, whichever makes more sense

I think 70 works better from switch too and from the backup camera, as we are using a bit of the Mazda interface for Android Auto, instead of our own "legacy" method which involves javascript, an http server, and a bit of luck lol

Try 35ea19c

Upgraded to 70.0.0.110A and now both in headunit 1.13 and openauto (built from that commit) cause my Pixel 5 to repeatedly fail to launch Android Auto. I'll have to put in some time to get it working again before I can test further

@silverchris
Copy link
Owner

That's awesome, thanks! I have no problem updating to 70 if it's easier/better (though I'm not sure where to get the files now that Mazda has thoroughly scrubbed the internet of the files) or remaining on 59 to test the earlier version for you, whichever makes more sense

I think 70 works better from switch too and from the backup camera, as we are using a bit of the Mazda interface for Android Auto, instead of our own "legacy" method which involves javascript, an http server, and a bit of luck lol
Try 35ea19c

Upgraded to 70.0.0.110A and now both in headunit 1.13 and openauto (built from that commit) cause my Pixel 5 to repeatedly fail to launch Android Auto. I'll have to put in some time to get it working again before I can test further

Using wired or wireless?

@rudcode
Copy link

rudcode commented Aug 10, 2022

Hi, I tested your latest prebuilt. Android auto is connected but nothing showed up in car sreen, not even black screen (still showing home screen) and the dial isn't working until I hold back for 2 seconds. I think the focus changed to androidauto but the gstreamer isn't showing anything. Maybe it's because this firmware doesn't have capsfilter plugin? I still use the ancient firmware v56. Can't grab the log now but will do that later.

Or maybe this one is the problem?

// sd = new asio::posix::stream_descriptor(ioService_, p_stdout[0]);
// asio::async_read_until(*sd, buffer, '\n', [this](asio::error_code error_code, size_t bytes_transferred) {
// this->message_handler(error_code, bytes_transferred);
// });

@YouHusam
Copy link
Author

@CodeFusion I had the same issue when upgrading to 70. I don't know what caused it, but I solved it by installing the mazda usb retrofit.
I tried different cables, reinstall, resetting to factory settings, but nothing worked. Only thing I didn't try is testing wireless

@CodeFusion
Copy link

Using wired or wireless?

Both

@silverchris
Copy link
Owner

Using wired or wireless?

Both

Drop this

lefthandDrive = true
hideClock = true
enableTouchscreen = true
wifiPort = 30515
logLevel = "debug"
logFile = "/tmp/autoapp.log"

into /mnt/data_persist/dev/bin/autoapp_configuration.toml
and grab a copy of the log it creates at /tmp/autoapp.log

@silverchris
Copy link
Owner

Hi, I tested your latest prebuilt. Android auto is connected but nothing showed up in car sreen, not even black screen (still showing home screen) and the dial isn't working until I hold back for 2 seconds. I think the focus changed to androidauto but the gstreamer isn't showing anything. Maybe it's because this firmware doesn't have capsfilter plugin? I still use the ancient firmware v56. Can't grab the log now but will do that later.

Or maybe this one is the problem?

// sd = new asio::posix::stream_descriptor(ioService_, p_stdout[0]); // asio::async_read_until(*sd, buffer, '\n', [this](asio::error_code error_code, size_t bytes_transferred) { // this->message_handler(error_code, bytes_transferred); // });

That is just the log reading for gst-streamer, turned it off because it was using a lot of cpu cycles.
If you want to see what gst-launch is saying, that will need to be uncommented, though. (Didn't mean to check it in commented, it was more for testing :) )

@silverchris
Copy link
Owner

Also, if you need the script to enable WiFi, here it is https://gist.github.com/silverchris/213abd8ffa8d98cb3d262deadf41c831
it goes in /jci/scripts/jci-wifiap.sh, and needs /jci/scripts/jci-wifiap.sh start added to the end of /jci/scripts/start_wifi.sh

@CodeFusion
Copy link

Using wired or wireless?

Both

Drop this

lefthandDrive = true
hideClock = true
enableTouchscreen = true
wifiPort = 30515
logLevel = "debug"
logFile = "/tmp/autoapp.log"

into /mnt/data_persist/dev/bin/autoapp_configuration.toml and grab a copy of the log it creates at /tmp/autoapp.log

I'm not getting logs from that. I did find the system log, however, and I'm getting a bit of interesting data from it. From what I can find, it's an undervoltage error, which makes sense given that I have the original USB hardware. It used to work, though, so it seems something in the OS is advertising its available amperage as higher than it actually is on the old hardware.

00:01:34.690 kernel[] Error (: ) [   94.688022] usb 2-1.3: device not accepting address 12, error -71
00:01:34.714 kernel[] Error (: ) [   94.709627] hub 2-1:1.0: hub_events state 7 ports 3 chg 0008 evt 0008
00:01:34.714 kernel[] Error (: ) [   94.712676] hub 2-1:1.0: hub_port_connect_change port 3, status 0100, change 0001, 12 Mb/s
00:01:34.912 process-coredump[] Fatal (: ) File: process-coredump.cpp, Function: main, Line: 556, Message: version: 70.00.100A, length 16
00:01:34.913 process-coredump[] Fatal (: ) File: process-coredump.cpp, Function: main, Line: 639, Message: LOCK FILE NAME /var/lock/LCK3325.core
00:01:34.921 process-coredump[] Fatal (: ) File: process-coredump.cpp, Function: main, Line: 766, Message: Process 3325 ("autoapp") abnormally exited due to signal SIGSEGV (11) with core file: /data_persist/log/dumps/core629-autoapp-SIGSEGV(11)-3325-94-70.00.100A.core.bz2

@silverchris
Copy link
Owner

dump.cpp, Function: main, Line: 556, Message: version: 70.00.100A, length 16
00:01:34.913 process-coredump[] Fatal (: ) File: process-coredump.cpp, Function: main, Line: 639, Message: LOCK FILE NAME /var/lock/LCK3325.core
00:01:34.921 process-coredump[] Fatal (: ) File: process-coredump.cpp, Functio

Something is causing autoapp to segfault.
There should be a log being created.
On the console you could also try doing smctl -s -n autoapp and then just directly run autoapp and see if it spits out anything interesting

@CodeFusion
Copy link

CodeFusion commented Aug 10, 2022

Here are the logs. Turns out I made a typo which was preventing the toml file from being read. I did one run with USB and one with wifi. For USB, I got the looping behaviour, even if autoapp was not running - perhaps something going on with the built-in AA or the old USB port? For wireless, I got a black screen. My phone said to continue on the car screen, but there was nothing there. Pressing the button and tapping the screen didn't seem to do anything.

Line 33 on the USB log is what appears to cause the segfault.
Lines 103, 246, and 449 show an AudioFocus timeout
I was also seeing a lot of Mode [day|night] triggered messages, not sure if it's relevant.

https://gist.github.com/CodeFusion/fd896537a9dc1294cc861385689645e2

@CodeFusion
Copy link

CodeFusion commented Aug 10, 2022

Also of note, the uninstall script doesn't remove the autoapp service from smctl, so even after removal, the script thinks autoapp is still installed and only prompts for update rather than install. Perhaps checking for the autoapp executable might be a better way to see if it's installed?

@silverchris
Copy link
Owner

Also of note, the uninstall script doesn't remove the autoapp service from smctl, so even after removal, the script thinks autoapp is still installed and only prompts for update rather than install. Perhaps checking for the autoapp executable might be a better way to see if it's installed?

It looks like it started successfully over wifi, did you just get a black screen?

@CodeFusion
Copy link

Yeah, black screen that didn't respond to button inputs. My phone asked me to continue on my car screen

@silverchris
Copy link
Owner

Yeah, black screen that didn't respond to button inputs. My phone asked me to continue on my car screen

Try again, but when you get the black screen hold the back key on the commander knob for about 5 seconds, and it should take you back to the Mazda software. Then hold home for a few seconds and release, and see what happens

@silverchris
Copy link
Owner

Not sure if this is useful, but started this https://gitter.im/mazda_openauto/community

@CodeFusion
Copy link

I was actually going to suggest opening a slack or something to avoid filling a single issue on GitHub, so that's great

@silverchris
Copy link
Owner

created a new release https://github.com/silverchris/openauto/releases/tag/v1.0.3 with some fixes

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

No branches or pull requests

5 participants