modprobe usbserial

This forum is for all other ARMv5 devices

Re: modprobe usbserial

Postby Arktronic » Fri Mar 23, 2012 5:45 pm

Yeah, what WarheadsSE said. Also, since you guys apparently missed telzey's post earlier in the thread, here's info on compiling your own kernel with more modern patches: viewtopic.php?f=29&t=2472

It's totally unsupported, but if you really want to do it, there's the info you need.
Arktronic
 
Posts: 22
Joined: Fri Feb 03, 2012 6:16 am

Re: modprobe usbserial

Postby zigomatic » Mon Mar 26, 2012 1:03 pm

I take pl2303.c and .h on 2.6.31.6 and on 3.2.13

There are modification on the code but difficult to know the result without compiling.

And from here, you can have a diff over 3 version of linux:
http://os1a.cs.columbia.edu/lxr/source/drivers/usb/serial/pl2303.c?a=arm
zigomatic
 
Posts: 28
Joined: Sun Feb 19, 2012 4:37 pm

Re: modprobe usbserial

Postby bernardbelgique » Tue Aug 28, 2012 6:28 am

Hello, I have a pogopug v2 and a USB <> RS 485 chipset based on pl2303x (I think)
When I run the following command I get the same result as you (I cut some part of the result) :?
Did you manage to get it work finally?

Thanks
Regards,
Bernard

aurora -b -a2 -c -T -Y3 -d0 -e /dev/ttyUSB0

szttyDevice: /dev/ttyUSB0
yDelay: 1
yTimeout 0 mS
yMaxRunTime ~
devLCKfile: </var/lock/LCK..ttyUSB0>
devLCKfileNew: </var/lock/LCK..ttyUSB0.2243>
Got Params

RunTime 20120821-18:16:42 v1.8.3
Endian : Little
PID : 2243

.....

received 8 characters

Elapsed time since last comm 0 us
Attempt 3
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=1 (00) waited/max 17802/1000000 uS
Read char #2 RC=1 (00) waited/max 19822/1000000 uS
Read char #3 RC=1 (00) waited/max 13/1000000 uS
Read char #4 RC=1 (00) waited/max 19663/1000000 uS
Read char #5 RC=1 (00) waited/max 19825/1000000 uS
Read char #6 RC=1 (f0) waited/max 13/1000000 uS
Read char #7 RC=1 (00) waited/max 19668/1000000 uS
Read char #8 RC=1 (00) waited/max 13/1000000 uS
answer: 00 00 00 00 00 f0 00 00
received 8 characters
CRC receive OK 0000
Transmission State Check: 0
Model ID "

Elapsed time since last comm 0 us
Attempt 3
Clearing read buffer Success!
szSerBufferSave OK! 02 3b 04 00 00 00 00 00 00 00
command: 02 3b 04 00 00 00 00 00 78 38
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=1 (00) waited/max 17520/1000000 uS
Read char #2 RC=1 (00) waited/max 19827/1000000 uS
Read char #3 RC=1 (fe) waited/max 12/1000000 uS
Read char #4 RC=1 (00) waited/max 19666/1000000 uS
Read char #5 RC=1 (00) waited/max 19830/1000000 uS
Read char #6 RC=1 (00) waited/max 12/1000000 uS
Read char #7 RC=1 (ff) waited/max 13/1000000 uS
Read char #8 RC=1 (00) waited/max 19523/1000000 uS
answer: 00 00 fe 00 00 00 ff 00
received 8 characters
20120821-18:16:42: CRC receive error (3 attempts made) 2ee6 00 ff

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.2243>
Clearing Serial Port Lock (2243)... done.

20120821-18:16:43: aurora: ERROR: Received bad return code (-1 59 4)

Complete 20120821-18:16:43
bernardbelgique
 
Posts: 2
Joined: Tue Aug 28, 2012 6:22 am

Re: modprobe usbserial

Postby haiku » Thu Nov 15, 2012 7:32 am

Hi,
I've been trying to install a FTDI serial converter (as well as a pl2303) on a friend's Pogo Pro and i sadely notice the same issue than you :?
The oxnas board use an "old" kernel 2.6.31.6, i have installed the update from Warheads which is suppose to have recompiled mods.
Now, i have all detail from my converter with an lsusb -v -s1:3 but it still dosen't come up on dmesg and an lsmod don't show usbserial and ftdi_sio (or pl2303). :cry:
I tried to force the mod with modprobe but still..
I don't know where i could look at now ? I am not at ease to recompil the whole thing and i only have a remote access to that device..
Any help is appreciated !
Bye
haiku
 
Posts: 96
Joined: Tue May 31, 2011 6:34 am

Re: modprobe usbserial

Postby haiku » Sun Nov 18, 2012 7:57 am

Hi,
Meanwhile, i've find some solutions :
- Use an old chipset FT232BM ~10€ (haven't test that though)
- Use a RS485/232 TCP/IP converter with socat ~18€
- Use a ARMv5 device ;)
haiku
 
Posts: 96
Joined: Tue May 31, 2011 6:34 am

Re: modprobe usbserial

Postby BioTopper » Thu Jan 10, 2013 12:18 pm

Hi Haiku,

I'm using a similar setup:

Aurora PVI 3.0 Inverter ==> ATC1000 ( RS485 -> Ethernet (TCP or UDP) ) ==> Raspberrypi (ARM) ==> remserial ==> aurora command line or Aurora Monitor or 123solar. I get it to work using TCP for aurora command-line and solar123, and TCP or UDP for Aurora Monitor. Using aurora command-line it is flaky, codes like [ aurora: ERROR: Received bad return code (-1 78 1)] although including the [-Y 8 -w 25 ] as aurora options. I've tried lots of different options with remserial and nc (netcat), but no real success on a stable connection. So, I would love to see what commands you used with socat to get this working and stable. If this works stable om my end I want to publish a step-by-step process so other people can leverage on this.

Note: Baud rate etc is OK as I use this also for connection to a windows machine without any problem.

Thnx in advance,
BioTopper
BioTopper
 
Posts: 2
Joined: Thu Jan 10, 2013 11:58 am

Re: modprobe usbserial

Postby haiku » Thu Jan 10, 2013 3:25 pm

Sorry i can't help you much. It wasn't my system and my friend switched for a pogo mobile (v5).
I know some people use socat with aurora on the 123solar group, you may ask the question there..
cheers
haiku
 
Posts: 96
Joined: Tue May 31, 2011 6:34 am

Re: modprobe usbserial

Postby BioTopper » Thu Jan 10, 2013 7:41 pm

OK thanks for your reply.

Update: I managed to get socat working:

downloaded socat from http://www.dest-unreach.org/socat/
Installed socat (ignored some of the error messages and they did not apply to my needs)
As root:

socat -d PTY,link=/dev/[WhatEverName] tcp:123.123.123.123:XX &
(You need to change 123 to your host-name's IP address and the XX = the port address of the ATC1000)

Then you can run aurora with:

aurora -a 2 -Y 8 -w 25 -M 5 -e /dev/[WhatEverName]

From the aurora documentation:

-Y 8 : Retry failed communications with inverter up to <num> times (1-100)
-w 25 : Seconds to wait to lock serial port. (1-30)
-M 5 : Maximum amount of time in seconds that aurora will run trying tot get data from the inverter

Still, after some testing (and I'll ask the 123solar forum as well) a lock set on the serial port which stopped 123solar from continuing. Due to the fact that 123solar is repeatedly starting the aurora command this can happen randomly (I think I've seen people complaining about this and thinking that 123solar ran out of resources). So, I'm thinking to run the aurora program separately and just let 123solar read the output file (via shell-exec). At this moment 123solar uses memory to store values (calculated values as well) and that is prone to error, as I found today. I had to restart 123solar some time due to the serial lock and at the end of the day my generated kWh was much lower than the real kWh (as shown on the display of the inverter and from a run of Aurora Monitor on the raspberrypi). I'm new to PHP, so I hope I manage to implement this change. No worries Jean Marc, this version will only be for personal use, but if people are interested to use it as well, I'll touch base with you and sync up on the changes. Perhaps we can make an aurora version of the 123solar program.

Regards,
BioTopper
BioTopper
 
Posts: 2
Joined: Thu Jan 10, 2013 11:58 am

Previous

Return to Community Supported

Who is online

Users browsing this forum: No registered users and 2 guests