SC14DECTIPBS Quick Start Guide v1.1 PDF
SC14DECTIPBS Quick Start Guide v1.1 PDF
SC14DECTIPBS Quick Start Guide v1.1 PDF
page 1 of 43
Purpose of this document: This guide explains the most important steps of installing and setting up the SC14DECTIPBS. It will also cover the interoperability with the SC14WSMDATA. For detailed information refer to the SC14DECTIPBS SW Manual. Terms and abbreviations: API AT Base Station CVM DECT FP FTDI Handset IDE IPBS IPEI MMI NVS PCB PP RFPI UART ULE WSM Application Programming Interface Attention (Command given to CVM module) See FP Cordless Voice Module Digital Enhanced Cordless Telephone Fixed Part Future Technology Devices International See PP Integrated development environment Internet Protocol Base Station International Portable Equipment Identity (please refer to ETSI EN 300 175-6) Man Machine Interface Non Volatile Storage Printed Circuit Board Portable Part Radio Fixed Part Identity (please refer to ETSI EN 300 175-6) Universal Asynchronous Receiver / Transmitter Ultra Low Energy Wireless Sensor Module
Icons used: The most common icons which are used throughout this document are: = Note which gives additional information = Important step, please read carefully! = Repeat steps that were previously executed = (Successfully) reached the last step of the section = Refers to a pdf document
page 2 of 43
Introduction: The SC14DECTIPBS is an internet enabled DECT base station which connects TCP/IP based applications (i.e. cloud applications) to a DECT ULE network of Wireless Sensor Modules (WSMDATA). Typically an application will consist of several nodes connected to a single SC14DECTIPBS base station. The SC14WSMDATA module can be used to create sensor and actuator nodes. See Figure 1. In the remainder of this document, the SC14WSMDATA nodes will be referred to as the portable part (PP) and the SC14DECTIPBS as fixed part (FP).
Figure 1: Product overview The SC14DECTIPBS is a reference design. It uses Dialog SC452 VOIP SoC as a host processor to a SC14CVMDECT. Preparation
To start the installation and configuration of the target, check if all software and hardware is present: The Kit Content, consisting of The target Connection cables: 1x UTP, 1x USB-to-serial cable and 1x power cable The DVD, containing the VM, software and documentation
Additional hardware and software: A functioning computer running Windows XP or better, with 10GB free hard disk space 2GB RAM and a free USB port. An active Internet connection. A router configured with a DHCP server See the documentation of the router for more details on configurating a DHCP server. A wired network
page 3 of 43
IPBASE HW components
LED1 LED1 LED2 LED2 LED3 LED3 LED4 LED4 Generic button LED5 LED5 Memory (SDRAM) Power connector
!
Max 5V
SC14452
DECT ULE
UTP Connector
Note Note:: Programmable Programmable and and configurable configurable items items are are shown shown in in bold. bold.
Black Black
LED ASSIGNMENT LED1: It blinks when the Dect radio receives or sends data packets. LED2: It is ON if board has successfully connected to network (has obtained IP address). LED3: It is ON if board has successfully connected to portal server. It blinks during connection (~ 60 sec). LED4: It is ON when ULE application has successfully initialized and is running. LED5: It is ON when unit is in registration mode. It blinks when user is asked to press the Generic Button to register the board to portalserver. Other parts SC14452 The IP processor. DECT ULE The DECT communication module enables communication with DECT devices. Memory (SDRAM) The volatile working memory (RAM). The content of the RAM is erased after the power is disconnected or the Reset button is activated. Memory (Flash) The non-volatile ROM where the image is stored. PHY (PHYsical layer) Enables communication between target and network
page 4 of 43
Using this document: This document successively contains the following sections: Nr. 1. 2. Section Description Using the SC14DECTIPBS without the development environment Setting up the Setup the hardware and connecting it to the SmartPulse portal SC14DECTIPBS Accessing the Accessing the SC14DECTIPBS internal website after setting it SC14DECTIPBS internal up. website Setting up the development environment Error! Reference source not Installing VirtualBox. ound. Software Setup Importing the Virtual Machine provided by Dialog. Developing Software Software development on Using the Software Development environment. SC14DECTIPBS Compile/debug/run the Running the ULE application in the Native / PC environment. application on the PC Cross compiling the Running the ULE application on the SC14DECTIPBS target. application and run from RAM Upgrading the Permanently storing the ULE application on the SC14DECTIPBS FLASH SC14DECTIPBS target image Where to change the code Pointers on where to change the code.
Developing Software
3. 4. 5. 6. 7. 8.
9. 10. 11.
Connecting the serial terminal to control the board via UART Reprogramming the FLASH via the serial terminal (in case the board seizes to respond).
page 5 of 43
What to do!
Additional info
1.
Unpack the board and write down the number on the back of the board.
First connect the Ethernet connector (top red square) to a free port of a switch or a router. 2. 2 . 1 Then connect the Power plug (bottom red square). Do not exceed 5V on the power supply. The board will be damaged.
page 6 of 43
Check if the board functions correctly: Green LEDs: D11 should light up continuously (power) D7 should blink to indicate Ethernet activity Yellow LEDs: The following sequence should be seen: +- 20 sec: D4 (next to push button) should light up continuously indicating the (uC)Linux application has started correctly. +-25 sec: D2 should light up continuously to indicate the board has an IP address. +-27 sec: D3 will start blinking slowly to indicate the board is trying to connect to the SmartPulse portal. D1 (bottom right) blinks whenever there is DECT radio activity. Note: if any of the previous steps fail, most likely the internet connection is not present (Ethernet cable should have internet access and a DHCP server should be present in the network).
Green LEDs
Yellow LEDs
3.
5.
page 7 of 43
Before trying to register the board, wait for LED D3 (yellow LED) to be on continuously. 6. Important: if LED D3 is not on continuously but blinking this means the board has not setup a connection to the server. Registration will then fail. Once setup, the link will remain until the board is reset or power cycled.
Yellow LEDs
7.
Type in the code which is on the bottom of the board (see step 2.1). Click Register
8.
page 8 of 43
The RED LED should blink and the website indicates the LED on the board blinks.
Press the Registration button on the board to complete the registration process. 9.
P U S H
10.
After pressing the button the board has been successfully registered to your account.
The SC14WSMDATA modules in the SC14DECTIPBSREFKT are normally preregistered. By turning on the device it will start communicating with the SC14DECTIPBS. If the device is not registered, follow the procedure below. 11. Follow this sequence to enable registration on the SC14WSMDATA_DB: Power off the SC14WSMDATA_DB hold down the Reg button Power on the SC14WSMDATA_DB After > 2sec release the Reg button The RED LED will be on continuously to indicate registration mode. If needed, enable registration on the base station by clicking the corresponding button in webpage. The RED LED on the SC14DECTIPBS will be on if the base is in registration. Default access code is 0000 (preprogramed value). The RED LED on the SC14WSMDATA device will turn off if registration is successful. Refer to the SC14WSMDATA documentation for more information.
April 10, 2012 v1.1 Dialog Semiconductor B.V. Confidential
Power button
Reg(istration) button
12.
page 9 of 43
13.
Once a device has communicated with the SC14DECTIPBS it will show up as a sensor on the main web page. Click the sensor to access the corresponding device menu.
The device web page allows the user to try various JSON commands. The sequence is as follows: Push a button to invoke a JSON command (purple square). The JSON command input from the server to the board or the end device will show up in the left yellow box. The JSON response from the board will show up in the right red box. The left yellow box can also be used to experiment with JSON command and send various commands to the device or base station.
14.
15.
page 10 of 43
Check if the board functions correctly. In order to access the boards internal website only LED D4 and D2 need to light up continuously. 2.
Green LEDs
Yellow LEDs
page 11 of 43
From the DVD folder PcTools, double click the DECT-ULE-SetupWizard.exe file Match the hostname to the number under the board to find the board IP address. Note: Please connect the PC running the DECT ULE Setup Wizard to the same wired network as the SC14DECTIPBS is on. The Setup Wizard broadcasts information to find the board, which may be blocked from wireless to wires networks. 3.
Open a browser and type in the corresponding IP address. The internal webpage is now opened. 4. Note: Windows 7 has a difficult time accessing IP addresses that are not in the hostfile. If the webpage is very slow, add the IP address to the hostfile. See http://helpdeskgeek.com/windows7/windows-7-hosts-file/
page 12 of 43
The SC14WSMDATA modules in the SC14DECTIPBSREFKT are normally preregistered. By turning on the device it will start communicating with the SC14DECTIPBS. If the device is not registered, follow the procedure below. 5. Follow this sequence to enable registration on the SC14WSMDATA_DB: Power off the SC14WSMDATA_DB hold down the Reg button Power on the SC14WSMDATA_DB After > 2sec release the Reg button The RED LED will be on continuously to indicate registration mode. If needed, enable registration on the base station, by selecting DECTIP base control and then enable registration. The RED LED on the SC14DECTIPBS will be on if the base is in registration. Default access code is 0000. The RED LED on the SC14WSMDATA device will turn off if registration is successful. Refer to the SC14WSMDATA documentation for more information.
Power button
Reg(istration) button
6.
Once devices are registered and communicating they are displayed in the home page, and by clicking on them you can see the details of each sensor.
7.
page 13 of 43
You can tie an event with an activity by selecting Add activity. An event can be any packet of certain type coming from a sensor. It can be a wake-up packet, an alarm packet, a HAL packet. An activity can be any action that should be taken in response to an event like toggling an actuator, setting a LED, driving a ULE port or just logging and sending an email.
8.
The system log file can be accessed by selecting System Debug JSON Interface from the home page. Multiple commands to the sensors can be sent through the WEB API (JSON interface). For more details refer to Web API.pdf included in the release.
9.
page 14 of 43
10.
The boards local IP address has been found successfully and the internal web page has been accessed. .
page 15 of 43
3. Software Installation
Goal: Install Oracle VM VirtualBox Manager. It is a freely available open source product from Oracle needed to open the Virtual Machine file provided with this release. What to do! VirtualBox Manager Additional info / Result
1.
2.
Go to the Downloads section and choose the latest VirtualBox for Windows hosts.
3.
4.
Press Run.
5.
Press Next
page 16 of 43
6.
Click the components which you would like to install. It is not advised to deselect any of the selected components. You can click Browse to change your installation directory. Click Next to continue.
7.
Select the way the features should be installed and press Next.
8.
9.
Click Install to begin the installation. A progress bar is shown. Wait until the progress bar is completed.
10.
Click the Finish button to exit the Setup Wizard. You can check the checkbox to start the virtual machine right after installation.
page 17 of 43
4. Software Setup
Goal: Setup the Oracle VM VirtualBox Manager What to do! VM VirtualBox Manager Setup Browse to the VirtualBox_image directory on your DVD and copy the file ULE_RefKit.vdi to a local drive. If it exists in zip format format, copy it and extract he vdi file. 1. It is important to first copy the file on to your hard drive as it needs to be writable. Additional info / Result
2.
If Oracle VM VirtualBox Manager has not been started yet start the VirtualBox Manager (with Windows Start Menu).
3.
4.
Fill in a name and choose Linux as your operating system and Ubuntu as the version. Click Next.
5.
page 18 of 43
6.
Make sure that Start-up Disk is checked and that Use existing hard disk is selected. Accordingly click the browse icon:
7.
Browse to directory on your local drive containing the file ULE_RefKit_xxx.vdi file. Select the dvi file, click Open and click Next.
8.
9.
10.
Click Network. Select Bridged Adapter for the field Attached to and select a network connection for field Name:. Important: Connect the computer to a wired network. As the DECT-ULE-Setupwizard must be able to reach the board through a broadcast it needs to be on the same physical medium.
11.
Click OK. Click the Start arrow in the main screen and press OK.
page 19 of 43
12.
A new window is opened showing the virtual machine. Press OK, OK to close all the information screens. Important: If you are requested to enter a username and password use: User: uleuser Password: uleuser
13.
In the menu of Oracle VM VirtualBox select Devices -> CD/DVD Devices -> Choose a virtual CD/DVD disk file
14.
Browse to folder VirtualBox_image on your DVD and select the VBoxGuestAdditions_4.1.6.iso and click Open. Press OK.
15.
You are prompted to choose the application to launch. Select Open Autorun Prompt and press OK. Note: In case you are not prompted, right-click the VBOXADDITIONS_4.1.6_7413 and select Open With Autorun Prompt and press Run.
page 20 of 43
16.
17.
Wait until the VirtualBox Guest Additions installation is completed and press Enter to close the window.
18.
page 21 of 43
What to do! First connect the Ethernet connector (top red square). 1. 2 . 1 Then connect the Power plug (bottom red square). Do not exceed 5V on the power supply. The board will be damaged.
Additional info
Check if the board functions correctly. In order to access the boards on your local network only LED D4 and D2 need to light up continuously. 2.
Green LEDs
Yellow LEDs
page 22 of 43
From the DVD folder PcTools, double click the DECT-ULE-SetupWizard.exe file Match the hostname to the number under the board to find the board IP address. Since the Virtual Machine environment is now also installed, the DECT-ULE-SetupWizard can also be accessed from Linux.
3.
If not already started, start the Virtual Machine and log in.
4.
page 23 of 43
Optional step In order to run the DECT-ULE-SetupWizard from Linux first double clik Root Terminal. 5. Use the uleuser as password for the administrative tasks.
6.
Optional step Execute /home/uleuser/DECT-ULE-SetupWizard to start the wizard. Write down the board IP address (see step 3).
Start the Eclipse SDK by double clicking the Eclipse icon. Use the uleuser as password for the administrative tasks. .
7.
page 24 of 43
The Eclipse environment will open after the splash screen shows.
8. Once opened, select the ULE_ReferenceDesign project. This will enable the compile, debug and run buttons.
Compile
Debug
Run
From the drop down button next to the Run External Tools button select Update SDK with Board IP address 9.
page 25 of 43
Click once in the (white) console area to select the console and type the SC14DECTIPBS IP address. (as found by the DECT-ULE-SetupWizard)
Important: It is important to configure the correct IP. If not done, the programming tools in the Eclipse SDK will not work. Once configured, the IP does not need to be re-configured if the board IP does not change. The last board IP is stored in a configuration file so closing and (re)opening the SDK will not change the board IP configuration.
19.
The Virtual Machine and SC14DECTIPBS are successfully set up for SW development.
page 26 of 43
First build the Software for the PC architecture by clicking the dropdown button next to the hammer and selecting Debug_PCBUILD.
1.
Check if the build is successful. If the console shows finished building target the build was successful.
page 27 of 43
2.
In order to connect the radio module on the SC14DECTIPBS to the Eclipse SDK a stub (small program) must be downloaded to the board. This stub connects the radio module to the SDK over the Ethernet network. Press the drop down button next to the Run External Tools button and select Run Dect Bridge.
Verify in the console area that the Dect Bridge stub has started correctly.
3.
If the stub has downloaded correctly, press the drop down button next to the Debug button. 4. Select ULE_RefDebugAPP
5.
For more information on debugging with Eclipse tools, please see the SC14DECTIPBS SW manual and the (extensive) information on Eclipse on the internet.
April 10, 2012 v1.1 Dialog Semiconductor B.V. Confidential page 28 of 43
Note: Since the ULE application is running on the Virtual Machine the web interface and demo page is now active in the Virtual Machine (using libmicrohttpd). In the default user application port 8020 is used in the VM. Open a browser and go to http://localhost:8020 or http://127.0.0.1:8020. For more tips on how to work on the demo page please see the SC14DECTIPBS SW manual. Warning: As an added feature the PC_BUILD version uses simulated sensors, a way to test IPBASE behavior with sensors that do not exist yet or are under developmnet. This feature doesnt intefere with operation of normal sensors which are also active in parallel. Uncomment function ULE_Sensor_Simulate in main_app.c to disable this feature.
When finished debugging, terminate the application by pressing the Terminate button.
6.
Go back to the C/C++ view by closing the debug view. Right Click the Debug view (top right of your screen) and select Close. Important: Make sure the debug application is not running anymore before continuing. Running applications may disturb follow up steps.
page 29 of 43
7.
Optionally, you can debug natively the ule application clicking the debug button and using the Eclipse GDB debug tool.
8.
Finally one very useful to use for debugging website code is the Firefox plugin Firebug. This tools enable the inspection of generated html code, add the ability to breakpoint in JavaScript code and inspect JavaScript variables as well as intrnal JSON exchange activity. http://getfirebug.com/
9.
The application has now been verified to function properly by testing the functionality on the PC.
page 30 of 43
First cross-compile the Software for the SC14DECTIPBS target architecture by clicking the dropdown button next to the hammer and selecting Release_CROSSCOMPILE.
1. Check if the build is successful. If the console shows Copy to TFTP server and no apparent errors show the build was successful.
2.
In order to run the application it must be downloaded to the target and executed. This is done by executing an expect script, which logs in to the board using Telnet, then downloads the latest application from the Virtual Machine built in TFTP server (to which it was copied after compilation) and executes it. To invoke this script, go to the dropdown button next to the External Tools button and select: Run ule_app
page 31 of 43
The console now shows the script logging in on the board, downloading the application from the Virtual Machine TFTP server and executing it. The application response will show in the console area. 3. Warning: Application menu is not accessible with this method. Eclipse uses telnet to kick off the ule application in the board. Eclipse will only receive the output from the application but will not be able to send any keystrokes to it.
4.
The application is now cross compiled for the SC14DECTIPBS target and has been tested on the actual device.
page 32 of 43
What to do! Updating the SC14DECTIPBS image. After the application has been successfully modified and debugged it is time to update the image in the board so that the changes are made permanent. Build the entire image (= application + Operating System + file system + ) by clicking the dropdown button next to the Compile button and select: BUILD BOARD IMAGE Note: compiling an image may take a while.
Additional info
1.
Check if the build is successful. If the console shows cp linux-2.6.x/vmlinuz /ser/tftp and no apparent errors show the build was successful.
page 33 of 43
In order to update the SC14DECTIPBS image in the FLASH it must be downloaded to the target and stored. This is done by executing an expect script, which logs in to the board using Telnet. The script then downloads the image from the Virtual Machine built in TFTP server and stores it to the FLASH (after erasing the FLASH). 2. To invoke this script, go to the dropdown button next to the External Tools button and select: Update flash Important: Make sure this process is not disturbed by for instance disconnecting the ethernet, power cycling the board or resetting the board. This will corrupt the flash and make the image difficult to restore.
The console now shows the script logging in on the board, downloading the image from the Virtual Machine TFTP server, erasing the FLASH and storing the new image. Once the update is successful, the board will be reset in order to activate the new image.
3.
4.
The ULE application (including the website, file system, OS and so on) have been stored to FLASH successfully. Changes to the application or website will be retained after resetting the board.
page 34 of 43
Note: the FLASH space on the board is limited, so the website should not exceed 500kB or so.
The main_app.c file can be modified to: Register new function callbacks for new sensor types Change the main output to the console when starting the application
2.
page 35 of 43
The sensor_handlers.c file contains the callback functions for the sensors (callbacks are registered in main_app.c).
3.
The ule_simulate.c contains simulation sensors when just running on the PC. Modify this file to simulate sensor devices when running in the PC environment. Note that the PC application is always connected to the boards Radio Module, but simulated sensors provide easy debugging capabilities. 4.
page 36 of 43
5.
The userhtmlHandler.c file contains the code for incoming connections on the IP side. Use this to bypass ULE app default JSON interface. Change this code to add specific links between your ULE application and clients on the IP side.
The webrequest_handler.c is specifically designed to store application rules on the SC14DECTIPBS. 6. Basically it stores rules such as when device w sends message x, the base should send message y to device z to a file in the FLASH and uses that to process incoming events from the ULE network devices.
page 37 of 43
10.
This section describes how to connect the serial port interface to development machine. This interface can be used for extra debug capabilities and system recovery in case of flash corruption. There are two methods which can be used to access the IP base serial port. The first is by hyperTRM from the windows machine and the other is by using minicom in the virtual machine. Minicom is preconfigured in the VM and is adviced to use this option as part of all-in-one development process.
What to do! Connect a IPBASE to your PC with a USB to TTL converter cable. 1. The black cable of the FTDI cable should be connected to the connector pin marked as black.
Additional info
2.
If you are connecting the IPBASE to your computer for the first time, the hardware drivers need to be installed before you can proceed.
On the virtual machine Device Menu, select USB Device and then the FTDI device.
3.
page 38 of 43
On the virtual machine, click on the Root terminal (uleuser is the password) and the type ./serial_terminal.sh. This will open minico, a program used to send and receive characters from the UART. 4.
5.
Alternatively you can use Windows HyperTerminal to access IPBASE COM port.
6.
Open menu File and select New Connection Give the new connection a name and click on OK. The Connect To window appears Select the <COM-port> that represents the USB connecter, to which the USB-to-Serial cable is currently connected. Click on OK to continue.
Note: If the mapping between <COM-port> and USB port is not clear, check the device manager.
7.
On Windows XP go to the Control Panel, item System. Under tab Hardware click on Device Manager. Go to the item Ports (COM & LPT).
page 39 of 43
8.
Enter the following settings in the COM properties windows. Bits per second: 115200 Data bits: 8 Parity: None Stop bits: 1 Flow control: None
9.
page 40 of 43
11.
This section describes what to do if the SC14DECTIPBS is not responding anymore. Most likely the FLASH upgrade process has been disrupted or the FLASH has been corrupted otherwise. Although this is not very likely to happen, the following steps can be used to restore functionality on the SC14DECTIPBS.
What to do! Follow chapter 10 to connect the board a serial cable. 1. The black cable of the FTDI cable should be connected to the connector pin marked as black.
Additional info
The Virtual Machine should be running. It has a built in TFTP server that is hosting the Linux binary. 2. Find the IP address of the Virtual Machine by typing ifconfig. Note that in this example the IP is 10.0.3.190 (which will most likely be different in other cases).
page 41 of 43
Stop the autoboot by pressing any key in the serial terminal within three seconds.
3.
Program the following settings: setenv serverip 10.0.3.190 This setting defines the IP address of the Virtual Machine (where the TFTP server recides). setenv ipaddr 10.0.3.10 The SC14DECTIPBS board needs an IP address to communicate (10.0.3.10 in this example, please contact your system administrator which address is available). setenv netmask 255.255.0.0 Set the netmask appropriately. Usually two subnets are sufficient. saveenv Store the settings with the saveenv command. After programming the correct settings the Linux image can be restored using the following command: upgrade vmlinuz a00000 20000
4.
5.
6.
Reset the SC14DECTIPBS after the upgrade is done and the board is restored.
page 42 of 43
Preliminary
First Production
No Identification Noted
Full production
Obsolete
Not in Production
Dialog Semiconductor BV reserves the right to make changes without notice to any products herein to improve reliability, function or design. Dialog Semiconductor BV does not assume any liability arising out of the application or use of any product or circuit described herein; neither does it convey any license under its patent rights, nor the right of others.
Dialog Semiconductor BV does not assume any responsibility for use of any circuit described, no circuit patent licenses are implied, and Dialog reserves the right, at any time without notice, to change said circuitry or specifications.
RoHS Compliance
Dialog Semiconductor complies to DIRECTIVE 2002/95/EC OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL of 27 January 2003 concerning Restriction of Hazardous Substances (RoHS). Dialog Semiconductors statement on RoHS can be found on http://www.dialogsemiconductors.com. See Corporate, Quality Policy RoHS certicates from our suppliers are available on request.
Customer support
[email protected] Customer service [email protected] [email protected] [email protected] [email protected]
page 43 of 43