Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: sending ascii commands over serial rs232 to Philips TV  (Read 23641 times)

0 Members and 1 Guest are viewing this topic.

svendudink

    Topic Starter


    Starter

    • Experience: Beginner
    • OS: Unknown
    sending ascii commands over serial rs232 to Philips TV
    « on: September 22, 2011, 01:53:28 PM »
    oke this is the problem,

    i have a Philips BDL4221, i accidently locked the remote control and the onboard buttons, so i cant change the input or change anything on the tv, i tried to send some thing via 232analyzer but i have no idea what to do, the tv send me 2 messages back those are CTS turned on and DSR turned on, i found this in the user manual from the tv but i dont have any idea what to do with this:

    3.  Serial Interface Communication Protocol
    3.1 General specifications
    3.1.1  Protocol definition 
    Communication to the main monitor microprocessor is possible through the serial  port,
    which  support a communication protocol dedicated to BDS only. The protocol is
    specifically  designed to allow data communication in half duplex multi-point
    environments,  but  it can also be used for half duplex point-to-point RS-232
    communication.
    3.1.2 Communication characteristics
    A half duplex communication is implemented starting from the concept of a master-slave
    structure, where the monitor is supposed to be the slave.
    The first action is always taken by the master, which can be either a built-in PC-based
    video controller in a MASTER monitor or any external device (acting a server) interfaced
    to  the monitor. After sending a command or a request in the appropriate format (see
    section 3.2), the master receives form the slave an acknowledgement, which tells the
    transmitter whether the command is not valid (or not executable, anyway) or  it  is
    accepted.
    In  case  of  a  request, the requested information is sent back and it becomes the
    acknowledgement by itself.
    If  the  poll  sequence has been sent, the acknowledgement tells the transmitter the
    monitor status, i.e. whether it is ready or busy and other information.
    3.1.3  RS232 pin assignment
    There is a 9-pin male connector on the set for  RS232  communication.  The  pin
    assignment is as following table.
     
    Pin No.  Function  Description
    1  GND  Signal Ground
    2  RxD  Receive Data
    3  TxD  Transmit Data
    4  NC  Not Connected
    5  GND  Signal Ground
    6  NC  Not Connected
    7  NC  Not Connected
    8  NC  Not Connected
     
    9  NC  Not Connected
     
    3.1.4 RS232 settings
    This section describes the parameters used during the whole communication process.
     
    Baud rate  57600 bps
    Data bits  8 bits
    Parity  None
    Stop bit  1
    Flow Control  None
     
    2838   100   05424
     
     
    [ NAME ]
                          Philips
      07 14023
     
    3.2 Data frame
    3.2.1  Poll sequence: frame format
    The poll sequence must be transmitted before sending any command, to check whether
    the monitor is ready to accept a command or it is busy.
    The poll message in enclosed in a frame that has the following format:
     
    <Start> <Address> <E> <Stop>
     
    where:
     
    <Start>  =  <Esc> <$>, i.e. ASCII characters [1Bh] and [24h].
     
    <Address>  =  3 ASCII characters each of which ranging from [30h] to [39h], which are
    used as monitor address.
     
    <E>  =  the ASCII character [45h].
     
    <Stop>  =  <;>, i.e. the ASCII character [3Bh].
     

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: sending ascii commands over serial rs232 to Philips TV
    « Reply #1 on: September 22, 2011, 02:24:51 PM »
    Looks all good. But for one thing. How do you do 57600 bps with a typical serial port?

    Quote
    Baud rate  57600 bps

    Are you sure?

    svendudink

      Topic Starter


      Starter

      • Experience: Beginner
      • OS: Unknown
      Re: sending ascii commands over serial rs232 to Philips TV
      « Reply #2 on: September 22, 2011, 02:41:27 PM »
      this is copy paste from the original philips manual, the problem is that i have no idea how to use this information, i would like to know how to read this and how to write it down in a hyperterminal like 232 analyzer so the tv gives me a response, especially this part is what i dont onderstand


      3.2 Data frame
      3.2.1  Poll sequence: frame format
      The poll sequence must be transmitted before sending any command, to check whether
      the monitor is ready to accept a command or it is busy.
      The poll message in enclosed in a frame that has the following format:
       
      <Start> <Address> <E> <Stop>
       
      where:
       
      <Start>  =  <Esc> <$>, i.e. ASCII characters [1Bh] and [24h].
       
      <Address>  =  3 ASCII characters each of which ranging from [30h] to [39h], which are
      used as monitor address.
       
      <E>  =  the ASCII character [45h].
       
      <Stop>  =  <;>, i.e. the ASCII character [3Bh].

      Geek-9pm


        Mastermind
      • Geek After Dark
      • Thanked: 1026
        • Gekk9pm bnlog
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: sending ascii commands over serial rs232 to Philips TV
      « Reply #3 on: September 22, 2011, 03:15:06 PM »
      OK. The baud rate seemed odd. But I found that it is right.

      You need to set your device to that baud rate, 8 data bits, no parity. At that baud rate you need to be careful about cable quality and shield.

      You must first start with a start sequences to the monitor.
      Basically, you are asking "Are you There?"
       Which is:
       \x1b  $  9  E  ;

      No spaces. I used spaces to set the items apart. The \x1b  is the char 27 in the ASCII set, which is the escape key on the keyboard. It is not printable, so the \x1b is used as a symbol to represent the non-visible char.The ESC key.

      I used 9 as the address here, but the device might be from 0 to 9 , the documentation does not say what the default address is.

      If that is right, it will respond. In not, try another address in the range 0-9


      svendudink

        Topic Starter


        Starter

        • Experience: Beginner
        • OS: Unknown
        Re: sending ascii commands over serial rs232 to Philips TV
        « Reply #4 on: September 22, 2011, 03:34:40 PM »
        at first thank you very much for your help, for now i just used 232analyzer as the software to control it since i dont really know what to use as software, this is also the only software from where the tv sends me some signals back, it shows me every 10 a 20 seconds dsr turned on and cts turned on and sometimes turned off,

        so if you know any better software please suggest me,

        as send format i use ascii i think this is right??

        and for the adress, i dont know for shure but shouldnt i use 3 numbers with this line?
        <Address>  =  3 ASCII characters each of which ranging from [30h] to [39h], which are
        used as monitor address.

        if you are interested you can take a look at the manual,everything about the serial interface communications protecol starts at page 89
        http://www.p4c.philips.com/files/b/bdl4221v_00/bdl4221v_00_dfu_aen.pdf

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: sending ascii commands over serial rs232 to Philips TV
        « Reply #5 on: September 22, 2011, 04:38:03 PM »
        Right. It is three numbers. I overlooked that. I wold love top learn more about this, nut I have some chores to do. This weekend we are going to getaway for awhile.

        Maybe somebody here can help you. It is possible to write a small program using the Visual Studio, but I am not able to do it.

        Perhaps somebody here can help.

        Current versions of Windows do not have the Hyper terminal. Read this.
        http://windows.microsoft.com/en-US/windows-vista/What-happened-to-HyperTerminal

        Need to check this out:
        http://www.compuphase.com/software_termite.htm

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: sending ascii commands over serial rs232 to Philips TV
        « Reply #6 on: September 23, 2011, 10:04:34 AM »
        OK, It is Friday morning and we are going to the lake.

        The service manual for the TV is rather an extensive.  Apparently you can control just about anything that the TV needs to a serial port.  The bond rate, word size parity and stop bits are all given in the manual for
        standard  RS232.
        It would seem this television is intended for use in an area were several monitors would be displayed and it's desirable control all the monitors from a central location.  Doing the end with the remote control or could be rather awkward.  A managing it had nine TV sets the display.  Then trying to control most TV sets with nine controllers would be kind of clumsy.  And if you were added distance one controller might end up activating several sub sets at once, unless there was some kind of encoding selected address just one TV set.  A better solution is to use the RS 232 port and have a special terminal that's been set up with the functioning in most often use.
        A him in such a scenario of it would make sense to use in a serial port to connect all the TV is together in Canada daisychained and each TV set would have to have its own address so from the terminal they would have to be a function that would send the address to a particular TV set in Wakefern acknowledgment in the operator contrived tight end some parameters such as Channel No. and the volume setting and give the command and would send it to the TV set.  Other things such as brightness and color can also be sent.  In fact, just about everything can think of Canada within serial port.
        The tricky thing is to figure out the address steam.  Looking to the documentation he was not clear to mean how you set the address for each TV set.  It seems that you have to have from 0 control available to set up the addresses for use with a serial port.
        A program such as terminated would be very helpful here is only for below.

        Terminite is a free to use program. It can send and recieve data via the serial port of a PC with at least one standard COM port..
        http://www.compuphase.com/software_termite.htm

        Anybody hee that wants to help the OP with this d you can take a look at the manual,everything about the serial interface communications protecol starts at page 89

        http://www.p4c.philips.com/files/b/bdl4221v_00/bdl4221v_00_dfu_aen.pdf

        Microphone off

        svendudink

          Topic Starter


          Starter

          • Experience: Beginner
          • OS: Unknown
          Re: sending ascii commands over serial rs232 to Philips TV
          « Reply #7 on: September 25, 2011, 05:31:36 AM »
          ok i tried the code but i didnt get any response from the tv, is it right that i always should get a response from the tv even if the command is wrong? or should it only reply on good codes, could it be that i should use a 0-modem cable? for now i use a straid cable with a HQCC-146 usb to serial adapter

          Geek-9pm


            Mastermind
          • Geek After Dark
          • Thanked: 1026
            • Gekk9pm bnlog
          • Certifications: List
          • Computer: Specs
          • Experience: Expert
          • OS: Windows 10
          Re: sending ascii commands over serial rs232 to Philips TV
          « Reply #8 on: September 25, 2011, 05:11:03 PM »
          Apparre3tnly,  the serial protocol is specific to hate fillips system.

          With what I understand, the TV only responds if you gives its address. with the Enable command.

          The default address is 000. It can be altered with remote control.
          Example, if the TV has been Set to address n123 then you would Enable it with
          ESC$123E;

          Where ESC repents the single char that is 27 in the ASCII table.
          The TV should respond with a code that includes the address and the status.
          EAC%1230A;

          The 123 is the address. the 0A is status when not ready.

          Status 0A is not ready
          Status 0B is ready
           

          The cable should be a straight RS322 cable. Your computer should use a standard
           COM port.

          You Computer is a
          Data Terminal (DTE),
          the TV set is a
          Data Set (DCE ) .
          So the wires go straight over.

          In this application CD is likely ignored. Nothing specific in the document.

          That is about as much as I can do for you. The manual is rater straight forward and rte notation used is standard.

          Rather that using a USB to serial  would think a normal Com port work work better with any program like Terminite.

          feignzillA



            Newbie

            • Experience: Expert
            • OS: Windows 8
            Re: sending ascii commands over serial rs232 to Philips TV
            « Reply #9 on: June 23, 2016, 08:52:10 PM »
            I have just spent 10 hours trying to work out how to do this for a Phillips BDL4210Q (very similar model to yours)
            If you Google: "Application Note BDLxxxx RS232 SERIAL INTERFACE COMMUNICATION PROTOCOL (SICP V1.85)" you can find the user manual for the RS232 Serial Interface Communication Protocol which has all the hex commands for the Phillips BDL series TVs and is very useful.
            Make sure that you have a RS232 crossover cable (null modem), I spent ages using a standard RS232 cable which wasn't crossing over the pins hence there was no communication

            The specs for the BDL4210Q are:
            Baud: 9600
            Parity: None
            Data bits: 8
            Stop bits: 1
            Flow control: None

            After lots of trial and error I found the best program to use is RealTerm because the send command option is very easy to use. As a test to see if your host is talking to the TV, open RealTerm and open the COM port, then turn the TV off and on again. RealTerm should echo a heap of code back which is all the diagnostics information.
            You can then send commands in hex format: i have been sending the 'On' and 'Standby' commands and am testing more. You need to remember to input the 0x before whatever hex character you are inputting, for example the code to turn the TV on is 05 01 18 02 1E, but when you send it you need to enter 0x05 0x01 0x18 0x02 0x1E. The best way to test is to have the TV on and send the 'Standby' command, which is 0x05 0x01 0x18 0x01 0x1D

            On - 0x05 0x01 0x18 0x02 0x1E
            Standby - 0x05 0x01 0x18 0x01 0x1D

            I've attached a screenshot of the feedback from when I turned the TV on, and then sent the 'Standby' command. All of the hex code echoed back apart from the last 5 bits is feedback from when I turned the TV on, and the last 5 bits are a response to my standby command





            [attachment deleted by admin to conserve space]