OpenWrt Forum Archive

Topic: USB serial adapters on DIR-505L using 14.07rc3

The content of this topic has been archived on 12 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Has anyone actually successfully used a USB-serial adapter on a DIR-505L? Or for any platform really.

I've got 4 different USB serial adapters, some are RS232, some are RS485; one is ACM based and the others are PL2303 based. I've installed kmod-usb-serial, kmod-usb-acm, and kmod-usb-serial-pl2303. I can send characters to another computer, but can't receive any on the DIR reliably. I send characters with "echo 'a' > /dev/ttyUSB0" (or /dev/ttyACM0 for the ACM-based one), and try to receive using "cat /dev/ttyUSB0".

I'll execute the cat statement on the DIR and while it sits there, I'll send tons of characters using another computer. If I Ctrl-C out of cat and re-run the cat statement, I will receive some of the characters that were previously sent, like the first 60 or so. I've tried changing the serial port to raw, turning flow control on and off, etc. using stty (coreutils-stty) but to no avail.

I tried to play dumb and opened the port using Python using default settings (i.e. a=serial.Serial('/dev/ttyUSB0',9600)) but more of the same, executing a.read() just hangs forever.

I know that data is going through because the adapters have LEDs on them, and both adapters will flash when I send characters.

Any ideas here?

Figured this out, I was using the adapter with a Belkin passive USB hub, as soon as I hooked in the adapter directly (bypassed the hub), it worked perfectly. Guess I'll need a different USB hub.

root@BrutusII:~# lsusb -v -s 1:5

Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x05e3 Genesys Logic, Inc.
  idProduct          0x0608 USB-2.0 4-Port HUB
  bcdDevice           32.98
  iManufacturer           0
  iProduct                1 USB2.0 Hub
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             4
  wHubCharacteristic 0x00e0
    Ganged power switching
    Ganged overcurrent protection
    TT think time 32 FS bits
    Port indicators
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent    100 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0100 power
   Port 3: 0000.0103 power enable connect
   Port 4: 0000.0503 highspeed power enable connect
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

(Last edited by Epy on 23 Aug 2014, 00:26)

Hi,



Sorry to highjack this thread but I am having similar issue with a 3G modem. When I boot up openwrt with modem connected I get:
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 001 Device 004: ID 19d2:1514 ZTE WCDMA Technologies MSM

If I boot without the 3g modem inserted and after boot I insert it i get:
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 001 Device 005: ID 19d2:1515 ZTE WCDMA Technologies MSM

I am using an USB hub, but I need to use it, as openwrt is installed on an USB stick inserted in the hub. So I need two USB ports.
The device I am using for this is a TP-LINK MR3040 which only has 1M of installing packages on it. I know a solution would be to put a microsd card in the modem, but I would like to avoid that, in order for me to be able to use the router with more than one 3g modem.

Is there any way I would be able to fix this issue, so that the 3g modem has the correct ID's from the get go?

I can post more info if necessary.
Cheers!

(Last edited by mboeru on 1 Sep 2014, 10:59)

The discussion might have continued from here.