Skip to content

Instantly share code, notes, and snippets.

@y3nr1ng
Last active October 17, 2020 06:34
Show Gist options
  • Save y3nr1ng/86f10d9a33a4b5b22c98dbd6355d4f24 to your computer and use it in GitHub Desktop.
Save y3nr1ng/86f10d9a33a4b5b22c98dbd6355d4f24 to your computer and use it in GitHub Desktop.
Script collection for Linux DPT-RP1 access
#! /usr/bin/env python
# This is used for automatically setup DPT-RP1 to usb-network, before python
# package dptrp1 starts.
import serial
with serial.Serial('/dev/ttyACM0', 115200) as tty:
# Activate CDC/ECM mode
tty.write(b"\x01\x00\x00\x01\x00\x00\x00\x01\x01\x04")
#! /usr/bin/env bash
# This is used for mounting DPT-RP1 to a specified folder.
dptmount --config ~/.config/dpt-rp1.conf "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment