- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试在 Linux (Ubuntu) 中连接秤(Dibal 系列 400),但无法成功。在安装驱动程序以启用虚拟 Com 端口后,秤可以在 Windows 上运行,但是当我在 Linux 中插入秤时,它会尝试启动,但过了一会儿秤会断电。
系统日志消息说:
kernel: [ 3202.896355] usb 1-2: new full-speed USB device number 8 using xhci_hcd
kernel: [ 3203.038395] usb 1-2: New USB device found, idVendor=0483, idProduct=5740
kernel: [ 3203.038400] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: [ 3203.038403] usb 1-2: Product: Dibal G Series
kernel: [ 3203.038405] usb 1-2: Manufacturer: DIBAL S.A
kernel: [ 3203.038407] usb 1-2: SerialNumber: 00000000001A
kernel: [ 3203.039349] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2"
mtp-probe: bus: 1, device: 8 was not an MTP device
kernel: [ 3203.081110] [UFW BLOCK] IN=wlp2s0 OUT= MAC= SRC=fe80:0000:0000:0000:8bb6:c943:d1eb:b07f DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=400724 PROTO=UDP SPT=8612 DPT=8612 LEN=24
kernel: [ 3203.081125] [UFW BLOCK] IN=wlp2s0 OUT= MAC= SRC=fe80:0000:0000:0000:8bb6:c943:d1eb:b07f DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=123875 PROTO=UDP SPT=8612 DPT=8610 LEN=24
kernel: [ 3203.091404] [UFW BLOCK] IN=wlp2s0 OUT= MAC= SRC=fe80:0000:0000:0000:8bb6:c943:d1eb:b07f DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=400724 PROTO=UDP SPT=8612 DPT=8612 LEN=24
kernel: [ 3203.091423] [UFW BLOCK] IN=wlp2s0 OUT= MAC= SRC=fe80:0000:0000:0000:8bb6:c943:d1eb:b07f DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=123875 PROTO=UDP SPT=8612 DPT=8610 LEN=24
kernel: [ 3207.543042] usb 1-2: USB disconnect, device number 8
kernel: [ 3207.543169] cdc_acm 1-2:1.0: failed to set dtr/rts
ModemManager[1005]: <warn> (ttyACM0) could not open serial device (2)
ModemManager[1005]: <warn> (Plugin Manager) (Nokia) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial device ttyACM0: No such file or directory'
ModemManager[1005]: <warn> (ttyACM0) could not open serial device (2)
ModemManager[1005]: <warn> (Plugin Manager) (Iridium) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial device ttyACM0: No such file or directory'
ModemManager[1005]: <warn> (ttyACM0) could not open serial device (2)
ModemManager[1005]: <warn> (Plugin Manager) (Cinterion) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial device ttyACM0: No such file or directory'
ModemManager[1005]: <warn> (ttyACM0) could not open serial device (2)
ModemManager[1005]: <warn> (Plugin Manager) (Generic) [ttyACM0] error when checking support: '(tty/ttyACM0) failed to open port: Could not open serial device ttyACM0: No such file or directory'
ModemManager[1005]: <info> Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2': not supported by any plugin
作为附加信息,在 Windows 中它被识别为:
STMicroelectronics 虚拟 COM 端口 (COM3)它有下一个配置:波特率:9600奇偶性:无
当秤开始时(持续运行 3 或 4 秒),我测试过:
udevadm 测试/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1
ACTION=add
BUSNUM=001
DEVNAME=/dev/bus/usb/001/036
DEVNUM=036
DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-1
DEVTYPE=usb_device
DRIVER=usb
ID_BUS=usb
ID_MODEL=Dibal_G_Series
ID_MODEL_ENC=Dibal\x20G\x20Series
ID_MODEL_FROM_DATABASE=STM32F407
ID_MODEL_ID=5740
ID_REVISION=0200
ID_SERIAL=DIBAL_S.A_Dibal_G_Series_00000000001A
ID_SERIAL_SHORT=00000000001A
ID_USB_INTERFACES=:020201:0a0000:
ID_VENDOR=DIBAL_S.A
ID_VENDOR_ENC=DIBAL\x20S.A
ID_VENDOR_FROM_DATABASE=STMicroelectronics
ID_VENDOR_ID=0483
MAJOR=189
MINOR=35
PRODUCT=483/5740/200
SUBSYSTEM=usb
TYPE=0/0/0
USEC_INITIALIZED=9445077321
Unload module index
Unloaded link configuration context.
谁能帮帮我?
非常感谢,贾维。
最佳答案
终于解决了这个问题:
感谢那个链接:
https://github.com/dhylands/usb-ser-mon/blob/master/usb_ser_mon/mk-udev-rules-stm32.sh
用这个创建一个脚本并执行它。
#!/bin/sh
sudo sh -c 'cat > /etc/udev/rules.d/49-stm32.rules' <<EOF
# 0483:5740 - STM32F4 Dsicovery in USB Serial Mode (CN5)
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740",
ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740",
ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740",
MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740",
MODE:="0666"
# 0483:df11 - STM32F4 Discovery in DFU mode (CN5)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11",
MODE:="0666"
EOF
sudo udevadm control --reload-rules
关于ubuntu - 在 Ubuntu 中连接 usb scale,cdc_acm 说 failed to set dtr/trs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47480214/
我有一个 USB 设备,它不是调制解调器,在 Linux 下被识别为 ttyACM。我可以使用标准系统调用打开此路径进行读/写操作。我看到的问题是,在插入后的前 20 秒内,一些 USB 数据包丢失,
我在使用 cdc_acm 驱动程序在 USB 端口上发送意外字符时遇到问题。更令人困惑的是,代码在 Ubuntu 12.04(3.2 内核)上运行良好,但在 Centos 6(3.6 内核)上运行失败
我正在尝试使用多个(七个)USB 子接口(interface)表示自身的 USB 设备,因为每个子接口(interface)都加载了 cdc_acm 内核模块。当我尝试连接更多 USB 设备时,cdc
我正在尝试在 Linux (Ubuntu) 中连接秤(Dibal 系列 400),但无法成功。在安装驱动程序以启用虚拟 Com 端口后,秤可以在 Windows 上运行,但是当我在 Linux 中插入
我是一名优秀的程序员,十分优秀!