Tracking single-cord USB power issues #891
Replies: 69 comments
-
Your link doesn't work |
Beta Was this translation helpful? Give feedback.
-
Weird - works for me. |
Beta Was this translation helpful? Give feedback.
-
I normally use the Pi with a battery so it can backup recordings without having to leave the car on, but tried with a single USB cable today, and it works without problems for me. Tried with both kernel 4.14 and 4.19. |
Beta Was this translation helpful? Give feedback.
-
Oh man. If I'm dealing with USB cable issues I'm gonna lose my mind.
…On Sun, Apr 7, 2019, 8:55 PM marcone ***@***.***> wrote:
I normally use the Pi with a battery so it can backup recordings without
having to leave the car on, but tried with a single USB cable today, and it
works without problems for me. Tried with both kernel 4.14 and 4.19.
2018 Model S, firmware 2019.8.5
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABZr8sh2rkGINnelwqoTR_UWdB4fOJEUks5vepOSgaJpZM4cgXsc>
.
|
Beta Was this translation helpful? Give feedback.
-
I'm also dealing with what I believe are power issues. If I use a single cable (I'm actually using the usb a addon board), it seems to bootloop before mass storage can connect. If I plug in a second cable the boot process finishes and the car sees the drive. I can then unplug the second cable and everything continues to run fine. Looking at dmesg, before it reboots, it makes it to
which is one line from the mass storage messages when it boots properly. I've attempted to disable HDMI and blindly blacklist modules but nothing has changed.
Kernel 4.19 |
Beta Was this translation helpful? Give feedback.
-
I'm still not having any luck even with two cords.. totally happy of
plugged into my PC but not the car
…On Wed, Apr 24, 2019, 8:43 PM Chris ***@***.***> wrote:
I'm also dealing with what I believe are power issues. If I use a single
cable (I'm actually using the usb a addon board
<https://www.amazon.com/gp/product/B07BK2BR6C/>), it seems to bootloop
before mass storage can connect. If I plug in a second cable the boot
process finishes and the car sees the drive. I can then unplug the second
cable and everything continues to run fine. Looking at dmesg, before it
reboots, it makes it to
...
[ 15.291893] brcmfmac: power management disabled
[ 24.046855] FS-Cache: Netfs 'cifs' registered for caching
[ 24.047796] Key type cifs.spnego registered
[ 24.047846] Key type cifs.idmap registered
[ 25.967676] random: crng init done
[ 25.967702] random: 7 urandom warning(s) missed due to ratelimiting
[ 27.245354] FAT-fs (loop0): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
which is one line from the mass storage messages when it boots properly.
I've attempted to disable HDMI and blindly blacklist modules but nothing
has changed.
/usr/bin/tvservice -o in /etc/rc.local
blacklist btbcm
blacklist hci_uart
blacklist bcm2835_v4l2
blacklist bcm2835_codec
blacklist bcm2835_mmal_vchiq
blacklist bcm2835_alsa
blacklist bcm2835_vc_sm_cma_probe
blacklist snd_bcm2835
blacklist vc_sm_cma
blacklist ipv6
Kernel 4.19
2018 Model 3, 2019.8.5
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AALGX4VWD7ASNKSHBXE2ECLPSD5BTANCNFSM4HEBPMOA>
.
|
Beta Was this translation helpful? Give feedback.
-
@mattster98 which model car do you have? Could this be a 3 vs S thing? |
Beta Was this translation helpful? Give feedback.
-
Oh I see in another issue that you have an X. No clue then. |
Beta Was this translation helpful? Give feedback.
-
Yeah.. I'm not alone but some people have it working. Going to try another
raspi and SD to rule out hardware.
…On Wed, Apr 24, 2019, 9:12 PM marcone ***@***.***> wrote:
Oh I see in another issue that you have an X. No clue then.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AALGX4VHZOFD6SDGCYQRBVTPSEAQ3ANCNFSM4HEBPMOA>
.
|
Beta Was this translation helpful? Give feedback.
-
I'd suspect cables more than the Pi or sd card. You used the same cables when connecting to the PC and that worked? |
Beta Was this translation helpful? Give feedback.
-
Yep, and tried half a dozen other cables in the car.
…On Wed, Apr 24, 2019, 9:29 PM marcone ***@***.***> wrote:
I'd suspect cables more than the Pi or sd card. You used the same cables
when connecting to the PC and that worked?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AALGX4TAF46G3IXB54NRTLTPSECOFANCNFSM4HEBPMOA>
.
|
Beta Was this translation helpful? Give feedback.
-
I have similar setup with 4 RPi Zero W with USB add-on board @rfvgyhn mentioned. I have 6 MicroSD cards from 16gb to 128gb. 2018 Model 3 LR-RWD So far I have tried both 0406 build and then updating it with rpi-update to get to 4.19. In any combination of SD card or one of the RPI ZeroW each time I can find the "CAM" mounted on Mac with "TeslaCam" folder. However no matter what I do there will be no recording in the car. If I pull the RPI0W and plug into Mac I can see "CAM" again every single time. Why is it not recording on either of the prebuilt images? Last few lines of dmesg output fdisk shows - this is with 64gb card - 100% cam usage Device Boot Start End Sectors Size Id Type |
Beta Was this translation helpful? Give feedback.
-
Using the bare Raspi Zero W there are two USB ports. the first one ("USB")
goes to the USB port in the car, the second port on the board ("PWR IN")
goes to either a second port in the car, a 12V adapter, or some are using
rechargeable battery banks to provide reliable power.
…On Thu, Apr 25, 2019 at 3:08 PM clean-ev ***@***.***> wrote:
I have similar setup with 4 RPi Zero W with USB add-on board @rfvgyhn
<https://github.com/Rfvgyhn> mentioned. I have 6 MicroSD cards from 16gb
to 128gb.
2018 Model 3 LR-RWD
So far I have tried both 0406 build and then updating it with rpi-update
to get to 4.19.
Also tried 0421 with 4.19 kernel baked in.
In any combination of SD card or one of the RPI ZeroW each time I can find
the "CAM" mounted on Mac with "TeslaCam" folder. However no matter what I
do there will be no recording in the car. If I pull the RPI0W and plug into
Mac I can see "CAM" again every single time.
Why is it not recording on either of the prebuilt images?
What do you all mean when you say second cable? As I am using add-on board
I do not use any cables and plug USB-A directly to one of the USB ports
Last few lines of dmesg output
[ 28.244097] random: 7 urandom warning(s) missed due to ratelimiting
[ 29.055885] FAT-fs (loop0): Volume was not properly unmounted. Some data
may be corrupt. Please run fsck.
[ 33.608111] Mass Storage Function, version: 2009/09/11
[ 33.608130] LUN: removable file: (no medium)
[ 33.608292] LUN: removable file: /backingfiles/cam_disk.bin
[ 33.608302] Number of LUNs=1
[ 33.612651] g_mass_storage gadget: Mass Storage Gadget, version:
2009/09/11
[ 33.612668] g_mass_storage gadget: g_mass_storage ready
[ 33.612683] dwc2 20980000.usb: bound driver g_mass_storage
[ 33.870113] dwc2 20980000.usb: new device is high-speed
[ 33.925383] dwc2 20980000.usb: new device is high-speed
[ 33.980843] dwc2 20980000.usb: new device is high-speed
[ 34.036632] dwc2 20980000.usb: new device is high-speed
[ 34.092086] dwc2 20980000.usb: new device is high-speed
[ 34.147500] dwc2 20980000.usb: new device is high-speed
[ 34.202646] dwc2 20980000.usb: new device is high-speed
[ 34.258355] dwc2 20980000.usb: new device is high-speed
[ 34.314149] dwc2 20980000.usb: new device is high-speed
[ 34.406110] dwc2 20980000.usb: new address 9
[ 35.136190] g_mass_storage gadget: high-speed config #1
<#1>: Linux File-Backed Storage
fdisk shows - *this is with 64gb card - 100% cam usage*
***@***.***:~ $ fdisk -l /backingfiles/cam_disk.bin
Disk /backingfiles/cam_disk.bin: 53.7 GiB, 57679810560 bytes, 112655880
sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6c64afc5
Device Boot Start End Sectors Size Id Type
/backingfiles/cam_disk.bin1 2048 112655879 112653832 53.7G c W95 FAT32
(LBA)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AALGX4UPD757ZX4GMCH2PXLPSH6SHANCNFSM4HEBPMOA>
.
|
Beta Was this translation helpful? Give feedback.
-
@mattster98 - I tried using all 4 RPi0W bare with 2 separate MicroUSB cables (deemed working) has 5 at hand all of them working. I found that plugging in cable to car and other end to USB on Zero fired up the RPi. I still plugged in power cable using a portable battery. Kept on changing cables and zero’s but at no time did the car see the zero as a USB to start recording. Using same hardware and cables I plugged them in to my Mac and “CAM” shows up each time. Also put them together with USB-A adapters I have and “CAM” shows up. Wonder where the problem is - this setup worked from cimryan repo for the longest time, however since 9.x came I have tried to switch to this without any success. Any other items I should check? @marcone |
Beta Was this translation helpful? Give feedback.
-
The only change that I'm aware of in 9.x is that 9.x requires a partitioned drive. The current scripts do that, and the fdisk output you posted above shows yours is partioned correctly. |
Beta Was this translation helpful? Give feedback.
-
So, using a two-cable, one power, one data (modified to disable the 5V), my Pi will boot properly in the car. However, it doesn't present the drives to the Tesla unless I then unplug the USB and re-attach it. Here is my diagnostics.txt from such a boot (the TeslaCam icon would not appear on the dash, but the PiZero was showing two flashing LEDs / second) |
Beta Was this translation helpful? Give feedback.
-
I have a similar experience, but I can only get teslausb working if I first power the pi from the vehicle usb, then wait for proper boot, then plug in the usb cable (plugged into the usb port on the pi) to the vehicle. I tried using an external power source (RAVPOWER battery pack) and that did not work. I've also tried isolating the power pin on the usb connector to make it data only, but that also doesn't seem to work for me. |
Beta Was this translation helpful? Give feedback.
-
I decided to start again, but instead set camsize to 100%. On my Win10 box, I notice the usb interface is live during boot, then turns off, then is live again. Is this normal behavior? |
Beta Was this translation helpful? Give feedback.
-
Setting camsize to 100% didn't work. I bought 4" Ankur premium USB cables and those didn't work either. The only way I can get it to work is to plug in the USB to the power port and let it boot (1 - 2m), then plug in the USB cable to the vehicle. Camera logo shows up and stays up till the USB port is shut off, then I have to reboot the pi like above. Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
Mine is working "normally". But I had to use a data-only USB cable for one of the ports (I actually used the "tape over power pin" method) and then a second cable in the power-only port on the Pi-zero. This is working reliably, but it also burns BOTH of my USB ports in the front (eliminating my ability to charge my phone). Note: it will NOT work with two "normal" USB cables, as the Pi-zero doesn't seem to boot properly with power on both cables. |
Beta Was this translation helpful? Give feedback.
-
I am using the tape over method as well, but it still will not completely boot if both are plugged in at the same time. |
Beta Was this translation helpful? Give feedback.
-
I had a similar issue with the USB not being recognized. I found the USB splitter pictured above on Amazon and tried it just in case. Strangely enough it seemed to work! Cable is here if anyone is looking for it. |
Beta Was this translation helpful? Give feedback.
-
Issue: looses connection to DashCam. Need to unplug data cable and plug it in at the start of each trip. Sometimes need to do it within the trip. Sometimes when in my garage. Today I ran some tests. Needed to replug usb to car to get it started. Did a couple of short trips and saved Dashcam info. Returned to garage 2x and everything seemed fine through log entry:
|
Beta Was this translation helpful? Give feedback.
-
Just drove again and tried something new. The Jackery Charger Bar briefly interrupts power to the RPi when you unplug it from the 12V socket causing it to restart. Tried this 4x on trip and each time the RPi rebooted and the DashCam came back. Tried again in garage after RPi uploaded to my PC . Dashcam still came on. |
Beta Was this translation helpful? Give feedback.
-
An update to this old thread... Used to have the single cable reboot issue, and had to use both a data only + a standard usb cable to fully boot the pi. |
Beta Was this translation helpful? Give feedback.
-
I think it's highly variable. I have MCU2 but have to use the data only + standard for it to work still... |
Beta Was this translation helpful? Give feedback.
-
Thanks again for your good work on this marcone Just another MX100P, MCU1 with same issue reporting in. I've tried the dual cable method, as well as the tape over method, to no avail. The only way it works as exactly as others stated. It works if I wait for power up, and then replug in data cable. However, that sort of defeats the utility of having an automated dashcam. The one day I forget it is the day I'll need it. Anyone make any positive progress? I have a split cable on order to see if that works. |
Beta Was this translation helpful? Give feedback.
-
My DIY Solution:
Theres just enough power to keep the 18650's topped up and power the pi with no dropouts. been running in the car for the last hour, so need to test long term. *Please not the 2 additional 18650's did not increase the car's range 😂 |
Beta Was this translation helpful? Give feedback.
-
This is glorious, but way too much work for my use case. I've been testing a hub, as it was posted somewhere else that it could help. So far, it seems to have worked! I've tried the splitter cable listed, which did NOT work for me. |
Beta Was this translation helpful? Give feedback.
-
(converted this old issue to a discussion, since there wasn't really anything actionable, but there were some interesting solutions presented that might still be relevant) |
Beta Was this translation helpful? Give feedback.
-
I wanted to create a separate issue on the off chance there's something we can do on the RasPi side to get a single usb cable to work again.
I used my USB power meter to see what happens when the RasPi reboots, and based on what the meter is showing, the power to the port itself is actually going away - no apparent overload that would seem to trigger it - max current is maybe 230mA - well below even very basic USB power limits.
I thought maybe Tesla added some logic to actively reject "usb attacks" given the visibility on the hacking stuff recently, so I copied the USB device ID, etc from a working USB thumb drive and it didn't seem to have any effect. (I plugged it into the g_mass_storage.conf file)
Video of what I observed: http://imgur.com/gallery/qecn7Ke
All cables were plugged in the whole time - the power meter just saw a complete loss of power (or low enough to reboot).
Anybody else tried things to get a single cable to work again? I finally got two cables working again so I'm at least back to "working". Just hoping to improve further.
Beta Was this translation helpful? Give feedback.
All reactions