Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#2994 closed enhancement (fixed)

Add DVBAPI-support for Matrix Cam Air (MCA)

Reported by: dirtyharry123 Owned by:
Priority: critical Component: DVBApi
Severity: high Keywords: MCA, Matrix Cam Air
Cc: Sensitive: no

Description

Reason for enhancement

Add DVBAPI-support for Matrix Cam Air CI-module.

Possible impacts on other features

No known impacts, creates new build-flag "USE_MCA" and make-target "make mca"

More Information

Discussions and testing has been going on here (in german):
http://www.digital-eliteboard.com/showthread.php?210353-MCA-Development-Talk
and here:
http://www.digital-eliteboard.com/showthread.php?210918-Testberichte-Thread-zur-neuen-Community-Firmware-MCA_NG-0-1-339

Attachments (3)

oscam-7948-mca.patch (33.8 KB ) - added by dirtyharry123 11 years ago.
oscam-1.20-unstable_svn7948-arm-linux-gnueabi-mca (837.6 KB ) - added by dirtyharry123 11 years ago.
Oscam-binary for the MCA
oscam-7949-mca.patch (31.0 KB ) - added by dirtyharry123 11 years ago.
Unified patch

Download all attachments as: .zip

Change History (33)

by dirtyharry123, 11 years ago

Attachment: oscam-7948-mca.patch added

comment:1 by FilipeAmadeuO, 11 years ago

That would be excelent. I use the matrix air cam and it work pretty well.
gfto can you please take a look and add it to the trunk ?

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

by dirtyharry123, 11 years ago

Oscam-binary for the MCA

comment:2 by dirtyharry123, 11 years ago

Priority: minorcritical

comment:3 by FilipeAmadeuO, 11 years ago

Hi. I updated matrix air cam firmware to MCA_NG-0.1-339
Now how can i upgrade oscam ? Can you please explain

in reply to:  3 comment:4 by dirtyharry123, 11 years ago

Replying to FilipeAmadeuO:

Hi. I updated matrix air cam firmware to MCA_NG-0.1-339
Now how can i upgrade oscam ? Can you please explain

You can use scp (WinSCP on Windows) to switch the binaries.
For more information please check the links provided, it has been described there.
Also the MCA_NG-0.1-339-Firmware already includes an oscam,
which is based on an earlier version of this patch.

comment:5 by FilipeAmadeuO, 11 years ago

Ok. I suceed to upgrade oscam version in matrix air root file system and deleted the older (7294).
Do i have to change anything else ? The oscam name is oscam-1.20-unstable_svn7948-arm-linux-gnueabi-mca. Is this correct ?
Can you open a thread (english please) in oscam streamboard forum to improve this ?

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

comment:6 by dirtyharry123, 11 years ago

The mca only starts /oscam IIRC in MCA_NG-0.1 this is a wrapper-script, where you can select which oscam-binary to start (you didn't have to delete the older oscam)
Also since oscam waits for up to 1 minute if its buildtime is greater than the systemtime, here is a wrapper-script which prevents this from happening

#!/bin/sh

OSCAM=/oscam-1.20-unstable_svn7948-arm-linux-gnueabi-mca  #Path to selected oscam-binary
DEBUG_LEVEL=0                                             #Start oscam with this debug-level

STAT=`busybox stat -c %Y $OSCAM`
date -s "1970-01-01 01:00:$STAT"
$OSCAM -d $DEBUG_LEVEL "$@"

comment:7 by FilipeAmadeuO, 11 years ago

Ok. Understood. For editing the script i have to edit the bin/sh file ?
Any idea in improving the start up time of matrix air cam ?
Please join our streamboard forum. You are most welcome :)

Version 2, edited 11 years ago by FilipeAmadeuO (previous) (next) (diff)

comment:8 by dirtyharry123, 11 years ago

No editing of /bin/sh, this is the system shell, you just need to place the script to
/oscam and grant appropriate permissions (also to the binary):
chmod 755 /oscam

MrWeb(@DEB) and I have already prepared some major improvements (including a startup time of less than 2 minutes), however due to a lack of time we havend finished packing these into the next NG-firmware.
I will be working toward releasing NG-0.2 some time in the beginning of 2013.
I will try and check the streamboard-forum every now and then.
But since most of the developement and testing happened at DEB, for now this is probably the best place.
(Also because not all of the development is oscam-related)

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

comment:9 by FilipeAmadeuO, 11 years ago

Done and working very nice with 7948
Excelent. Make matrix air firmware as simple as possible.
Probably this will make startup faster.
I will follow your development and continue the good work :)
Now let´s wait for oscam developers to add this improvements to trunk.

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

comment:10 by gf, 11 years ago

I'll look at the patch tomorrow. Please post the patches as unified patch (diff -u) not as context.

by dirtyharry123, 11 years ago

Attachment: oscam-7949-mca.patch added

Unified patch

comment:11 by dirtyharry123, 11 years ago

Done and thanks.

comment:12 by gf, 11 years ago

I have applied the patch locally. It can be cleaned up a lot, since the main thing is just module-dvbapi-azbox.c copied with added support for MCA.

I'm cleaning up MCA/openxcas support and this would remove a lot of code basically merging MCA support in module-dvbapi-azbox (by the way, this file needs renaming to module-dvbapi-openxcas). Since I don't have MCA I'll post git branch for testing when I'm done. If you could test the resulting code that would be great.

Preliminary work on cleaning up the patch can be found at branch "mca" in git://github.com/gfto/oscam.git - https://github.com/gfto/oscam/tree/mca

It needs couple of hours of work, I'll finish it tomorrow.

comment:13 by dirtyharry123, 11 years ago

Thanks for you looking into that.
I'm not sure if its appropriate to merge azbox and mca-support.
The MCA doesn't really use openxcas, it only uses the message-structs defined in openxcas_message
and doesn't rely on an external library (like azbox does).
But you are right, much of the code is copied from module-dvbapi-azbox (most of it isn't openxcas-related).
Also a lot of the copied code is actually never executed on the MCA.
I have left it in there for now, because i wasn't sure if it may be possible to implement some of this later.

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

comment:14 by gf, 11 years ago

I have pretty good idea how to merge the code, stay tuned.

comment:15 by dirtyharry123, 11 years ago

Is there anything I can do to help? (Other than testing of course)

comment:16 by gf, 11 years ago

I have commited current patch queue, so we can cleanup the patches on trunk.

comment:17 by dirtyharry123, 11 years ago

Great, thanks a lot.
May I ask why you have removed the "private logging".
The idea was that logging to /tmp/mdbg should happen even if logging is disabled.
And if enabled one should be able to have both /tmp/mdbg-logging as well as a logfile.
(it may even be necessary, I have to test that again, will do that later)
Also since it is a pipe it should be treated like stdout (no logrotate).
Everything that is output to /tmp/mdbg will be printed to the MCAs serial-console.

comment:18 by FilipeAmadeuO, 11 years ago

@dirtyharry123 or gf
Can you please help gorgone on simplebuild ? See here:
http://www.streamboard.tv/wbb2/thread.php?threadid=34465&page=67

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

comment:19 by gf, 11 years ago

If any feature grows its own logging mechanism we will quickly be in quite a mess. There is no place for private logging mechanisms.

comment:20 by dirtyharry123, 11 years ago

So maybe we can add a generic logging-mechanism that allows writing to a pipe regardless of the log being enabled and not do log-rotation on the pipe?

comment:21 by dirtyharry123, 11 years ago

OK I have just tested with the latest trunk (7959), it's all working fine so far, and it doesn't seem to rely on the log in /tmp/mdbg, so I guess for debugging-purposes one can just add /tmp/mdbg as logfile in oscam.conf.
Thanks again

comment:22 by FilipeAmadeuO, 11 years ago

Simplebuild 1.71 builds ok.
Only one strange warning on building:

CC module-dvbapi-mca.c
module-dvbapi-mca.c: In function `mca_main_thread':
module-dvbapi-mca.c:397: warning: statement with no effect
CC module-dvbapi.c

Any fix for this ?

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

comment:23 by Admin, 11 years ago

Resolution: fixed
Status: newclosed

Compile warning should be fixed and the main subject was solved some weeks ago. I'll close this ticket now.

comment:24 by FilipeAmadeuO, 11 years ago

Problem when building:

+-------------------------------------------------------------------------------
| OSCam ver: 1.20-unstable_svn rev: 7991 target: arm-none-linux-gnueabi-mca
| Tools:
| CROSS = /home/Documents/simplebuild/toolchains/mca/bin/arm-none-linux-gnueabi-
| CC = /home/Documents/simplebuild/toolchains/mca/bin/arm-none-linux-gnueabi-gcc
| STRIP = /home/Documents/simplebuild/toolchains/mca/bin/arm-none-linux-gnueabi-strip
| Settings:
| CONF_DIR = /var/mca/d1
| CC_OPTS = -Os
| CC_WARN = -W -Wall -Wshadow -Wredundant-decls -Wstrict-prototypes -Wold-style-definition
| CFLAGS = -DWITH_MCA
| LDFLAGS = -Wl,--gc-sections -DWITH_MCA -Wl,-rpath,
| LIBS = -lpthread -ldl
| Config:
| Addons : WEBIF HAVE_DVBAPI WITH_LB
| Protocols: CCCAM CCCSHARE
| Readers :
| CardRdrs :
| Compiler : arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2011.03-41) 4.5.2
| Linker : GNU ld (Sourcery G++ Lite 2011.03-41) 2.20.51.20100809
| Binary : ../archiv/oscam-svn7991-mca-webif
+-------------------------------------------------------------------------------
CC cscrypt/aes.c
CC cscrypt/crc32.c
CC cscrypt/i_cbc.c
CC cscrypt/i_ecb.c
CC cscrypt/i_skey.c
CC cscrypt/md5.c
CC cscrypt/rc6.c
CC cscrypt/sha1.c
CC module-cccam.c
CC module-cccshare.c
CC module-dvbapi-mca.c
module-dvbapi-mca.c: In function 'mca_ex_callback':
module-dvbapi-mca.c:286:6: error: expected expression before '{' token
module-dvbapi-mca.c:301:29: error: expected expression before '{' token
make[1]: * [build/arm-none-linux-gnueabi-mca/module-dvbapi-mca.o] Error 1
make:
* [all] Error 2

comment:25 by FilipeAmadeuO, 11 years ago

Resolution: fixed
Status: closedreopened

comment:26 by FilipeAmadeuO, 11 years ago

Next try (tested 7992) ? :)

CC module-dvbapi-mca.c
module-dvbapi-mca.c:36:8: warning: function declaration isn't a prototype
module-dvbapi-mca.c: In function 'dummy':
module-dvbapi-mca.c:36:8: warning: old-style function definition

comment:27 by Admin, 11 years ago

Don't get that on my system. Try that line

int8_t dummy(void){ return 0;}

instead of

int8_t dummy(){ return 0;}

comment:28 by FilipeAmadeuO, 11 years ago

That works. No more warnings

comment:29 by Admin, 11 years ago

Resolution: fixed
Status: reopenedclosed

comment:30 by babylover2009, 10 years ago

hi to all ,
i have copy : oscam-1.20-unstable_svn7948-arm-linux-gnueabi-mca​ to root of my MCA , i have rename the old one oscam-1.20-unstable_svn7294-arm-linux-gnueabi-mca to oscam_old , i have rename the new one oscam-1.20-unstable_svn7948-arm-linux-gnueabi-mca to ​oscam-1.20-unstable_svn7294-arm-linux-gnueabi-mca, i give it chmod 755 but again when i start oscam in my MCA device the old is started...please can you tell me how to update the oscam in my MCA device.
br
Baby

Note: See TracTickets for help on using tickets.