Friday, 30 October 2015

New 2015 Apple TV4 is "underwhelming"

I am remarkably underwhelmed by the new Apple TV or Apple TV4 release.

I have loved the Apple TV since version 1, using it primarily to display my photo collection on my large screen, but, as the Apple TV evolved and matured, using it for home movies, rental movies and youtube.

The concept of Apple TV4 sounded great. The Apple TV I love with Apps and local storage.

Unfortunately, as is usual with Apple, the next generation is rarely built on the foundation of what you have previously loved. I know it's great for setting new standards, I can see the point of removing the CD drive (it was so 3 months ago) and why have a USB port nowadays? This pushes us to use the next and latest technologies and I appreciate that. But removing the "Photo Wall" screensaver!

Initial things that I have unfortunately found disappointing after a couple of hours:


  • You cannot use a bluetooth keyboard with the Apple TV4 - People have confirmed this in conversations with Apple Tech Support.
  • You cannot use the iOS remote app to control the Apple TV4 - again confirmed with tech support.
  • You cannot use the Apple Watch Remote app to control the Apple TV4 - again confirmed with tech support.
  • They have removed the "Photo Wall" slideshow option - Gutted!
  • The Trailers app has disappeared. This may be in certain countries only, but, in the UK, it's gone and its not in the App Store.
  • There is no podcasts app
  • Siri cannot control Apple Music
Perhaps time, apps and Apple updates with refine this device, but honestly, if I don;t get that Apple TV "Photo Wall" slideshow back for my screensaver, I'm gonna be gutted.

Wednesday, 19 August 2015

Using the Raspberry Pi and Screenly OSE as a low cost display advertising solution

I am using Screenly OSE (Screenly's Open Source Edition of its Screenly Display Ad solution) running on a Raspberry Pi to display ads on screens in a number of locations. Screenly's OSE provides a free display ad solution that can be used with an inexpensive Raspberry Pi to make the lowest cost display ad solution I could find.

My requirements meant that I needed to have the Raspberry Pi running Screenly on a WiFi solution. I needed to be able to access Screenly remotely so that it could be updated at any point, and, I needed access to the Screenly admin screens to be password protected, which at the time of writing, they weren't by default.

This post summarises the setup of Screenly OSE on a Raspberry Pi with the following configuration:
  1. Screenly OSE installed and running on a Raspberry Pi 2
  2. Password protection on Screenly's admin screens
  3. The Raspberry Pi connecting via WiFi
  4. The ability to update the display images remotely

Screenly OSE Basic Installation

The basic instructions for setting up Screenly OSE can be found at:
These instructions will give you a basic working setup of Screenly but you will need to use a cabled network connection, not wifi, and we need to secure the Raspberry Pi but make it accessible remotely.

Complete the instructions above to get to the Screenly start up screen which will show you the IP address of the Raspberry Pi. 

Screenly OSE post-installation

You can SSH into the Pi using the IP address and the pi user account. From a linux box or a mac terminal on the same network:
  • ssh pi@xxx.xxx.xxx.xxx
Make sure you have completed all of the steps including
  • Expanding the root filesystem with "sudo raspi-config"
  • Updating Screenly to the latest version with "~/screenly/misc/run_upgrade.sh
Additionally, you should update the operating system while you are at it:
  • sudo apt-get update
  • sudo apt-get upgrade
Also, change the pi user account password using the passwd command:
  • passwd
Reboot the box after the updates
  • sudo reboot

Screenly Password Protection Update

The current release of Screenly OSE does not include any password protection. If you know the IP address and port that Screenly is running on (which it displays for about 20 seconds every time the Raspberry Pi reboots) you can freely get in to modify what the display shows. There are no restrictions.

James Singleton has forked the current Screenly release and updated it to include some basic password protection. His updates are available on github:
The easiest way to update Screenly OSE to incorporate these password protection changes is to simply replace the existing server.py with James' updated server.py.

Use the following command to copy James' updated code to the Raspberry pi:
  • git clone https://github.com/jpsingleton/screenly-ose.git
and then copy the new server.py over the original one.

  • cp screenly-ose/server.py screenly
Finally, change the standard password by editing the server.py file:

  • sudo nano screenly/server.py
# Update the web admin login credentials here:
# Good to use only SSL (script in misc folder)
def check_creds(username, password):
    return username == "admin" and password == "Scr33nlyOSE"

Raspberry Pi WiFi Setup

Raspberrypi.org gives simple instructions to get your Pi Wifi enabled and connected at :
It basically explains how to:
  • Scan for wireless networks: sudo iwlist wlan0 scan
  • Edit the Wifi setup files: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Go to the bottom of the file and add the following:

network={
    ssid="The_SID"
    psk="Your_wifi_password"
}

wpa-supplicant will normally notice a change. You can verify if it has successfully connected using ifconfig wlan0. If the inet addr field has an address beside it, the Pi has connected to the network. If not, check your password and SSID are correct.

To set up multiple wireless networks, give each network in wpa_supplicant.conf an id_str and then add an entry for that id_str in /etc/network/interfaces

For example, in /etc/wpa_supplicant/wpa_supplicant.conf

network={
    ssid="The_SID"
    psk="Your_wifi_password"
    id_str="work"
}

and in /etc/network/interfaces

iface school inet dhcp

Screenly OSE Remote login

To access the Raspberry Pi remotely and and remotely control Screenly OSE, you need to open a port on the network router that the Raspberry Pi is connecting to.

Opening or forwarding ports varies on different routers but you are looking for the advanced settings and information about virtual servers in the routers admin menus.

You’ll need to set which incoming port your router should watch and the protocol to watch for along with the IP address of the Raspberry Pi which will be the destination for this port’s requests. Lastly, you’ll be able to choose which port the request should be targeted to on the destination IP.
  • Incoming port: 8080 - you could change this to another port if you like
  • Protocol: TCP or select Both
  • IP Address: Probably something like 192.168.xxx.xxx. This is the IP address shown on the Screenly boot screen.
  • Target Port: 8080 - this must be 8080 as this is what Screenly uses


Wednesday, 21 December 2011

Connecting to the USB My Weigh Ultraship U2 scale using Visual Studio C# 2010 - Part 2

Having discovered the Vendor ID (VID) and Product ID (PID) of the My Weigh Ultraship U2 USB scale by examining the devices connected to the PC using the Windows Device Manager, I can now use a USB Sniffer to intercept and log the data being exchanged between the USB scale and the Windows PC.

The sniffer I used was called USB Sniffer and is based on an earlier project that was called USB Snoopy. This program lets you view all of the USB devices connected to your PC and shows their VID and PID so that you can quickly identify the exact device you are interested in looking at.

To use the USB Sniffer/Snoopy you install it and then, I found, that I had to run it as administrator in order for it to be able to access and install the relevant services that it needed to view the data. You run it as an administrator by right-clicking on the SnoopyPro.exe file and selecting the Run As administrator option.

When the program starts, choose the View menu and select the option to Show USB Devices which will show a list similar to the one below. You can see our Ultraship U2 USB highlighted in blue with VID 04D9 PID E002. There are actually two entries for it that are identical.


In order for Snoopy to be able to intercept the data between the USB device and the PC, you need to install services that will capture this data. The first thing to do is, from the menu options at the top of the window listing your USB devices, choose the File, Unpack Drivers option. Next choose the File, Install Service option.

Snoopy is now prepared and you can select the device that you want to monitor. Do this by right clicking on the entry in the list of USB devices and select the Install and Restart option. The list of devices should be updated showing that monitoring for the device has been installed, as shown below.


As soon as you do this, the original program window opens a USB Log window that will be used to record and display the data exchanged.



The data is not displayed live as it comes in, but the window does update to show the number of packets that have been logged. To see the data choose the Tools, Analyse Log option. This will show a summary of all of the packets that have been transferred between the PC and the USB device.


And finally, to see the actual data exchanged, you can click on the + button at the start of each row in the log to show the full detail of the data exchanged.


In the screenshot above, I have selected the exchange containing the weight information which we can see has transferred 8 bytes of information, 2b 20 20 30 2e 30 30 30. This was created by pressing the send button on the Ultraship U2 USB scale. The weight was at zero when the button was pressed.

Remember to uninstall and restart your USB device when you have finished interrogating it. Do this via the USB Devices list by right clicking on your device and choosing the Uninstall and Restart option. Then, choose the File, Uninstall Service option before exiting out of Snoopy altogether.

Friday, 16 December 2011

Connecting to the USB My Weigh Ultraship U2 scale using Visual Studio C# 2010 - Part 1

I'm trying to figure out how to connect to a My Weigh weighing scale, the Ultraship U2 to be specific. I'm going to want to connect to it and control it using Visual C# 2010. This post details my findings as I worked through the issues of identifying what I would need to find out in order to do this.

I'll say from the start of this post that if you have any additional information about this device and about how to connect to it, make sure you let me and everyone else know in the comments.

Identifying the Ultraship's Vendor ID and Product ID


The My Weigh Ultraship U2 is a USB HID (Human Interface Device) and as such its Vendor ID and Product ID can be found in the Device Manager of your Windows PC. 

Connect the scale to your PC and on Windows 7, open your Start Menu and right click on Computer and select Properties. This opens the Control Panel -> System and Security -> System Page where you need to select Device Manage from the top left.

From the Device Manage window that opens, it is easiest to reorganise the view of the devices by going to the View menu and selecting Devices By Connection.


The Ultraship U2 scale is the HID-Compliant Device that you can see highlighted in the image above. You can right-click on it and select properties, then select the details tab and where you see the Property drop down, select Hardware IDs.


From this Device Properties window, you can now see the VID and PID for the scale.
  • VID 04D9
  • PID E002
Now that I know VID 04D9 PID E002, I need to find out how to access the device using from Visual C# 2010. Any suggestions?