From ce604a0fef0a0eed84f9b8eb13532f2116427d2e Mon Sep 17 00:00:00 2001
From: TheNewCivilian <superregmail@gmx.de>
Date: Tue, 15 Aug 2023 15:06:22 +0200
Subject: [PATCH] docs: Add USB access instructions

---
 docs/badge/firmware.rst | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/docs/badge/firmware.rst b/docs/badge/firmware.rst
index 2ccfc3d3fc..b49294ea11 100644
--- a/docs/badge/firmware.rst
+++ b/docs/badge/firmware.rst
@@ -75,9 +75,25 @@ This is the SPI flash partition layout we use:
 | ``vfs``      | 12MiB  | FAT32 filesystem (with [#WL]_ layer). |
 +--------------+--------+---------------------------------------+
 
-Accessing files from a PC
+
+
+Setup USB access rules
 -------------------------
 
+.. warning::
+   **Did you set up USB access rules already?**
+
+   To let ``mpremote`` to work properly your user needs to have access rights to ttyACM.
+
+   Quick fix: ``sudo chmod a+rw /dev/ttyACM[Your Device Id here]```
+
+   More sustainable fix: Setup an systemd rule to automatically allow the logged in user to access ttyUSB
+
+	    1. To use this, add the following to /etc/udev/rules.d/60-extra-acl.rules: ``KERNEL=="ttyACM[0-9]*", TAG+="udev-acl", TAG+="uaccess"``
+	    2. Reload ``udevadm control --reload-rules && udevadm trigger``
+	
+
+
 If the badge is running correctly, you can access the filesystem over the micropython REPL, using tools like mpremote.
 
 ::
-- 
GitLab