Opened 10 years ago
Closed 10 years ago
#3025 closed defect (fixed)
Last version ( STAPI version ) cardreader not work.
Reported by: | ngc1927 | Owned by: | theparasol |
---|---|---|---|
Priority: | trivial | Component: | Reader |
Severity: | low | Keywords: | |
Cc: | Sensitive: | no |
Attachments (5)
Change History (32)
by , 10 years ago
Attachment: | 8032_error.log added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Priority: | major → trivial |
---|---|
Resolution: | → invalid |
Severity: | medium → low |
Status: | new → closed |
by , 10 years ago
Attachment: | 8039_error.log added |
---|
comment:3 by , 10 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Now attached 255 debug
@theparasol
I test last 8039 ..not work.
comment:5 by , 10 years ago
comment:6 by , 10 years ago
Try http://www.streamboard.tv/oscam/changeset/8043
Actually reverted the whole read all chars at once for sh4 only.
If I got it right your box will work again.
Perhaps a more experienced dev can rewrite the code so that it pulls all chars from reader of SH4. But perhaps these kind of boxes only deliver chars one by one?
comment:7 by , 10 years ago
What is somehow strange from the log is that the error exists when he just requests a chunk of size 1?
comment:8 by , 10 years ago
Yup, saw that too and couldnt find a solution, therefor the revert for SH4/STAPI :(
by , 10 years ago
Attachment: | 8043_error.log added |
---|
comment:10 by , 10 years ago
Double checked it again... only thing I found was a readed = 0
I missed to reimplement. If this not fixes it I'm out of options and somebody else better give a look at it.
comment:11 by , 10 years ago
I know the problem in the original commit I think:
while( (((tv_spent.tv_sec-tv.tv_sec)*1000000) + ((tv_spent.tv_usec-tv.tv_usec)/1000000L)) < (time_t)(timeout))
{
readed =read(reader->handle, &data[count], size-count);
gettimeofday(&tv_spent,0);
}
The break condition and the "count +=readed;" is missing here! That's why after the first successful receive, it tries to read further until timeout time is reached and at this point "read" probably returns 0 then resulting in the error!
comment:12 by , 10 years ago
If you can fix it, go ahead. BTW: I like it the way its now: splitted up in section SH4 and other devices. Much better readable code
comment:13 by , 10 years ago
You will switch the codeblocks on the _sh4_ Pragma, this affects all Sh4-Versions.Not only the Stapi-Readers!
Not all Sh4-Versions are using the Stapi-Interface.
comment:15 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Please test the attached patch first. If it works, it will yield better performance.
@kroki: Well, but you can compile without stapi even if you are on such a box...you mean we should check for internal reader additionally?
comment:16 by , 10 years ago
@Admin: That's right. If you use a Enigma2 or Neutrino-Image on these Boxes you don't use the Stapi-Interface. So with your Patch you always mention, that sh4 = stapi.
So the optimisations for the other readers didn't have any effect on sh4, if you use the pragma _sh4_. Better use WITH_STAPI.
comment:19 by , 10 years ago
I'll try to make it more restrictive in the evening...please don't commit yet.
by , 10 years ago
Attachment: | stapichunk.patch added |
---|
So here's the revised patch. The code path is only valid for WITH_STAPI and only for the internal readers => other serial readers on these plattforms should work with the regular code.
comment:23 by , 10 years ago
Sorry ..i see too late your request of test, ..yes in stapi work ok.
Thx @theparasol and @Admin
comment:24 by , 10 years ago
after r8069 my sh4 without stapi lags on reading on my internal reader. slow initialisation and reader timeouts with the internal reader because my times are over 5000ms. on 8068 everything works fine. everything is reported in this thread: http://www.streamboard.tv/wbb2/thread.php?threadid=36758&page=3
comment:25 by , 10 years ago
alborland found a fix:
http://www.streamboard.tv/wbb2/thread.php?postid=446190#post446190
can someone include this?
comment:26 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
attach complete (!) d255 log. Here card reader works, so discuss first in forum