Last active
October 17, 2020 06:34
-
-
Save y3nr1ng/86f10d9a33a4b5b22c98dbd6355d4f24 to your computer and use it in GitHub Desktop.
Script collection for Linux DPT-RP1 access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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