top

Using the Smart TV Emulator with VirtualBox & Troubleshooting

Published 2014-10-28 | (Compatible with SDK 4.5 and 2013 models)

This guide explains usage of Virtual Box with the Smart TV Emulator

Note

This Guide assumes that you have already installed the Smart TV SDK on your computer. If you have no installed the SDK, please refer to SDK 4.5 Installation Guide for Windows / Mac OS X / Linux

Overview

The Smart TV Emulator has been ported to the Linux Ubuntu operating system. To ensure that this port can be used on multiple platforms, it has been bundled as a Virtual Machine that is run in the Virtual Box virtualization tool. Virtual Box is a free and open-source tool that provides many tools for working with the guest (virtual) and host operating system.

Sharing Applications

The Emulator can open applications that are stored in a shared folder on the host operating system. This folder must be called “Apps”. However, the folder can be located anywhere on your PC.

Figure 1 Apps are loaded from a folder named Apps

Starting the Emulator

The Emulator can be started in two ways:

  • Started standalone via Virtual Box
  • Started in the Smart TV App Editor IDE

To start the Emulator as standalone, first start Virtual Box. Then select the Emulator Virtual Machine and click “Start”:

Figure 2: Starting the Smart TV Emulator using the Oracle VM Virtual Box

To start the Emulator through the IDE, click the “Samsung Smart TV SDK” menu and select “Run Samsung Smart TV Emulator” or “Run Current Project in Samsung Smart TV Emulator” (if a Smart TV project is loaded with its top-level folder selected).

Figure 3: Starting the Smart TV Emulator using the IDE

Stopping the Emulator

Click the red “Power” button to shutdown the Emulator and choose “OK”.

Figure 4: Shutdown the Emulator by clicking the Power button on the Remote Control

Additionally, the Emulator can be closed by closing the entire window. Virtual Box will prompt you with 3 choices.

“Send the Shutdown Signal” is the best way to gracefully close the entire Emulator.

“Save the Machine State” will restore the Emulator in the current state the next time it is started.

“Power Off The Machine” is the same as pulling the power plug out of a computer. You should NOT use this option as it prevents the virtual machine from properly shutting down.

Figure 5: Choose “Send the shutdown signal” if shutting down the Emulator Virtual Machine via closing the window

Troubleshooting

VirtualBox Error on Launching Emulator

In some computers which do not support hardware virtualization, the emulator may show following error when launched:

Figure 6 This error can occur if the PC does not support hardware virtualization

Virtual machines with more than one CPU cannot be launched in the computers which do not support hardware virtualization. Currently Samsung SmartTV Emulator virtual machine has 3 CPUs which is necessary to make AIR application work in the emulator.

How to Solve this Problem

It is possible to change number of CPUs while importing the machine as shown in following import virtual appliance dialog:

Figure 7: Set the Virtual Machine’s CPU count to “1” if your PC does not support hardware virtualization

After that, the emulator will launched and all other applications except Adobe AIR apps can be tested in emulator.

Apps Not Listed When Choosing “Open...”

Verify that the Emulator Virtual Machine is properly setup with the Shared Folder named “Apps” (case sensitive).

Right-click the Virtual Machine and select “Settings...

On the Shared Folder tab, verify that the Shared Folder is set to a folder called “Apps” and that auto-mount is set to “Yes”:

AllShare and Convergence

AllShare and Convergence applications require that the Emulator virtual-machine be set to Bridged network. Additionally, the Emulator must be assigned an IP address. Please read the following instructions for details:

Set Bridged Network

  • Make sure the Emulator is shutdown.
  • Start Oracle VM VirtualBox Manager
  • Right-click on the Emulator VM and choose Settings->Network
  • Under Adapter 1 tab, Make sure “Enable Network Adapter” is selected
  • Next to “Attached to” option, choose “Bridged Adapter” (see picture)
  • Click OK.

Figure 8: AllShare & Convergence, the network type must be Bridged Adapter

Set IP Address

The Emulator will attempt to set an IP address based on the file in Apps/ipconfig.info

  • Create a file called Apps/ipconfig.info
  • Below is an example template for this file. Change the values to match you network:
true
10.1.2.100
10.1.2.1
255.255.255.0
10.1.2.0
10.32.192.11 10.32.193.11

##Do not put any comment above the line
#Line 1: Network adaptor in Bridged mode
#Line 2: IP Address
#Line 3: Gateway
#Line 4: Network Mask
#Line 5: Network Address
#Line 6: Primary DNS Secondary DNS

Line 1: Set to true when using Bridged Mode. Set back to false when not using Bridged Mode.

Line 2: Virtual Machine’s IP address. This value must be on same network as your host PC.

Line 3, 4, 5, and 6: Gateway, Network Mask, Network Address, and Primary DNS.

These values can be the same as the host PC.

Next time the Emulator starts, it will read this file and set its IP address.

Note

Setting the VirtualMachine to Bridged Mode will allow you to test AllShare and Convergence apps on your network. However, it may prevent the Emulator from connecting to the Internet. In this case, set the Emulator’s Network setting back to “NAT” and set the first line of ipconfig.info to false.

Adobe AIR Support

Adobe AIR in the Smart TV Emulator requires that the Virtual Machine be configured for 3 processors (see picture below). By default, the Smart TV Emulator is configured this way.

However, PCs do not support multi-processor Virtual Machines (see the topic VirtualBox Error on Launching Emulator). In this case, the Smart TV Emulator should be limited to 1 processor and Adobe AIR will not be supported.

Figure 9: Adobe AIR support requires 3 processors. However, some PC’s do not support this.

Support for USB Devices

The Smart TV Emulator supports several USB devices such as gamepads and MIDI piano keyboards. If such a device is connected to the PC but it is not recognized by the Smart TV Emulator, please make sure it is added to the USB filter list:

  • Start Oracle VM VirtualBox Manager
  • Right-click on the Smart TV Emulator and choose Settings->USB
  • Click the green “+” icon to add the USB device to the filter list (see picture below)

Figure 10: Adding a USB device to the Emulator

SmartHub

When displaying the SmartHub GUI, the Open App, Stop, and Refresh buttons will be disabled. Please launch an app in SmartHub by clicking the icon and close the app using the Exit key on the remote control (as done on a real TV). This behavior is designed to make Emulator’s behavior more similar to the real DTV. The list of apps in the SmartHub GUI will be refreshed only when the Emulator is restarted.