RedRat RedRat-X Integration Manual Download Page 5

3.6

 

RedRat Control 

Most of the applications described so far are intended for the output of IR signals to control TVs and 
STBs. RedRat Control operates differently in that it is designed to allow control of applications on a PC 
via infrared remote control. For example, if a media player is running, RedRat Control can be configured 
to respond to IR commands from a remote control handset and send appropriate instructions (play, 
pause etc) to the media player. 

4

 

Platform Support 

Historically, software for RedRat devices has been developed on Microsoft Windows using the .NET 
framework, so this is where there is still the best RedRat device support. However, many applications, 
particularly larger scale STB testing systems often use Linux, so we have now ensured that the RedRat-X 
is supported on Linux. 
 
The RedRat core code (RedRat.dll) will run on both Windows and on Linux/Macs using Mono. 
Applications using the console/terminal window and not using any Windows-specific functionality will 
therefore also run using Mono. At present, Windows applications using a GUI interface (WinForms or 
WPF) will not run on Linux or Macs, though developing cross-platform GUI applications is a potential 
future area of development. 
 
With the RedRat-X, both USB and network communication is supported on Windows and Linux. 

5

 

RedRat Hub - Sending Commands from Applications 

RedRat Hub provides perhaps the most straightforward mechanism for integrating RedRat devices with 
third party software. 
 
When RedRat Hub starts, it loads any required IR datasets and then establishes communication with 
RedRat devices. Client applications then open a socket to RedRat Hub and send quite simple commands, 
such as: 
 

ip="192.168.1.40" dataset="Sky+" signal="play" output="3" 

 

This will send the IR signal 

play

 from the 

SKY+

 dataset via output 3 of the RedRat device found at the 

given IP address (irNetBox or RedRat-X). 
 

name="RRX-1" output="4" dataset="SKY+" signal="play" 

 
The second example sends the same signal via output 4 (blaster output) on the RedRat-X with the name 
“RRX-1”. 
 
RedRat Hub is a very scalable application in that it can support a large number of client applications (in 
the 100s) concurrently sending commands to RedRat devices. It manages any resource contention, i.e. it 
will ensure that commands are sent to RedRat devices in a manner that they can handle. 
 
Example client code is available for C#, Java, Python, Perl and PHP. 

Summary of Contents for RedRat-X

Page 1: ...The RedRat X Integration Guide ...

Page 2: ...ub Sending Commands from Applications 5 6 Using the RedRat SDK 6 6 1 RedRat X Discovery 6 6 2 Simple Communication Tasks 6 6 3 IR Signal Output 7 6 3 1 Using the Front IR Blaster 7 6 3 2 Using the Rear IR Ports 8 6 4 IR Signal Input 8 6 4 1 The Wide Band Detector 8 6 4 2 The Narrow Band Detector 9 6 5 Handling USB Plug Events 10 7 Porting RedRat3 II Applications to the RedRat X 11 7 1 USB Device D...

Page 3: ...Ds indicate the operational state of the unit please see the User Guide for details The LED colour and brightness are also adjustable via software control so applications can use this to indicate the state or provide feedback 2 2 Rear USB The RedRat X is powered via its USB port This can be connected to a computer and in which case USB will also be used to control the unit Network Ethernet control...

Page 4: ...ther RedRat applications and with the SDK The IR data can also be exported in other formats for use in different applications or on different platforms 3 3 RedRat Scheduler If it is necessary to setup a set of remote control operations to happen at particular times then the Scheduler application can be used to do this Individual signals or short sequences of signals macros can be programmed to be ...

Page 5: ...WPF will not run on Linux or Macs though developing cross platform GUI applications is a potential future area of development With the RedRat X both USB and network communication is supported on Windows and Linux 5 RedRat Hub Sending Commands from Applications RedRat Hub provides perhaps the most straightforward mechanism for integrating RedRat devices with third party software When RedRat Hub sta...

Page 6: ...st There are a number of ways to do this or do selective searches but perhaps the most straightforward way to find all RedRat Xs is var rrxLis RRUtil FindRedRats LocationInfo RedRatType RedRatX A list of generic LocationInfo objects are returned which contain details about the RedRat device This search will take a few seconds to return as it waits for responses from the network broadcast If only U...

Page 7: ...mple synchronous OutputModulatedSignal method is used this will transmit the signal via the front blaster Output an IR signal via the blaster rrx OutputModulatedSignal sig Console WriteLine IR out via blaster using sync API The async API can also be used where higher IR output throughput is required and concurrent IR transmission is needed from the rear IR ports and the blaster The code below will...

Page 8: ...mple except the rear IR ports are selected rather than the front blaster 6 4 IR Signal Input As with the RedRat3 II device the RedRat X has two IR detectors for different purposes as described below 6 4 1 The Wide Band Detector This allows the device to sample the raw IR signal so is used for IR signal capture learning It is fairly short range in operation the recommended distance being between 1m...

Page 9: ...g code to use the narrow band detector is quite similar to the wide band except that the detector is turned ON for the duration of the period it is in use During this period any number of input events may be received depending on how often the RCU buttons are pressed or what other IR noise may appear as data EventHandler rcDetectorSignalInHandler s ea var siea ea as SignalEventArgs if siea null re...

Page 10: ... find the RR X that has just been plugged in var xLis RRUtil FindRedRats LocationInfo RedRatType RedRatX_USB OfType RedRatXUsbLocationInfo var xLi usbLis FirstOrDefault li li SerialNumber args deviceSerialNumber Console WriteLine Plugged in device is xLi Name This is then wired up to the UsbPlugHandler object Add plug unplug handler UsbPlugHandler Instance UsbPlugEvent usbPlugHandler Console Write...

Page 11: ...ole WriteLine No USB RedRat devices found return Where lis is a list of LocationInfo objects i e objects describing the device and its location Code developed for the RedRat3 II device will use the IRedRat3 interface which is also implemented by the RedRat X So by creating an object of this type it can be used regardless of whether the underlying implementation is a RedRat3 II or RedRat X IRedRat3...

Page 12: ... can host one RF module currently either a Bluetooth Classic and Low Energy module or an RF4CE module As Bluetooth and RF4CE control of TVs and STBs is more complex than using infrared remote control it is not done via APIs in the RedRat dll but using our Toolbox applications and HTTP REST API In addition there is no generic standard for either Bluetooth or RF4CE in that each type of TV or STB has...

Reviews: