Jun 3, 2024, 2:59 PM
This commit is contained in:
parent
14860da345
commit
7bc9b35d0b
@ -87,109 +87,8 @@ Leaning towards MatterControl
|
|||||||
|
|
||||||
MatterControl has an issue post install, bug report at <https://github.com/MatterHackers/MatterControl/issues/5096>
|
MatterControl has an issue post install, bug report at <https://github.com/MatterHackers/MatterControl/issues/5096>
|
||||||
|
|
||||||
|
|
||||||
### Misc notes
|
### Misc notes
|
||||||
|
|
||||||
```
|
|
||||||
For the above items that present serial port over USB, we need to setup persistent device names.
|
|
||||||
|
|
||||||
Here is some text on how to do that from <http://wiki.mattercontrol.com/Development/Running_on_Linux>
|
|
||||||
|
|
||||||
"
|
|
||||||
Assigning Serial Ports
|
|
||||||
|
|
||||||
On Linux, serial port assignments can change whenever a printer is connected or disconnected. MatterControl cannot tell which printer is connected to which serial port. You can setup a udev rule to permanently assign a unique port to your printer.
|
|
||||||
|
|
||||||
Do ls /dev/tty* before and after connecting your printer to find out which port it is assigned to. Printers will show up as either /dev/ttyACM# or /dev/ttyUSB#.
|
|
||||||
|
|
||||||
Use udevadm to get the serial number (UUID) of the USB device. This is a unique 20 digit hexadecimal value.
|
|
||||||
|
|
||||||
$ udevadm info --attribute-walk -n /dev/ttyACM0 | grep "serial"
|
|
||||||
|
|
||||||
Some printers will not report a serial number. In this case, you will have to use other attributes to identify it such as the vendor ID (idVendor) and the product ID (idProduct).
|
|
||||||
|
|
||||||
Create a file /etc/udev/rules.d/97-3dprinters.rules. Here is an example with rules for two printers.
|
|
||||||
|
|
||||||
SUBSYSTEM=="tty", ATTRS{serial}=="6403237383335190E0F1", GROUP="uucp", MODE="0660", SYMLINK+="tty-taz"
|
|
||||||
SUBSYSTEM=="tty", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="076b", GROUP="uucp", MODE="0660", SYMLINK+="tty-kosselpro"
|
|
||||||
|
|
||||||
Fill in either the serial number or vender and product IDs based on the information you obtained earlier. Make sure GROUP is set to the same group ownership as the rest of your serial ports. This is usually dialout on Debian or uucp on Arch. You can check by doing ls -l /dev/ttyACM*. Lastly, give your printer a unique name for the SYMLINK. This name must start with tty or it will not show up in the list in MatterControl.
|
|
||||||
|
|
||||||
The next time you connect the printer, a symlink will automatically be created that points to the correct serial device. You can now edit the printer in MatterControl and choose the new device.
|
|
||||||
"
|
|
||||||
|
|
||||||
Here is an example rule from a production system at tsys:
|
|
||||||
|
|
||||||
root@pfv-vmsrv-04:/etc/udev/rules.d# cat 99-usb-serial.rules
|
|
||||||
|
|
||||||
# examples from
|
|
||||||
|
|
||||||
# <http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/>
|
|
||||||
# <https://medium.com/@inegm/persistent-names-for-usb-serial-devices-in-linux-dev-ttyusbx-dev-custom-name-fd49b5db9af1>
|
|
||||||
|
|
||||||
# SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="rah-ctrl"
|
|
||||||
|
|
||||||
# SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A6008isP", SYMLINK+="arduino"
|
|
||||||
|
|
||||||
# SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A7004IXj", SYMLINK+="buspirate"
|
|
||||||
|
|
||||||
# SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="FTDIF46B", SYMLINK+="ttyUSB.ARM"
|
|
||||||
|
|
||||||
# Apply changes via
|
|
||||||
|
|
||||||
#
|
|
||||||
|
|
||||||
# udevadm control --reload-rules && sudo udevadm trigger
|
|
||||||
|
|
||||||
#
|
|
||||||
|
|
||||||
####################################
|
|
||||||
|
|
||||||
# USB serial for UPS
|
|
||||||
|
|
||||||
####################################
|
|
||||||
|
|
||||||
# Bus 002 Device 045: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
|
|
||||||
|
|
||||||
# root@pfv-vmsrv-03:~# udevadm info --name=/dev/ttyUSB2 --attribute-walk|grep -i vendor
|
|
||||||
|
|
||||||
# ATTRS{idVendor}=="067b"
|
|
||||||
|
|
||||||
# ATTRS{idVendor}=="2109"
|
|
||||||
|
|
||||||
# ATTRS{idVendor}=="8087"
|
|
||||||
|
|
||||||
# ATTRS{idVendor}=="1d6b"
|
|
||||||
|
|
||||||
# ATTRS{subsystem_vendor}=="0x1028"
|
|
||||||
|
|
||||||
# ATTRS{vendor}=="0x8086"
|
|
||||||
|
|
||||||
# root@pfv-vmsrv-03:/etc/snmp# udevadm info --name=/dev/ttyUSB2 --attribute-walk|grep -i serial
|
|
||||||
|
|
||||||
# SUBSYSTEMS=="usb-serial"
|
|
||||||
|
|
||||||
# ATTRS{product}=="USB-Serial Controller"
|
|
||||||
|
|
||||||
# ATTRS{serial}=="0000:00:1d.0"
|
|
||||||
|
|
||||||
# root@pfv-vmsrv-03:/etc/udev/rules.d# udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' | head -n1
|
|
||||||
|
|
||||||
# ATTRS{serial}=="0000:00:1d.0"
|
|
||||||
|
|
||||||
# SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", ATTRS{serial}=="0000:00:1d.0", SYMLINK+="ups4"
|
|
||||||
|
|
||||||
SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ups4"
|
|
||||||
####################################
|
|
||||||
|
|
||||||
# USB serial for sifive
|
|
||||||
|
|
||||||
####################################
|
|
||||||
####################################
|
|
||||||
|
|
||||||
# USB serial for parallella
|
|
||||||
|
|
||||||
####################################
|
|
||||||
|
|
||||||
<https://research.kudelskisecurity.com/2014/05/01/jtag-debugging-made-easy-with-bus-pirate-and-openocd/>
|
<https://research.kudelskisecurity.com/2014/05/01/jtag-debugging-made-easy-with-bus-pirate-and-openocd/>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user