Dash cam to be enabled with Autopilot V9

  • SUPPORT THE SITE AND ENJOY A PREMIUM EXPERIENCE!
    Welcome to Tesla Owners Online, four years young! For a low subscription fee, you will receive access to an ad-free version of TOO. We now offer yearly memberships! You can subscribe via this direct link:
    https://teslaownersonline.com/account/upgrades

    SUBSCRIBE TO OUR YOUTUBE CHANNEL!
    Did you know we have a YouTube channel that's all about Tesla? Lots of Tesla information, fun, vlogs, product reviews, and a weekly Tesla Owners Online Podcast as well!

MelindaV

☰ > 3
Moderator
Joined
Apr 2, 2016
Messages
10,391
Location
Vancouver, WA
Country
Country
Tesla Owner
Model 3
#41
Bummer that it uses a USB port and doesn’t allow you to use the same usb drive as your music stick. So if you have a music drive and a dash cam drive you now have no front USB ports to charge.
Does FAT32 allow partitions? if so, could one be used for music and another for the dashcam data?
until we have the V9, would be interesting to see if a partitioned USB drive with music on each would be recognized as 2 devices on the screen.
 

JML

Well-known member
Joined
Jul 26, 2018
Messages
201
Location
Broomfield, Colorado
Country
Country
Tesla Owner
Model 3
#42
Does FAT32 allow partitions? if so, could one be used for music and another for the dashcam data?
until we have the V9, would be interesting to see if a partitioned USB drive with music on each would be recognized as 2 devices on the screen.
This got me curious, so I decided to do some experiments. This is all on 36.2.

I put two albums on a USB stick, and could play them fine in the car. This was to be expected.

Then I partitioned the USB stick into two partitions, put one album on each partition, and then the car could also play them both.
As can be seen in the image, the car is treating this as two different USB devices, but I could play either album easily enough.

Some have said the dashcam feature will require a separate device from the music drive. The only real reason I can think of to do this is because it appears that music drives are mounted read only, but the dashcam drive will obviously have to be read/write. I don't think speed is a problem, because the dashcam is writing about 30MB a minute, but even a terrible USB 2.0 drive (like I was using) will be able to write at 2-3MB a second. One minute of an MP3 file is about 1MB, and 1 minute of a flac file is still only about 5MB. So reading and writing as fast as needed to stream music and video is not going to push the limit of any USB drive that's big enough to be useful.

So, the technical bits on why I think the drive is mounted read only. Linux by default sets a "dirty bit" on FAT filesystems when it mounts them read/write. The "dirty bit" is then cleared when the drive is safely unmounted. The "dirty bit" is not set when a FAT filesystem is mounted read only. I plugged my music drive into the car, started playing music off it, and then pulled the drive out. If the drive had been read/write the dirty bit would have been set. I plugged the drive into my computer, but the dirty bit was not set, so the drive was either mounted read only, or Tesla is overriding default behavior.

Anyway, I don't think the read/write thing is an issue. If you pull the drive while it is writing videos, any incomplete videos will be corrupt, but the music is just static files on the drive, and will be fine, unless you are really unlucky and the whole filesystem is corrupted.

If the dashcam does require a separate drive, then partitioning a single drive might work, because the car is treating the multiple partitions as separate devices. I'm actually quite impressed by this. A quick diversion for some background. Linux (and most other operating systems are a variation of this) will see a drive as /dev/sda (for example), and then the first partition is /dev/sda1, the second /dev/sda2, etc. Most embedded devices I find only try to mount /dev/sda1. They don't bother to check for other partitions, or do anything if they're there. The really bad ones are worse in that they don't work if there is more than one partition, even though to the OS there is no difference between /dev/sda1 if it is the only partition or if it shares the drive with other partitions. The fact that the car gracefully handles multiple partitions says to me that the engineers and programmers actually bothered to think about it.

One final thing. I set the "dirty bit" by mounting the drive read/write on my computer, then pulling it out. The car didn't care, and could still play music off the drive. By default Linux will mount a FAT filesystem with the dirty bit set, it just complains.
 
Last edited: