USB-RS485 Communications

Home Forums MultiConnect OCG USB-RS485 Communications

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2608
    Miguel Ángel
    Participant

    I connected a USB-RS485 converter in USB host:

    http://www.robot-electronics.co.uk/htm/usb_rs485_tech.htm

    My application opens a connection on port /dev/ttyGS0 but not communicating properly. The USB converter used the chip FTDI FT232R.

    Can be a driver issue? How do I change?

    #3300
    Nathan Tidd
    Participant

    Miguel, did the drivers appear to install ok on the device?

    #3301
    Jesse Gilles
    Blocked

    The /dev/ttyGS0 is the port for the gadget serial driver, which is operating on the USB device port. The ftdi driver will give you a new tty device to use. Run ‘dmesg’ after you attach the device to see the tty assigned to it.

    #3302
    Miguel Ángel
    Participant

    The ‘dmesg’ output is:

    Machine: Atmel AT91SAM9G20-EK

    Memory policy: ECC disabled, Data cache writeback

    On node 0 totalpages: 16384

    free_area_init_node: node 0, pgdat c0394af4, node_mem_map c03b6000

    Normal zone: 128 pages used for memmap

    Normal zone: 0 pages reserved

    Normal zone: 16256 pages, LIFO batch:3

    Clocks: CPU 396 MHz, master 132 MHz, main 18.432 MHz

    sam9g20: i2c available

    Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256

    Kernel command line: mem=64M console=ttyS0,115200 root=/dev/mtdblock8 ro rootfstype=jffs2

    PID hash table entries: 256 (order: -2, 1024 bytes)

    Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

    Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

    Memory: 64MB = 64MB total

    Memory: 61108KB available (3292K code, 241K data, 132K init, 0K highmem)

    Hierarchical RCU implementation.

    NR_IRQS:192

    AT91: 96 gpio irqs in 3 banks

    Console: colour dummy device 80×30

    console [ttyS0] enabled

    Calibrating delay loop… 197.83 BogoMIPS (lpj=989184)

    Mount-cache hash table entries: 512

    CPU: Testing write buffer coherency: ok

    NET: Registered protocol family 16

    AT91: Power Management (with slow clock mode)

    AT91: Starting after power-restored wakeup

    tcb_clksrc: tc0 at 16.012 MHz

    bio: create slab <bio-0> at 0

    SCSI subsystem initialized

    usbcore: registered new interface driver usbfs

    usbcore: registered new interface driver hub

    usbcore: registered new device driver usb

    Switching to clocksource tcb_clksrc

    NET: Registered protocol family 2

    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

    TCP established hash table entries: 2048 (order: 2, 16384 bytes)

    TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

    TCP: Hash tables configured (established 2048 bind 2048)

    TCP reno registered

    NET: Registered protocol family 1

    RPC: Registered udp transport module.

    RPC: Registered tcp transport module.

    RPC: Registered tcp NFSv4.1 backchannel transport module.

    JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.

    ROMFS MTD (C) 2007 Red Hat, Inc.

    msgmni has been set to 119

    io scheduler noop registered

    io scheduler anticipatory registered (default)

    atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL

    atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL

    atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL

    atmel_usart.3: ttyS3 at MMIO 0xfffd0000 (irq = 23) is a ATMEL_SERIAL

    brd: module loaded

    loop: module loaded

    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)

    Scanning device for bad blocks

    Creating 9 MTD partitions on “atmel_nand”:

    0x000000000000-0x000010000000 : “MTNCG-NANDFlash”

    0x000000000000-0x000000020000 : “AT91Bootstrap”

    0x000000020000-0x000000060000 : “UBoot”

    0x000000060000-0x000000080000 : “UBoot Config”

    0x000000080000-0x0000000a0000 : “UBoot Redundant Config”

    0x0000000a0000-0x000000800000 : “uImage”

    0x000000800000-0x000001000000 : “Config”

    0x000001000000-0x000001800000 : “Oem Config”

    0x000001800000-0x000010000000 : “Rootfs”

    atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)

    atmel_spi atmel_spi.1: Atmel SPI Controller at 0xfffcc000 (irq 13)

    PPP generic driver version 2.4.2

    PPP Deflate Compression module registered

    PPP BSD Compression module registered

    MACB_mii_bus: probed

    eth0: Atmel MACB at 0xfffc4000 irq 21 (00:08:00:87:2d:38)

    eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)

    usbmon: debugfs is not available

    ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver

    at91_ohci at91_ohci: AT91 OHCI

    at91_ohci at91_ohci: new USB bus registered, assigned bus number 1

    at91_ohci at91_ohci: irq 20, io mem 0x00500000

    usb usb1: New USB device found, idVendor=1d6b, idProduct=0001

    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

    usb usb1: Product: AT91 OHCI

    usb usb1: Manufacturer: Linux 2.6.32.3 ohci_hcd

    usb usb1: SerialNumber: at91

    usb usb1: configuration #1 chosen from 1 choice

    hub 1-0:1.0: USB hub found

    hub 1-0:1.0: 2 ports detected

    usbcore: registered new interface driver usbserial

    USB Serial support registered for generic

    usbcore: registered new interface driver usbserial_generic

    usbserial: USB Serial Driver core

    udc: at91_udc version 3 May 2006

    mice: PS/2 mouse device common for all mice

    rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0

    IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs

    i2c /dev entries driver

    at24 0-0056: 512 byte 24c04 EEPROM (writable)

    sam9g20: read 512 bytes from id eeprom

    i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)

    AT91SAM9 Watchdog: sorry, watchdog is disabled

    at91_wdt: probe of at91_wdt failed with error -5

    Registered led device: status

    Netfilter messages via NETLINK v0.30.

    nf_conntrack version 0.5.0 (955 buckets, 3820 max)

    CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use

    nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or

    sysctl net.netfilter.nf_conntrack_acct=1 to enable it.

    IPv4 over IPv4 tunneling driver

    GRE over IPv4 tunneling driver

    ip_tables: (C) 2000-2006 Netfilter Core Team

    TCP cubic registered

    NET: Registered protocol family 17

    rtc-at91sam9 at91_rtt.0: setting system clock to 2011-08-09 08:28:58 UTC (1312878538)

    usb 1-1: new full speed USB device using at91_ohci and address 2

    usb 1-1: New USB device found, idVendor=1199, idProduct=683c

    usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0

    usb 1-1: Product: MC8790V

    usb 1-1: Manufacturer: Sierra Wireless, Incorporated

    usb 1-1: configuration #1 chosen from 1 choice

    usb 1-2: new full speed USB device using at91_ohci and address 3

    usb 1-2: New USB device found, idVendor=0403, idProduct=6001

    usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

    usb 1-2: Product: FT232R USB UART

    usb 1-2: Manufacturer: FTDI

    usb 1-2: SerialNumber: A7007KAI

    usb 1-2: configuration #1 chosen from 1 choice

    JFFS2 notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

    VFS: Mounted root (jffs2 filesystem) readonly on device 31:8.

    Freeing init memory: 132K

    mmc0: new SD card at address 8fe4

    mmcblk0: mmc0:8fe4 SD02G 1.84 GiB

    mmcblk0: p1

    USB Serial support registered for Sierra USB modem

    sierra 1-1:1.0: Sierra USB modem converter detected

    usb 1-1: APM supported, enabling autosuspend.

    usb 1-1: Sierra USB modem converter now attached to ttyUSB0

    sierra 1-1:1.1: Sierra USB modem converter detected

    usb 1-1: APM supported, enabling autosuspend.

    usb 1-1: Sierra USB modem converter now attached to ttyUSB1

    sierra 1-1:1.2: Sierra USB modem converter detected

    usb 1-1: APM supported, enabling autosuspend.

    usb 1-1: Sierra USB modem converter now attached to ttyUSB2

    sierra 1-1:1.3: Sierra USB modem converter detected

    usb 1-1: APM supported, enabling autosuspend.

    usb 1-1: Sierra USB modem converter now attached to ttyUSB3

    sierra 1-1:1.4: Sierra USB modem converter detected

    usb 1-1: APM supported, enabling autosuspend.

    usb 1-1: Sierra USB modem converter now attached to ttyUSB4

    USB Serial support registered for FTDI USB Serial Device

    sierra 1-1:1.5: Sierra USB modem converter detected

    usb 1-1: APM supported, enabling autosuspend.

    ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected

    usb 1-2: Detected FT232RL

    usb 1-2: Number of endpoints 2

    usb 1-1: Sierra USB modem converter now attached to ttyUSB5

    sierra 1-1:1.6: Sierra USB modem converter detected

    usb 1-1: APM supported, enabling autosuspend.

    usb 1-2: Endpoint 1 MaxPacketSize 64

    usb 1-2: Endpoint 2 MaxPacketSize 64

    usb 1-2: Setting MaxPacketSize 64

    usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB6

    usbcore: registered new interface driver ftdi_sio

    usb 1-1: Sierra USB modem converter now attached to ttyUSB7

    usbcore: registered new interface driver sierra

    ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver

    sierra: v.1.7.30:USB Driver for Sierra Wireless USB modems

    JFFS2 notice: (1382) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.

    g_serial gadget: Gadget Serial v2.4

    g_serial gadget: g_serial ready

    What is the port? I can set the port for the future?

    #3303
    Miguel Ángel
    Participant

    Finally I know find the port. Now every time you reboot the machine the port is different. Is there any way to fix the port?

    #3304
    Jesse Gilles
    Blocked

    You can fix the port name by writing udev rules that match the device and create a symlink with a specific name.

    A google search yielded this as an example:

    http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/

    #6091
    Jeeva K
    Participant

    I need to install FTDI driver on OCG-device to use USB host as a another tty serial port. Can you help me with some more details?

    #6093
    Jesse Gilles
    Blocked

    Jeeva, please start a new topic for your problem and provide more details about your device and issue. The OCG already includes a basic FTDI USB-serial driver, but perhaps it doesn’t support your device.

    Jesse

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.