Jump to content

Recommended Posts

Posted

Hi,

Im running Armbian_21.08.2_Orangepizero2_buster_legacy_4.9.255 on Orangepi zero 2. 
I don't see ttyUSB in my /dev/ but I can see it when  I list usb :

root@orangepizero2:~# lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0781:5591 SanDisk Corp. Ultra Flair
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Any Idea what should I do ? 
Thank in advance ! 

log.txt

Posted

It seems that theer's  some kind  of drv_vbus problem.  What does it mean ? 
...

[    1.981228] [sunxi-ehci3]: probe, pdev->name: 5311000.ehci3-controller, sunxi                                                                                            _ehci: 0xffffff8009994538, 0x:ffffff80081d5000, irq_no:124
[    1.981279] sunxi-ehci 5311000.ehci3-controller: SW USB2.0 'Enhanced' Host Co                                                                                            ntroller (EHCI) Driver
[    1.981304] sunxi-ehci 5311000.ehci3-controller: new USB bus registered, assi                                                                                            gned bus number 3
[    1.981599] sunxi-ehci 5311000.ehci3-controller: irq 292, io mem 0xffffff8008                                                                                            1d5000
[    1.992442] sunxi-ehci 5311000.ehci3-controller: USB 0.0 started, EHCI 1.00
[    1.992656] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    1.992665] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=                                                                                            1
[    1.992673] usb usb3: Product: SW USB2.0 'Enhanced' Host Controller (EHCI) Dr                                                                                            iver
[    1.992680] usb usb3: Manufacturer: Linux 4.9.255-sun50iw9 ehci_hcd
[    1.992687] usb usb3: SerialNumber: sunxi-ehci
[    1.993549] hub 3-0:1.0: USB hub found
[    1.993591] hub 3-0:1.0: 1 port detected
[    1.994533] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.994909] get drv_vbus is fail, 84
[    1.994917] get ohci0-controller, regulator_io is no nocare
[    1.995270] [sunxi-ohci0]: probe, pdev->name: 5101000.ohci0-controller, sunxi                                                                                            _ohci: 0xffffff80099941f0
[    1.995277] [sunxi-ohci0]: Not init ohci0
[    1.995401] get ohci1-controller, regulator_io is no nocare
[    1.995566] hci: request ohci1-controller gpio:80
[    1.995647] [sunxi-ohci1]: probe, pdev->name: 5200000.ohci1-controller, sunxi                                                                                            _ohci: 0xffffff8009993b60
...


 

Posted

The log says that no external USB devices were connected to the Orange Pi at all.

For example:

% sudo dmesg |tail -n20

 8<------8<------8<------8<------8<------8<------
[72814.174773] usb 2-1.2: new full-speed USB device number 34 using ehci-pci
[72814.273199] usb 2-1.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.54

                                                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[72814.273218] usb 2-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[72814.273224] usb 2-1.2: Product: USB2.0-Serial
[72814.274295] ch341 2-1.2:1.0: ch341-uart converter detected
[72814.279461] usb 2-1.2: ch341-uart converter now attached to ttyUSB0

                                                                               ---------------------^^^^^^^^

8<------8<------8<------8<------8<------8<------

% lsusb 

8<------8<------8<------8<------8<------8<------

Bus 002 Device 034: ID 1a86:7523 QinHeng Electronics CH340 serial converter

                                        ^^^^^^^^^

8<------8<------8<------8<------8<------8<------

 %  ls /dev/ttyUSB0    
/dev/ttyUSB0

Posted

The printer controllers use TTL logic 0-0.8 V, USB has 0-5.0 V. The USB2TTL or USB2UART adapter is used for coordination. It can be built into the printer controller board or USB cable. This cable cannot be replaced with the оrdinary USB cable.

 

An example of such a cable from Samsung:

dNIz-0DWuyU5h7cSHIkD7utFa3K7FdzRpNlENrA3

 

2. If the new xxxx: yyyy ID is listed and the dmesg message says that the kernel cannot select a working module for it, try selecting it manually from:

 

% find lib/modules/ -type f -name \*serial\*.ko

lib/modules/4.9.255-sun50iw9/kernel/drivers/usb/gadget/legacy/g_serial.ko

lib/modules/4.9.255-sun50iw9/kernel/drivers/usb/serial/symbolserial.ko

lib/modules/4.9.255-sun50iw9/kernel/drivers/usb/serial/usbserial.ko

                                                                                       ^^^^^^^^^^^^^

lib/modules/4.9.255-sun50iw9/kernel/drivers/usb/serial/wishbone-serial.ko

lib/modules/4.9.255-sun50iw9/kernel/drivers/usb/serial/safe_serial.ko

lib/modules/4.9.255-sun50iw9/kernel/drivers/usb/serial/usb-serial-simple.ko

lib/modules/4.9.255-sun50iw9/kernel/drivers/usb/serial/qcserial.ko

% find lib/modules/ -type f -name \*acm\*.ko

lib/modules/4.9.255-sun50iw9/kernel/drivers/usb/gadget/legacy/g_acm_ms.ko

lib/modules/4.9.255-sun50iw9/kernel/drivers/usb/class/cdc-acm.ko

                                                                                      ^^^^^^^^^^^

For example:

% sudo modprobe cdc-acm

 

If dmesg reports that the kernel has created an interface for your printer, such as /dev/ttyACM0, it will need to be write in the Octoprint configuration. https://docs.octoprint.org/en/master/configuration/config_yaml.html#serial

 

Add new udev rules to automatically load the module

/etc/udev/rules.d/50-My3DPrinter.rules

#
# Add USB VID/PID for Your 3D printer
#
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", ATTR{idProduct}=="yyyy", RUN+="/usr/bin/modprobe usb-acm", RUN+="/bin/sh -c 'echo $attr{idVendor} $attr{idProduct} > /sys/bus/usb-serial/drivers/generic/new_id'"

#
# Construct a symlink to the TTY generated for the printer.
#
SUBSYSTEM=="tty", ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="yyyy", SYMLINK+="my_3d_printer"

 

 

 

 

Posted
10 minutes ago, poltawer said:

The printer controllers use TTL logic 0-0.8 V, USB has 0-5.0 V. The USB2TTL or USB2UART adapter is used for coordination. It can be built into the printer controller board or USB cable. This cable cannot be replaced with the оrdinary USB cable.

 

 

2. If the new xxxx: yyyy ID is listed and the dmesg message says that the kernel cannot select a working module for it, try selecting it manually

Thanks for reply!
1. USB /TTL levels converter has to be built in to printer - regular USB cable hase been provided with printer. 
2. I'll try to connect as you said after next finished print. 

Posted

In Octoprint terminal seems that user has no permission to open connection with tty device:
Send: N0 M110 N0*125 Trying port /dev/ttyS0, baudrate 115200 Connecting to port /dev/ttyS0, baudrate 115200 Unexpected error while connecting to serial port /dev/ttyS0, baudrate 115200 from hook default: SerialException: '[Errno 13] could not open port /dev/ttyS0: [Errno 13] Permission denied: '/dev/ttyS0'' @ comm.py:_open_serial:3779 Could not open port /dev/ttyS0, baudrate 115200, skipping Trying port /dev/ttyS0, baudrate 250000 Connecting to port /dev/ttyS0, baudrate 250000 Unexpected error while connecting to serial port /dev/ttyS0, baudrate 250000 from hook default: SerialException: '[Errno 13] could not open port /dev/ttyS0: [Errno 13] Permission denied: '/dev/ttyS0'' @ comm.py:_open_serial:3779 Could not open port /dev/ttyS0, baudrate 250000, skipping Changing monitoring state from "Detecting serial connection" to "Error" Changing monitoring state from "Error" to "Offline after error" Connection closed, closing down monitor Changing monitoring state from "Offline" to "Opening serial connection" Connecting to port /dev/ttyS0, baudrate 115200 Changing monitoring state from "Opening serial connection" to "Error" Changing monitoring state from "Error" to "Offline after error" Unexpected error while connecting to serial port /dev/ttyS0, baudrate 115200 from hook default: SerialException: '[Errno 13] could not open port /dev/ttyS0: [Errno 13] Permission denied: '/dev/ttyS0'' @ comm.py:_open_serial:3779

How can i change it ? 
 

 

Posted

You are not reporting whether dmesg specified that the kernel created the /dev/tyUSB0 interface, or whether Octoprint uses the interface specified in its configuration. I can only guess that the kernel created the necessary interface. If so, then this question should rather be asked on the forums of Oktoprint.

I assume this works with 'myst' user privileges, then you add 'myst' user to tty and dialout groups using: 

% sudo usermod -a -G dialout myst
% sudo usermod -a -G tty myst

Best regard Serhiy!

Enjoj ;)

Posted
5 hours ago, poltawer said:

You are not reporting whether dmesg specified that the kernel created the /dev/tyUSB0 interface, or whether Octoprint uses the interface specified in its configuration. I can only guess that the kernel created the necessary interface. If so, then this question should rather be asked on the forums of Oktoprint.

I assume this works with 'myst' user privileges, then you add 'myst' user to tty and dialout groups using: 

% sudo usermod -a -G dialout myst
% sudo usermod -a -G tty myst

Best regard Serhiy!

Enjoj ;)

Hi, 
Thanks for your reply. 
Unfortunately after performing suggested operation, problem  still exist. 

...
Connecting to port /dev/ttyS0, baudrate 115200 Changing monitoring state from "Opening serial connection" to "Error" Changing monitoring state from "Error" to "Offline after error" Unexpected error while connecting to serial port /dev/ttyS0, baudrate 115200 from hook default: SerialException: '[Errno 13] could not open port /dev/ttyS0: [Errno 13] Permission denied: '/dev/ttyS0'' @ comm.py:_open_serial:3779

...


Printer should be visible in dev as ttyUSB0. Maybe some driver is missing ? 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines