I have tried these codes, but this is what I get when i try to get it to work:
== ATTEMPT FRESH START ==
1 03/09/13 09:33:03 /usr/pluto/bin/Spawn_Device.sh 164 (spawning-device) 22440 Dev: 164; Already Running list: 15,16,18,19,29,30,31,87,151,38,21,56,163,22,59,25,26,54,27,23,50,
== FRESH START ==
1 03/09/13 09:33:03 /usr/pluto/bin/Spawn_Device.sh 164 (spawning-device) device: 164 ip: localhost cmd_line: Generic_Serial_Device
0 03/09/13 09:33:03 164 (spawning-device) Entering 164
========== NEW LOG SECTION ==========
1 03/09/13 09:33:03 164 (spawning-device) Starting... 1
1 03/09/13 09:33:03 164 (spawning-device) Found /usr/pluto/bin/Generic_Serial_Device
05 03/09/13 9:33:03.656 Connection for client socket reported NEED RELOAD IP=::ffff:127.0.0.1, device 164 last error 2 <0xb77476d0>
05 03/09/13 9:33:03.656 The router must be reloaded before this device is fully functional <0xb77476d0>
05 03/09/13 9:33:03.661 void ClientSocket::Disconnect() on this socket: 0x90520c0 (m_Socket: 5) <0xb77476d0>
05 03/09/13 9:33:03.713 Connection for client socket reported NEED RELOAD IP=::ffff:127.0.0.1, device 164 last error 2 <0xb77476d0>
05 03/09/13 9:33:03.716 Running without DeviceData, will try to add device <0xb5943b70>
01 03/09/13 9:33:03.755 GSD Port is not specified. Instantiating non-IO Wrapper. <0xb5943b70>
RCODE:
0:require 'Ruby_Generic_Serial_Device'
1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper
2:end
3:class Device_164 < Ruby_Generic_Serial_Device::RubySerialWrapper
4:#### START SETTERS ####################################################################
5:def initialize()
6:super
7:@returnParamArray=Array.new
8:end
9:#### END SETTERS ####################################################################
10:end
12:05 03/09/13 9:40:23.907 Got a reload command from 0 <0xb5943b70>
05 03/09/13 9:40:24.205 void ClientSocket::Disconnect() on this socket: 0x9052628 (m_Socket:
<0xb77476d0>
Return code: 2
2 03/09/13 09:40:24 164 (spawning-device) Device requests restart... count=1/50 dev=164
Sat Mar 9 09:40:24 CST 2013 Restart
========== NEW LOG SECTION ==========
1 03/09/13 09:40:32 164 (spawning-device) Starting... 1
1 03/09/13 09:40:32 164 (spawning-device) Found /usr/pluto/bin/Generic_Serial_Device
05 03/09/13 9:40:34.010 Connect() failed, Error Code 111 (Connection refused)) <0xb782a6d0>
05 03/09/13 9:40:35.011 Connect() failed, Error Code 111 (Connection refused)) <0xb782a6d0>
05 03/09/13 9:40:36.012 Connect() failed, Error Code 111 (Connection refused)) <0xb782a6d0>
05 03/09/13 9:40:37.013 Connect() failed, Error Code 111 (Connection refused)) <0xb782a6d0>
05 03/09/13 9:40:38.014 Connect() failed, Error Code 111 (Connection refused)) <0xb782a6d0>
05 03/09/13 9:40:39.016 Connect() failed, Error Code 111 (Connection refused)) <0xb782a6d0>
01 03/09/13 9:40:45.942 Could not determine network address for device 164. <0xb5a26b70>
01 03/09/13 9:40:45.942 Could not add new Device Node. <0xb5a26b70>
RCODE:
0:require 'Ruby_Generic_Serial_Device'
1:class Command < Ruby_Generic_Serial_Device::RubyCommandWrapper
2:end
3:class Device_164 < Ruby_Generic_Serial_Device::RubySerialIOWrapper
4:#### 123 ####################################################################
5:def cmd_123(text, cmd=nil)
6:@returnParamArray.clear
7:RemoteKey("info")
8:return @returnParamArray
9:end
10:#### 126 ####################################################################
11:def cmd_126(cmd=nil)
12:@returnParamArray.clear
13:RemoteKey("guide")
14:return @returnParamArray
15:end
16:#### 190 ####################################################################
17:def cmd_190(streamid, cmd=nil)
18:@returnParamArray.clear
19:RemoteKey("enter")
20:return @returnParamArray
21:end
22:#### 204 ####################################################################
23:def cmd_204(cmd=nil)
24:@returnParamArray.clear
25:RemoteKey("0")
26:return @returnParamArray
27:end
28:#### 205 ####################################################################
29:def cmd_205(cmd=nil)
30:@returnParamArray.clear
31:RemoteKey("1")
32:return @returnParamArray
33:end
34:#### 206 ####################################################################
35:def cmd_206(cmd=nil)
36:@returnParamArray.clear
37:RemoteKey("2")
38:return @returnParamArray
39:end
40:#### 350 ####################################################################
41:def cmd_350(cmd=nil)
42:@returnParamArray.clear
43:buf = conn_.Recv(100, 500)
44:if !(buf.empty?)
45: msg = buf.strip
46: log(msg)
47: log("")
48: log("***********************************************************")
49:end
50:return @returnParamArray
51:end
52:#### 355 ####################################################################
53:def cmd_355(cmd=nil)
54:@returnParamArray.clear
55:$logFile = File.new("/var/log/pluto/DirecTV.log", "w")
56:return @returnParamArray
57:end
58:#### PRIVATE METHODS ####################################################################
59:def RemoteKey(key)
60:
61:log("***************************************************************")
62: log("********** Sending key=" + key + "
63:**********")
64:
65:log("***************************************************************")
66: conn_.Send("GET\x20/remote/processKey?key=" + key + "&hold=keyPress\x20HTTP/1.1\x0D\x0AContent-Length:\x200\x0D\x0A\x0D\x0A")
67:end
68:
69:def log(word)
70: logTime = Time.now
71: timeStr = logTime.strftime("%d-%m-%Y %H:%M:%S ")
72:
73: $logFile.print( timeStr + word + "\n" )
74: $logFile.flush()
75: print(word + "\n")
76:end
77:#### START SETTERS ####################################################################
78:def initialize()
79:super
80:@returnParamArray=Array.new
81:end
82:#### END SETTERS ####################################################################
83:end
85: