Philips POS9002 Tips

Pairing again the remote

This is usefull after an update or when you figure out some advanced functions don’t work anymore (voice commands, keyboard, etc.).

Operation is available in POS9002 manual.

  1. You can simply long press the PAIR key (approximate for 3 seconds) for pairing. Alternatively, go to (TV menu) > Settings > Wireless and network > Remote control > Pair remote control
  2. Then follow the on-screen instructions. Reminder: the Pairing button is the top-up-right on the remote.

     3. A message appears when the pairing is successful.

Update remote’s firmware

Usually when the whole TV’s firmware is updated, there is also an update inside the TV’s firmware for the remote. But his is not automatically deployed so you have to manually chck sometimes if updates are available for the remote.

Operation is available in POS9002 manual.

  1. Go to (TV menu) > Settings > Wireless and network > Remote control > Update remote control software
  2. Check available remote control software for updates.

Limit the number of process to avoid slowness

The POS9002 is often slow to respond especially during menu navigation. To avoid that you may want to limit the number of processes allowed to run at the same time.

  1. Launch the Settings application (bottom of the screen)
  2. Scroll & select “Android Parameters” in the left menu
  3. Enter the “{ } Developer Options” menu (if you don’t see it yet, that’s because you need to enable it, check below the chapter to control your TV with ADB)
  4. Change the option “Limit the number of background process”: set it to 0

Disable Philips Apps tray

  1. Navigate to your Manage Apps menu on the bottom of the home screen
  2. Choose System App and look for LeanbackCustomiser.
  3. Click on it and go to Notifications and set it to Off.
  4. Go back to home, Philips Apps not displayed anymore (apps still installed though)

Remote control of the TV via network & ADB (eth or wifi or usb)

Android Debug Bridge (ADB) is used to deploy, launch, debug Android Apps. It is also used to access & alter core Android functionalities, and to control the Android device. 

  1. Launch the Settings application (bottom of the screen)
  2. Scroll & select “Android Parameters” in the left menu
  3. Scroll & select “About” in the right menu
  4. Scroll & click several times on “Build” at the bottom of the right menu, it will say you entered Developer mode, which is what we want to use ADB
  5. Go back to the main Settings screen and enter the new “{ } Developer Options” menu, below Voice & Accessibility entries in the right menu
  6. Enable the USB Debugging mode

Now we’re mostly done on TV side, except one thing: we need to allow the ADB remote device we will use. So we need to install ADB and connect it.

  1. Download ADB zip file for Linux OR use  apt-get if you are running a Debian OR use yum if you are running a Fedora/SUSE

wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
OR
sudo apt-get install adb
OR
sudo yum install android-tools

  1. If you just downloaded ADB zip file then Unzip it, it will create a ‘platform-tools’ directory, enter it

unzip platform-tools-latest-linux.zip
cd platform-tools

  1. Now option 1: USB link between your Philips POS9002 & ADB ‘controller’.
    • It is better to change the connection mode to “file transfer (MTP)” mode: in the  “{ } Developer Options” menu, scroll down to “USB Configuration” and choose “MTP (Media Transfer Protocol”
    • Plug your USB link between TV & ControllerLaunch the ADB daemon
    • Lauch ADB daemon

adb devices

  1. Ethernet or Wifi link between your Philips POS9002 & ADB ‘controller’.
    • You need to know your Android’s device IP Address: in the “Settings” app, go to “Wireless & Networks” in the left menu, then “Wired/Wi-Fi”, then “Display Network Parameters” choice and write down the IP Address (in my case 192.168.1.20)
    • Connect your controller to your POS9002

adb connect 192.168.1.20

adbdevices

  1. You should see on your TV a prompt asking you to allow USB debugging. YES, go ahead: tick the box to always allow it, and validate.
  2. Re-enter the previous command. You should now see your device’s serial number in the Terminal window output.

Switch between HDMI & other entries with ADB

Here we use keyevents, on which are also mapped action buttons from the real, physical, Philips remote. Not all keyevents codes documented will work on the Philips TV, as all Android Devices are not used for the same things.

Switch to HDMI 1: 

adb shell input keyevent KEYCODE_F6

Go back Home:

adb shell input keyevent KEYCODE_HOME

Launch Deezer:

adb shell input keyevent KEYCODE_MUSIC

Switch off/on the TV:

adb shell input keyevent KEYCODE_SLEEP

adb shell input keyevent KEYCODE_WAKEUP

adb shell input keyevent KEYCODE_POWER

Note that  KEYCODE_POWER will switch the TV on if it was OFF, and will switch it OFF when it was ON. KEYCODE_SLEEP will only switch it OFF & not put it ON if it was already OFF, same thing for KEYCODE_WAKEUP, it won’t do anything is the TV was already ON.

Remotely wake up the TV when asleep & offline (Wake On Lan)

Your TV could disconnect from the network while it is in sleep mode. This can be a problem especially if you control your TV remotely.

I didn’t understand exactly when it decides to really disconnect, as sometimes I can control it after several hours of sleeping mode (during the night), and sometimes my tools see it offline after a few minutes.

Anyway there is a workaround, but it needs you to be able a python script when the TV is detected offline (from a Windows or Linux computer, on the same network, Ethernet or Wifi).

  1. Launch the Settings application (bottom of the screen)
  2. Go to “Wireless & Networks” in the left menu, then “Wired/Wi-Fi”
  3. Scroll down to “Wake-up with Wi-Fi (WoWLan)”, activate it

As my TV is connected by Ethernet, not Wifi, I’m currently testing if this WoWLan is actually really dedicated to WiFi, as I assume it will also allow it on a wired Ethernet network. In my  “Wireless & Networks” menu I disabled Wi-Fi.

Now, use the Python script (initially found here) pasted below,  and beside having Python installed (how to use it is out of scope of this article), you need to edit 2 lines, highlighted below, before being able to use it.

#!/usr/bin/env python3
import struct
import re
import socket
import sys

MAC = '1c:5a:6b:b8:93:c0'


def wake_on_lan(mac):
    if len(mac) == 12:
        pass
    elif len(mac) == 12 + 5:
        mac = mac.replace(mac[2], '')
    else:
        raise ValueError('Incorrect MAC address format')

    data = ''.join(['FFFFFFFFFFFF', mac * 16])

    # Split up the hex values and pack.
    send_data = b''
    for i in range(0, len(data), 2):
        send_data = b''.join([send_data, struct.pack('B', int(data[i: i + 2], 16))])

    # Broadcast it to the LAN.
    for _ in range(15):
        sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
        sock.sendto(send_data, ('172.16.15.255', 9))


if __name__ == '__main__':
    # mac = get_mac_address(sys.argv[1])
    # print(mac)
    wake_on_lan(MAC)
  1. Line 7: you have to find the MAC address of your TV and put it here.
  2. Line 29: the WoL request will be broadcasted on the subnet you enter here, so it needs to be the one your TV is supposed to be listening on, when it is alive.

Now let’s try it. Initial state is that the TV is offline since all ADB commands are failing, ADB see no device attached, and a connexion attempt is also failing.

An attempt to kill & restart ADB is no more successfull.

Now let’s try to wake up the Philips with our customized wol.py script, and test it with the same ping command as in the screenshot above. 
Note that I uncommented line 34 for testing purpose. This why the script displays my TV’s MAC address.

Conclusion: TV’s network connexion is now awake as it replies to the ping requests. It’s not shown in the screenshot above, but ADB commands are now also working after issuing a simple:

adb connect 192.168.1.20

Leave a Reply

%d bloggers like this: