nisargjhaveri / WirelessAndroidAutoDongle

Use Wireless Android Auto with a car that supports only wired Android Auto using a Raspberry Pi.
MIT License
656 stars 70 forks source link

Argo Trekking 2020 w/ Pi Zero 2w Needs 2 usbs #88

Open algoz098 opened 6 months ago

algoz098 commented 6 months ago

Hi, first of all, amazing piece of work/software you got here! Cheers!

Now, I have put this into a rasp pi zero 2w and connected to a Argo Trekking (Fiat) 2020.

And did not work first, After some debug, I noticed for some reason, it keep restarting the PI needing to restart the process. Then I tried to put two usbs, one for power, and another one for data, and after that work.

My question is, is this expected? If so, is there a way to just use one USB from the car?

IF not, is this something anyone has experiencied? Is something I can do to prevent this problem?

nisargjhaveri commented 6 months ago

This could happen if the it was not able get enough power from the OTG port. But generally that should not be the case for RPi Zero 2w. I've been using it with just the OTG cable connected.

Logs from the device can help confirm, but might be difficult to get the logs, you might have to make some modifications and build.

algoz098 commented 6 months ago

The problem with getting said information it seems the device keeps restarting. Maybe the car is restarting it?

Gdenge commented 6 months ago

Does the Pi give you any error blinking, or does it literally turn completely off and on again?

algoz098 commented 6 months ago

Is hard to say anything more, but I can see the led of the PI turn off, and then on again, and for a couple seconds bluethooth and wifi disapear.

Theres no ERROR for theres no screen in the pi, nor does it keep the logs.

But, if I put two cables, one for power another for data, any strange behaiviour, stops.

gxaris commented 1 month ago

I would like to confirm that the same issue is happening with RPi 3A connected to a Fiat 500 (2021) If i use 2 USB cables connected to the 2 USB ports of my car, the system performs as normal. Using a single USB cable, the system seems to be boot looping. The issue can be replicated even when plugging the OTG port to the USB of a windows machine

nisargjhaveri commented 1 month ago

Logs would help a lot in this case to see when exactly is it failing. If someone can build locally, you can change the location of the logs to somewhere else that is persisted across boots.

There are some techniques we can use to reduce power consumption. Though, it should not be using much power in the first place.

algoz098 commented 1 month ago

The problem is after it restart there's no logs, also, its so fast we cant event connect to it to get the logs.

mvincenzi96 commented 1 month ago

As I mentioned in #137 Same happens with my Fiat Cronos S-Design 2021 I measured the output current coming from both the usb outputs of my car It measured 0.8A

Rpi Zero W requires at least 1A to work properly And Zero 2W requires at least 1.2A

nisargjhaveri commented 1 month ago

My understanding was that 0.8A should be enough for RPi Zero W and Zero 2 W.

https://github.com/raspberrypi/documentation/blob/develop/documentation/asciidoc/computers/raspberry-pi/power-supplies.adoc lists the typical bare-board consumption to be much lower, I somehow assumed it should work with wifi and bluetooth as well with fairly small currents.

mvincenzi96 commented 1 month ago

I made a mistake, based on the link you posted. RPI Zero W requires at least 1.2A And Zero 2W requires 2A

nisargjhaveri commented 1 month ago

As I understand, those values are recommended supplies, but the boards generally work on much smaller power as well.

In any case, this looks like power supply issue only. We should probably look at ways to lower power consumption. The fact that it keeps working even when removing the power cable also suggests that boot might be requiring higher power, and then not so much.

Maybe we should try disabling some Cpu cores, or disabling led (don't know how much it affects) or any other things that can reduce consumption?

nisargjhaveri commented 3 weeks ago

Can someone with this issue try out the following couple of things? Might help us solve the issue.

  1. If you connect just the single cable instead of USB to PWR port, would it boot and connect bluetooth and Wifi correctly? Android Auto won't work, because of the wrong usb port, but just to understand if the power provided is the only problem or something else as well.
  2. Restricting CPU frequency or disabling cores to save power. There are several articles online around this. Couple of them are here that I found interesting, there are a bunch more.