PDA

View Full Version : Working on getting the guide data to show up for the extra locals in 3.1


AlphaWolf
01-24-2003, 10:36 PM
Ok I think I may have found a good lead to the answer, but its a bit confusing, so I will just start by explaining what I did.

I prepared a script that will dump all of the < 100 channels information to stdout. I configured the access card to get the phoenix arizona locals, then captured all of the data for channels < 100 once they started showing up. I then set the card for the las vegas locals and did the same. I took a sample of one channel and compared it against itself when its supposed to be disabled. This is what I saw:


Phoenix locals enabled, Las Vegas disabled:

ApgChannel 438754/10 {
AboutText = {CBS television services from KPHO-TV, 5, Phoenix, AZ}
AdditionalNetworkId = 659
ApgObjectId = 186763
BackupLogoIndex = LogoSpace=DirecTV LogoIndex=<None Defined>
Category = 142 (rel=10) 404 (rel=10) 148 (rel=10) 287 (rel=10)
ChannelDefinition = 438754/12
ChannelPipIndicator = 0
ConditionalDescriptorExpr = (length 6) 0xc3 0x02 0x00 0x00 0x94 0x00 0x00 0x00
DefaultProgram = 438498/-1
FrameHeaderNetworkId = 0
GuideInclusionExpr = (length 9) 0xc3 0x02 0x00 0x00 0x94 0x80 0x88 0x1d 0x00 0x00 0x00 0x00
IndexPath = /Server/A0002d98b:87:37:0
LogoIndex = LogoSpace=DirecTV LogoIndex=19
LongName = PN5
PipChannelNumber = 885
PipFrequencyIndex = 19
ServerId = A0002d98b
ServerVersion = 37
ShortName = PN5
SourceId = 10640
Version = 5
}



Las Vegas locals enabled, Phoenix disabled:

ApgChannel 438754/10 {
AboutText = {CBS television services from KPHO-TV, 5, Phoenix, AZ}
AdditionalNetworkId = 659
ApgObjectId = 186763
BackupLogoIndex = LogoSpace=DirecTV LogoIndex=<None Defined>
CanBeViewed = 0
Category = 142 (rel=10) 404 (rel=10) 148 (rel=10) 287 (rel=10)
ChannelDefinition = 438754/12
ChannelPipIndicator = 0
ConditionalDescriptorExpr = (length 6) 0xc3 0x02 0x00 0x00 0x94 0x00 0x00 0x00
DefaultProgram = 438498/-1
FrameHeaderNetworkId = 0
GuideInclusionExpr = (length 9) 0xc3 0x02 0x00 0x00 0x94 0x80 0x88 0x1d 0x00 0x00 0x00 0x00
IndexPath = /Server/A0002d98b:87:37:0
LogoIndex = LogoSpace=DirecTV LogoIndex=19
LongName = PN5
PipChannelNumber = 885
PipFrequencyIndex = 19
ServerId = A0002d98b
ServerVersion = 37
ShortName = PN5
SourceId = 10640
Version = 6
}


Now this shows us that we don't need to play with the GIE or CDE attributes in this particular object, all we have to do here is remove the CanBeViewed=0 attribute. The guide data problem lies elsewhere.

So, I took a deeper look into the channel dump. I found that each channel, when enabled normaly via the access card, has 2 object entries listed. (the second channel is near the end of the dump, along with all of the rest of your local channels' second objects, all grouped together). When a channel is disabled, it just has one object, and the CanBeViewed=0 attribute is added. Based on how the script is written, that tells me that the channel list attribute in the /Setup/Source object excludes that second channel object. These are the only differences between when a channel is enabled and disabled.

Below is what the second object looks like for the same channel listed above:

ApgChannel 476930/10 {
AboutText = {CBS Affiliate KPHO from Phoenix, AZ}
ApgObjectId = 4585
BackupLogoIndex = LogoSpace=DirecTV LogoIndex=<None Defined>
CanBeViewed = 0
Category = 404 (rel=10) 148 (rel=10)
ChannelDefinition = 476930/11
ChannelPipIndicator = 3
ConditionalDescriptorExpr = (length 6) 0xc3 0x00 0x00 0x02 0x93 0x00 0x00 0x00
FrameHeaderNetworkId = 659
IndexPath = /Server/A000011e9:87:6:0
LogoIndex = LogoSpace=DirecTV LogoIndex=19
LongName = KPHO
ServerId = A000011e9
ServerVersion = 6
ShortName = KPHO
SourceId = 10640
Version = 1
}


Now, with the Phoenix channels disabled, even though this object does not get listed in my channel dump, the object still exists. Not only that, but when I dump it disabled, its exactly the same; the CanBeViewed=0 attribute is still there.

I would include a sample las vegas channel for all of the above, but theres no point because they show the same differences/similarities when enabled or disabled.

From here we have two possible solutions. We can try copying the information from this second attribute into the first one, and hopefuly that sets up enough for the guide data to work.

Another option would be to find out how to add all of these second objects to the channels attribute in /Setup/Source. It's possible to add more, but I can't say whether or not that will cause any problems because of the way this data is indexed (have a look at it to see what I mean).

(continued on next post)

AlphaWolf
01-24-2003, 10:36 PM
For either of these though, we need to be able to identify the FSID of the channels second object somehow. If we can't do that, that will require you to adjust the locals from the access card every time you want to add a new region. These FSIDs appear semi-static, so theres probably a listing of them elsewhere in MFS, the problem is finding it.

I am also curious to know if any versions below 3.1 have this second channel object for the enabled locals. If anybody wants to find out, I have attached the channeldump script.

Yazhol
01-25-2003, 11:19 AM
I'm having the same problem with the "extra" locals not having guide information but I'm running 2.5.2 after using SZ's upgrade. I'm getting guide data for the locals that my card is set for, Miami, but not getting guide data for the extra locals I've added using xPlusz, West Palm Beach. Any ideas?

I'll download the tcl in this thread and post my dump...

Yazhol
01-25-2003, 11:51 AM
Miami locals on card, Miami Channel.

ApgChannel 41324/10 {
AboutText = {CBS television services from WFOR-TV, 4, Miami, FL}
ApgObjectId = 186824
BackupLogoIndex = LogoSpace=DirecTV LogoIndex=<None Defined>
Category = 142 (rel=10) 404 (rel=10) 148 (rel=10) 287 (rel=10)
ChannelDefinition = 41324/11
ChannelPipIndicator = 0
DefaultProgram = 40410/-1
FrameHeaderNetworkId = 0
IndexPath = /Server/A0002d9c8:87:35:0
LogoIndex = LogoSpace=DirecTV LogoIndex=19
LongName = MI4
PipChannelNumber = 980
PipFrequencyIndex = 25
ServerId = A0002d9c8
ServerVersion = 35
ShortName = MI4
SourceId = 11349
Version = 15
}


Miami locals on card, West Palm Beach Channel...


ApgChannel 41699/10 {
AboutText = {NBC television services from WPTV-TV, 5, West Palm Beach, FL}
ApgObjectId = 578293
BackupLogoIndex = LogoSpace=DirecTV LogoIndex=<None Defined>
Category = 404 (rel=10) 150 (rel=10) 287 (rel=10)
ChannelDefinition = 41699/11
ChannelPipIndicator = 0
DefaultProgram = 40410/-1
FrameHeaderNetworkId = 0
IndexPath = /Server/A0008d2f5:87:16:0
LogoIndex = LogoSpace=DirecTV LogoIndex=20
LongName = WP5
PipChannelNumber = 900
PipFrequencyIndex = 11
ServerId = A0008d2f5
ServerVersion = 16
ShortName = WP5
SourceId = 11791
Version = 16
}

There is no "CanBeViewed" for either. I get guide data for Miami but not West Palm Beach.

AlphaWolf
01-25-2003, 03:32 PM
Ok things are a bit worse than I expected. I just parsed the entire /Server index, and found that the second object I mentioned earlier is only created after your receiver has seen its specific locals region enabled from the access card. Something similar probably happens for the versions below 3.1, because they don't get the guide data right away, it takes a few hours. With a normal guide byte change, the guide data comes instantly once the other locals appear.
.

Juppers
01-25-2003, 04:19 PM
Ok, a quick rundown on how local guide data works and how selectlocals and other multiple locals scripts work.

Local channels have 3 parts that set them apart from regular channels. The AdditionalNetworkId, ConditionalDescriptorExpr, and GuideInclusionExpr. 2.5 and earlier didn't have the AdditionalNetworkId. On boot, all locals are set CanBeViewed = 0.
During the aquiring phase, the receiver checks the card's local setting, and derives a few values from it, and sets the systems MarketId. These indirectly match up to the CDE and GIE. If the CDE and GIE match the derived value, the CanBeViewed attribute is removed and the locals show up in the guide. 2.5.2 and higher also require the ANI. The current local scripts avoid this check by simply removing the values that must be matched.

The catch, is in 2.5.2 and higher something in the aquiring phase is using the CDE, GIE, or ANI, or some combination thereof, to decide if it adds those channels to the DB to be continually populated with guide data. I believe the value that decides this is /State/SatConfig/MarketId. Unfortunately, just playing with that value has no immediate effect. Something in the normal APGwalk verifies the value before putting it into action. This means if your card says something different than the MarketId says, the marketId will be updated to match your card.

The solution, is to find a way to put the updated marketId into effect without having to change the values on the access card. Then, you could have a cron job run every 2 hours to cycle to the next local area in your list, so on and so forth. The way to accomplish this is to disassemble tivoapp enough to see what event it is firing after verifying the local market, then either making a stand alone app that will do that, or change tivoapp to skip the verify phase.

Or I could be totally wrong and persistantly updating the MarketId directly may just be the trick. I haven't had the time to play with it enough. Good luck!

AlphaWolf
01-25-2003, 04:27 PM
Something worthy of noting, the ANI in the first object matches the FrameHeaderNetworkId attribute in the second object. The first object has a zero in that spot. The second object has no ANI.

RUBiK
01-30-2003, 05:46 PM
*gratuitous bump* :p

Very interesting thread... Thanks for the info, AlphaWolf (and Juppers)...

dturturro
03-01-2003, 11:28 AM
Originally posted by Juppers
Ok, a quick rundown on how local guide data works and how selectlocals and other multiple locals scripts work.

Local channels have 3 parts that set them apart from regular channels. The AdditionalNetworkId, ConditionalDescriptorExpr, and GuideInclusionExpr. 2.5 and earlier didn't have the AdditionalNetworkId. On boot, all locals are set CanBeViewed = 0.
During the aquiring phase, the receiver checks the card's local setting, and derives a few values from it, and sets the systems MarketId. These indirectly match up to the CDE and GIE. If the CDE and GIE match the derived value, the CanBeViewed attribute is removed and the locals show up in the guide. 2.5.2 and higher also require the ANI. The current local scripts avoid this check by simply removing the values that must be matched.

The catch, is in 2.5.2 and higher something in the aquiring phase is using the CDE, GIE, or ANI, or some combination thereof, to decide if it adds those channels to the DB to be continually populated with guide data. I believe the value that decides this is /State/SatConfig/MarketId. Unfortunately, just playing with that value has no immediate effect. Something in the normal APGwalk verifies the value before putting it into action. This means if your card says something different than the MarketId says, the marketId will be updated to match your card.

The solution, is to find a way to put the updated marketId into effect without having to change the values on the access card. Then, you could have a cron job run every 2 hours to cycle to the next local area in your list, so on and so forth. The way to accomplish this is to disassemble tivoapp enough to see what event it is firing after verifying the local market, then either making a stand alone app that will do that, or change tivoapp to skip the verify phase.

Or I could be totally wrong and persistantly updating the MarketId directly may just be the trick. I haven't had the time to play with it enough. Good luck!

So would it be wise for those of us having local problems with 2.5.2 to return to 2.5?