[Octoprint] multiple USB serial modules for 5.13.x kernel

Who doesn't love third-party apps? Get together and talk about them here.
User avatar
father.mande
Posts: 1817
youtube meble na wymiar Warszawa
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

[Octoprint] multiple USB serial modules for 5.13.x kernel

Post by father.mande »

Hi,

After tests, please find attach (before new delivery) kernel modules (multiples) for Octoprint (or other APKG requiring it) for new Kernel 5.13.x

Tested on AS5202T with ADM 4.1.x (last just arrive update)
Octoprint (internal update) 1.8.1 ... no need new APKG :P update is included

How-to

... open a ssh terminal using root/your_admin_password (or adminisytrator user)
... put the tar file in /share/Public (other share if you want)
then do :
tar xf /share/Public/5.13.x_usb_async_drivers.tar -C /usr/local/AppCentral/octoprint/modules/

It's all. restart Octoprint or upgrade to 4.1

Philippe.
5.13.x_usb_async_drivers.tar
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
photog
Posts: 3
Joined: Thu Jul 21, 2022 10:37 am

Re: [Octoprint] multiple USB serial modules for 5.13.x kernel

Post by photog »

Thanks so much for this!!

G
DQ4HNyBp
Posts: 5
Joined: Mon Sep 05, 2022 11:04 pm

Re: [Octoprint] multiple USB serial modules for 5.13.x kernel

Post by DQ4HNyBp »

Thank you so much for your work on this.

I can install the app and the patches here - but what do I choose for USB port in Octoprint? I have the cable connected, but every port I pick says 'not detected'

Is there a specific port on the NAS I should use? Should I change any settings for USB in Octoprint?

Thank you again!
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [Octoprint] multiple USB serial modules for 5.13.x kernel

Post by father.mande »

Hi,

No specific USB plug ... just don't use if possible the front one.

Please have a look when you connect the printer to the system log
in a terminal : dmesg ... you can see if an error occurs.
also please can you indicate your printer model ... because I provide driver for the most common and (can) test only for my own Ender 3 printer .

Unfortunately (for support APKG) I am in travel and can't verify that all run as well with the last 4.1 update (but no reason)

for information, you must have in dmesg output lines like this (before plugging USB cable). ... first numeric value are timestamp so always differ

Code: Select all

[31637.487242] usbserial: USB Serial support registered for ch341-uart
[31643.876976] usbcore: registered new interface driver cp210x
[31643.877024] usbserial: USB Serial support registered for cp210x
[31779.851019] usbcore: registered new interface driver pl2303
[31779.851053] usbserial: USB Serial support registered for pl2303
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
DQ4HNyBp
Posts: 5
Joined: Mon Sep 05, 2022 11:04 pm

Re: [Octoprint] multiple USB serial modules for 5.13.x kernel

Post by DQ4HNyBp »

Thank you very much. I have a Prusa i3 Mk2.5 printer

my dmesg output when I connect it is:

Code: Select all

<6>[12193.641653] usb 1-2: new full-speed USB device number 6 using xhci_hcd
<6>[12193.778538] usb 1-2: New USB device found, idVendor=2c99, idProduct=0001, bcdDevice= 0.01
<6>[12193.787166] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[12193.794849] usb 1-2: Product: Original Prusa i3 MK2
<6>[12193.800065] usb 1-2: Manufacturer: Prusa Research (prusa3d.com)
<6>[12193.813217] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [Octoprint] multiple USB serial modules for 5.13.x kernel

Post by father.mande »

Hi,

I think, I understand the problem ...
due to Application management, it's necessary in ADM to change the access right to the USB device driver
I do this by a "survey" (shell running all the time of octoprint run) of tty and change access right
this is done by the shell in /usr/local/AppCentral/octoprint/bin/adm_start_survey_tty.sh

up to now ... printer use driver generating device name like : /dev/ttyUSB* (* = a number)
your printer generate a device name : /dev/ACM* (* = a number)

so ... the access right is not changed ... first request for cdc-acm

to test (before I provide a new survey shell) in a terminal using root / your_admin_password (or sudo from any administrators)

do ... when printer is plugged (device ttyACM* created)
chmod 666 /dev/ttyACMn (replace n by number certainely 0 in your case)
verify if /usr/local/AppCentral/octoprint/octoprint/dev/ttyACMn exist
if not do : cp -pP /dev/ttyACMn /usr/local/AppCentral/octoprint/octoprint/dev/ttyACMn
if yes do : chmod 666 /usr/local/AppCentral/octoprint/octoprint/dev/ttyACMn

then try octoprint connection.

Philippe.
Sorry ... you are my tester ...
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
DQ4HNyBp
Posts: 5
Joined: Mon Sep 05, 2022 11:04 pm

Re: [Octoprint] multiple USB serial modules for 5.13.x kernel

Post by DQ4HNyBp »

Oddly, all of the entries in my /dev were already 777 level permissions.

Using my dmesg output above I figured out that the USB device its mapping to is /dev/usbdev1.6. None of the tty or acm devs appear to be mapped to the USB ports (on my device at least).

I did an experiment and installed Octoprint via Docker on my AS5202T and mapped /dev/usbdev1.6 on the host to /dev/ttyACM0 on the container. Octoprint installed without a problem and worked great: no patches were necessary and the USB port is working perfectly. I did a full print to test it. I will continue to try it via Docker to see if I can figure out more and then use your info above to try and get the app version working too.

Thank you again!
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [Octoprint] multiple USB serial modules for 5.13.x kernel

Post by father.mande »

Hi,

OK ... it's not the problem ... I just analyse from previous ADM version where this problem exist (dev/ttyxxxx are rw only for root) ... I have to search again ...

just a question ... did you update octoprint (using the internal update), with my Ender 3 all run as well ... so ???

the advantage of Linux is to have multiple solutions for the same usage of an application, so if docker works for you and you like using it ... just continue with it.

I will check for specific change ...
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
User avatar
father.mande
Posts: 1817
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: [Octoprint] multiple USB serial modules for 5.13.x kernel

Post by father.mande »

Hi,

Redo some test with Octoprint 1.8.2 ... no problem
but a friend said me that /dev/ttyANA or ACM can be not detected, so he suggest to :
restart octoprint after plugin the printer (due to no udev nor systemd)
if no success ...
add /dev/ttyACM0 or other in settings / connection / Additional serial ports

Please can you try ? remember if port used are different you can have multiple octoprint ... one running at a time on one specific serial

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
DQ4HNyBp
Posts: 5
Joined: Mon Sep 05, 2022 11:04 pm

Re: [Octoprint] multiple USB serial modules for 5.13.x kernel

Post by DQ4HNyBp »

I tried both of these but I am still unable to connect. I also tried adding the device mapping to the config.json in the Octoprint app directory and that did not work either.
Post Reply

Return to “Developer's Corner”