Hi all,
Trying to control my AV Receiver (Onkyo) using RS232. Using a straight through cable.
I have added a device AV Equipment (AVC-A1SRA RS232) (Device #37, Device Template #71, controlled by: CORE)
Automatically I get a Generic Serial Device with the same settings.
I also adjusted Com Port Paritybit/stop to reflect N81
I also adjusted Plug & Play detection script to use 20_OnkyoReceiver.sh but this does not seem to work...
When I send a command to #37 like this: /usr/pluto/bin/MessageSend dcerouter 0 37 1 192
the receiver responds correctly. So we know RS232 communication is working.
When I try to send a command using the test buttons next to the codes from the AV Equipment, A/V Properties screen, a popup says the command has been sent to #1 but nothing happens.
In DCErouter.log I find this:
08 01/15/10 13:24:14.549 Received Message from 0 (unknown / ) to 1 (CORE / Bureau), type 1 id 191 Command:Send Code, retry none, parameters: <0x735cbb90>
08 01/15/10 13:24:14.549 Parameter 9(Text): <$"!1PWR00\r"$> <0x735cbb90>
05 01/15/10 13:24:14.599 Socket::ReceiveData 0x86c9818 failed, bytes left 0 start: 8460000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 73 Incoming_Conn Socket 73 127.0.0.1 <0x735cbb90>
05 01/15/10 13:24:14.599 Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 73 127.0.0.1 <0x735cbb90>
05 01/15/10 13:24:14.599 TCPIP: Closing connection to -1003 (Router Dev #0) 0x86c9818 m_Socket: -1 <0x735cbb90>
05 01/15/10 13:24:14.599 Router::RemoveAndDeleteSocket 0x86c9818 -1003 <0x735cbb90>
01 01/15/10 13:24:30.182 DCEConfig::WriteSettings modified LastSearchTokenUpdate=LastSearchTokenUpdate=1263558174 <0xa1ffeb90>
07 01/15/10 13:25:43.040 Event #75 has no handlers <0xb1bf6b90>
07 01/15/10 13:25:43.040 Received Message from 18 (Asterisk / Bureau) to -1001 (unknown / ), type 2 id 75 Event:Extensions Status, retry none, parameters: <0xb1bf6b90>
07 01/15/10 13:25:43.040 Parameter 13(Text): SIP/200:Registered <0xb1bf6b90>
My conclusion is that the link to the GSD device is not set up properly.
I see the Core receives the MessageSend, but from 0 Unknown, and it is not rerouted to #37 GSD.
Where did I go wrong here?
What also puzzles me is that in Plutoadmin, switching from the AV Equipment view to
the Generic Serial Devices view, the fields with information about Paritybit/stop and discrete volume seem to be empty, whereas they are not empty, and reappear at other times.
Is it okay for the "This device is controlled via" to show no objects? (see attached screenshot)
I feel I'm very close, but not quite there yet!
Thanks for helping out,
Erwin
Please post your pnp script so i can take a look
does the system even auto detect if not then your pnp script is wrong and start with that...
you can test by using the test serial command
ex..
this is for my Elite
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 9600 -t "\r\s500m\rPO\r" -i 4 -s "PWR0"
-p $3 <-- is the comport so for a term test it should look like this -p <comport name>
-P N81 <-- parity
-b 9600 <-- baudrate
-t "\r\s500m\rPO\r" <-- text to send \r <-- carrage return \s500m <-- wait 500 miliseconds \rPO <-- carrage return and power on \r <-- carrage return
-i 4 <-- 4 iterations
-s "PWRO" <-- string that is returned that you are parsing for
so get your commands for your reciver and test with that if you cant talk to it with those basic commands then you have something wrong
once you can confirm that it is talking to the device then create an ir group if one doesnt exsit for your reciver and put all your code in there
Mandingo
irc linuxmce-devel and linuxmce
Mandingo, thx for your effort and reply.
I have not used any pnp script.
I have entered 20_OnkyoReceiver.sh in the #71 template, this seems to be a standard script present in /usr/pluto/bin.
I've tried to run it from cli, but it said not an Onkyo if I remember.
I verified RS232 communication in 2 ways:
KDE -> Cutecom
MessageSend to #37 DSG
As stated:
When I send a command to #37 like this: /usr/pluto/bin/MessageSend dcerouter 0 37 1 192
the receiver responds correctly. So [color=blue]we know RS232 communication is working[/color].
I've been searching through the wiki, amongst others here:http://wiki.linuxmce.org/index.php/How_to_add_your_own_GSD_device (http://wiki.linuxmce.org/index.php/How_to_add_your_own_GSD_device)
So what it boils down to:
- 1. AV device was created, and auto-created GSD #37
- 2. GSD #37 is properly linked to /dev/ttyS0
That we know because I can use MessageSend like:/usr/pluto/bin/MessageSend dcerouter 0 37 1 192 - 3.The codes present in LinuxMCE DO work with my receiver (I sent 192, but can send any code)
- 4. It is the link between the Core (DCErouter.log) and GSD that is faulty. (At least I think so, as commands are sent to #1 (core) but aren't routed to #37 (GSD)
Have look at the attached screenshot. I've added some comment & pointer.
I think it must be something 'small & stupid' that I'm overlooking..?
I'll look into your suggestion to create an IR Group, but I know the codes present in device #71 work.
Erwin
i dont see a devicedata #78 for baudrate that is missing
also you have to create a ir command group for your serial commands