Jump to content


Photo

oscam-emu sometime start sometime not [maybe this can help]


  • Please log in to reply
4 replies to this topic

#1 zcache

  • Member
  • 20 posts

0
Neutral

Posted 10 October 2018 - 17:15

Hi all,

first of all I would say sorry I'm not much fluent in English.

 

One of mainly problem of oscam-emu random start sometime not because the machine time smaller than it's build so it waiting for little second to fix with the current time.

 

I found something interesting about rtc time on my box so I tried to modified as my way and look like it's working pretty.

 

/etc/init.d/set-rtctime

#!/bin/sh

TIME_STAMP=1514764800 #01.01.2018
SYSTEM_TIME=$(date +%s)
RTC_TIME=0

if [ -f /etc/timestamp ] ; then
        TIME_STAMP=$( cat /etc/timestamp )
fi

if [ -f /proc/stb/fp/rtc ] ; then
        RTC_TIME=$( cat /proc/stb/fp/rtc )
fi

if [ "$TIME_STAMP" -gt "$RTC_TIME" ]; then
        if [ "$SYSTEM_TIME" -lt "$TIME_STAMP" ]; then
                date -s @$TIME_STAMP
        fi
fi

exit 0

*** you need to modify original timestamp to unix timestamp (I put it to be 10.09.2018 00:00)

echo "1539043200" > /etc/timestamp

Restart the box and check oscam-emu live-log. I thing this trick may be help. :) :)

 

 

 

openpli 6.2-release h5

 
h5 login: root
root@h5:~# date
Tue Oct  9 07:00:23 +07 2018
root@h5:~#

 

oscam-emu live-log

 

 

  • 2018/10/09 07:00:03 00000000 s (main) System name = Linux
  • 2018/10/09 07:00:03 00000000 s (main) Host name = h5
  • 2018/10/09 07:00:03 00000000 s (main) Release = 4.10.12
  • 2018/10/09 07:00:03 00000000 s (main) Version = #1 SMP Thu May 17 07:36:43 CEST 2018
  • 2018/10/09 07:00:03 00000000 s (main) Machine = mips
  • 2018/10/09 07:00:03 00000000 s (main) Stb model = h5
  • 2018/10/09 07:00:03 00000000 s (main) Stb boxtype = h5
  • 2018/10/09 07:00:03 00000000 s (main) creating pidfile /tmp/oscam-emu.pid with pid 537
  • 2018/10/09 07:00:03 00000000 s (config) services reloaded: 0 services freed, 1 services loaded, rejected 0
  • 2018/10/09 07:00:03 00000000 s (emu) OSCam-Emu version 771
  • 2018/10/09 07:00:03 00000000 s (config) userdb reloaded: 1 accounts loaded, 0 expired, 0 disabled
  • 2018/10/09 07:00:03 00000000 s (main) signal handling initialized
  • 2018/10/09 07:00:03 00000000 s (config) 15 provid's loaded
  • 2018/10/09 07:00:03 00000000 s (config) 295 service-id's loaded in 7 ms
  • 2018/10/09 07:00:03 00000000 s (net) newcamd: initialized (fd=4, port=10001, prio=1 [ SO_PRIORITY IP_TOS ])
  • 2018/10/09 07:00:03 00000000 s (net) cccam: initialized (fd=5, port=12000, prio=1 [ SO_PRIORITY IP_TOS ])
  • 2018/10/09 07:00:03 00000000 s (reader) constant [constcw] creating thread for device /usr/keys/constant.cw
  • 2018/10/09 07:00:03 00000000 s (reader) dstv.ca [internal] creating thread for device /dev/sci0
  • 2018/10/09 07:00:03 00000000 s (reader) emulator.ca [emu] creating thread for device emulator
  • 2018/10/09 07:00:03 00000000 s (reader) mirror.ca [emu] creating thread for device emulator
  • 2018/10/09 07:00:03 00000000 s (stat) loadbalancer: could not open /tmp/.oscam/stat for reading (errno=2 No such file or directory)
  • 2018/10/09 07:00:03 00000000 s (emmcache) loaded 0 emmcache records from /etc/tuxbox/config/oscam-emu/oscam.emmcache in 0 ms
  • 2018/10/09 07:00:03 3B8DB83D r (reader) dstv.ca [internal] Reader initialized (device=/dev/sci0, detect=cd, mhz=600, cardmhz=600)
  • 2018/10/09 07:00:03 3B8DB83D r (reader) dstv.ca [internal] Reader sci internal, detected box type: h5
  • 2018/10/09 07:00:03 00000000 s (emmcache) loaded 0 emmstat records from /etc/tuxbox/config/oscam-emu/oscam.emmstat in 0 ms
  • 2018/10/09 07:00:03 00000000 s (anticasc) anti cascading disabled
  • 2018/10/09 07:00:03 5C541AFE p (constcw) Local reader: constant (file: /usr/keys/constant.cw)
  • 2018/10/09 07:00:03 4BDEF11F r (reader) mirror.ca [emu] Reader initialized (device=emulator, detect=cd, mhz=357, cardmhz=357)
  • 2018/10/09 07:00:03 5C541AFE p (reader) constant [constcw] proxy initialized, server /usr/keys/constant.cw:0
  • 2018/10/09 07:00:03 4E2E2556 r (reader) emulator.ca [emu] Reader initialized (device=emulator, detect=cd, mhz=357, cardmhz=357)
  • 2018/10/09 07:00:03 772B8B88 c (client) plain dvbapi-client granted (local, au=auto (4 reader))
  • 2018/10/09 07:00:03 772B8B88 c (dvbapi) dvbapi channelcache loaded from /etc/tuxbox/config/oscam-emu/oscam.ccache
  • 2018/10/09 07:00:03 772B8B88 c (dvbapi) Detected /dev/dvb/adapter0/demux0 Api: 0, userconfig boxtype: 1 maximum amount of possible filters is 32 (oscam limit is 32)
  • 2018/10/09 07:00:03 602F7453 h (webif) webif: decompressed 177963 bytes back into 439096 bytes
  • 2018/10/09 07:00:03 602F7453 h (webif) HTTP Server running. ip=0.0.0.0 port=8888
  • 2018/10/09 07:00:04 4BDEF11F r (reader) mirror.ca [emu] card detected
  • 2018/10/09 07:00:04 3B8DB83D r (reader) dstv.ca [internal] card detected
  • 2018/10/09 07:00:04 4E2E2556 r (reader) emulator.ca [emu] card detected
  • 2018/10/09 07:00:05 4BDEF11F r (reader) mirror.ca [emu] found card system emu
  • 2018/10/09 07:00:05 4BDEF11F r (reader) mirror.ca [emu] THIS WAS A SUCCESSFUL START ATTEMPT No 1 out of max alloted of 1
  • 2018/10/09 07:00:05 4E2E2556 r (reader) emulator.ca [emu] found card system emu
  • 2018/10/09 07:00:05 4E2E2556 r (reader) emulator.ca [emu] THIS WAS A SUCCESSFUL START ATTEMPT No 1 out of max alloted of 1
  • 2018/10/09 07:00:05 4BDEF11F r (emu) Reading key file: /etc/tuxbox/config/oscam-emu/SoftCam.Key
  • 2018/10/09 07:00:05 4BDEF11F r (-) -- Skipped 1 duplicated log lines --
  • 2018/10/09 07:00:05 4BDEF11F r (emu) Total keys in memory: W:0 V:0 N:0 I:0 S:0 F:10 P:66 D:0 T:0
  • 2018/10/09 07:00:08 3B8DB83D r (-) -- Skipped 1 duplicated log lines --
  • 2018/10/09 07:00:08 3B8DB83D r (reader) dstv.ca [internal] ATR:
  • 2018/10/09 07:00:08 3B8DB83D r (reader) dstv.ca [internal] Buffers readed 0 bytes total time_us 75234
  • 2018/10/09 07:00:09 3B8DB83D r (reader) dstv.ca [internal] detect irdeto card
  • 2018/10/09 07:00:09 3B8DB83D r (reader) dstv.ca [internal] Irdeto SC 58 version 19 revision 1, patch level e
  • 2018/10/09 07:00:10 3B8DB83D r (reader) dstv.ca [internal] caid: ####, acs: 6.09, country code: ###
  • 2018/10/09 07:00:10 3B8DB83D r (reader) dstv.ca [internal] providers: 4, ascii serial: ##########, hex serial: ######, hex base: ##
  • 2018/10/09 07:00:12 3B8DB83D r (reader) dstv.ca [internal] WARNING: For Irdeto cards you will have to set 'mhz= 600' in oscam.server
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [internal] active providers: 4
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [internal] found card system irdeto
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [irdeto] THIS WAS A SUCCESSFUL START ATTEMPT No 1 out of max alloted of 1
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [irdeto] entitlements for provider: 1, id: ######
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [irdeto] chid: 00xx, date: 2016/09/26 - 2016/10/10
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [irdeto] chid: 00xx, date: 2016/09/29 - 2016/10/29
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [irdeto] chid: 00xx, date: 2016/09/29 - 2016/10/29
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [irdeto] chid: 00xx, date: 2016/07/18 - 2016/08/17
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [irdeto] chid: 00xx, date: 2016/09/29 - 2016/10/09
  • 2018/10/09 07:00:13 3B8DB83D r (reader) dstv.ca [irdeto] chid: 00xx, date: 2016/08/17 - 2016/08/27
  • 2018/10/09 07:00:18 3B8DB83D r (reader) dstv.ca [irdeto] ready for requests
  • 2018/10/09 07:00:27 772B8B88 c (dvbapi) Demuxer 0 ecmpid 0 CAID: 0E00 ECM_PID: 1771 PROVID: 000000
  • 2018/10/09 07:00:27 772B8B88 c (dvbapi) Demuxer 0 found 1 ECMpids and 3 STREAMpids in caPMT
  • 2018/10/09 07:00:27 772B8B88 c (dvbapi) Demuxer 0 found channel in cache and matching prio -> start descrambling ecmpid 0
  • 2018/10/09 07:00:27 772B8B88 c (dvbapi) Demuxer 0 trying to descramble PID 0 CAID 0E00 PROVID 000000 ECMPID 1771 ANY CHID PMTPID 145B VPID 0852
  • 2018/10/09 07:00:27 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:8284831851851EB534D28A3E9E5FF1ED): found (6 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/09 07:00:27 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:5F77EC8EEDF1A983C540C00580810FEC): found (7 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/09 07:00:27 772B8B88 c (dvbapi) Demuxer 0 found 1 ECMpids and 3 STREAMpids in PMT
  • 2018/10/09 07:00:28 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:E27475E6114B9D29565A11F2A89CEB21): found (6 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/09 07:00:29 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:5565F7E3E1DA72406DFCF7FA42D6077F): found (7 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/09 07:00:30 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:22A796851A5E8AF8003308C6841CCE69): found (6 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/09 07:00:31 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:12F9667CFEECFB436FA93EEBEE6677B3): found (9 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/10 23:08:14 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:9833E3034B444B762D579F8DDEBD13D0): found (8 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/10 23:08:15 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:66F4314F57EC4B9743009CC5E1FBED7B): found (8 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/10 23:08:16 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:F95287C4B93C5B5235F621BB0D25143F): found (6 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/10 23:08:17 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:782D0BC92220A908A6ACACC0A839B2F1): found (6 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/10 23:08:18 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:BE94E732A3F0E90E21767338B527B668): found (8 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/10 23:08:19 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:B1B676CD14FB0E028E08AC4CDC0AB425): found (8 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/10 23:08:20 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:7150DB93851C766E9DC4256995BA31FF): found (8 ms) by emulator.ca - BBC Earth Thai
  • 2018/10/10 23:08:21 772B8B88 c (ecm) local (0E00@000000/0000/00D3/40:CF5D7631A4A00E26992A743E644A6022): found (9 ms) by emulator.ca - BBC Earth Thai

 


ZGEMMA H5 Power by OpenPLi 7.0 Released


Re: oscam-emu sometime start sometime not [maybe this can help] #2 WanWizard

  • PLi® Core member
  • 70,542 posts

+1,812
Excellent

Posted 10 October 2018 - 18:33

You could have asked, it would have saved you a lot of time. ;)

 

Oscam has a 60 sec startup delay in it while it waits for the time to get set. Normally, this happens when you tune, and it's not a problem. Oscam functionally doesn't need the time, but due to a design fault that isn't being adressed is does...

 

Easiest is to install the systemtime plugin, and use internet time if you don't have a valid transponder signal.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: oscam-emu sometime start sometime not [maybe this can help] #3 Dimitrij

  • PLi® Core member
  • 10,330 posts

+350
Excellent

Posted 10 October 2018 - 19:38

https://github.com/O...src/set-rtctime


GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: oscam-emu sometime start sometime not [maybe this can help] #4 zcache

  • Member
  • 20 posts

0
Neutral

Posted 11 October 2018 - 01:01

.......

.......

 

Easiest is to install the systemtime plugin, and use internet time if you don't have a valid transponder signal.

 

Yes, I already did. At the end of oscam live-log I got a valid time from ntp time, NTP start after RTC few second. As I check /proc/stb/fp/rtc my box always 0 so I think RTC time should not start with 0 I change as I show in the script. RTC time going base on 1.1.2018 and change by timestampt if exist

Edited by zcache, 11 October 2018 - 01:02.

ZGEMMA H5 Power by OpenPLi 7.0 Released


Re: oscam-emu sometime start sometime not [maybe this can help] #5 zcache

  • Member
  • 20 posts

0
Neutral

Posted 11 October 2018 - 01:52

New idea, I back to original code and change it little bit.

#!/bin/sh

if [ -f /etc/rtc ] ; then
        LIMIT_TIME=1514808000 #01.01.2018
        RTC_TIME=$( cat /etc/rtc )
        SYSTEM_TIME=$(date +%s)
        if [ "$RTC_TIME" -gt "$LIMIT_TIME" ]; then
                if [ "$SYSTEM_TIME" -lt "$LIMIT_TIME" ]; then
                        date -s @$RTC_TIME
                        echo "set rtc time ..."
                fi
        fi
fi

exit 0

and need to created rtc file on /etc/

echo "1539043200" > /etc/rtc

I think this is better code from first code. Hope this can help for alternative choice other people that problem with startup oscam.  :lol:


ZGEMMA H5 Power by OpenPLi 7.0 Released



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users