Embedded Automation Forum  

Go Back   Embedded Automation Forum > mHome Products > mControl Software Integration
Forums FAQ Members List Calendar Search Today's Posts Mark Forums Read

mControl Software Integration Includes information on Software Development Kits (SDK), Driver Development Kits (DDK) , etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2008, 07:28 PM
JNBrook JNBrook is offline
Member
 
Join Date: Apr 2008
Posts: 76
Question xml file for a Brillian TV Driver

I am trying to write an xml file for a Brillian TV and am stuck...

I can get the connection to open properly with the correct connection speed stop bit, parity, etc. I can see from the port monitor that a certain number of bits are being sent.

Here is where I get stuck, I am not sure how to send the ASCII characters in the xml file. I have confirmed that the commands are correct by sending them manually.

The two commands I would like to send are:
Power on = *(Carriage Return) repeated 10 times
Power Off = *SE|POWR|OFF(Carriage Retrun)

The xml file I have so far is as follows:

<?xml version="1.0" encoding="utf-8"?>
<mServerDb vendor="EA Generic Driver" version="1.1.0">
<Modules>
<module base="EAGA_BTV" class="GENERIC" use="Y">
<mparam name="DISPLAY-AS" value="EAGA - Brillian LCOS Models" />
<mparam name="Description" value="EAGenericAdapter Brillian TV" />
<mparam name="MProtocol" value="EAGenericProtocol" />
<mparam name="CmdBtnGrp" value="EAGA_BTV" />
<mparam name="ParamsGrp" value="HVAC" />
<mparam name="DefaultImage" value="TV.gif" />
<DriverSpecific>
<connection>
<mparam name="CommandType" value="ASCII" note = "[ASCII]|BINARY" />
<mparam name="ConnectUsing" value="SERIAL" note="Valid values are either SERIAL or HTTP or SOCKET" />
<mparam name="FieldsGrp" value="EAGENERIC_SERIAL" />

<mparam name="HandShake" value="None" note="For SERIAL only. [None]|RequestToSend|RequestToSendXOnXOff|XOnXOff" />
<mparam name="BaudRate" value="19200" note="For SERIAL only. 2400|4800|[9600]|19200|38400|57600|115200" />
<mparam name="DataBits" value="8" note="For SERIAL only. Default to 8" />
<mparam name="StopBits" value="1" note="For SERIAL only. 0|[1]|1.5|2" />
<mparam name="Parity" value="None" note="For SERIAL only. [None]|Even|Odd|Mark|Space" />

</connection>
<outgoing-messages>
<param name="POWER ON" value="\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x 2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x 2A\0x0D" />
<param name="POWER OFF" value="\0x2A\0x53\0x45\0x7C\0x50\0x4F\0x57\0x52\0x 7C\0x4F\0x46\0x46\0x0D" />
</outgoing-messages>
</DriverSpecific>
</module>
</Modules>
<ModuleCommands>
<group name="EAGA_BTV">
<command name="POWER_ON" label="Power On" uiClass="On" />
<command name="POWER_OFF" label="Power Off" uiClass="Off" />
</group>
</ModuleCommands>
</mServerDb>

I would sure like to get this to work...I posted in the Generic Driver sub forum and go no response so am trying here.

JNBrook
Reply With Quote
  #2  
Old 09-17-2008, 10:21 PM
Roger Roger is offline
Senior Member
 
Join Date: May 2007
Posts: 174
Default

Try to set CommandType=BINARY.
Reply With Quote
  #3  
Old 09-18-2008, 12:44 AM
JNBrook JNBrook is offline
Member
 
Join Date: Apr 2008
Posts: 76
Default Thanks

Thanks for the suggestion...I tried setting command type Binary with:

<mparam name="CommandType" value="BINARY" note = "[ASCII]|BINARY" />

...but I am still not getting a response from the TV. Do I have the commands set out correctly in the xml I pasted into my last post? I transcibed them to hex because I was not sure how to send ASCII control characters in xml. Any other ideas or ways I can test my configuration?
Reply With Quote
  #4  
Old 09-18-2008, 05:58 PM
Ted Singh's Avatar
Ted Singh Ted Singh is offline
Senior Member
Site Admin
 
Join Date: Nov 2005
Posts: 1,108
Default

JNBrook,

I noticed there were some spaces in the actual commands in your post - is that just a result of the post here or are the spaces also in your XML file?

Are you sure that you have the proper COM port selected and it is available?

Do you have to enable the serial port on your TV somehow?

What does the log file say?

Ted
Reply With Quote
  #5  
Old 09-18-2008, 06:13 PM
JNBrook JNBrook is offline
Member
 
Join Date: Apr 2008
Posts: 76
Default

Quote:
Originally Posted by Ted Singh View Post
JNBrook,

I noticed there were some spaces in the actual commands in your post - is that just a result of the post here or are the spaces also in your XML file?

Are you sure that you have the proper COM port selected and it is available?

Do you have to enable the serial port on your TV somehow?

What does the log file say?

Ted
The spaces are a result of the post here. I have tested this virtual com port using DockLight to send the commands manually and I get the desired response so I know the com port is selected properly and the TV port is accepting connections.

Since my last post I checked the virtual com port connections using a port monitor on the WHS and I see the connection is made with the proper attributes of baud rate, parity bits, stop bits, etc.

I have also monitored the communications from the client pc (physical side) of the com port and I am receiving the command name from:

<command name="POWER_ON" label="Power On" uiClass="On" />
<command name="POWER_OFF" label="Power Off" uiClass="Off" />

Instead of the parameter values from:

<outgoing-messages>
<param name="POWER ON" value="\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x 2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x 2A\0x0D" />
<param name="POWER OFF" value="\0x2A\0x53\0x45\0x7C\0x50\0x4F\0x57\0x52\0x 7C\0x4F\0x46\0x46\0x0D" />
</outgoing-messages>

I can make this work by changing the command names to the Hex values of the ASCII commands I would like the TV to receive. What I would like to do is make these two discrete commands function as a single toggle button called power but I wanted to get the commands to send properly first.
Reply With Quote
  #6  
Old 09-18-2008, 07:26 PM
Roger Roger is offline
Senior Member
 
Join Date: May 2007
Posts: 174
Default

Should the <param name="POWER ON"...>
be <param name="POWER_ON"...>?
Reply With Quote
  #7  
Old 09-18-2008, 08:00 PM
JNBrook JNBrook is offline
Member
 
Join Date: Apr 2008
Posts: 76
Default Thanks

Thanks for the help everyone...that did it!

The Parameter name and the command name have to be the same and no spaces are allowed.

Now to get the discrete commands of "power on" and "power off" to function as a toggle under one power button.

Any suggestions?
Reply With Quote
  #8  
Old 09-19-2008, 09:04 PM
Roger Roger is offline
Senior Member
 
Join Date: May 2007
Posts: 174
Default

Some devices have a toggle command which can power on/off the device.

If power on/off use different commands then the UI need to know which command to use. This is a problem for UIs except mContol Editor.

If you want to use these command only in mControl Editor or macros try the following:

<outgoing-messages>
<param name="POWER" value="[c1]" />
...
</outgoing-messages>

<group name="EAGA_BTV">
<command name="POWER" label="Power" />
<component label="Value" type="LIST" displayList="On|Off" values="\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0 x 2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x2A\0x0D\0x 2A\0x0D|\0x2A\0x53\0x45\0x7C\0x50\0x4F\0x57\0x52\0 x7C\0x4F\0x46\0x46\0x0D" />
</command>
<group>
Reply With Quote
  #9  
Old 09-19-2008, 09:46 PM
JNBrook JNBrook is offline
Member
 
Join Date: Apr 2008
Posts: 76
Default Avaliable in MCML and HTML

Any word on if and when these types of controls will be available in the MCML and HTML interfaces?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:10 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.