Community discussions

MikroTik App
 
ttaiw
just joined
Topic Author
Posts: 18
Joined: Mon Jun 29, 2009 5:48 pm

Feature Request: USB CH340 usb-to-serial support.

Sun Aug 02, 2015 4:34 pm

I want to use CH340 usb-to-serial adapter. but Mikrotik not support yet.
Please make it support for this chip.
 
User avatar
doneware
Trainer
Trainer
Posts: 647
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

Re: Feature Request: USB CH340 usb-to-serial support.

Sat Sep 07, 2019 1:21 am

I want to use CH340 usb-to-serial adapter. but Mikrotik not support yet.
i saw ch341 kernel module in the newly released routeros7.0 beta1.
tomorrow i will hook on a ch34x based USB to serial to the upgraded router and report back my findings.
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: Feature Request: USB CH340 usb-to-serial support.

Sat Sep 07, 2019 3:05 am

It may be possibly different for other architectures, but my usb-to-serial cable that reports as CH340 in Windows, works fine with CHR 6.45 (it's a little unusual to test it there, but right now I don't have physical RB with usb port here). I was able to connect from another PC over serial cable, so it really works.
[admin@MikroTik] > system resource usb print detail 
...
 3 device="2-2" name="USB2.0-Ser!" vendor-id="0x1a86" device-id="0x7523" speed="12" usb-version=" 1.10" 
[admin@MikroTik] > port print detail                
Flags: I - inactive 
 0   name="usb1" used-by="Serial Console" device="" channels=1 baud-rate=9600 data-bits=8 parity=none stop-bits=1 flow-control=none
 
User avatar
doneware
Trainer
Trainer
Posts: 647
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

Re: Feature Request: USB CH340 usb-to-serial support.

Sat Sep 07, 2019 1:25 pm

C0CAF0AA-D612-42C9-A768-E4E43B3473CA-3191-0000028F5EFFE2C2.jpeg
just tried with this chinese arduino nano knockoff which has a WCH340G usb serial adapter, and it works fine. i agree, the device naming is somewhat medeival:
[admin@hgw] > /system/resource/usb/print 
Columns: DEVice, VENDOR, NAME, SPEEd
#  DEV  VENDOR                   NAME                  SPEE
0  1-0  Linux 4.14.131 xhci-hcd  xHCI Host Controller   480
1  1-1                           USB2.0-Serial           12
2  2-0  Linux 4.14.131 xhci-hcd  xHCI Host Controller  5000
[admin@hgw] > /system/resource/usb/print detail 
 0 device="1-0" vendor="Linux 4.14.131 xhci-hcd" name="xHCI Host Controller" 
   serial-number="xhci-hcd.0.auto" vendor-id="0x1d6b" device-id="0x0002" 
   speed="480" ports=1 usb-version=" 2.00" 

 1 device="1-1" name="USB2.0-Serial" vendor-id="0x1a86" device-id="0x7523" 
   speed="12" usb-version=" 1.10" 

 2 device="2-0" vendor="Linux 4.14.131 xhci-hcd" name="xHCI Host Controller" 
   serial-number="xhci-hcd.0.auto" vendor-id="0x1d6b" device-id="0x0003" 
   speed="5000" ports=1 usb-version=" 3.00" 

[admin@hgw] > /port/print detail 
Flags: I - inactive 
 0   name="serial0" used-by="Serial Console" device="" channels=1 
     baud-rate=115200 data-bits=8 parity=none stop-bits=1 flow-control=none 

 1   name="" used-by="" device="" channels=1 baud-rate=115200 data-bits=8 
     parity=none stop-bits=1 flow-control=none 

name="" ?! but functionally it is OK.
[admin@hgw] > /system/serial-terminal port=""

[Ctrl-A is the prefix key]


Adafruit MAX31865 PT100 Sensor Test!
RTD value: 32767
Ratio = 0.99996948
Resistance = 429.98687744
Temperature = 988.79
Fault 0xFF
RTD High Threshold
RTD Low Threshold
btw it was a hap ac2 running 7.0b1
You do not have the required permissions to view the files attached to this post.
 
User avatar
doneware
Trainer
Trainer
Posts: 647
Joined: Mon Oct 08, 2012 8:39 pm
Location: Hungary

Re: Feature Request: USB CH340 usb-to-serial support.

Sat Sep 07, 2019 1:47 pm

re-checked it with 6.45 on MIPS - works as well.
[admin@hgw] > /sys reso usb print detail 
 0 device="1-0" vendor="Linux 3.3.5 ehci_hcd" name="RB400 EHCI" 
   serial-number="rb400_usb" vendor-id="0x1d6b" device-id="0x0002" 
   speed="480" ports=1 usb-version=" 2.00" 

 1 device="1-1" name="USB2.0-Serial" vendor-id="0x1a86" device-id="0x7523" 
   speed="12" usb-version=" 1.10" [admin@hgw] > /sys reso print 
                   uptime: 1w5d12h29m17s
                  version: 6.45.3 (stable)
               build-time: Jul/29/2019 12:11:49
              free-memory: 93.0MiB
             total-memory: 128.0MiB
                      cpu: MIPS 74Kc V4.12
                cpu-count: 1
            cpu-frequency: 600MHz
                 cpu-load: 5%
           free-hdd-space: 96.5MiB
          total-hdd-space: 128.0MiB
  write-sect-since-reboot: 46950
         write-sect-total: 462108
               bad-blocks: 0%
        architecture-name: mipsbe
               board-name: CRS125-24G-1S
                 platform: MikroTik

[admin@hgw] /port> /system serial-terminal port=usb2 

[Ctrl-A is the prefix key]


Adafruit MAX31865 PT100 Sensor Test!
RTD value: 0
Ratio = 0.00000000
Resistance = 0.00000000
Temperature = -242.02

Who is online

Users browsing this forum: adwlodaro, Bing [Bot], keshav, Maggiore81, remilucia and 180 guests