Arduino – testing IPTV devices (STB).
We had over ~200 STB devices (Motorola, Zyxel, MAG-250) which came from network (some working, some had issues). It’s hard to have someone test them one by one to eliminate those which had problems from units which are ok. I created a simple ‘human’ simulator which generated infrared codes to STBs to simulate channel changes. We connected 5, 6 devices at once and left them over night. Switching channels tests were run even for 48 hours. After that we checked log files for losing multicast frames, sound problems or other glitches. For now – it does the job!
Source:
— cut —
#include <IRremote.h>
IRsend irsend;
int powerPin = 11;
int txPin = 12;
int hits = 0;
// channel change
unsigned int magUP[68] = {950, 850, 1800, 850, 900, 1700, 950, 850, 900, 850, 1800, 1700, 950, 800, 950, 850, 900, 850, 1800, 850, 950};
unsigned int motkaUP[68] = {2550,1900,600,350,300,300,350,300,600,650,350,300,300,350,300,300,350,300,300,350,300,
300,350,300,300,350,300,300,350,300,300,350,300,300,350,300,600,350,300,350,300,650,300,350,
300,350,300,300,650,650,600,650,300,350,300,300,650,};
void setup()
{
pinMode(powerPin, OUTPUT);
pinMode(txPin, OUTPUT);
Serial.begin(9600);
Serial.begin(115200);
}
void loop() {
digitalWrite(powerPin, HIGH);
digitalWrite(txPin, LOW);
// channel change every 15 secs
delay(15000);
digitalWrite(txPin, HIGH);
irsend.sendRaw(magUP,68,38);
delay(500);
irsend.sendRaw(motkaUP,58,38);
delay(1000);
digitalWrite(txPin, LOW);
}
— cut —
Using Arduino and IR receiver and transceiver you can emulate almost every device which communicates over IR easily.
Below – finished devices: