Author Topic: USB-UIRT Learning: I think it's sending multiple instances of each #?  (Read 6511 times)

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
My USB-UIRTS arrived today, so I set out to learn all those remote codes on my "living-room" installation.

I was able to add devices, like my Toshiba 32" CRT TV, my LG LH-T750TB Surround Sound Amp, and my Bell ExpressVu 2700 Receiver.

I was able to 'learn' what commands I figured we needed to know.

I then went into MythTV Setup and added:

/usr/pluto/bin/TuneToChannel.sh 67 2

into the external change channel field for the Dish Receiver, pulling 67 as the device ID of the 2700 Receiver from the admin page, and pulling video source id 2 out of the database, as instructed here: http://wiki.linuxmce.org/index.php/TuneToChannel.sh

So then it was time to go to Start > Media > TV and see what happens.

Low and behold, I can see the USB dongle flashing and the dish receiver flips to a channel. Partial Success! Yippie!

When I used the LinuxMCE guide to select, say channel 205, lots of flashes came out and I got flipped to about 3 or 4 different stations before everything stopped.

This is making me think the pronto codes were learned OK but it captured many presses of each number and is therefore sending multiple 2's, 0's and 5's? Would that make sense?

How many streams of numbers should be in a normal pronto code? I assume I can go back and edit the pronto codes and strip out the duplicates?

eNoodle

  • Veteran
  • ***
  • Posts: 93
    • View Profile
hi freyman,

use ProntoUtil to check your Pronto codes. You can download it here:
http://www.remotecentral.com/cgi-bin/files/rcfiles.cgi?area=pronto&db=other&br=utilities&dv=irprograms&md=prontoutil&kw=&st=&ar=&dt=&so=&pg=2&file=utilities/prontoutil.zip

There are also some other tools, which are extremly helpful if you need to cleanup your Code, have to convert them from CCF or if you want to generate a whole set of codes to find a specific discrete code.


eNoodle

gazlang

  • Guru
  • ****
  • Posts: 210
    • View Profile
I don't think its a fault of too many pronto code numbers. I had this fault with channel changing on my SKY box using the UIRT. Apparantly, its a problem with the ir transmitter itself and can be fixed to send single instances of your channel change codes by using a separate ir transmitter plugged into the UIRT's mini jack port.

There are previous threads on this forum relating to this. Have a scan for them.
AMD Athlon 5800+ X2
Asus M2N-SLI-Deluxe
2x Corsair XMS6400 DDR2 512mb
Samsung 400GB SATA + 500GB SATA
nVidia GeForce 7300GT
Hauppauge Nova-T 500
Hauppauge PVR-500
Thermaltake low-noise 450w PSU
Thermaltake Bach Case w/ imon vfd
Fiire Remote
UIRT

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
I don't think its a fault of too many pronto code numbers. I had this fault with channel changing on my SKY box using the UIRT. Apparantly, its a problem with the ir transmitter itself and can be fixed to send single instances of your channel change codes by using a separate ir transmitter plugged into the UIRT's mini jack port.

There are previous threads on this forum relating to this. Have a scan for them.

 Hi, thanks for the reply.

 I was using an external dongle. I didn't have much time to test. I was even wondering if the receiver was getting double signals, but I won't know till I hook it up again, which will be Saturday.

 I just ran the last of the network cables in the wall this morning and will be ready to put the core into place Saturday when the better half is at work, and then I can flip on the media director in the living-room and get that going, and then test and play away.

 One of the things I noticed is you can go back and edit the pronto codes but when doing that, there's no test button. I do remember reading in the forums that another person deleted the device, then added it back, picked the template, and added/tested from there.

 EDIT: Found you can edit/delete/test if you go to Web Admin -> Wizard -> Devices -> A/V Equipment. Look for your piece of equipment you want to adjust and click on the A/V Properties button and voila! [end edit]

 I will do some searching for that thread and the number repeats and see what else I can learn before Saturday.

 Thanks again!
« Last Edit: June 13, 2008, 01:02:23 am by freymann »

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
I've had a mantis ticket in on this for a while...
http://mantis.linuxmce.org/view.php?id=3959

What is boils down to is this piece of code:
Code: [Select]
In src/IRBase/IRBase.cpp, around line 200 you can see
iRepeat = 4;

In the section of code that follows, I added:
iRepeat = 2; at line 216 to force the iRepeat variable to 2. With this change, both of my (different brand FTA) satellite boxes work as they should.


@ line 201, if( pmsg->m_mapParameters.find(COMMANDPARAMETER_Repeat_Command_CONST)!=pmsg->m_mapParameters.end() )
checks to see if the Repeat command parameter is set.. Apparently it is never set, so to fix this, it needs fixed where the command is sent without the repeat command parameter.
Since IR is such a lossy signal prone to failed delivery, LMCE sends each command 4 times by default (As shown in the code above). Many devices seem to filter out the extra signals thrown to them, others have a problem however.
When I hacked in my fix above, i found that if I put the iRepeat variable to 1 and only sent each code once, i had only about 75% success in the command being delivered successfully. Setting iRepeat to 3 ended up with multiple changes once in a while. Setting to 2 worked for me on this device (a Vizio LCD).

My quick hack listed above did fix it.. However, you could also go to each IR command and add the Repeat_Command command parameter and it should work. The only problem with this is that some devices may require different Repeat_Command command parameters to operate properly, and attaching the Repeat_Command parameter to the commands directly would mean that any device would have to use what would then be coded for that command. For this reason, for a solid fix would be to add the Repeat_Command to an A/V device so that each device could use a different value, then modify IRBase.cpp to check for that. The only problem with that is that for an A/V device, it would be better as a Device_Data entry (as there really isn't a "Master command" to add this command parameter to). So now with this rambling, maybe its best to keep the command parameter and its associated code as it is, but also add support for a Repeat device data field at the device level, and have IRBase.cpp decide which one to use (if any, in which case it defaults to 4 as it does now). This would ensure that all prior commands and Devices operate as they did before, but any new devices including a Repeat device data parameter will have control over this functionallity.

There may be a little bit more to it, but from looking into it breifly this is what I remember. I plan on working on this once I get my LMCE system set back up.
« Last Edit: June 12, 2008, 11:31:19 pm by jondecker76 »

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
I've had a mantis ticket in on this for a while...
http://mantis.linuxmce.org/view.php?id=3959

What is boils down to is this piece of code:
Code: [Select]
In src/IRBase/IRBase.cpp, around line 200 you can see
iRepeat = 4;

In the section of code that follows, I added:
iRepeat = 2; at line 216 to force the iRepeat variable to 2. With this change, both of my (different brand FTA) satellite boxes work as they should.
[/quote]

 That's interesting and something I will keep in mind.
« Last Edit: June 14, 2008, 07:00:17 pm by freymann »

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
I don't think its a fault of too many pronto code numbers. I had this fault with channel changing on my SKY box using the UIRT. Apparantly, its a problem with the ir transmitter itself and can be fixed to send single instances of your channel change codes by using a separate ir transmitter plugged into the UIRT's mini jack port.

There are previous threads on this forum relating to this. Have a scan for them.

 Today I have put everything in place and just tested the pronto codes I recorded for the Bell Dish. In test mode, they work fine, and when I test a number, it is only sent once.

 This works fine with our without the IR dongle connected into the main uirt.

 Now, when I call up the LinuxMCE TV Guide and select a channel, I'm indeed getting mutliples of each number.

 504 gives 5,5,5,5 0,0,0,0,4,4,4,4 as near as I can tell. There is other text on the screen preventing me some seeing the exact number of repeated numbers.

 If I edit /src/IRBase/IRBase.cpp, isn't there something I would need to compile and put in place? I have no idea how to do that :-(

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
I was able to teach the core about the other bell dish receiver I have (4700) and it too sends the channel number 4 times.

At the moment, this is a rather large problem.

Is editing that *.cpp file the solution? what steps do I need to take to do that?

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
well the changes you would make to IRBase.cpp would need compiled. I did a page on the wiki a while back titled "Setting up a development environment" - you would have to do that to compile the change. Its not easy, and also puts you at risk of trashing your install. But if you are confident and brave, set up a development environment, and compile the change. It is a temporary solution that does work (thats how I'm doing it now)

However, I myself am setting up another dev environment, and will be looking for a better permanent solution that will allow us to just add a device data entry to our device template and adjust the repeat parameter that way.

But yes, this is what you need to fix the problem. Some devices filter the extra repeats out, others don't. Thats why it may seem inconsistant, but it always fires off 4 commands by default

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
well the changes you would make to IRBase.cpp would need compiled. I did a page on the wiki a while back titled "Setting up a development environment" - you would have to do that to compile the change. Its not easy, and also puts you at risk of trashing your install. But if you are confident and brave, set up a development environment, and compile the change. It is a temporary solution that does work (thats how I'm doing it now)

 I saw that page a while ago...

 Hmmm. I would try to do this on the box I just retired, but it's intel, and the core and media director where I'm having this problem are using the AMD64 code...

 I would assume I can't load up an i386 version on my spare box, install the development version, compile and then copy over to the AMD's due to the i386 vs AMD64 thing then, right?

 I've been quite pleased with the way everything has gone this trip around. I don't really have a choice here, I need to be able to change channels on the external dish.

 What about this then?

 What I made the "development" machine the media director? I guess that way, if I screwed it up, I could delete the MD and then recreate, without bringing down the core? Would that work?

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: USB-UIRT Learning: I think it's sending multiple instances of each #?
« Reply #10 on: June 15, 2008, 04:10:20 am »
Never tried it, but sounds like it would be worth a try.

Another option is to start a thread, we can post the changes needed, and have people with both 32 and 64 bit development environments going compile the module, then we can post them to the wiki under known issues. I would be willing to do a 32 bit compile (once i get my dev environment set back up)

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: USB-UIRT Learning: I think it's sending multiple instances of each #?
« Reply #11 on: June 15, 2008, 04:56:33 am »
Never tried it, but sounds like it would be worth a try.

Another option is to start a thread, we can post the changes needed, and have people with both 32 and 64 bit development environments going compile the module, then we can post them to the wiki under known issues. I would be willing to do a 32 bit compile (once i get my dev environment set back up)

 That sounds like a great idea!

 I may have some time Sunday, and if not, Monday then... I will work on setting up a development environment for AMD64.

 Is this file I need to change just an individual file? or is it part of the kernel? As you can see, I will need some guidance, but I'm pretty good at this stuff too.

 Since you seem to be more the driver, why don't start the 'new thread' and I'll join in.

 Thank you very much... and may we bring excellent results to the LinuxMCE project ;-)

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: USB-UIRT Learning: I think it's sending multiple instances of each #?
« Reply #12 on: June 16, 2008, 12:23:58 am »
well the changes you would make to IRBase.cpp would need compiled. I did a page on the wiki a while back titled "Setting up a development environment" - you would have to do that to compile the change. Its not easy, and also puts you at risk of trashing your install. But if you are confident and brave, set up a development environment, and compile the change. It is a temporary solution that does work (thats how I'm doing it now)

 I followed the instructions here http://wiki.linuxmce.org/index.php/Setting_Up_A_Development_Environment and it aborted with this error:

make[2]: Leaving directory `/home/linuxmce/charon-merge'
make video_wizard_videos
make[2]: Entering directory `/home/linuxmce/charon-merge'
Downloading wizard videos
--17:56:20--  http://www.charonmedia.org/video-wizard-videos-429.tar
           => `video-wizard-videos-429.tar'
Resolving www.charonmedia.org... 206.53.51.112
Connecting to www.charonmedia.org|206.53.51.112|:80... failed: Connection refused.
make[2]: *** [build/state_videos_downloaded_429] Error 1
make[2]: Leaving directory `/home/linuxmce/charon-merge'
make[1]: *** [create_cdrom] Error 2
make[1]: Leaving directory `/home/linuxmce/charon-merge'
make: *** [all] Error 2

 I'm thinking the file is either gone or the site is unavailable at the moment?

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: USB-UIRT Learning: I think it's sending multiple instances of each #?
« Reply #13 on: June 16, 2008, 01:50:20 am »
I updated that page today.. I had to set up a new development environment myself. It is much easier now than it used to be. Please revisit that page and start all over - it should get you in this time.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: USB-UIRT Learning: I think it's sending multiple instances of each #?
« Reply #14 on: June 16, 2008, 01:56:09 am »
I updated that page today.. I had to set up a new development environment myself. It is much easier now than it used to be. Please revisit that page and start all over - it should get you in this time.

 I think that's the version I just followed... I just did this a few hours ago and when I reloaded the page it looked the same.

 Maybe you can have a look at this new thread for me?

http://forum.linuxmce.org/index.php?topic=5510.0

 Thanks!