top | item 18525072

(no title)

rgoodwintx | 7 years ago

Funny enough, I've been about to embark on something similar, for a project I contribute to that makes a Raspi Zero W into a "smart USB drive" for the built-in Tesla dashcam:

https://github.com/cimryan/teslausb

(Props to Cim and Ray who are doing a ton of work making the project go, also!)

The goals/advantages, vs just using a USB thumb drive:

- will connect to your wifi network (when detected) and copy off your saved dashcam files (over CIFS, SSH, others) - fixes any FAT filesystem errors on the virtual USB drive (presented to the host using g_mass_storage) automatically; some Tesla software versions had/have a bug that left the filesystem dirty on shutdown, rendering some thumb drives unreadable until formatted again

- (in process testing) uses BTRFS to keep the drive online while taking snapshots to do the file copies (and other neat things I have planned, like extending the 1-hour rolling buffer that Tesla uses by copying off files older than 1 hr into a secondary backing store on disk to be copied off later)

- automated (headless) setup by putting a configuration file in /boot (including wifi setup)

- quite a few more ideas to come; love to hear more brainstorms too. Maybe with a little more work it's worth its own Show HN? :)

I've learned a lot about how little I remembered about bash, how Raspbian images are built, setting up Jenkins for automated builds, even controlling the LED on the Pi to show progress of headless setup. (Sometimes it's the little things...)

On the to-do list was something exactly like this post: provide a way to get to the files if you are away from your home network, and/or don't have a computer with a USB or SD reader handy. Say, if you had just gotten in an accident and wanted to get to the files pronto. So, a way to trigger the Pi popping into AP mode was my next area of exploration; timely! I was actually exploring having your phone make a BT connection that would cause the host to switch configs (either automatically, or using BT PAN. (And a web UI to grab files, make settings changes, etc.) Good thoughts on security in some of the comments, and glad to see others have thought through this.

Thanks to OP and others; I think there's a solution one way or another in several of these project ideas! And, as customary, PR's welcome :)

discuss

order

No comments yet.