Jump to content


Photo

it913x USB DVB-T tuner reported as DVB-C after GUI restart

OpenPLi4 it913x Vu+ Duo2

  • Please log in to reply
68 replies to this topic

Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #21 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 14 December 2013 - 22:22

(though this won't affect this issue I think. Most likely the dvb api version in 3.3.8 does not have full delsys support)

 

 What about vu+ images? Do they use newer kernel? That stick is recognized ok with their image. If they do use newer kernel, is there a chance to update kernel in openpli for duo2?



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #22 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 14 December 2013 - 22:27

The actual line error is 157 not 163, 163 is with my extra print lines.... 

pieterg, on 14 Dec 2013 - 22:06, said:

Why aren't you using regular openpli4 anymore?
We've just updated it to the latest oe-core heads.

 I just want to put some more debugging info.

 

I have yet another problem which I must solve first. That is images from 02.12.2013 for duo2 do not start when it9135 tuner is plugged in. This information comes from http://openpli.org/f...o2/#entry391507

For now I now that the device is started ok, but then an exception occurs in NimManager.py line 163:

 

 

types.remove("DVB-S")ValueError: list.remove(x): x not in list
 

 

It is strange as it happens only when usb dvb-t is plugged, but the error refers to frontend0 which is dvb-s2 dual card (single card with 2 dvb-s2 tuners).



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #23 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 14 December 2013 - 23:09

Delsys exists in kernel 3.3
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/media/dvb/frontends/it913x-fe.c?id=refs/tags/v3.3#n946

static struct dvb_frontend_ops it913x_fe_ofdm_ops = {
	.delsys = { SYS_DVBT },
	.info = {
		.name			= "it913x-fe DVB-T",
		.frequency_min		= 51000000,
		.frequency_max		= 1680000000,
		.frequency_stepsize	= 62500,
But it doen't in 3.2
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/drivers/media/dvb/frontends/it913x-fe.c?id=refs/tags/v3.2#n807

static struct dvb_frontend_ops it913x_fe_ofdm_ops = {

	.info = {
		.name			= "it913x-fe DVB-T",
		.type			= FE_OFDM,
		.frequency_min		= 51000000,
So without delsys what is happening?
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #24 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 15 December 2013 - 18:20

This is more or less what i do to test an enigma2 patch:

1. I create the patch and i am copying the patch into sources folder (eg 0001-testXYZ.patch).

2. Create a file named enigma2.bbappend and place it on the same folder where enigma2.bb resides (or here meta-local/recipes-local/images/ will work too)

enigma2.bbappend should contain the following:

PRINC = "1"
SRC_URI += "file://0001-testXYZ.patch"
3. Every time i am making changes to 0001-testXZY.patch i am increasing PRINC by one and trying again. It is obvious that patch is copied on sources folder every time

4. When build success i am getting enigma ipk from build/tmp/deploy/ipk/MACHINE/enigma2_xxxx.ipk and i am testing.

Good luck ;)

PS. When making changes on existing files its ok to issue the command git diff > TestXYZ.patch to quickly create a patch.

PPS. Bitbake will complaing that patch is not found in expected folder but it works.

 

I will present my findings soon.

 

Can you tell me what to put into bbappend file so it is not used with tuxtxt-enigma2 recipes and have build not pause and wait for closing additional terminal window?



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #25 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 15 December 2013 - 19:54

Hi,

 

This is a bug in bitbake, i have already mention this, but no update from OpenPLi yet.

 

http://openpli.org/f...e-2#entry390744

 

Here is the patch required for bitbake in order to bypass problem.

 

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 1f494ee..b36ed6f 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -1486,7 +1486,7 @@ class CookerCollectFiles(object):
         filelist = []
         f = os.path.basename(fn)
         for bbappend in self.appendlist:
-            if bbappend in f or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])):
+            if (bbappend == f) or ('%' in bbappend and bbappend.startswith(f[:bbappend.index('%')])):
                 self.appliedappendlist.append(bbappend)
                 for filename in self.appendlist[bbappend]:
                     filelist.append(filename)

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #26 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 15 December 2013 - 20:57

I flashed with my custom image, set up a few things in setup wizard (no scanning, no service lists). That worked ok because I had no it913x drivers yet. What is strange here is that settings for second of the dual dvb-s2 are not saved from wizard (the same with regular openpli, vu+ image and BH that I tested). 

 

After wizard finished, I set up tuners in again, installed packages required by it913x and rebooted. Log attached. Also for reference I attached patch file for my changes.

 

In a log all custom messages introduced by me start with '[macnuts]'.

 

delsys is working ok, I think. it9135 stick I have (twin tuner) reports DVB-T.

 

USB tuners are registered first: (lines in between removed)

DVB: registering new adapter (ITE 9135(9006) Generic)
DVB: registering adapter 0 frontend 0 (ITE 9135(9006) Generic_1)...
DVB: registering new adapter (ITE 9135(9006) Generic)
DVB: registering adapter 1 frontend 0 (ITE 9135(9006) Generic_2)...
bcm7335_frontend_init cedc2800, 0
DVB: registering adapter 2 frontend 0 (Vuplus FE)...
bcm7335_frontend_init cedc2200, 1
DVB: registering adapter 2 frontend 0 (Vuplus FE)...
bcm7335_frontend_init cedc2000, 2
DVB: registering adapter 2 frontend 0 (Vuplus FE)...

 

Then egnima2 somehow mixes all. It checks a single frontend and set DVB-S2 for it forcefully. That is why original NimManager crashes (first frontend has DVB-T from delsys and DVB-S2 from setSlotInfo). So no DVB-S for this one and that is direct cause of crash. But a real problem is not that place of code of course.

 

Another strange thing is that only single frontend is checked. That is why eDVBFrontend::supportsDeliverySystem always returns false when checking other forntends:

reached rl 70
---- opening lame channel db
reading services (version 4)
loaded 0 channels/transponders and 0 services
linking adapter1/frontend0 to vtuner0
scanning for frontends..
[macnuts] eDVBFrontend constructor: filename '/dev/dvb/adapter0/frontend0', fe (m_dvbid & m_slotid) 0, simulate 1
[macnuts] eDVBFrontend::openFrontend START, dvbid 0
[macnuts] simulating, setting fe_info.frequency_min = 900000 and fe_info.frequency_max = 2200000
[macnuts] eDVBFrontend::openFrontend END (0)
[macnuts] eDVBFrontend constructor: filename '/dev/dvb/adapter0/frontend0', fe (m_dvbid & m_slotid) 0, simulate 0
[macnuts] eDVBFrontend::openFrontend START, dvbid 0
opening frontend 0
[macnuts] ioctl FE_GET_INFO details - START
[macnuts] fe name is ITE 9135(9006) Generic_1
[macnuts] fe type is FE_OFDM
[macnuts] fe frequency_min is 51000000
[macnuts] fe frequency_max is 1680000000
[macnuts] fe frequency_stepsize is 62500
[macnuts] fe frequency_tolerance is 0
[macnuts] fe symbol_rate_min is 0
[macnuts] fe symbol_rate_max is 0
[macnuts] fe symbol_rate_tolerance is 0
[macnuts] fe notifier_delay is 0
[macnuts] fe caps is 001b2bff
[macnuts] fe caps has FE_CAN_INVERSION_AUTO
[macnuts] fe caps has FE_CAN_FEC_1_2
[macnuts] fe caps has FE_CAN_FEC_2_3
[macnuts] fe caps has FE_CAN_FEC_3_4
[macnuts] fe caps has FE_CAN_FEC_4_5
[macnuts] fe caps has FE_CAN_FEC_5_6
[macnuts] fe caps has FE_CAN_FEC_6_7
[macnuts] fe caps has FE_CAN_FEC_7_8
[macnuts] fe caps has FE_CAN_FEC_8_9
[macnuts] fe caps has FE_CAN_FEC_AUTO
[macnuts] fe caps has FE_CAN_QAM_16
[macnuts] fe caps has FE_CAN_QAM_64
[macnuts] fe caps has FE_CAN_QAM_AUTO
[macnuts] fe caps has FE_CAN_TRANSMISSION_MODE_AUTO
[macnuts] fe caps has FE_CAN_GUARD_INTERVAL_AUTO
[macnuts] fe caps has FE_CAN_HIERARCHY_AUTO
[macnuts] ioctl FE_GET_INFO details - END
[macnuts] entering DTV_ENUM_DELSYS part
[macnuts] ::ioctl(m_fd, FE_GET_PROPERTY, &cmdseq) succeeded, enumerating results - START
[macnuts] SYS_DVBT is true
[macnuts] ::ioctl(m_fd, FE_GET_PROPERTY, &cmdseq) succeeded, enumerating results - END
[macnuts] leaving DTV_ENUM_DELSYS part
[macnuts] m_simulate_fe is not null, copying m_delsys
[macnuts] eDVBFrontend::openFrontend END (0)
close frontend 0
[macnuts] eDVBFrontend::supportsDeliverySystem - START (slot_id=0, dvb_id=0, obeywhitelist=0)
[macnuts] argument is SYS_DVBT
[macnuts] m_delsys has SYS_DVBT = 1
[macnuts] eDVBFrontend::supportsDeliverySystem - END (true)
[macnuts] eDVBFrontend::supportsDeliverySystem - START (slot_id=0, dvb_id=0, obeywhitelist=0)
[macnuts] argument is SYS_DVBT
[macnuts] m_delsys has SYS_DVBT = 1
[macnuts] eDVBFrontend::supportsDeliverySystem - END (true)
found 2 adapter, 1 frontends(1 sim) and 1 demux, boxtype 4
Use valid Linux Time  (RTC?)
[EPGC] Initialized EPGCache (wait for setCacheFile call now)
Loading spinners...
[ePNG] couldn't open /usr/share/enigma2/skin_default/spinner/wait5.png
found 4 spinner!
executing main
setIoPrio best-effort level 3 ok
[macnuts] eDVBFrontend::readInputpower - START
Failed to open /dev/dbox/fp0
[macnuts] eDVBFrontend::readInputpower - END (-1)
[Harddisk] enumerating block devices...
new Harddisk sda -> /dev/sda -> /dev/sda
[ePopen] command: ('sdparm', 'sdparm', '--set=SCT=0', '/dev/sda')
new Harddisk sdb -> /dev/sdb -> /dev/sdb
Reading satellites.xml
Reading cables.xml
couldn't open /etc/tuxbox/cables.xml!!
Reading terrestrial.xml
removing internal link on frontend id 1
sec config cleared
setSlotInfo for dvb frontend 0 to slotid 0, descr Vuplus DVB-S NIM(AVL6222), need rotorworkaround No, enabled Yes, DVB-S2 Yes
[macnuts] NimManager.py SecConfigure::update frontend 0 - getting types
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=0, type=DVB-T2)
[macnuts] eDVBFrontend::supportsDeliverySystem - START (slot_id=0, dvb_id=0, obeywhitelist=0)
[macnuts] argument is SYS_DVBT2
[macnuts] m_delsys has SYS_DVBT = 1
[macnuts] m_delsys has SYS_DVBS2 = 1
[macnuts] eDVBFrontend::supportsDeliverySystem - END (false, argument not found in m_delsys or is false)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=0, type=DVB-T)
[macnuts] eDVBFrontend::supportsDeliverySystem - START (slot_id=0, dvb_id=0, obeywhitelist=0)
[macnuts] argument is SYS_DVBT
[macnuts] m_delsys has SYS_DVBT = 1
[macnuts] m_delsys has SYS_DVBS2 = 1
[macnuts] eDVBFrontend::supportsDeliverySystem - END (true)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (true)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=0, type=DVB-C)
[macnuts] eDVBFrontend::supportsDeliverySystem - START (slot_id=0, dvb_id=0, obeywhitelist=0)
[macnuts] argument is SYS_DVBC_ANNEX_A
[macnuts] m_delsys has SYS_DVBT = 1
[macnuts] m_delsys has SYS_DVBS2 = 1
[macnuts] eDVBFrontend::supportsDeliverySystem - END (false, argument not found in m_delsys or is false)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=0, type=DVB-S2)
[macnuts] eDVBFrontend::supportsDeliverySystem - START (slot_id=0, dvb_id=0, obeywhitelist=0)
[macnuts] argument is SYS_DVBS2
[macnuts] m_delsys has SYS_DVBT = 1
[macnuts] m_delsys has SYS_DVBS2 = 1
[macnuts] eDVBFrontend::supportsDeliverySystem - END (true)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (true)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=0, type=DVB-S)
[macnuts] eDVBFrontend::supportsDeliverySystem - START (slot_id=0, dvb_id=0, obeywhitelist=0)
[macnuts] argument is SYS_DVBS
[macnuts] m_delsys has SYS_DVBT = 1
[macnuts] m_delsys has SYS_DVBS2 = 1
[macnuts] eDVBFrontend::supportsDeliverySystem - END (false, argument not found in m_delsys or is false)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=0, type=ATSC)
[macnuts] eDVBFrontend::supportsDeliverySystem - START (slot_id=0, dvb_id=0, obeywhitelist=0)
[macnuts] argument is SYS_ATSC
[macnuts] m_delsys has SYS_DVBT = 1
[macnuts] m_delsys has SYS_DVBS2 = 1
[macnuts] eDVBFrontend::supportsDeliverySystem - END (false, argument not found in m_delsys or is false)
[macnuts] eDVBFrontend::supportsDeliverySystem - START (slot_id=0, dvb_id=0, obeywhitelist=0)
[macnuts] argument is SYS_DVBC_ANNEX_B
[macnuts] m_delsys has SYS_DVBT = 1
[macnuts] m_delsys has SYS_DVBS2 = 1
[macnuts] eDVBFrontend::supportsDeliverySystem - END (false, argument not found in m_delsys or is false)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts]  NimManager.py SecConfigure::update frontend 0 - getting types completed
[macnuts]  NimManager.py SecConfigure::update frontend 0 has type DVB-T
[macnuts]  NimManager.py SecConfigure::update frontend 0 has type DVB-S2
[macnuts] NimManager.py SecConfigure::update frontend 1 - getting types
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=1, type=DVB-T2)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=1, type=DVB-T)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=1, type=DVB-C)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=1, type=DVB-S2)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=1, type=DVB-S)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=1, type=ATSC)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts]  NimManager.py SecConfigure::update frontend 1 - getting types completed
[macnuts] NimManager.py SecConfigure::update frontend 2 - getting types
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=2, type=DVB-T2)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=2, type=DVB-T)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=2, type=DVB-C)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=2, type=DVB-S2)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=2, type=DVB-S)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=2, type=ATSC)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts]  NimManager.py SecConfigure::update frontend 2 - getting types completed
[macnuts] NimManager.py SecConfigure::update frontend 3 - getting types
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=3, type=DVB-T2)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=3, type=DVB-T)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=3, type=DVB-C)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=3, type=DVB-S2)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=3, type=DVB-S)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts] eDVBResourceManager::frontendIsCompatible - START (index=3, type=ATSC)
[macnuts] eDVBResourceManager::frontendIsCompatible - END (false)
[macnuts]  NimManager.py SecConfigure::update frontend 3 - getting types completed
.

 

 

I hope that helped put you on track.

 

Regards.

Attached Files



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #27 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 17 December 2013 - 16:42

No much comments so far...

 

I have some general questions before I can proceed, forgive me if it was obvious for you, but I am learning about frontends while working on this issue...

 

 

How important is the '/dev/dvb/adapter0' phrase? I understand that if a device did not exist then there would be no tuner installed, but my question is 'what are the expectations about adapter0'? Has it be a non-removable one, or can it be USB tuner present at boot time? 

 

I've noticed that each USB tuners creates 'virtualFrontendName' under adapter0 (hardcoded).

What would be an impact on functionality (I do not refer to required C++ code changes here) if adapter0 were any (USB or non-removable) and all other adapters (including non-removable) would create 'virtualFrontendName' under adapter0?

 

Audio & video devices of adapter0 are used in a few places in the enigma2 code:

lib/dvb/decoder.cpp (last line here):

RESULT eTSMPEGDecoder::showSinglePic(const char *filename)
{
if (m_decoder == 0)
{
  eDebug("showSinglePic %s", filename);
  int f = open(filename, O_RDONLY);
  if (f >= 0)
  {
   struct stat s;
   fstat(f, &s);
   if (m_video_clip_fd == -1)
    m_video_clip_fd = open("/dev/dvb/adapter0/video0", O_WRONLY);
   if (m_video_clip_fd >= 0)
   {

lib/dvb/volume.cpp:

#define VIDEO_DEV "/dev/dvb/adapter0/video0"
#define AUDIO_DEV "/dev/dvb/adapter0/audio0"

Would it harm if that adapter0 referenced in the code above would be USB tuner?

 

Regards.



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #28 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 17 December 2013 - 18:22

adapter0 needs to be the stb dvb adapter

Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #29 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 2 January 2014 - 17:30

No more startup problems with adapter0 set to USB stick, thanks to http://sourceforge.n...b8306c5ae82261/

 

Here are some more findings about DVB-T USB stick not seen as DVB-T:

 

1.

It is not related to it913x driver, I tried another brand and it was DVB-C after enigma2 restart, too.

 

2.

The problems starts where 'scanning for frontends..' is present in log. For startup (from deep standby) it works ok, correct devices are queried for their caps, but is goes wrong after enigma2 restart.

Correct devs are queried on startup:
build-in tuners are ok (lines 15, 53, 87 of bootlog):
/dev/dvb/adapter0/frontend0 (Vuplus FE)
/dev/dvb/adapter0/frontend1 (Vuplus FE)
/dev/dvb/adapter0/frontend2 (Vuplus FE)
Also USB tuners are ok (lines 128, 172 of boot log):
/dev/dvb/adapter1/frontend0 (ITE 9135(9006) Generic_1)
/dev/dvb/adapter2/frontend0 (ITE 9135(9006) Generic_2)


After enigma2 restart the following tuners are queried (lines 8, 46, 84, 128, 173 of enigma2 restart log):
/dev/dvb/adapter0/frontend0 (Vuplus FE)
/dev/dvb/adapter0/frontend1 (Vuplus FE)
/dev/dvb/adapter0/frontend2 (Vuplus FE)
/dev/dvb/adapter0/frontend3 (vtuner fe)
/dev/dvb/adapter0/frontend4 (vtuner fe)

 

Any hint about where to look for device path being lost is appreciated.

 

Regards.

 

boot log:

Spoiler

 

 

 enigma2 restart log:

Spoiler

Attached Files



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #30 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 2 January 2014 - 20:43

On restart there is no register of dvb frontend.

DVB: registering adapter 0 frontend 0 (Vuplus FE)...
DVB: registering adapter 0 frontend 0 (Vuplus FE)...
DVB: registering adapter 0 frontend 0 (Vuplus FE)...
DVB: registering adapter 1 frontend 0 (ITE 9135(9006) Generic_1)...
DVB: registering adapter 2 frontend 0 (ITE 9135(9006) Generic_2)...
linking adapter1DVB: registering adapter 0 frontend 0 (vtuner fe)...
/frontend0 to vtuner0
linking adapter2DVB: registering adapter 0 frontend 0 (vtuner fe)...
/frontend0 to vtuner1

Also, it seems that DVB and linking is running in paraller.

Anyway, add more debuging on eDVBResourceManager::eDVBResourceManager() i think you will find something good.

 


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #31 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 2 January 2014 - 22:07

I will look into that code.

 

On restart there is no registering of dvb frontends because they were registered when their appropriate modules were loaded (at startup).



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #32 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 5 January 2014 - 03:26

I am a one step closer to find a problem core.

 

Just to remind, vu+duo2 with dual dvb-s2 and dvb-c/t (both built in) and a dvb-t usb stick which has two tuners (but I tested with an ordinary single tuner dvb-t usb stick and results are the same).

 

The problem is in the eDVBUsbAdapter constructor.

It uses a loop and checks for existing /sys/class/dvb/dvb0.frontendX and tries to create a next one (X+1) and create or use /dev/dvb/adapter0/frontend(X+1) for a current adapter (with ioctl calls I guess). It fails on enigma2 restart because all entries are still present and the creation of new ones fails. There are never more than 5 frontends created and they are always numbered:

/sys/class/dvb/dvb0.frontend[0...4] and

/dev/dvb/adapter0/frontend[0..4].

But enigma2 code is not aware of this.

 

/sys/class/dvb/dvb0.frontend[0-3] are for built-in tuners (first two are for dvb-s2 and the third one is for dvb-c/t).

 

During boot it is ok and looks like this:

In eDVBResourceManager constructor:

Two usb adapters are found, and two eDVBUsbAdapter objects are created.

In the eDVBUsbAdapter objects' constructor /sys/class/dvb/dvb0.frontends are enumerated and:

- for a first object:

 

[macnuts] checking /sys/class/dvb/dvb0.frontend0... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend1... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend2... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend3... no execute perission!
[macnuts] virtualFrontendName is /dev/dvb/adapter0/frontend3
mappedFrontendName[/dev/dvb/adapter0/frontend3] = /dev/dvb/adapter1/frontend0

-for a second object:

 

[macnuts] checking /sys/class/dvb/dvb0.frontend0... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend1... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend2... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend3... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend4... no execute perission!
[macnuts] virtualFrontendName is /dev/dvb/adapter0/frontend4
mappedFrontendName[/dev/dvb/adapter0/frontend4] = /dev/dvb/adapter2/frontend0

 

 

On enigma2 restart the process is the same of course, but:

-for a first object:

 

[macnuts] checking /sys/class/dvb/dvb0.frontend0... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend1... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend2... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend3... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend4... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend5... no execute perission!
[macnuts] virtualFrontendName is /dev/dvb/adapter0/frontend5
mappedFrontendName[/dev/dvb/adapter0/frontend5] = /dev/dvb/adapter1/frontend0

for a second object:

 

[macnuts] checking /sys/class/dvb/dvb0.frontend0... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend1... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend2... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend3... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend4... execute permission OK!
[macnuts] checking /sys/class/dvb/dvb0.frontend5... no execute perission!
[macnuts] virtualFrontendName is /dev/dvb/adapter0/frontend5
mappedFrontendName[/dev/dvb/adapter0/frontend5] = /dev/dvb/adapter2/frontend0

 

As you can see /sys/class/dvb/dvb0.frontend5 was not created for first object (adapter1) and I checked that /dev/dvb/adapter0/frontend5 didn't exist. They were not created for the second object (adapter2) neither.

 

Frontend mapping fails, everything else after that fails.


Edited by macnuts, 5 January 2014 - 03:26.


Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #33 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 5 January 2014 - 07:46

It should not create frontend 5,6 but use frontend 3,4. Right?

Is threre a way to check for previous mapped enties? Or de-mapping should happen on destructor so restart will recreate them successfully?

Edited by athoik, 5 January 2014 - 07:47.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #34 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 5 January 2014 - 17:37

There is no cleanup of /dev/dvb/adapter0/frontend[3-4]. The paths are remembered in adapter USB objects and in mappedFrontendName (keys).

But I do not know what triggers creation of those files, so I do not know how to make them disappear. As the creation code has no 'open' function (not in the enigma2 code) so I guess 'unlink' in destructor is not a good option.

 

I do not now how DVB works, so any help is highly appreciated.



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #35 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 5 January 2014 - 19:42

@macnuts,

 

Here is my strace (strace -o /tmp/aaa -s 200 enigma2) when starting enigma2.

 

Spoiler

 

When enigma is running it creates the following entries:

 

 

# ls -la /dev/dvb/adapter0/frontend1 /sys/class/dvb/dvb0.frontend1
crw-rw----    1 root     root      212,  26 Jan  5 20:12 /dev/dvb/adapter0/frontend1
lrwxrwxrwx    1 root     root             0 Jan  5 20:12 /sys/class/dvb/dvb0.frontend1 -> ../../devices/virtual/dvb/dvb0.frontend1

 

When enigma stops, those entries deleted somehow (not in your case probably).

 

# ls -la /dev/dvb/adapter0/frontend1 /sys/class/dvb/dvb0.frontend1
ls: /dev/dvb/adapter0/frontend1: No such file or directory
ls: /sys/class/dvb/dvb0.frontend1: No such file or directory

 

I think that is the problem. Unfortunatelly it doen't happen on me so i cannot find why.

 

@OpenPLi, anyone to help macnuts here?


Edited by athoik, 5 January 2014 - 19:42.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #36 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 5 January 2014 - 19:52

What about /dev/dvb/adapter1/* ?

I am trying to init4 and strace enigma2 but I need to get rid of "bad" entries first....



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #37 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 5 January 2014 - 20:16

Only /dev/dvb/adapter0/frontend1 /sys/class/dvb/dvb0.frontend1 created/deleted automatically.

/sys/class/dvb/
/sys/class/dvb/dvb0.demux0
/sys/class/dvb/dvb0.dvr0
/sys/class/dvb/dvb0.net0
/sys/class/dvb/dvb0.ca0
/sys/class/dvb/dvb0.demux1
/sys/class/dvb/dvb0.dvr1
/sys/class/dvb/dvb0.net1
/sys/class/dvb/dvb0.ca1
/sys/class/dvb/dvb0.demux2
/sys/class/dvb/dvb0.dvr2
/sys/class/dvb/dvb0.net2
/sys/class/dvb/dvb0.ca2
/sys/class/dvb/dvb0.demux3
/sys/class/dvb/dvb0.dvr3
/sys/class/dvb/dvb0.net3
/sys/class/dvb/dvb0.ca3
/sys/class/dvb/dvb0.demux4
/sys/class/dvb/dvb0.dvr4
/sys/class/dvb/dvb0.net4
/sys/class/dvb/dvb0.audio0
/sys/class/dvb/dvb0.frontend0
/sys/class/dvb/dvb0.video0
/sys/class/dvb/dvb1.demux0
/sys/class/dvb/dvb1.dvr0
/sys/class/dvb/dvb1.net0
/sys/class/dvb/dvb1.frontend0
/dev/dvb/adapter0/
/dev/dvb/adapter0/video0
/dev/dvb/adapter0/frontend0
/dev/dvb/adapter0/audio0
/dev/dvb/adapter0/net4
/dev/dvb/adapter0/dvr4
/dev/dvb/adapter0/demux4
/dev/dvb/adapter0/ca3
/dev/dvb/adapter0/net3
/dev/dvb/adapter0/dvr3
/dev/dvb/adapter0/demux3
/dev/dvb/adapter0/ca2
/dev/dvb/adapter0/net2
/dev/dvb/adapter0/dvr2
/dev/dvb/adapter0/demux2
/dev/dvb/adapter0/ca1
/dev/dvb/adapter0/net1
/dev/dvb/adapter0/dvr1
/dev/dvb/adapter0/demux1
/dev/dvb/adapter0/ca0
/dev/dvb/adapter0/net0
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/demux0
/dev/dvb/
/dev/dvb/adapter1
/dev/dvb/adapter1/frontend0
/dev/dvb/adapter1/net0
/dev/dvb/adapter1/dvr0
/dev/dvb/adapter1/demux0
/dev/dvb/adapter0
/dev/dvb/adapter0/video0
/dev/dvb/adapter0/frontend0
/dev/dvb/adapter0/audio0
/dev/dvb/adapter0/net4
/dev/dvb/adapter0/dvr4
/dev/dvb/adapter0/demux4
/dev/dvb/adapter0/ca3
/dev/dvb/adapter0/net3
/dev/dvb/adapter0/dvr3
/dev/dvb/adapter0/demux3
/dev/dvb/adapter0/ca2
/dev/dvb/adapter0/net2
/dev/dvb/adapter0/dvr2
/dev/dvb/adapter0/demux2
/dev/dvb/adapter0/ca1
/dev/dvb/adapter0/net1
/dev/dvb/adapter0/dvr1
/dev/dvb/adapter0/demux1
/dev/dvb/adapter0/ca0
/dev/dvb/adapter0/net0
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/demux0
/dev/misc/
/dev/misc/vtuner1
/dev/misc/vtuner0
/dev/misc/hdmi_cec0

If you want to get rid "bad entries" rename enigma2 to enigma22, reboot and then enigma2 wont start, start manually (init 4, rename && strace)


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #38 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 5 January 2014 - 21:15

That is exactly what I did.

 

Before enigma2 is started:

Spoiler
Spoiler
Spoiler

 

After running and closing (Ctr+C) enigma2 (strace -f -o /tmp/enigma2.strace.log -s 200 /usr/bin/enigma2) log attached (Note, the service did not tune up, but it was because of timeouts, I believe - it works ok without strace).

 

changes to /sys/devices/virtual/dvb/ (new 4 files):

     0 drwxr-xr-x    3 root     root             0 Jan  5 20:30 dvb0.ca8
     0 drwxr-xr-x    3 root     root             0 Jan  5 20:30 dvb0.frontend2
     0 drwxr-xr-x    3 root     root             0 Jan  5 20:30 dvb0.frontend3
     0 drwxr-xr-x    3 root     root             0 Jan  5 20:30 dvb0.frontend4

changes to /sys/class/dvb/ (new 4 files):

     0 lrwxrwxrwx    1 root     root             0 Jan  5 20:44 dvb0.ca8 -> ../../devices/virtual/dvb/dvb0.ca8
     0 lrwxrwxrwx    1 root     root             0 Jan  5 20:44 dvb0.frontend2 -> ../../devices/virtual/dvb/dvb0.frontend2
     0 lrwxrwxrwx    1 root     root             0 Jan  5 20:30 dvb0.frontend3 -> ../../devices/virtual/dvb/dvb0.frontend3
     0 lrwxrwxrwx    1 root     root             0 Jan  5 20:30 dvb0.frontend4 -> ../../devices/virtual/dvb/dvb0.frontend4

changes to /dev/dvb/adapter0 (new 4 files):

     0 crw-rw----    1 root     root      212,  49 Jan  5 20:30 ca8
     0 crw-rw----    1 root     root      212,  32 Jan  5 20:30 frontend2
     0 crw-rw----    1 root     root      212,  50 Jan  5 20:30 frontend3
     0 crw-rw----    1 root     root      212,  51 Jan  5 20:30 frontend4

Attached Files


Edited by macnuts, 5 January 2014 - 21:18.


Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #39 dmarion

  • Member
  • 16 posts

+1
Neutral

Posted 6 January 2014 - 21:54

Just a note: I'm facing the same issue with vusolo2. 



Re: it913x USB DVB-T tuner reported as DVB-C after GUI restart #40 macnuts

  • Senior Member
  • 420 posts

+14
Neutral

Posted 18 January 2014 - 12:58

OpenPLi developers, please help solving this problem.

 

What I can try next? Can it be because vu+ image uses dvb_usb_v2, not dvb_usb?


Edited by macnuts, 18 January 2014 - 12:59.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users