Rock 4c Plus DietPi Install with external Drive - marcone/teslausb GitHub Wiki
TeslaUSB on Rock Pi 4C+ (DietPi)
🧰 Hardware Requirements
- Rock Pi 4C+ (⚠️ Only the 4C+ variant supports USB power input)
- Micro SD card (128 GB or larger recommended)
- USB 3.0 A-to-A cable (connects Rock Pi’s top blue USB 3.0 port to car)
- USB-A-to-C cable (to power the Rock Pi)
- USB 3.0 hub or Y-cable (to connect both above cables to the car’s single USB port)
- (Optional) Micro-HDMI cable (to connect a display)
- (Optional) USB-to-TTL serial adapter (for console access)
💽 Software Requirements
- 
DietPi image for Rock Pi 4C+: 
 https://dietpi.com/downloads/images/DietPi_ROCK4CPlus-ARMv8-Bookworm.img.xz
- 
USB OTG overlay file (enables peripheral mode): 
 https://github.com/user-attachments/files/18145944/rk3399-dwc3-0-peripheral.zip (credits to @herrfrei)
🛠️ Installation Steps
1. Flash DietPi to SD Card
- 
Download the image and flash it using: 
- 
Insert SD card into Rock Pi 4C+ 
2. First Boot
- Power the Rock Pi via USB-C
- Log in as:
Username: root Password: dietpi
- 
if you have a USB to TTL serial adapter (this one works), you can connect to the Rock Pi 4C+'s serial console using e.g. PuTTY 
- 
if you have neither ethernet nor serial available, you must connect a keyboard and display to the Rock Pi 4C+ and log in via the console. You will need a micro-hdmi cable to connect a display to the Rock Pi 4C+ 
- 
Follow DietPi's first boot setup 
- 
once you're past the initial DietPi setup and have a root shell prompt, configure Wifi Note: in my experience NetworkManager is a lot faster while booting up than default ifup.d, you may want to apt install Network-Manager)
- 
once wifi is configured, verify that you can ssh into the Rock 4C+ via ssh, as root, using the password you chose earlier 
3. Enable Bluetooth using dietpi-config
This step is optional if you intend to keep the car awake using BLE
Navigate to: Advanced Options → Bluetooth → Enable
4. Enable USB OTG Peripheral Mode
Download and extract overlay
mkdir -p /boot/overlay-user
cd /boot/overlay-user
wget https://github.com/user-attachments/files/18145944/rk3399-dwc3-0-peripheral.zip
unzip rk3399-dwc3-0-peripheral.zip
NOTE: Rock 4C+ ONLY Does OTG on the Upper USB3 (Blue) Port, the lower one will be for Storage and still in Host Mode
5. Edit /boot/dietpiEnv.txt
nano /boot/dietpiEnv.txt
Add or update these lines:
overlay_prefix=rockchip
overlays=dwc3
user_overlays=rk3399-dwc3-0-peripheral
param_dwcore.dr_mode=peripheral
6. Install teslausb
- once logged in to the Rock Pi 4C+ again, run curl https://raw.githubusercontent.com/marcone/teslausb/main-dev/setup/generic/install.sh | bash -s norootshrink
- edit the TeslaUSB config file: nano /teslausb/teslausb_setup_variables.confYou can use any editor you like, but may have to install it first. You do not have to fill out the SSID and WIFIPASS values, since you already configured wifi earlier.
- when you've filled out all the required entries in the config file, save and exit, and run /etc/rc.local
- the machine will reboot
- check http://teslausb.local if it succeeds
If the device reboots after setup, you can log in again and run tail -f /teslausb/teslausb-headless-setup.log to follow setup progress.
Once setup is complete, it should print "All done" and reboot one final time.