rsjudka / intelligent-auto

41 stars 15 forks source link

openauto stay blank #55

Closed iztoogood closed 4 years ago

iztoogood commented 4 years ago

Hi, do you have any advice for me ? once started, when i plug my phone, the message "waiting for device..." disappear, but the window stay blanck I have tried to change display driver opengl in raspi-config with no effect

rsjudka commented 4 years ago

Did you set the dev rules correctly?

You might want to check out https://github.com/openDsh/dash

It's a bit more experimental, but stable enough for daily use plus it's got a lot more features and includes a script to help set everything up for you (as soon as we finalize everything there, this project will become deprecated)

iztoogood commented 4 years ago

thanks for your help abou tdev rules...? you mean

FILE=/etc/udev/rules.d/51-iadash.rules
echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"*\", ATTR{idProduct}==\"*\", MODE=\"0660\", GROUP=\"plugdev\"" | sudo tee $FILE

--> yes it's ok

the git i have clone is : git clone --recursive -b develop https://github.com/rsjudka/intelligent-auto.git

i will try right now https://github.com/openDsh/dash thanks !

iztoogood commented 4 years ago

i have made multiple tests...

git clone --recursive https://github.com/rsjudka/intelligent-auto.git
+ cd intelligent-auto
+ wget https://raw.githubusercontent.com/rsjudka/intelligent-auto/develop/install.sh
+ chmod +x install.sh
+ ./install.sh

--> the .sh ends and... it works !!! \o/ everything is diplayed on the screen !!! but the sound level cursor take too much place... on a small 3.5" lcd screen :-(

git clone -b develop --recursive https://github.com/rsjudka/intelligent-auto.git
+ cd intelligent-auto
+ ./install.sh

--> the .sh ends, ia is diplayed with new features... but openauto stay blancks (the phone is detected because the message "waiting for device..." desapear ... but the frame window stays blank)

git clone https://github.com/openDsh/dash 
+ ./install.sh ends with :
.../...
[100%] Built target aasdk
Aasdk Make completed successfully

make: *** Aucune règle pour fabriquer la cible « install ». Arrêt.
Aasdk install failed with code 1

the .sh do not ends :-(

in the meantime... this script gaved me a working openauto :
https://github.com/humeman/openauto_patched_installer but only openauto... :-(

i really would like to make yours working with the ODBII functionality !!! ... and media player ... and all your stuff

rsjudka commented 4 years ago

have you tried running the autoapp build from intelligent-auto or the openauto in the openDsh org? That way we can isolate to either openauto or ia/dash

Did you remove all instances of aasdk/openauto before running the dash script? If not, I can see how that script would fail since it might be using a different version of aasdk that doesnt include the install logic. Basically if you start with a clean slate, you should be able to run the dash script without any issues

iztoogood commented 4 years ago

hi, this morning i have re build the develop branch

git clone -b develop --recursive https://github.com/rsjudka/intelligent-auto.git
+ cd intelligent-auto
+ ./install.s

and then started the autoapp in /home/pi/intelligent-auto/openauto/bin/autoapp the openauto splashscreen with its button appear, i connect my phone ...it turns blank

then i have cleaned my home directory and

git clone https://github.com/openDsh/dash 
+ ./install.sh 

ends with an error message after gstream built ... if i well remember it could not "sudo make install" (for gstreamer)

-- Configuring incomplete, errors occurred!
See also "/home/pi/aasdk/qt-gstreamer/openauto/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/aasdk/qt-gstreamer/openauto/build/CMakeFiles/CMakeError.log".
Openauto CMake failed with error code 1

i have noticed that aasdk is cloned in my home directory and not in the dash/ directory and qt-gstreame in aasdk

then I re-cleand my home directory re git clone --recursive https://github.com/rsjudka/intelligent-auto.git it works... (but i want more !!!) all stuff is in the intelligent-auto/

i will try to tweak the dash/install.sh to have something like : ~/dash ~/dash/aasdk ~/dash/qt-gstreamer ~/dash/openauto and ~/dash/all the rest of your stuff

iztoogood commented 4 years ago

the dash insatller ends with:

.../...
Dash CMake OK

Running Dash make
make: *** Pas de cible spécifiée et aucun makefile n'a été trouvé. Arrêt.
Dash make failed with error code 1

the openauto buld path for dash is: /home/pi/aasdk/qt-gstreamer/openauto/bin/autoapp and it has the same behaviour than autoapp from intelligent-auto develop branche... i mean it starts, shows openauto settings, when the phoen is pluged, it turns blank

rhysmorgan134 commented 4 years ago

Hm I just did a fresh install of dash to test, and there is a mistake on my end with the navigating out of the build directories, to get around this use this fork for now https://github.com/rhysmorgan134/dash

However we are still getting an error at the openauto cmake stage and its this

  aasdk was found but not built.  Perform an in-source build.

@rsjudka where does aasdk get installed to with the make install step? I can only assume this error has come from moving the aasdk build step into its own build directory, not sure how/why this would affect it though, it does goe through the build steps fine

iztoogood commented 4 years ago

this version of dash/installer.sh i have modified (see pastbin https://pastebin.com/Gk4uUZCS ) allowed me to start /home/pi/dash/bin/ia Just some few modifications of some change directory... to aim ~/bash instead of ../ or ../../ or ../dash etc... (i don't like relative... it make me loose my minds)

but it has the same effect than intelligent-auto develop branch... it starts, when the phone is plugged ti turns blank

rsjudka commented 4 years ago

@rhysmorgan134 thanks for looking into that! I was planning on trying the build myself to see if that would work.

Ah shoot but you're right, it looks like the cmake modules that look for aasdk/openauto assume they're in the home directory, so putting that build did might not work. I swear I tried running it before, but I wonder if I just had some artifacts left over that still allowed it to work.

@iztoogood I know myself and others have all gotten the white screen in the past, but the usual issue was with the udev rules. Can you try running with sudo and see if that makes a difference. Also, would you be able to paste the logs of when you run dash?

iztoogood commented 4 years ago

usb rules are ok i think...

 cat /etc/udev/rules.d/51-iadash.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="*", ATTR{idProduct}=="*", MODE="0660", GROUP="plugdev"

is there other rules to apply ?

rsjudka commented 4 years ago

Can you try changing the mode to 0666?

I know I've had to do that a couple of times depending on the system I'm running on

Did you try running with dash/ia with sudo?

rhysmorgan134 commented 4 years ago

@iztoogood I would probably do a fresh install and then use the script from my branch (just doing a fresh install now to test) It looks like theres alot of things in the wrong directories etc

rhysmorgan134 commented 4 years ago

OK I have just built with this fork, and its all worked @rsjudka I reverted the aasdk and openauto build folder changes

https://github.com/rhysmorgan134/dash.git

rhysmorgan134 commented 4 years ago

@rsjudka Looks like I am also getting the white screen issue now, I dont believe its anything to do with the install or permissions, as this is exactly the same that my current install was set up, logs show this

qt5ct: using qt5ct plugin
qt5ct: palette support is disabled
qt5ct: custom style sheet is disabled
[2020-08-22 20:30:07.802193] [0x70d31010] [info]    [OpenAuto] [GSTVideoOutput] RPI Build, running with omxh264dec
[2020-08-22 20:30:08.078433] [0x4eb7c2f0] [info]    [OpenAuto] [App] Waiting for device...
[2020-08-22 20:30:08.080277] [0x4eb7c2f0] [info]    [OpenAuto] [App] Devices enumeration result: false
[2020-08-22 20:30:18.821317] [0x4e37b2f0] [info]    [OpenAuto] [App] Device connected.
[2020-08-22 20:30:18.835625] [0x70d31010] [debug]   [OpenAuto] [AudioInput] create.
PulseAudioService: pa_context_connect() failed
[2020-08-22 20:30:18.855976] [0x4e37b2f0] [info]    [OpenAuto] [AndroidAutoEntity] start.
[2020-08-22 20:30:18.856282] [0x4e37b2f0] [info]    [OpenAuto] [AudioInputService] start.
[2020-08-22 20:30:18.856831] [0x4e37b2f0] [info]    [OpenAuto] [AudioService] start, channel: MEDIA_AUDIO
[2020-08-22 20:30:18.856935] [0x4e37b2f0] [info]    [OpenAuto] [AudioService] start, channel: SPEECH_AUDIO
[2020-08-22 20:30:18.856992] [0x4e37b2f0] [info]    [OpenAuto] [AudioService] start, channel: SYSTEM_AUDIO
[2020-08-22 20:30:18.857092] [0x4e37b2f0] [info]    [OpenAuto] [SensorService] start.
[2020-08-22 20:30:18.857227] [0x4e37b2f0] [info]    [OpenAuto] [VideoService] start.
[2020-08-22 20:30:18.857379] [0x4e37b2f0] [info]    [OpenAuto] [BluetoothService] start.
[2020-08-22 20:30:18.857512] [0x4e37b2f0] [info]    [OpenAuto] [InputService] start.
[2020-08-22 20:30:19.061122] [0x4e37b2f0] [info]    [OpenAuto] [AndroidAutoEntity] version response, version: 1.6, status: 0
[2020-08-22 20:30:19.061213] [0x4e37b2f0] [info]    [OpenAuto] [AndroidAutoEntity] Begin handshake.
[2020-08-22 20:30:19.073946] [0x4eb7c2f0] [info]    [OpenAuto] [AndroidAutoEntity] Handshake, size: 2282
[2020-08-22 20:30:19.094723] [0x4eb7c2f0] [info]    [OpenAuto] [AndroidAutoEntity] continue handshake.
[2020-08-22 20:30:19.098817] [0x4e37b2f0] [info]    [OpenAuto] [AndroidAutoEntity] Handshake, size: 51
[2020-08-22 20:30:19.099217] [0x4e37b2f0] [info]    [OpenAuto] [AndroidAutoEntity] Auth completed.
[2020-08-22 20:30:19.102930] [0x4eb7c2f0] [info]    [OpenAuto] [AndroidAutoEntity] Discovery request, device name: Android, brand: samsung SM-G975F
[2020-08-22 20:30:19.103432] [0x4eb7c2f0] [info]    [OpenAuto] [AudioInputService] fill features.
[2020-08-22 20:30:19.103718] [0x4eb7c2f0] [info]    [OpenAuto] [AudioService] fill features, channel: MEDIA_AUDIO
[2020-08-22 20:30:19.103887] [0x4eb7c2f0] [info]    [OpenAuto] [AudioService] fill features, channel: SPEECH_AUDIO
[2020-08-22 20:30:19.103938] [0x4eb7c2f0] [info]    [OpenAuto] [AudioService] fill features, channel: SYSTEM_AUDIO
[2020-08-22 20:30:19.103984] [0x4eb7c2f0] [info]    [OpenAuto] [SensorService] fill features.
[2020-08-22 20:30:19.104102] [0x4eb7c2f0] [info]    [OpenAuto] [VideoService] fill features.
[2020-08-22 20:30:19.104259] [0x4eb7c2f0] [info]    [OpenAuto] [BluetoothService] fill features
[2020-08-22 20:30:19.104317] [0x4eb7c2f0] [info]    [OpenAuto] [InputService] fill features.
[2020-08-22 20:30:19.169322] [0x4eb7c2f0] [info]    [OpenAuto] [AudioInputService] open request, priority: 0
[2020-08-22 20:30:19.169498] [0x4db7a2f0] [info]    [OpenAuto] [AudioService] open request, channel: MEDIA_AUDIO, priority: 0
[2020-08-22 20:30:19.169601] [0x4db7a2f0] [debug]   [OpenAuto] [AudioService] channel: MEDIA_AUDIO audio output sample rate: 48000, sample size: 16, channel count: 2
[2020-08-22 20:30:19.169638] [0x4eb7c2f0] [info]    [OpenAuto] [AudioInputService] open status: 0
[2020-08-22 20:30:19.169863] [0x4f37d2f0] [info]    [OpenAuto] [AudioService] open request, channel: SPEECH_AUDIO, priority: 0
[2020-08-22 20:30:19.169931] [0x4f37d2f0] [debug]   [OpenAuto] [AudioService] channel: SPEECH_AUDIO audio output sample rate: 16000, sample size: 16, channel count: 1
[2020-08-22 20:30:19.170701] [0x4e37b2f0] [info]    [OpenAuto] [SensorService] open request, priority: 0
[2020-08-22 20:30:19.170817] [0x4e37b2f0] [info]    [OpenAuto] [SensorService] open status: 0
[2020-08-22 20:30:19.171065] [0x4eb7c2f0] [info]    [OpenAuto] [AudioService] open request, channel: SYSTEM_AUDIO, priority: 0
[2020-08-22 20:30:19.171134] [0x4eb7c2f0] [debug]   [OpenAuto] [AudioService] channel: SYSTEM_AUDIO audio output sample rate: 16000, sample size: 16, channel count: 1
[2020-08-22 20:30:19.171862] [0x4e37b2f0] [info]    [OpenAuto] [InputService] open request, priority: 0
[2020-08-22 20:30:19.171949] [0x4e37b2f0] [info]    [OpenAuto] [InputService] open status: 0
[2020-08-22 20:30:19.173059] [0x4e37b2f0] [info]    [OpenAuto] [VideoService] open request, priority: 0
[2020-08-22 20:30:19.173790] [0x4db7a2f0] [error]   [OpenAuto] [RtAudioOutput] Failed to open audio output, what: RtApiPulse::probeDeviceOpen: error connecting output to PulseAudio server.
[2020-08-22 20:30:19.174034] [0x4db7a2f0] [info]    [OpenAuto] [AudioService] open status: 1, channel: MEDIA_AUDIO
[2020-08-22 20:30:19.175230] [0x4db7a2f0] [info]    [OpenAuto] [SensorService] sensor start request, type: 13
[2020-08-22 20:30:19.175337] [0x4f37d2f0] [error]   [OpenAuto] [RtAudioOutput] Failed to open audio output, what: RtApiPulse::probeDeviceOpen: error connecting output to PulseAudio server.
[2020-08-22 20:30:19.175412] [0x4f37d2f0] [info]    [OpenAuto] [AudioService] open status: 1, channel: SPEECH_AUDIO
[2020-08-22 20:30:19.175901] [0x4db7a2f0] [info]    [OpenAuto] [InputService] binding request, scan codes count: 0
[2020-08-22 20:30:19.176075] [0x4db7a2f0] [info]    [OpenAuto] [InputDevice] start.
[2020-08-22 20:30:19.176174] [0x4db7a2f0] [info]    [OpenAuto] [InputService] binding request, status: 0
[2020-08-22 20:30:19.177312] [0x4eb7c2f0] [error]   [OpenAuto] [RtAudioOutput] Failed to open audio output, what: RtApiPulse::probeDeviceOpen: error connecting output to PulseAudio server.
[2020-08-22 20:30:19.177597] [0x4eb7c2f0] [info]    [OpenAuto] [AudioService] open status: 1, channel: SYSTEM_AUDIO
[2020-08-22 20:30:19.190534] [0x4e37b2f0] [info]    [OpenAuto] [VideoService] open status: 0
[2020-08-22 20:30:19.192790] [0x4eb7c2f0] [info]    [OpenAuto] [SensorService] sensor start request, type: 10
[2020-08-22 20:30:19.193272] [0x4e37b2f0] [info]    [OpenAuto] [VideoService] setup request, config index: 3
[2020-08-22 20:30:19.193407] [0x4e37b2f0] [info]    [OpenAuto] [GSTVideoOutput] init
[2020-08-22 20:30:19.193573] [0x4e37b2f0] [info]    [OpenAuto] [VideoService] setup status: 2
[2020-08-22 20:30:19.194688] [0x4eb7c2f0] [info]    [OpenAuto] [VideoService] video focus indication.
[2020-08-22 20:30:19.195637] [0x70d31010] [info]    [OpenAuto] [GSTVideoOutput] Resizing to video container
[2020-08-22 20:30:19.196602] [0x4eb7c2f0] [info]    [OpenAuto] [VideoService] start indication, session: 0
[2020-08-22 20:30:30.770179] [0x70d31010] [info]    [OpenAuto] [GSTVideoOutput] Got resize request to 1768x984
rhysmorgan134 commented 4 years ago

hmm sorry for the spam, but I just tried turning off RT audio, and it worked. Turned rt audio back on and its still working. Not entirely sure what to say...

rsjudka commented 4 years ago

hmm i feel like thats happened to someone before, where at first AA wouldn't launch, then one time it randomly started and was totally fine after

@rhysmorgan134 when you get a chance, could you open a PR with the fixed install script into dash, just so we can have something working in there

iztoogood commented 4 years ago

@rsjudka here my logs I tried to run ia and autoapp aas pi user and sudo log_dash_autoapp_user_pi.txt log_dash_autoapp_user_pi_sudo.txt log_dash_user_pi.txt log_dash_user_pi_sudo.txt

@rhysmorgan134 y have tried your fork .... it has the same effect than original ... ia and autoapp start but when phone is plugged, it turns blank ... and i noticed that all stuff is clone in the user home ... :-(

rhysmorgan134 commented 4 years ago

You should have folders for

Dash aasdk openauto gstreamer

All at the same level

With the white thing, go to settings > open auto > then turn rtaudio off

Then try plugging phone in again

rsjudka commented 4 years ago

well good news your phone is atleast connecting properly :)

have you changed any of the openauto settings? Also, have you tried plugging the phone in before starting dash/openauto?

iztoogood commented 4 years ago

@rsjudka i have tried ... to first start dash ia and autoapp first before to plug my phone to first start the app android auto with a road trip setted in maps before to plug the phone in short ... all sort of combiantions ... first ia, first openauto app phone.. with pi user, as sudoer...

that's why... i have totaly cleaned my raspberry from scratch... currrently trying to get back both hdmi and LCD35-show running simultaneously ... with a decent resolution (i don't remember how i managed to do it before :-( ) as soon as i'm back on dash installation... i'll give you some news.

@rhysmorgan134 before that ... i've tested to go to settings > open auto > then turn rtaudio off as well in ia openauto settings and autoapp settings... as pi user or as sudoer it had no effect

as soon as i have fresh meat... i'm back

iztoogood commented 4 years ago

Hi it's me ... again... my last test: no changes... but i have notice some new littles details...

https://github.com/openDsh/dash leaves some binaries in /usr/local/bin (autoapp and btservice) is that normal ?

I have 3 ways to watch my desktop :

With a working autoapp, while the phone is plugged : openauto is shown on both screen whereas x11vnc stays on the autoapp splashScreen (with setting buttons etc ), on screens, the splashScreen goes in background

With the dash autoapp build, while the phone is plugged: all display as well x11vnc turn blanck, the splashscreen goes in back ground

rsjudka commented 4 years ago

leaves some binaries in /usr/local/bin (autoapp and btservice) is that normal ?

Yep, that's so you can run the apps from anywhere on your system (by just typing autoapp for example)

Overall, I don't think x11 forwarding is supported by the actual android auto "video" that is displayed, so that behavior makes sense

As for dash build, @rhysmorgan134 did some debugging and found that you need to disable "rtaudio" in order for it to work. Seems to be an issue with the latest version of Raspbian, but still need to dig further there. Can you run it with that disabled and let me know how that works for you?

iztoogood commented 4 years ago

Hi, I have disabled rt audio, it had no effect... maybe less messages in logs... but no effect on the blank screen i diabled it ... in dash=> openauto settings and in autoapp settings, it's a radio button with the alternative choice "Qt" ... that i choosed...

all of this ... as pi or sudoed ...

rsjudka commented 4 years ago

Just for completeness,

When you disabled it, did you save and then restart the application? Changes to the openauto config don't take place until the next run

rhysmorgan134 commented 4 years ago

I'm at a loss at what to suggest, I have built the latest commit twice and also have had someone else build it successfully.

You shouldn't need to touch auto app at all, just the install script, and then run it with the /bin/ia

I would suggest a fresh raspbian install, and then follow those steps. There shouldn't be any need for sudo (this has caused issues for me in the past)

iztoogood commented 4 years ago

2020-05-27-raspios-buster-lite-armhf.zip + sudo apt-get install raspberrypi-ui-mods

... that's my rapsbian fresh from 2 days ...

ok it's enought for me to dirty a fresh install ;-) ...

i currently do an other test... if it does not work, il try from a raspbian with desktop OS ... whohoo !! \o/ there is a new one ! 2020-08-20-raspios-buster-armhf.zip

iztoogood commented 4 years ago

Hello, Good news: It Works !!!

I'm really sorry I wasted your time, but the saddest thing is that ... I can't really say what fixed my problem ...

Once again I completely reinstalled raspbian (buster) ... previously I used the minimal install + raspberrypi-ui-mods This time, I used the basic one with the desktop it's a line of thought

In the same time I have insatlled my tiny LCD35 with another method

Thanks for your help and support, the issue can be closed ... it was on my side

rsjudka commented 4 years ago

just glad you got it working :)

you did help us a find an issue tho, which is helpful!

btw, did you end up using openDsh, or stuck with intelligent-auto?

iztoogood commented 4 years ago

The ia i have managed to install is openDsh I now have to go ahead ... testing my bluetooth odb dongle ... wire a cam... buying a bigger screen beacause 3.5 is really too small...

i have a new requet ... a feature addition ... May you add https://github.com/miegl/PiFmAdv it's a fork off piFm ... but this one allow to choose the gpio for the antena wire (usefull while using small tft screen) ... and it can broadcast messages over rds

rsjudka commented 4 years ago

yeah if you wanted to open up a request in dash that would be great!

luckily I have a UI element created for a radio, just haven't had anything to connect to it yet