Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2871 closed defect (fixed)

Oscam #7752 stops after starting

Reported by: JoSquillo Owned by:
Priority: critical Component: Reader
Severity: high Keywords:
Cc: Sensitive: no

Description

Revision

7752 mipsel

Issue Description

After starting the oscam stops. I have only a Sky V13 in an internal reader.

When the issue occurs

Directly by starting

Attachments (15)

oscm.log (4.7 KB ) - added by JoSquillo 11 years ago.
-d 255 log
oscm_d255.log (4.1 KB ) - added by JoSquillo 11 years ago.
log -d 255 with r7755
oscm_d2.log (3.6 KB ) - added by JoSquillo 11 years ago.
log -d2 with r7755
oscm_r7757_d255.log (3.9 KB ) - added by JoSquillo 11 years ago.
log -d 255 for r7757
oscm_r7757_d2.log (3.0 KB ) - added by JoSquillo 11 years ago.
log -d2 for r7757
oscm_r7757_d65535.log (3.9 KB ) - added by JoSquillo 11 years ago.
log -d 65535 for r7757
oscm_r7757_d65535 (2).log (3.9 KB ) - added by JoSquillo 11 years ago.
oscam_7759_d2_ET9200.log (12.0 KB ) - added by Mandos 11 years ago.
-d2 log of r7759, ET9200 internal reader, ATR set in oscam.server
oscam.log (10.0 KB ) - added by Tollwut 11 years ago.
oscm_r7758_d2_higherclock.log (3.0 KB ) - added by JoSquillo 11 years ago.
log r7758 -d2 with higher clock.
oscm_r7758_d65535_higherclock.log (3.8 KB ) - added by JoSquillo 11 years ago.
log r7758 -d65535 with higher clock.
oscm_r7758_d2_ATR_normalclock.log (3.6 KB ) - added by JoSquillo 11 years ago.
log r7758 -d2 with normal clock and ATR Field in Config
oscm_r7758_d65535_ATR_normalclock.log (4.8 KB ) - added by JoSquillo 11 years ago.
log r7758 -d65535 with normal clock and ATR Field in Config
oscm_r7758_d2_ATR_tryfix2.log (10.7 KB ) - added by JoSquillo 11 years ago.
log r7758 ATR in config -d2 with tryfix2
oscm_r7758_d2_tryfix2.log (3.0 KB ) - added by JoSquillo 11 years ago.
log r7758 -d2 with tryfix2 w/o ATR in config

Download all attachments as: .zip

Change History (67)

by JoSquillo, 11 years ago

Attachment: oscm.log added

-d 255 log

comment:1 by ni hao, 11 years ago

7752 mips running fine here at several different receivers. you can read in your log which errors there are. Several files are missing. Most important is the services file which can not be found.
Please repair critical errors first. This is not an oscam error !

Last edited 11 years ago by ni hao (previous) (diff)

comment:2 by JoSquillo, 11 years ago

I don't think that the missing files are the problem. Oscam stops while reading the ATR. This is naturally my opinion.

comment:3 by aleks20, 11 years ago

PCSC reader now work great.
but this look like that fix for pcsc reader couse problem with mouse reader. Maybe mouse reader must extra check ATR.

comment:4 by gf, 11 years ago

Which was the last version that worked? Is r7750 working?

comment:5 by JoSquillo, 11 years ago

What I tested is that 7750 isn't working but 7742 yes. I cannot say something about the versions between them.

Last edited 11 years ago by JoSquillo (previous) (diff)

comment:6 by JoSquillo, 11 years ago

I tested now also the 7744 that isn't working. I hope it is enough information for you.

comment:7 by irishmist, 11 years ago

Resolution: fixed
Status: newclosed

both mouse & pcsc. working on multiple cards seca, viaccess & NDS. Do NOT alter. Oscam does not stop

comment:8 by gf, 11 years ago

Resolution: fixed
Status: closedreopened

@irishmist: How do you decide that the issue reported by JoSquillo is fixed? Please don't close tickets like that.

comment:9 by gf, 11 years ago

@JoSquillo: So r7742 is working. Can you try r7745 (it shouldn't work).

  r7752 pcsc: Fix oscam crash on PCSC reader init.
  r7751 Fix for nonworking PCSC readers! Tnx to Sulge and The_Raven for their good debugging and test work
  r7750 csctapi: mp35 reader init fixes
  r7749 Revert r7747, it is wrong to initialize hCard that way.
  r7748 pcsc: Add debug message with card handle.
  r7747 pcsc: Init card context.
  r7746 pcsc: Fix stack overwrite.
* r7745 Small fix for ATR on the fly and ATR_InitFromArry: T14 protocol also doesnt use TCK byte. Tnx to Gorgone for reporting!
  r7744 csctapi: Fix couple of warnings seen on 32bit compile.
* r7743 ATR on the fly fully interpreted... hope you all learn as much from it as I did ;)

comment:10 by Tollwut, 11 years ago

I'm in with the same problem ;) I opened a new ticket. Sorry for that. Read this one to late. My log is attached. Last working version 7735.

comment:11 by JoSquillo, 11 years ago

@gf

I will try tomorrow to build the r7745 cause i didn't found one to test with. Sorry that I cannot give an earlier answer.

comment:12 by Tollwut, 11 years ago

@gf
I tested 7742 and it works but the builds #7753 and #7754 didn't. I'm working with DM8000, DMM Experimental OE2.0, 2 internal cards, 4 easymice, Oscam Build mipsel oe20.

comment:13 by gf, 11 years ago

@Tollwut: If you can test r7743 and r7745 that would help because these are the suspected commits.

comment:14 by Tollwut, 11 years ago

@gf:
r7743 stops after these log lines:
2012/10/19 08:49:47 771020E8 r skyde-v13 [internal] card detected
2012/10/19 08:49:47 77100750 r skyuk [internal] card detected
That's the sci1 card in my dm8000.
There is no r7745 for mipsel-tuxbox oe16 or oe20.

comment:15 by JoSquillo, 11 years ago

I built the r7745 and r7743 and i can confirm that it's not working for me. I built also the last r7754 and it's also not working, but this was pretty obvious. In my case the last running would be the r7742. I hope this could help a bit.

comment:16 by gf, 11 years ago

Thanks for testing it is what I suspected - ATR changes. theparasol is working on them in the moment.

comment:17 by Tollwut, 11 years ago

Thanks. We're waiting for it. ;)

comment:18 by JoSquillo, 11 years ago

I thank you for the huge work you do.

comment:20 by JoSquillo, 11 years ago

No it is not running. I become a malformed ATR.

by JoSquillo, 11 years ago

Attachment: oscm_d255.log added

log -d 255 with r7755

by JoSquillo, 11 years ago

Attachment: oscm_d2.log added

log -d2 with r7755

comment:21 by theparasol, 11 years ago

JoSquillo, what is the normal ATR of your card so I can compare it.
Second byte received is FF, inverse means 00, means no TA/TB/TC/TD: is just stupid.
What is your reader configged mhz/cardmhz?

comment:22 by JoSquillo, 11 years ago

It's a V13 Card.

ATR is 3F FF 11 25 03 10 80 41 B0 07 69 FF 4A 50 70 00 00 50 31 01 00 11

mhz = 357
cardmhz = 357

comment:23 by theparasol, 11 years ago

Ok that makes sense, seems to me inverse convention cards dont invert their atr...
But the good old ATR_InitFromArray does inverse them.
It might be the reader that is inversing the ATR already? Whats going on here...

Found it:

The stupid old code never ever inverses:

/* Check if ATR is from a inverse convention card */

if (atr_buffer[0] == 0x03) inverse convention is done on the fly in case ifd_sci.c based reader

{

for (pointer = 0; pointer < length; pointer++)

buffer[pointer] = ~(INVERT_BYTE (atr_buffer[pointer]));

}

Look at that stupid compare, its comparing against 0x03 instead of 0x3F !!!

This should be it then, will clean the code from inverse soon!

http://www.streamboard.tv/oscam/changeset/7757

Last edited 11 years ago by theparasol (previous) (diff)

comment:24 by JoSquillo, 11 years ago

Thanks. I don't know whether r7757 has to work or not, but it doesn't.

Last edited 11 years ago by JoSquillo (previous) (diff)

by JoSquillo, 11 years ago

Attachment: oscm_r7757_d255.log added

log -d 255 for r7757

comment:25 by theparasol, 11 years ago

-d255 is useless, always use -d2 so I can see what the ATR is doing ;)

comment:26 by JoSquillo, 11 years ago

Sorry for that. No ATR entries at all.

by JoSquillo, 11 years ago

Attachment: oscm_r7757_d2.log added

log -d2 for r7757

comment:27 by theparasol, 11 years ago

That cant be... restart your box (!) ... thinking your reader is in total panic mode ;)
Or make a -d 65535 log

comment:28 by JoSquillo, 11 years ago

65535 seems to be the same as 255. I restarted the box, but I think it couldn't be a panic attac. ;-)

by JoSquillo, 11 years ago

Attachment: oscm_r7757_d65535.log added

log -d 65535 for r7757

comment:29 by JoSquillo, 11 years ago

This is now the log after rebooting.

comment:30 by theparasol, 11 years ago

Your first readerpanic :) (Had it before while playing with the code....)

If I remember correctly you have a dreambox 8000?

If so, set reader mhz to 2700 and cardmhz to 500 and try again.

If you are tired of testing and reporting and want to operate your card, copy your ATR into reader config in the field ATR!

Think you not only need to reboot the box but to powercycle to fix your reader.

Last edited 11 years ago by theparasol (previous) (diff)

comment:31 by JoSquillo, 11 years ago

No i have a 7025+.

comment:32 by theparasol, 11 years ago

Then try reader mhz = 8300, cardmhz = 500
Its wise to powercycle the box, put power off wait 10 seconds and power up again.
7558 is already out, removed the inverse code completely.

by JoSquillo, 11 years ago

Attachment: oscm_r7757_d65535 (2).log added

comment:33 by JoSquillo, 11 years ago

I have to go out for this evening but I will test later or tomorrow. Thanks for your help.

It's not a problem to change the clock? I become suggested to use 357 for the V13.

I cannot find an ATR Field in the server config file.

Last edited 11 years ago by JoSquillo (previous) (diff)

comment:34 by JoSquillo, 11 years ago

I tested the with r7758 and also with different clock, but nothing to do. It would be nice if you can write to me about this ATR Field, cause i cannot find it. Maybe I'm too tired or the panic of my reader would become contagious ;-)

comment:35 by theparasol, 11 years ago

Set in oscam.server

[reader]
label=cardreader
protocol=internal
device=/dev/sci0
...
atr = 3FFFEF11F24F03F1FF80F40FB0F06F69FFEF4AF5FF70F0FF00F5FF
....
....
....

comment:36 by Tollwut, 11 years ago

I tried r7758 but there is still a lockdown after 1 second. Also tried with reader mhz 2700 and atr for internal V13 in my DM8000. Still no function. :(

comment:37 by theparasol, 11 years ago

Attach a -d2 log, otherwise I cant do anything but guessing. I'm not a lucky guesser I guess...

comment:38 by Tollwut, 11 years ago

I'll shortly do. I think I have the right atrs (copied out of the r7742 log without spaces of course). So the actual result is 1 out of 6. ORF Irdeto works (Easymouse) but Sky DE + UK (internal), MTV, SRG and KDG (all Easymouse) don't. I'll try some changes in mhz. My internal V13 doesn't work with 357 or 2700. The equal result with same digits for the 0963 in the second internal slot of the DM8000.

comment:39 by Mandos, 11 years ago

I am testing with an ET9200; r7742 works fine, r7743 terminates before even starting to show an ATR. The last lines are:

r v13_inkl._hd+ [internal] IFD: Activating card
  --- Skipped 1 duplicated log lines ---
r v13_inkl._hd+ [internal] IFD: Is card activated?
r v13_inkl._hd+ [internal] IFD: Reset internal cardreader!

Also I do not encounter a reader panic. I startet r7742 after r7743 had crashed, and it worked fine. r7759 crashes as well; I tried setting the correct ATR of my card in oscam.server. OSCAM does not crash, but the card still does not work. -d2 log attached. r7759 works fine with a smartreader, the next log lines would be card type and ROM version.

Last edited 11 years ago by Mandos (previous) (diff)

by Mandos, 11 years ago

Attachment: oscam_7759_d2_ET9200.log added

-d2 log of r7759, ET9200 internal reader, ATR set in oscam.server

comment:40 by Tollwut, 11 years ago

Here comes the log of r7759. Only the ORF Irdeto works fine. All readers are completed with an ATR Line.

Log is now attached. ;)

Last edited 11 years ago by Tollwut (previous) (diff)

comment:41 by JoSquillo, 11 years ago

I tested this morning with higher clock end it didn't run. After that I tested with normal 357 clock but with ATR Field in reader. In this case the screen remains black, but the oscam isn't stopping the process.

by Tollwut, 11 years ago

Attachment: oscam.log added

by JoSquillo, 11 years ago

log r7758 -d2 with higher clock.

by JoSquillo, 11 years ago

log r7758 -d65535 with higher clock.

by JoSquillo, 11 years ago

log r7758 -d2 with normal clock and ATR Field in Config

by JoSquillo, 11 years ago

log r7758 -d65535 with normal clock and ATR Field in Config

comment:42 by Tollwut, 11 years ago

Ok, I think I found it. Only the ATR of my ORF Card works. I tried it with r7742 and ATR. It's same problem like in r7758 or r7759. Error with V13, 0963 Sky UK, KDG G09, MTV and SRG v2.6. An ok for the ORF Irdeto. I worked with the ATR, which is shown in the Webif under Readers Info. So, what should I do now?

comment:43 by theparasol, 11 years ago

Nothing to do with atr parse on the fly, its in icc_async.

Try this tryfix patch: http://www.streamboard.tv/wbb2/thread.php?postid=429197#post429197

Make sure to use tryfix2, 3 is no good.

comment:44 by Tollwut, 11 years ago

Sorry, I don't know how to use the tryfix2. Could you give me a short hint how to handle this attach?

comment:45 by JoSquillo, 11 years ago

I will try.

@Tollwut

make a copy of the original icc_async.
Put the patchfile tryfix2.patch in the root of your oscam-svn
from commandline patch -p0 < tryfix2.patch

I hope I forgot nothing ;-)

comment:46 by Tollwut, 11 years ago

Thanks

comment:47 by JoSquillo, 11 years ago

Isn't working for me.

by JoSquillo, 11 years ago

log r7758 ATR in config -d2 with tryfix2

by JoSquillo, 11 years ago

Attachment: oscm_r7758_d2_tryfix2.log added

log r7758 -d2 with tryfix2 w/o ATR in config

comment:48 by system2_it, 11 years ago

hello,
I believe that the problem is in the form "ifd_sci.c", I tried to compile using the previous version of the same form (r7718) and it works correctly, without changing frequency and manually enter in the ATR config.

comment:49 by system2_it, 11 years ago

"theparasol" thanks for the correction, now with r7770 work properly with card 09CD

comment:50 by Tollwut, 11 years ago

Thanks theparasol! r7770 works fine. ;)

comment:51 by JoSquillo, 11 years ago

It's ok for me too. At the end we stumble over an if/endif. Really amazing thing. Thanks for your huge work.

comment:52 by JoSquillo, 11 years ago

Resolution: fixed
Status: reopenedclosed

fixed in r7770

Last edited 11 years ago by JoSquillo (previous) (diff)
Note: See TracTickets for help on using tickets.