Bugzilla – Bug 13621
Enable RAWI on Squeezebox hardware
Last modified: 2009-08-24 07:18:46 UTC
I just figured I'd make a more "official" feature request for what's in: http://forums.slimdevices.com/showthread.php?t=63872 If the hardware supports it, I'd like to be able to get the raw infrared codes ouf of Squeezebox hardware. It looks like this was once supported with "RAWI" in SlimProto, but that command isn't sent anymore by devices (or at least the newer ones I have, a SB3 and Boom). With this, I could build better LIRC support and not require another infrared receiver in front of my TV. I have something that works now, but it's harder to configure out of the box because it doesn't work with existing lircd.conf syntax. I'd like to just receive the packets and shove them directly into lircd (or even have the squeezebox itself do it, though that's probably a much larger change). I worry about the lag from going squeezebox -> squeezecenter -> lircd -> app but I hope it won't be much worse than current squeezebox lag which is fine for me. Thanks.
Felix: Is this possible?
James: Yes, it is. It is disabled by default because it can generate quite some traffic. But it can be enable from a SC plugin just fine. See IR Blaster plugin - switchIRRepeaterStatus(). First a plugin needs to register a callback function to receive RAWI data then it needs to tell the player to actually send them. That is achieved by sending a 'ilrn' command with one parameter about how many packets one would like to receive (max. 255). sub switchIRRepeaterStatus { my $class = shift; my $client = shift; my $status = shift; if( $status eq "on") { # Check if function is available if( UNIVERSAL::can( "Slim::Networking::Slimproto","setCallbackRAWI")) { Slim::Networking::Slimproto::setCallbackRAWI( \&RAWICallbackIRRepeat); } } if( $status eq "off") { # Check if function is available if( UNIVERSAL::can( "Slim::Networking::Slimproto","clearCallbackRAWI")) { Slim::Networking::Slimproto::clearCallbackRAWI( \&RAWICallbackIRRepeat); } } if( ( $status eq "on") || ( $status eq "more")) { # Ask SB2/SB3 or Transporter to send 10 ir codes (containing x samples) my $num_codes = pack( 'C', 10); $client->sendFrame( 'ilrn', \$num_codes); } }