Hi,
I have installed OpenWrt on a TL-WR703n with the intention of using aurora to monitor my solar panel output. The USB to RS485 connector I am using uses the pl2303 chipset. I have installed kmod-usb-serial-pl2303 and can see the adaptor yet it does not seem to communicate correctly. If I connect my laptop to the device I can communicate with my inverter so I can eliminate the USB to RS458 device or my wiring as an issue.
If I run aurora in verbose mode it appears to be talking to the USB device happily, but failing to read any data back.
root@OpenWrt:~/aroura_files# ./aurora -v -a2 -e /dev/ttyUSB0
20130605-23:05:01: aurora: No response after 1 attempts
20130605-23:05:02: aurora: ERROR: Received bad return code (-1 0)
root@OpenWrt:~/aroura_files# ./aurora -verbose -a2 -e /dev/ttyUSB0
szttyDevice: /dev/ttyUSB0
yDelay: 1
yTimeout 0 mS
yMaxRunTime ~
devLCKfile: </var/lock/LCK..ttyUSB0>
devLCKfileNew: </var/lock/LCK..ttyUSB0.1670>
Got Params
RunTime 20130605-23:05:12 v1.8.3
Endian : Big
PID : 1670
Attempting to get lock on Serial Port /dev/ttyUSB0...
Checking for lock
Checking process 1670 for lock
rPID: 1670 SubStrPos: aurora command: ./aurora = me
Appears we got the lock.
Opening Serial Port /dev/ttyUSB0... Serial Port /dev/ttyUSB0 successfully opened.
Configuring serial device... Flushing unread data first... Success!
Flushing serial device buffer... Success!
Comm Check: Let's see if the Aurora is listening...
Elapsed time since last comm 0 us
Attempt 1
Clearing read buffer Success!
szSerBufferSave OK! 02 3a 00 00 00 00 00 00 00 00
command: 02 3a 00 00 00 00 00 00 01 b7
Flushing serial device buffer... Success!
Sending command... sent 10 characters
Draining serial device buffer... Success!
Cleared data buffer: 00 00 00 00 00 00 00 00 00 00
Read char #1 RC=0 (00) waited/max 95914/1000000 uS
answer: Got -1 characters
Comm Check: Failure, aborting...
Restoring Serial Port settings /dev/ttyUSB0... Success!
Flushing serial device buffer... Success!
Closing Serial Port /dev/ttyUSB0... Success!
devLCKfile: </var/lock/LCK..ttyUSB0>
devLCKfileNew: </var/lock/LCK..ttyUSB0.1670>
Clearing Serial Port Lock (1670)... done.
20130605-23:05:13: aurora: ERROR: Received bad return code (-1 0)
Complete 20130605-23:05:13
root@OpenWrt:~/aroura_files#
root@OpenWrt:~# uname -a
Linux OpenWrt 3.3.8 #1 Sat Mar 23 16:49:30 UTC 2013 mips GNU/Linux
root@OpenWrt:~/aroura_files# lsusb -v -s2
Bus 001 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x067b Prolific Technology, Inc.
idProduct 0x2303 PL2303 Serial Port
bcdDevice 3.00
iManufacturer 1 Prolific Technology Inc.
iProduct 2 USB-Serial Controller
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 39
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
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 0x000a 1x 10 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
root@OpenWrt:~/aroura_files#
I believe "bMaxPacketSize0 64" indicates the chip-set is the 2303X variant. Is the 2303X varient supported, or does anyone have any suggestions as to what the issue may be ?
Thanks in advance.