viktorgino / headunit-desktop

HeadUnit Desktop is a car PC software built with Qt 5 and QML
https://github.com/viktorgino/headunit-desktop/wiki
GNU General Public License v3.0
292 stars 64 forks source link

Settings Loader not loading certain types of default settings #57

Closed mozcelikors closed 3 years ago

mozcelikors commented 3 years ago

Hi, I wanted to build your project to check it out, build steps are successful after a few tweaks (Ubuntu 16.04 PC). However, I receive "Unknown transport type" error.

./headunit-app 
Plugin Manager: Plugin loaded :  "libandroid-auto-plugin.so"
Plugin Manager: Plugin loaded :  "libhvac-plugin.so"
Plugin Manager: Plugin loaded :  "libsample-plugin.so"
Plugin Manager: Plugin loaded :  "libusbconnectionlistener-plugin.so"
Loading qml plugin:  "libandroid-auto-plugin.so"
Loading qml plugin:  "libhvac-plugin.so"
Loading qml plugin:  "libsample-plugin.so"
Loading qml plugin:  "libusbconnectionlistener-plugin.so"
Starting headunit
E: ../../../modules/android-auto/headunit/hu/hu_aap.cpp:83: ihu_tra_start : Unknown transport type
Loading hvac settings :  "0"
QIODevice::read (QFile, "0"): device not open
JSON Parse error :  "illegal value"
Theme Manager: Theme loaded :  "themes/default-theme/libdefault-theme.so"
Setting video surface
qrc:/HVAC/ClimateControl/HVACControlFanSlider.qml:10:5: Unable to assign [undefined] to int
qrc:/HVAC/ClimateControl/HVACControlFanSlider.qml:10:5: Unable to assign [undefined] to int
qrc:/HVAC/ClimateControl/HVACControlFanSlider.qml:10:5: Unable to assign [undefined] to int
qrc:/HVAC/ClimateControl/HVACControlFanSlider.qml:10:5: Unable to assign [undefined] to int
AndroidAuto event UsbConnectionListenerPlugin::UsbDeviceAdded :  QVariant(QByteArray, "{\"manufacturer\":\"SAMSUNG\",\"pid\":\"26720\",\"product\":\"SAMSUNG_Android\",\"serialNumber\":\"RF8N11J2QNV\",\"vid\":\"1256\"}")
Starting headunit
E: ../../../modules/android-auto/headunit/hu/hu_aap.cpp:83: ihu_tra_start : Unknown transport type
AndroidAuto event UsbConnectionListenerPlugin::UsbDeviceAdded :  QVariant(QByteArray, "{\"manufacturer\":\"SAMSUNG\",\"pid\":\"26720\",\"product\":\"SAMSUNG_Android\",\"serialNumber\":\"RF8N11J2QNV\",\"vid\":\"1256\"}")
Starting headunit
E: ../../../modules/android-auto/headunit/hu/hu_aap.cpp:83: ihu_tra_start : Unknown transport type

Could you help me figure out why I'm getting such error? Do I need to use a specific Android Auto version on my phone, or set something on my phone. (fyi My car & openauto have no issues connecting to my phone ) Thanks for the help in advance.

mozcelikors commented 3 years ago

After selecting transport type "USB", I was able to get past this error. However, now I get:

Starting headunit
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:493: Start : Found OAP Device
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:501: Start : OK libusb_claim_interface usb_err: 0 (Success)
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:515: Start : Done get_config_descriptor config: 0x37a8820  num_int: 2
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:540: Start : iusb_ep_in: 0x81
W: ../../../modules/android-auto/headunit/hu/hu_usb.cpp:547: Start : iusb_ep_out: 0x01
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:209: hu_ssl_begin_handshake : SSL_do_handshake() ret: -1
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:65: send_ssl_handshake_packet : BIO_read() HS client req ret: 265
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:232: hu_handle_SSLHandshake : BIO_write() server rsp ret: 2311
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:235: hu_handle_SSLHandshake : SSL_do_handshake() ret: -1
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:65: send_ssl_handshake_packet : BIO_read() HS client req ret: 1224
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:232: hu_handle_SSLHandshake : BIO_write() server rsp ret: 51
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:235: hu_handle_SSLHandshake : SSL_do_handshake() ret: 1
W: ../../../modules/android-auto/headunit/hu/hu_ssl.cpp:261: hu_handle_SSLHandshake :   SET: iaap_state: 2 (hu_STATE_STARTED)
W: ../../../modules/android-auto/headunit/hu/hu_aap.cpp:1391: hu_aap_start : Starting HU thread
W: ../../../modules/android-auto/headunit/hu/hu_aap.cpp:598: hu_handle_ServiceDiscoveryRequest : Found BT address 88:B1:11:1D:F5:19. Exposing Bluetooth service
W: ../../../modules/android-auto/headunit/hu/hu_aap.cpp:752: hu_handle_VideoFocusRequest : VideoFocusRequest: 0
BluetoothPairingRequest: phone_address: "70:CE:8C:48:F4:6F"
pairing_method: BLUETOOTH_PARING_METHOD_HFP

./headunit-app: symbol lookup error: /home/mozcelikors/headunit-desktop/build/plugins/libandroid-auto-plugin.so: undefined symbol: gst_video_info_from_caps
mozcelikors commented 3 years ago

Also solved the above error by adding "PKGCONFIG += gstreamer-video-1.0" to the android-auto.pro. You can add it too.

viktorgino commented 3 years ago

Hi @mozcelikors

Thanks for checking the project out!

The initial issue is caused by the settings loader not loading some of the default settings. Will fix soon.

Thanks for the heads up about the missing dependency. Fixed now.

mozcelikors commented 3 years ago

@viktorgino Excellent project!!! What I was looking for ages, wasting time with openauto. And all I needed was your usb detector and headunit.cpp. I have already integrated it to my Qt application, and to Yocto Project. Might be able to contribute the Yocto layers once matured.

viktorgino commented 3 years ago

@mozcelikors Setting up Yocto would definietly be interesting for this project. How long does it take to boot into Qt btw?

viktorgino commented 3 years ago

Fixed by https://github.com/viktorgino/headunit-desktop/commit/771e1bd1a2b933239e0b17c1aadf8d9bdddd2bb9

mozcelikors commented 3 years ago

Around 10 seconds, but most of it is occupied by bootloader which I have no control over on RPi 4. You can check out my project from the link: http://mozcelikors.com/projects_media_in_the_box.html