Author
Topic: Easy question (Read 5075 times)

OK this should be an easy one but I've tried several different combinations and am not able to get it to work.

Using TestSerialPort works successfully for turning on my tv with the below command.sudo ./TestSerialPort -p /dev/ttyS0 -t "ka 01 01\r"

...response backa 01 OK01x

The linuxmce web interface test is a different story. I click A/V properties for my TV and click the Test code button for turning on my TV and nothing ever happens no matter what I seem to put here.

The default is below which doesn't work. Can anyone please tell me exactly what to put for turning on my TV based on the succssful test above? Once I get one command right I should be able to figure the rest out. (I've also tried <$"ka 01 01\r"$> which doesn't work)SendCommand("ka","00",1)

Is the Com Port on PC properly specified, and is it set to /dev/ttyS0?

If so, follow the log of the Generic Serial Device for this device # when it starts up, look for any error messages.

-Thom

Yep and yep. I'm not sure where to look for this. Is it in one of the /var/log/pluto? If so I don't see anything that resembles what I'm supposed to be looking for. Are you sure I'm not typing the string wrong in the web interface? Maybe it needs a different format from what I was using when I was using the Testserialport script. As long as that works I would think I'm just not using the correct format in the web interface.

the top most part of the log is missing. This is the most important. An important indicator is that conn_ isn't defined. The only way this can happen is if GSD can't find the serial port or TCP port in question.

Well I sort of made progress. My logs weren't refreshing and it was because the device somehow got disabled. Now I got the log updated and it isn't showing that above error anymore... Here is the updated log. Any other ideas?

The device will become disabled if it can't start. It sounds like you are missing some parameters on the device page. Make sure you have all of the com settings correct.

Ok, I am past the device becoming disabled part now. I am 100% sure linuxmce com port settings are correct and that communication appears to be working. I have been using a com port directly connected to my PC. I have spent countless hours now trying to get this to work. I decided to buy what I am eventually going to need anyway... a serial to network hub... I have some more info and I am now even more confident that I have configuring the com settings correctly because I can see when data is sent to the hub and that linuxmce is connected to it successfully via a web interface:

Port 1 status: openfrom ip address: 192.168.80.1Baud settings: 9600 8/N/1 (these settings are not set by the serial hub either.. .they are received from linuxmce)

Now that I know communciation is wokring... AND i actually knew this in the first place anyway when I used TestSerialPort (sudo ./TestSerialPort -p /dev/ttyS0 -t "ka 01 01\r") how in the heck can I get the web interface to work and send "ka 01 01\r" (since I know this is the string that works with TestserialPort)

I am still very confused on why "test command" is not logging anything to the follow log and still very confused on what to use for the code. I really believe the code I am using is not correct for my tv since testserialport works. Am i supposed to be using sendcommand or command? What do i need to enter in the code in order for linuxmce web test command to send strictly this string for the tv on command "ka 01 01\r". I believe this is really what I need answered. thank you.

I don't think it will log it until the device is started. This will only happen once you have restarted the router. While you are test sending commands, it is not responding to states or other events from the router. I use the <$""$> format in my drivers. The only time I have used sendcommand is when I am making ir drivers using a gsd so that I can create ir macros.

And the device is definitely started as shown by the log without any errors. Below means that the driver is working correctly right? Are there any other logs I can view to help with troubleshooting this?