Usb to com линукс

Usb com переходник и linux

Добрый вечер! Потребовался мне в старом ноутбуке COM порт. Его там нет, поэтому решил купить адаптер USB-COM (например COM VCOM VUS7050). Вопрос, встанет ли он нормально в линукс или нет? Есть какие-то примеры решения данного вопроса?

По этой модели вроде заявлена официальная поддержка Linux. Скорее всего, должно заработать из коробки. Если нет, то нужно в параметрах модуля указать нужные vid и pid, должно помочь.

в отличии от винды никаких плясок с дровами не требуется — воткнул и все…

ЗЫ: COM VCOM VUS7050 не пробовал, всякая хрень с али работает…

Он-то может и встанет, а устройство которое ты будешь к com порту подключать точно заработает с usb конвертером?

У com порта напряжение 20В, а USB — 5В.

+-12 там.
В пекарне вообще только 3,3, 5 и 12 вольт.

Давно уже никто не рассчитывает на +-12, 0-5 наше все.

Всё таки купил переходник этот, но модем, через minicom он не видит. Определиться как порт USB2.

Нашёл на просторах интернета, аналогичные рекомендации по этому модему и переходнику другому. Но как применить на себе не знаю.

Источник

Настройка USB-COM переходника в Linux Mint.

Рассмотрим установку и настройку консольного кабеля (usb-to-com) в ОС Linux Mint, Debian, Ubuntu. Из коробки данные операционные системы не умеют работать с com портами, и пользователю необходимо добавлять своё устройство руками). Данная статья основана на добавление usb-com переходника фирмы Cablexpert USB A — RS232.

По умолчанию udev в Linux системах настроен так, что не дает обычному пользователю системы пользоваться COM портами. Под это правило попадает и USB-COM переходник на ft232.
Это конечно во многих случаях оправдано, но сильно надоедает. Ведь так нужно запускать терминал от root.
Избежать этого очень просто. Нужно поменять правила системы udev.

Изначально правила имеют данный вид:

1 $ ls -l /dev/ | grep USB
2 lrwxrwxrwx 1 root root 7 окт 26 17:54 pl2303_0 -> ttyUSB0

Нам необходимо узнать VendorID и ProductID нашего переходника. Это можно сделать следующей командой:

1 $ lsusb | grep UART
2 Bus 003 Device 011: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

Не всегда GREP отображает ваш переходник, поэтому можно воспользоваться командой lsusb. После ввода команды в «куче информации» находим строке:

Bus 002 Device 010: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

Где ID 067b:2303 нужные нам значения.

Теперь создаем файл (любым текстовым, терминальным редактором Linux)в /etc/udev/rules.d/

1 sudo vim /etc/udev/rules.d/PL2303.rules
Добавляем туда такое содержимое (изменяем если нужно idVendor и idProduct):

SUBSYSTEMS==»usb», ATTRS==»067b», ATTRS==»2303″, \
MODE:=»0666″, GROUP:=»users»,\
SYMLINK+=»PL2303_%n»
Сохраняем и закрываем.
wq

Перезагружаем компьютер и проверяем работоспособность + радуемся)

Источник

USB serialВ¶

IntroductionВ¶

The USB serial driver currently supports a number of different USB to serial converter products, as well as some devices that use a serial interface from userspace to talk to the device.

See the individual product section below for specific information about the different devices.

ConfigurationВ¶

Currently the driver can handle up to 256 different serial interfaces at one time.

The major number that the driver uses is 188 so to use the driver, create the following nodes:

When the device is connected and recognized by the driver, the driver will print to the system log, which node(s) the device has been bound to.

Specific Devices SupportedВ¶

ConnectTech WhiteHEAT 4 port converterВ¶

ConnectTech has been very forthcoming with information about their device, including providing a unit to test with.

The driver is officially supported by Connect Tech Inc. http://www.connecttech.com

For any questions or problems with this driver, please contact Connect Tech’s Support Department at support @ connecttech . com

HandSpring Visor, Palm USB, and CliГ© USB driverВ¶

This driver works with all HandSpring USB, Palm USB, and Sony CliГ© USB devices.

Only when the device tries to connect to the host, will the device show up to the host as a valid USB device. When this happens, the device is properly enumerated, assigned a port, and then communication _should_ be possible. The driver cleans up properly when the device is removed, or the connection is canceled on the device.

This means that in order to talk to the device, the sync button must be pressed BEFORE trying to get any program to communicate to the device. This goes against the current documentation for pilot-xfer and other packages, but is the only way that it will work due to the hardware in the device.

When the device is connected, try talking to it on the second port (this is usually /dev/ttyUSB1 if you do not have any other usb-serial devices in the system.) The system log should tell you which port is the port to use for the HotSync transfer. The “Generic” port can be used for other device communication, such as a PPP link.

Читайте также:  Компьютер долго перезагружается что делать для windows

For some Sony CliГ© devices, /dev/ttyUSB0 must be used to talk to the device. This is true for all OS version 3.5 devices, and most devices that have had a flash upgrade to a newer version of the OS. See the kernel system log for information on which is the correct port to use.

If after pressing the sync button, nothing shows up in the system log, try resetting the device, first a hot reset, and then a cold reset if necessary. Some devices need this before they can talk to the USB port properly.

Devices that are not compiled into the kernel can be specified with module parameters. e.g. modprobe visor vendor=0x54c product=0x66

There is a webpage and mailing lists for this portion of the driver at: http://sourceforge.net/projects/usbvisor/

For any questions or problems with this driver, please contact Greg Kroah-Hartman at greg @ kroah . com

PocketPC PDA DriverВ¶

This driver can be used to connect to Compaq iPAQ, HP Jornada, Casio EM500 and other PDAs running Windows CE 3.0 or PocketPC 2002 using a USB cable/cradle. Most devices supported by ActiveSync are supported out of the box. For others, please use module parameters to specify the product and vendor id. e.g. modprobe ipaq vendor=0x3f0 product=0x1125

The driver presents a serial interface (usually on /dev/ttyUSB0) over which one may run ppp and establish a TCP/IP link to the PDA. Once this is done, you can transfer files, backup, download email etc. The most significant advantage of using USB is speed — I can get 73 to 113 kbytes/sec for download/upload to my iPAQ.

This driver is only one of a set of components required to utilize the USB connection. Please visit http://synce.sourceforge.net which contains the necessary packages and a simple step-by-step howto.

Once connected, you can use Win CE programs like ftpView, Pocket Outlook from the PDA and xcerdisp, synce utilities from the Linux side.

To use Pocket IE, follow the instructions given at http://www.tekguru.co.uk/EM500/usbtonet.htm to achieve the same thing on Win98. Omit the proxy server part; Linux is quite capable of forwarding packets unlike Win98. Another modification is required at least for the iPAQ — disable autosync by going to the Start/Settings/Connections menu and unchecking the “Automatically synchronize …” box. Go to Start/Programs/Connections, connect the cable and select “usbdial” (or whatever you named your new USB connection). You should finally wind up with a “Connected to usbdial” window with status shown as connected. Now start up PIE and browse away.

If it doesn’t work for some reason, load both the usbserial and ipaq module with the module parameter “debug” set to 1 and examine the system log. You can also try soft-resetting your PDA before attempting a connection.

Other functionality may be possible depending on your PDA. According to Wes Cilldhaire @ hotmail . com>, with the Toshiba E570, …if you boot into the bootloader (hold down the power when hitting the reset button, continuing to hold onto the power until the bootloader screen is displayed), then put it in the cradle with the ipaq driver loaded, open a terminal on /dev/ttyUSB0, it gives you a “USB Reflash” terminal, which can be used to flash the ROM, as well as the microP code.. so much for needing Toshiba’s $350 serial cable for flashing!! 😀 NOTE: This has NOT been tested. Use at your own risk.

Keyspan PDA Serial AdapterВ¶

Single port DB-9 serial adapter, pushed as a PDA adapter for iMacs (mostly sold in Macintosh catalogs, comes in a translucent white/green dongle). Fairly simple device. Firmware is homebrew. This driver also works for the Xircom/Entrega single port serial adapter.

basic input/output (tested with ‘cu’)

blocking write when serial line can’t keep up

changing baud rates (up to 115200)

getting/setting modem control pins (TIOCM)

sending break (although duration looks suspect)

device strings (as logged by kernel) have trailing binary garbage

device ID isn’t right, might collide with other Keyspan products

changing baud rates ought to flush tx/rx to avoid mangled half characters

parity, 7 vs 8 bits per char, 1 or 2 stop bits

HW flow control

not all of the standard USB descriptors are handled: Get_Status, Set_Feature, O_NONBLOCK, select()

For any questions or problems with this driver, please contact Brian Warner at warner @ lothar . com

Keyspan USA-series Serial AdaptersВ¶

Single, Dual and Quad port adapters — driver uses Keyspan supplied firmware and is being developed with their support.

The USA-18X, USA-28X, USA-19, USA-19W and USA-49W are supported and have been pretty thoroughly tested at various baud rates with 8-N-1 character settings. Other character lengths and parity setups are presently untested.

The USA-28 isn’t yet supported though doing so should be pretty straightforward. Contact the maintainer if you require this functionality.

More information is available at:

For any questions or problems with this driver, please contact Hugh Blemings at hugh @ misc . nu

FTDI Single Port Serial DriverВ¶

This is a single port DB-25 serial adapter.

Devices supported include:

TripNav TN-200 USB GPS

Navis Engineering Bureau CH-4711 USB GPS

For any questions or problems with this driver, please contact Bill Ryder.

ZyXEL omni.net lcd plus ISDN TAВ¶

This is an ISDN TA. Please report both successes and troubles to azummo @ towertech . it

Читайте также:  Attempt to crash windows

Cypress M8 CY4601 Family Serial DriverВ¶

This driver was in most part developed by Neil “koyama” Whelchel. It has been improved since that previous form to support dynamic serial line settings and improved line handling. The driver is for the most part stable and has been tested on an smp machine. (dual p2)

Chipsets supported under CY4601 family:

CY7C63723, CY7C63742, CY7C63743, CY7C64013

DeLorme’s USB Earthmate GPS (SiRF Star II lp arch)

Cypress HID->COM RS232 adapter

Cypress Semiconductor claims no affiliation with the hid->com device.

Most devices using chipsets under the CY4601 family should work with the driver. As long as they stay true to the CY4601 usbserial specification.

The Earthmate starts out at 4800 8N1 by default… the driver will upon start init to this setting. usbserial core provides the rest of the termios settings, along with some custom termios so that the output is in proper format and parsable.

The device can be put into sirf mode by issuing NMEA command:

As far as I can tell it supports pretty much every sirf command as documented online available with firmware 2.31, with some unknown message ids.

The hid->com adapter can run at a maximum baud of 115200bps. Please note that the device has trouble or is incapable of raising line voltage properly. It will be fine with null modem links, as long as you do not try to link two together without hacking the adapter to set the line high.

The driver is smp safe. Performance with the driver is rather low when using it for transferring files. This is being worked on, but I would be willing to accept patches. An urb queue or packet buffer would likely fit the bill here.

If you have any questions, problems, patches, feature requests, etc. you can contact me here via email:

(your problems/patches can alternately be submitted to usb-devel)

Источник

How do I connect to a serial device using a USB-to-Serial Convertor in Linux ?

For years, I had ran my Prolific USB to Serial cable from my Windows 32bit laptop without any issues.

Unfortunately, life when running Windows is never easy. After upgrading Windows 7 to 64bit I tried to install the drivers from CNET downloads.
This was a HUGE mistake. Even though the CNET downloader told me it was downloading at 28K in the background it was installing 8 (yes 8 plugins and other useless crap) onto all my browsers. Finally after cleaning up my machine and finding the drivers from a source not intent in filling my machine full of rubbish I discovered that the drivers fail to work correctly for Windows 7 64bit based platforms. Back to square 1.

After wasting 2 hours trying to get this working in Windows I powered up Linux Mint. Loaded the necessary kernel module and tested. Success ! All in all 20 minutes taken. So high five to Linux and I certainly wont be using CNET downloads again !

So what are the steps ?

Steps

Connect the cable via USB.

Then load the kernel module via the following command. Note : To ensure this survives a reboot append this line to ‘/etc/modules’

You should now see that it is now showing as attached by running ‘dmesg’.

Finally, you will need to connect through to serial device /dev/ttyUSB0. This easiest way to do this is via ‘minicom’. Once you have issued the following command it will present you with a menu. Change (within the ‘serial port setup’ option) the service device to /dev/ttyUSB0 and any other settings i.e baud rate etc. Then select the exit option and you be connected to your serial device.

Источник

How to configure USB serial adapters in Linux

The serial USB driver in Linux contains many product IDs for Sealevel devices. However, the newest devices may not be currently included in the driver. This guide consists of example USB device installation instructions using either driver load time parameters or modification of the device driver to natively support the device. There are often subtle differences in Linux distributions. Any distribution specific conflicts should be resolved by consulting the distribution’s documentation.

Option 1: Serial USB Installation Instructions (No Recompile Necessary)

  • Commands preceded by ‘$’ can be issued by user-level privileges.
  • Commands preceded by ‘#’ require root-level privileges.
  • This method will ONLY work with single and dual port devices. Any device with more than two ports requires a driver modification and recompile (see Option 2 below).

1) Plug in the Sealevel USB device(s).

2) Open a terminal window and attain root privileges. This varies by distribution, but the most common method is to use the su command as demonstrated below.

3) Ensure that the device has been detected by the USB subsystem. This can be accomplished by using the lsusb command as demonstrated below. The -s 0c52 parameter returns only information about Sealevel devices attached to the system’s USB subsystem. For this example, we will attach the device driver to the e402 Sealevel hardware, which is the USB to RS-485 bridge used in Sealevel SeaI/O U-series data acquisition modules.

# lsusb -s 0c52
Bus 002 Device 011: ID 0c52:e402 Sealevel Systems, Inc.
Bus 002 Device 010: ID 0c52:2101 Sealevel Systems, Inc.

4) The kernel driver module for all FTDI based USB serial devices is sometimes configured for automatic load at boot time. Depending on distribution, it may be necessary to unload the driver if it is already loaded. This can be achieved by issuing the following command. This command can be issued without detriment when the driver is not loaded.

Читайте также:  Рукописный ввод для windows 10 как отключить

# modprobe -r ftdi_sio

5) The FTDI serial USB driver in Linux contains many product IDs for Sealevel devices. However, the newest devices may not be currently included in the driver. The driver allows a single vendor and product pair to be passed at module load time. Using these parameters, it is unnecessary to recompile the driver. To inform the FTDI driver of the Sealevel device’s identification information, issue the following command.

# modprobe ftdi_sio vendor=0x0C52 product=0xE402

6) The driver should now have identified the Sealevel device and is ready for communications. It may now be necessary to create the character special file used to interface with the device. Most modern distributions include a method of automatically creating these files in the /dev file system when they are identified by a device driver. The character special files typically use the ttyUSB# nomenclature. Verify their creation by issuing the following command.

# ls -al /dev/ttyUSB*
crw-rw—-1 root uucp 188, 0 2008-05-08 10:59 /dev/ttyUSB0
crw-rw—-1 root uucp 188, 1 2008-05-08 10:59 /dev/ttyUSB1

7) If the character special files have not been created automatically, or more than one appears, it is necessary to identify the driver major and device minor numbers. The driver major can be determined by searching the devices file in the /proc file system as demonstrated in the following command. The major number is highlighted in yellow below.

# cat /proc/devices | grep -i “ttyUSB”
188 ttyUSB

The device minor number can also be determined by searching a file located in the /proc file system. The tty directory contains information about all of the currently loaded tty drivers. Executing the next command will display a list of all USB serial ports detected by any USB serial drivers currently loaded. If multiple USB serial ports are detected by the system, identify which corresponds to the Sealevel device by checking the vendor and product IDs.

# cat /proc/tty/driver/usbserial
usbserinfo:1.0 driver:2.0
0: module:ftdi_sio name:”FTDI USB Serial Device” vendor:0c52 product:2101 num_ports:1
port:1 path:usb-0000:00:1d.1-1.2
1 : module:ftdi_sio name:”FTDI USB Serial Device” vendor: 0c52 product: e402 num_ports:1
port:1 path:usb-0000:00:1d.1-1.4

8) If the character special file for the Sealevel device was not present in step 6, it may be created by executing the following command. It may also be beneficial to you to create any extra special files corresponding to other USB serial devices that are not currently present. Be sure to replace the major and minor numbers listed below with those listed by the commands demonstrated in step 7 as they may vary from system to system.

# mknod /dev/ttyUSB0 c 188 0
# mknod /dev/ttyUSB1 c 188 1

9) User applications may now interactive with Sealevel device through the character special file with major and minor numbers corresponding to those determined in step 7. To check the major and minor numbers that are associated with the character special files in /dev file system, use the ls command as demonstrated. The major/minor pair is highlighted in yellow for each file.

# ls -al /dev/ttyUSB*
crw-rw—-1 root uucp 188, 0 2008-05-08 10:59 /dev/ttyUSB0
crw-rw—-1 root uucp 188, 1 2008-05-08 10:59 /dev/ttyUSB1

10) Ensure that all users account which must access the Sealevel device may do so. There are many ways to configure the file permissions to accomplish this goal, depending on the system and requirements. Distribution documentation on the chmod and chown commands should be consulted. To simply allow full access to any USB serial device, use the following command.

# chmod 777 /dev/ttyUSB*

The Sealevel device can now be accessed through the character special file corresponding to the major/minor pair of the device. In the examples shown here, the file would be /dev/ttyUSB1.

Option 2: Serial USB Installation Instructions (Hardcoded Driver Support)

  • Commands preceded by ‘$’ can be issued by user-level privileges.
  • Commands preceded by ‘#’ require root-level privileges.
  • This is the ONLY way a device with more than 2 ports will work in Linux.
  • This method requires full Kernel source (see your distribution documentation for specific instructions to acquire and configure)

1) Open the ftdi_sio.h file for editing located in your kernel source directory.
( /drivers/usb/serial/ftdi_sio.h)

2) Search for SEALEVEL_VID. This will bring you to a list of #define‘s for Sealevel USB serial devices.

3) Add new entries for each Sealevel listing discovered with the lspci command as described in Step 3 of the previous section.


#define SEALEVEL_2803_8_PID 0x2883 // SeaLINK+8 2803
#define SEALEVEL_E402_PID 0x E402 //

4) Close and save the changes to the header file.

5) Next open the ftdi_sio.c file for editing. It is located in the same directory as the header file.

6) Search for SEALEVEL_VID. This will bring you to an array of vendor/product id structures.

7) Add new entries for each new #define added in Step 3.

8) Now recompile kernel driver modules. Consult your specific distribution documentation.

# cd
# make modules && make modules_install

9) Now reload the ftdi_sio kernel module.

# modprobe -r ftdi_sio
# modprobe ftdi_sio

10) Continue from Step 6 of Option 1 above.

Источник

Оцените статью