SC14DECTIPBS Quick Start Guide v1.1.pdf

download SC14DECTIPBS Quick Start Guide v1.1.pdf

of 43

Transcript of SC14DECTIPBS Quick Start Guide v1.1.pdf

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    1/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 1 of 43Confidential

    Dialog Semiconductor B.V.

    SC14DECTIPBS

    Quick Start Guide

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    2/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 2 of 43Confidential

    Purpose of this document:

    This guide explains the most important steps of installing and setting up the SC14DECTIPBS. It will alsocover the interoperability with the SC14WSMDATA. For detailed information refer to theSC14DECTIPBS SW Manual.

    Terms and abbreviations:

    API Application Programming Interface

    AT Attention (Command given to CVM module)

    BaseStation

    See FP

    CVM Cordless Voice Module

    DECT Digital Enhanced Cordless Telephone

    FP Fixed Part

    FTDI Future Technology Devices International

    Handset See PP

    IDE Integrated development environment

    IPBS Internet Protocol Base Station

    IPEI International Portable Equipment Identity (please refer to ETSI EN 300 175-6)

    MMI Man Machine Interface

    NVS Non Volatile Storage

    PCB Printed Circuit BoardPP Portable Part

    RFPI Radio Fixed Part Identity (please refer to ETSI EN 300 175-6)

    UART Universal Asynchronous Receiver / Transmitter

    ULE Ultra Low Energy

    WSM 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

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    3/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 3 of 43Confidential

    Introduction:

    The SC14DECTIPBS is an internet enabled DECT base station which connects TCP/IP basedapplications (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 basestation. 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).

    The SC14DECTIPBS is a reference design. It uses Dialog SC452 VOIP SoC as a host processor to aSC14CVMDECT.

    PreparationTo 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 freeUSB 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

    Figure 1: Product overview

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    4/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 4 of 43Confidential

    IPBASE HW components

    UTP Connector

    Powerconnector

    Resetbutton

    LED1LED1

    B l a c k

    B l a c k

    O r a n g e

    O r a n g e

    Y e l l o w

    Y e l l o w

    Serial connector

    SC14452

    DECT ULE

    LED2LED2 LED3LED3 LED4LED4

    Genericbutton

    LED5LED5

    PHY

    Memory(SDRAM)

    Memory(Flash)

    !Max 5V

    Note : Programmable and configurable items are shown in bold.Note : Programmable and configurable items are shown in bold. Figure 2: Layout of the targetThe most important parts on the target are:

    Power ConnectorProvides power to the target.Warning : The target maximum power is 5V. Using a higher voltage can destroy the target.

    Reset buttonReboot the target manually.

    UTP connectorConnects the target to a wired network.

    Serial ConnectorConnect the target directly to a computer for configuring or updating. The color codes of the serial connectorare shown in Figure 2 and on the target.

    LED1 to LED 5Provide information about the current status of the target. LED 1 to LED 4 are green LEDs. LED 5 is red. In thedemo application they are assigned as following:

    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

    SC14452The 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 theReset button is activated.

    Memory (Flash)The non-volatile ROM where the image is stored.

    PHY (PHYsical layer)Enables communication between target and network

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    5/43

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    6/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 6 of 43Confidential

    1. Setting up the SC14DECTIPBS

    This section describes how to set up the board and connect it to the SmartPulsePortal (accessible worldwide).

    What to do! Additional info

    1. Unpack the board and write down thenumber on the back of the board.

    2.

    First connect the Ethernet connector(top red square) to a free port of a switch or

    a router.

    Then connect the Power plug(bottom red square).

    Do not exceed 5V on the power supply.The board will be damaged.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    7/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 7 of 43Confidential

    3.

    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 continuouslyto indicate the board has an IP address.

    +-27 sec: D3 will start blinking slowly toindicate the board is trying to connect to theSmartPulse portal.

    D1 (bottom right) blinks whenever there isDECT radio activity.

    Note: if any of the previous steps fail,most likely the internet connection is notpresent (Ethernet cable should haveinternet access and a DHCP server shouldbe present in the network).

    4.

    Go to the SmartPulse portal:http://smartpulse.uncinc.nl

    5.

    Create a new account

    GreenLEDs

    Yellow LEDs

    http://smartpulse.uncinc.nl/http://smartpulse.uncinc.nl/http://smartpulse.uncinc.nl/
  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    8/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 8 of 43Confidential

    6.

    Before trying to register the board, wait forLED D3 (yellow LED) to be on

    continuously.

    Important: if LED D3 is not oncontinuously but blinking this means theboard has not setup a connection to theserver. Registration will then fail. Oncesetup, the link will remain until the board isreset or power cycled.

    7.

    After creating an account clickRegister your board

    8.

    Type in the code which is on the bottom ofthe board (see step 2.1).

    Click Register

    Yellow LEDs

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    9/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 9 of 43Confidential

    9.

    The RED LED should blink and the websiteindicates the LED on the board blinks.

    Press the Registration button on the boardto complete the registration process.

    10.

    After pressing the button the board hasbeen successfully registered to your

    account.

    11.

    The SC14WSMDATA modules in theSC14DECTIPBSREFKT are normally

    preregistered. By turning on the device itwill start communicating with the

    SC14DECTIPBS. If the device is notregistered, follow the procedure below.

    Follow this sequence to enable registrationon 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.

    12.

    If needed, enable registration on the basestation by clicking the corresponding button

    in webpage. The RED LED on theSC14DECTIPBS will be on if the base is inregistration. Default access code is 0000

    (preprogramed value).

    The RED LED on the SC14WSMDATAdevice will turn off if registration is

    successful. Refer to the SC14WSMDATAdocumentation for more information.

    Power button

    Reg(istration) button

    PUSH

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    10/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 10 of 43Confidential

    13.

    Once a device has communicated with theSC14DECTIPBS it will show up as a sensoron the main web page. Click the sensor to

    access the corresponding device menu.

    14.

    The device web page allows the user to tryvarious 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 upin the left yellow box.

    The JSON response from the board willshow up in the right red box.

    The left yellow box can also be used toexperiment with JSON command and sendvarious commands to the device or basestation.

    15. The board is successfully connected to theSmartPulse portal.

    .

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    11/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 11 of 43Confidential

    2. Accessing the SC14DECTIPBS internal website

    If used on local networks, the SC14DECTIPBS internal webserver can also be usedto host a website. Using the SmartPulse server the board only hosts the JSON WebInterface. On a local network, it hosts the JSON Web Interface and a demo website.

    What to do! Additional info

    1.

    First connect the Ethernet connector(top red square).

    Then connect the Power plug(bottom red square).

    Do not exceed 5V on the power supply.The board will be damaged.

    2.

    Check if the board functions correctly. Inorder to access the boards internal website

    only LED D4 and D2 need to light upcontinuously.

    Green

    LEDs

    Yellow LEDs

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    12/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 12 of 43Confidential

    3.

    From the DVD folder PcTools , doubleclick the DECT-ULE-SetupWizard.exe file

    Match the hostname to the number underthe board to find the board IP address.

    Note: Please connect the PCrunning the DECT ULE Setup Wizard

    to the same wired network as theSC14DECTIPBS is on. The Setup Wizardbroadcasts information to find the board,which may be blocked from wireless towires networks.

    4.

    Open a browser and type in thecorresponding IP address.

    The internal webpage is now opened.

    Note: Windows 7 has a difficult timeaccessing IP addresses that are not

    in the hostfile. If the webpage is very slow,add the IP address to the hostfile. Seehttp://helpdeskgeek.com/windows-

    7/windows-7-hosts-file/

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    13/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 13 of 43Confidential

    5.

    The SC14WSMDATA modules in theSC14DECTIPBSREFKT are normally

    preregistered. By turning on the device itwill start communicating with theSC14DECTIPBS. If the device is not

    registered, follow the procedure below.

    Follow this sequence to enable registrationon 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.

    6.

    If needed, enable registration on the basestation, by selecting DECTIP base control

    and then enable registration. The RED LEDon the SC14DECTIPBS will be on if the

    base is in registration. Default access codeis 0000.

    The RED LED on the SC14WSMDATAdevice will turn off if registration is

    successful. Refer to the SC14WSMDATAdocumentation for more information.

    7.

    Once devices are registered andcommunicating they are displayed in thehome page, and by clicking on them youcan see the details of each sensor.

    Power button

    Reg(istration) button

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    14/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 14 of 43Confidential

    8.

    You can tie an event with an activity byselecting Add activity. An event can be

    any packet of certain type coming from asensor. It can be a wake-up packet, analarm packet, a HAL packet. An activity canbe any action that should be taken inresponse to an event like toggling anactuator, setting a LED, driving a ULE portor just logging and sending an email.

    9.

    The system log file can be accessed byselecting System Debug JSON Interfacefrom the home page. Multiple commands tothe sensors can be sent through the WEB

    API (JSON interface). For more details referto Web API.pdf included in the release.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    15/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 15 of 43Confidential

    10.

    The boards local IP address has beenfound successfully and the internal web

    page has been accessed..

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    16/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 16 of 43Confidential

    3. Software Installation

    Goal: Install Oracle VM VirtualBox Manager. It is a freely available open sourceproduct from Oracle needed to open the Virtual Machine file provided with thisrelease.

    What to do! Additional info / Result

    VirtualBox Manager

    1.Open your Web browser and go to page:

    https://www.virtualbox.org/

    2. Go to the Downloads section and choosethe latest VirtualBox for Windows hosts. Note: In this example we used VirtualBox4.1.6 for Windows hosts.

    3. Save and run the executable.

    4. Press Run.

    5. Press Next

    https://www.virtualbox.org/https://www.virtualbox.org/https://www.virtualbox.org/
  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    17/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 17 of 43Confidential

    6.

    Click the components which you would like

    to install. It is not advised to deselect any ofthe selected components. You can clickBrowse to change your installationdirectory. Click Next to continue.

    7. Select the way the features should beinstalled and press Next .

    8. Click Yes to proceed.

    9.

    Click Install to begin the installation. Aprogress bar is shown.

    Wait until the progress bar is completed.

    10.

    Click the Finish button to exit the SetupWizard. You can check the checkbox to

    start the virtual machine right afterinstallation.

    The VirtualBox installation is completed.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    18/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 18 of 43Confidential

    4. Software Setup

    Goal: Setup the Oracle VM VirtualBox Manager

    What to do! Additional info / Result

    VM VirtualBox Manager Setup

    1.

    Browse to the VirtualBox_image directory onyour 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.

    It is important to first copy the file on toyour hard drive as it needs to be writable.

    2.If Oracle VM VirtualBox Manager has not

    been started yet start the VirtualBox Manager(with Windows Start Menu).

    3. In VirtualBox Manager click New , Next .

    4.Fill in a name and choose Linux as your

    operating system and Ubuntu as the version.Click Next .

    5. Select 1024MB as the allocated amount ofbase memory. Click Next .

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    19/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 19 of 43Confidential

    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 drivecontaining the file ULE_RefKit_xxx.vdi file.

    Select the dvi file, click Open and click Next .

    8. Click Create to confirm the creation of the NewVirtual Machine.

    9. Click the Settings button in the main screen.

    10.Click Network . Select Bridged Adapter for the

    field Attached to and select a networkconnection for field Name:.

    Important: Connect the computer to a wirednetwork. As the DECT-ULE-Setupwizard must beable to reach the board through a broadcast itneeds to be on the same physical medium.

    11.Click OK .

    Click the Start arrow in the main screen andpress OK .

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    20/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 20 of 43Confidential

    12. A new window is opened showing the virtual

    machine. Press OK, OK to close all theinformation screens.

    Important: If you are requested toenter a username and password use:

    User : uleuserPassword : uleuser

    13.In the menu of Oracle VM VirtualBox selectDevices -> CD/DVD Devices -> Choose a

    virtual CD/DVD disk file

    14.

    Browse to folder VirtualBox_image on your

    DVD and select theVBoxGuestAdditions_4.1.6.iso and click Open .Press OK .

    15.You are prompted to choose the application to

    launch. Select Open Autorun Prompt andpress OK .

    Note: In case you are not prompted,right-click the

    VBOXADDITIONS_4.1.6_7413 and select OpenWith Autorun Prompt and press Run .

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    21/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 21 of 43Confidential

    16. Enter password: uleuser and press Authenticate .

    17.

    Wait until the VirtualBox Guest Additionsinstallation is completed and press Enter to

    close the window.

    18. The Virtual Machine is successfully set up.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    22/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 22 of 43Confidential

    5. Software development on SC14DECTIPBS

    The Virtual Machine contains the SC14DECTIPBS source code and all the tools required to programthe platform. There are three basic steps in developing the SW on the SC14DECTIPBS. For moredetails, please refer to the SC14DECTIPBS SW Manual. The steps are:

    1. Compiling and debugging the code on the PC.The Eclipse environment provides extensive debug options to debug a program (breakpoints,stepping, watching variables, ). The program communicates with the SC14DECTIPBS radiomodule directly over Ethernet.

    2. Compiling the code for the SC14DECTIPBS target and run it from the target RAM.The target provides print statement debugging capabilities. This step is used to verify theprogram is working as expected on the target. Upon reset the board loses the RAM content sothe program will be lost.

    3. Create the linux image and update the FLASH.This step creates a FLASH image for the SC14DECTIPBS (much like the hard drive contents ofa PC) and stores it in the board. This step is taken when step 2 has shown that the programworks and stores the program to FLASH meaning the program will not be lost upon reset. Asstep 3 takes considerably longer than step 2 usually a program is first developed in RAM andafterwards stored to FLASH.

    What to do! Additional info

    1.

    First connect the Ethernet connector(top red square).

    Then connect the Power plug(bottom red square).

    Do not exceed 5V on the power supply.The board will be damaged.

    2.

    Check if the board functions correctly. Inorder to access the boards on your localnetwork only LED D4 and D2 need to light

    up continuously.

    GreenLEDs

    Yellow LEDs

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    23/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 23 of 43Confidential

    3.

    From the DVD folder PcTools , doubleclick the DECT-ULE-SetupWizard.exe file

    Match the hostname to the number underthe board to find the board IP address.

    Since the Virtual Machine environment isnow also installed, the

    DECT-ULE-SetupWizard can also beaccessed from Linux.

    4.

    If not already started, start the VirtualMachine and log in.

    Important: username and passwordare:

    User : uleuserPassword : uleuser

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    24/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 24 of 43Confidential

    5.

    Optional step In order to run the DECT-ULE-SetupWizard

    from Linux first double clik Root Terminal .Use the uleuser as password for the

    administrative tasks.

    6.

    Optional stepExecute

    /home/uleuser/DECT-ULE- SetupWizard to start the wizard. Write down the board IP

    address (see step 3) .

    7.

    Start the Eclipse SDK by double clicking theEclipse icon.

    Use the uleuser as password for theadministrative tasks.

    .

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    25/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 25 of 43Confidential

    8.

    The Eclipse environment will open after thesplash screen shows.

    Once opened, select the

    ULE_ReferenceDesign project. This willenable the compile, debug and run buttons.

    9.

    From the drop down button next to the RunExternal Tools button select

    Update SDK with Board IP address

    Compile Debug

    Run

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    26/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 26 of 43Confidential

    10.

    The console will prompt to type in the

    IPBase board IP address.

    Click once in the (white) console area toselect the console and type theSC14DECTIPBS IP address.

    (as found by the DECT-ULE-SetupWizard )

    Press enter to complete the configuration ofthe SDK.

    Important: It is important to configurethe correct IP. If not done, the

    programming tools in the Eclipse SDK will notwork. Once configured, the IP does not need tobe 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 notchange the board IP configuration.

    19.

    The Virtual Machine and SC14DECTIPBSare successfully set up for SW

    development.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    27/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 27 of 43Confidential

    6. Compile/debug/run the application on the PC

    In order to speed up the development process the whole ule application can be compiled andrun on the virtual machine itself, except a small portion of code which stills runs on the board.This option has the following advantages:

    The Eclipse environment provides extensive debug options (breakpoints, stepping,watching variables) to debug the program running on the PC (GDB graphical debugenvironment).

    The website can debugged with any common debug tool like Dreamweaver/Firebug, asthe webserver and the host CPU is the virtual machine itself.

    There is no need to transfer any files to the board during development process.

    Note that the same application will be cross compiled and downloaded to the target later on.What to do! Additional info

    1.

    First build the Software for the PCarchitecture by clicking the dropdown

    button next to the hammer and selectingDebug_PCBUILD.

    Check if the build is successful. If theconsole shows finished building target

    the build was successful.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    28/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 28 of 43Confidential

    2.

    In order to connect the radio module on theSC14DECTIPBS to the Eclipse SDK a stub

    (small program) must be downloaded to theboard. This stub connects the radio moduleto the SDK over the Ethernet network.

    Press the drop down button next to the RunExternal Tools button and select

    Run Dect Bridge.

    3.

    Verify in the console area that the DectBridge stub has started correctly.

    4.

    If the stub has downloaded correctly, pressthe drop down button next to the Debug

    button.

    Select ULE_RefDebugAPP

    5.

    Running the ULE_RefDebugAPP willautomatically open the debug environment.

    Start the application by pushing theResume button.

    For more information on debugging withEclipse tools, please see the

    SC14DECTIPBS SW manual and the(extensive) information on Eclipse on the

    internet.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    29/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 29 of 43Confidential

    Note: Since the ULE application isrunning on the Virtual Machine the

    web interface and demo page is now activein the Virtual Machine (using libmicrohttpd).In the default user application port 8020 isused in the VM. Open a browser and go tohttp://localhost :8020 orhttp://127.0.0.1 :8020 . For more tips on howto work on the demo page please see theSC14DECTIPBS SW manual.

    Warning: As an added feature thePC_BUILD version uses simulated sensors,a way to test IPBASE behavior with sensorsthat do not exist yet or are underdevelopmnet. This feature doesnt inteferewith operation of normal sensors which arealso active in parallel. Uncomment functionULE_Sensor_Simulate in main_app.c todisable this feature.

    6.

    When finished debugging, terminate theapplication by pressing the Terminate

    button.

    Go back to the C/C++ view by closing thedebug view. Right Click the Debug view

    (top right of your screen) and selectClose.

    Important: Make sure the debugapplication is not running anymore beforecontinuing. Running applications maydisturb follow up steps.

    http://localhost:8020/http://localhost:8020/http://localhost:8020/http://127.0.0.1/http://127.0.0.1/http://127.0.0.1/http://localhost:8020/
  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    30/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 30 of 43Confidential

    7.

    Optionally, you can debug natively the uleapplication clicking the debug button andusing the Eclipse GDB debug tool.

    8.

    Finally one very useful to use for debuggingwebsite code is the Firefox plugin Firebug.This tools enable the inspection ofgenerated html code, add the ability tobreakpoint in JavaScript code and inspectJavaScript variables as well as intrnalJSON exchange activity.

    http://getfirebug.com/

    9.

    The application has now been verified tofunction properly by testing the functionality

    on the PC.

    http://getfirebug.com/http://getfirebug.com/http://getfirebug.com/
  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    31/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 31 of 43Confidential

    7. Cross compiling the application and run from RAM

    This step is used to verify the program is working as expected on the target. When theapplication is run from the RAM on the SC14DECTIPBS, the application output will be printedto the console. Upon reset the board loses the RAM content so the program will be lost.

    What to do! Additional info

    1.

    First cross-compile the Software for theSC14DECTIPBS target architecture by

    clicking the dropdown button next to thehammer and selecting

    Release_CROSSCOMPILE.

    Check if the build is successful. If theconsole shows Copy to TFTP server

    and no apparent errors show the build wassuccessful.

    2.

    In order to run the application it must bedownloaded 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 fromthe Virtual Machine built in TFTP server (towhich it was copied after compilation) and

    executes it.

    To invoke this script, go to the dropdownbutton next to the External Tools button and

    select:Run ule_app

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    32/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 32 of 43Confidential

    3.

    The console now shows the script loggingin on the board, downloading the

    application from the Virtual Machine TFTPserver and executing it.

    The application response will show in theconsole area.

    Warning: Application menu is notaccessible with this method. Eclipse usestelnet to kick off the ule application in theboard. Eclipse will only receive the outputfrom the application but will not be able to

    send any keystrokes to it.

    4.

    The application is now cross compiled forthe SC14DECTIPBS target and has been

    tested on the actual device.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    33/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 33 of 43Confidential

    8. Upgrading the SC14DECTIPBS FLASH image

    .This step creates a FLASH image for the SC14DECTIPBS (much like the hard drive contents ofa PC) and stores it in the board. This step is taken when the application has been debuggedand verified. Upgrading the SC14DECTIPBS FLASH image stores the program to FLASHmeaning the program will not be lost upon reset.

    What to do! Additional info

    1.

    Updating the SC14DECTIPBS image.

    After the application has been successfullymodified and debugged it is time to updatethe image in the board so that the changes

    are made permanent. Build the entireimage (= application + Operating System +file system + ) by clicking the dropdown

    button next to the Compile button andselect:

    BUILD BOARD IMAGE

    Note: compiling an image may takea while.

    Check if the build is successful. If theconsole shows

    cp linux- 2.6.x/vmlinuz /ser/tftp and noapparent errors show the build was

    successful.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    34/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 34 of 43Confidential

    2.

    In order to update the SC14DECTIPBSimage in the FLASH it must be downloaded

    to the target and stored. This is done byexecuting an expect script, which logs in tothe board using Telnet. The script thendownloads the image from the Virtual

    Machine built in TFTP server and stores itto the FLASH (after erasing the FLASH).

    To invoke this script, go to the dropdownbutton next to the External Tools button and

    select:Update flash

    Important: Make sure this process isnot disturbed by for instance disconnectingthe ethernet, power cycling the board orresetting the board. This will corrupt theflash and make the image difficult torestore.

    3.

    The console now shows the script loggingin on the board, downloading the imagefrom the Virtual Machine TFTP server,

    erasing the FLASH and storing the newimage.

    Once the update is successful, the boardwill be reset in order to activate the new

    image.

    4.

    The ULE application (including the website,file system, OS and so on) have been

    stored to FLASH successfully. Changes tothe application or website will be retained

    after resetting the board.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    35/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 35 of 43Confidential

    9. Where to change the code

    .This section provides a few pointers where to change the Software in order to change functionality ofthe SC14DECTIPBS. Please see the SC14DECTIPBS SW manual for a more detailed description ofthe SW architecture.

    What to do! Additional info

    1.

    The boards internal website can bemodified by changing the contents of thewebsite directory (index.html). Refer to SWmanual for a more thorough description ofavailable functionality.

    Note: the FLASH space on theboard is limited, so the websiteshould not exceed 500kB or so.

    2.

    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 theapplication

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    36/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 36 of 43Confidential

    3.

    The sensor_handlers.c file contains thecallback functions for the sensors

    (callbacks are registered in main_app.c ).

    4.

    The ule_simulate.c contains simulationsensors when just running on the PC.Modify this file to simulate sensor deviceswhen running in the PC environment.

    Note that the PC application is alwaysconnected to the boards Radio Module, butsimulated sensors provide easy debuggingcapabilities.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    37/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 37 of 43Confidential

    5.

    The userhtmlHandler.c file contains thecode for incoming connections on the IPside. Use this to bypass ULE app defaultJSON interface.

    Change this code to add specific linksbetween your ULE application and clientson the IP side.

    6.

    The webrequest_handler.c is specificallydesigned to store application rules on theSC14DECTIPBS.

    Basically it stores rules such as whendevice w sends message x , the baseshould send message y to device z to a filein the FLASH and uses that to processincoming events from the ULE networkdevices.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    38/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 38 of 43Confidential

    10. Connecting Serial Port

    This section describes how to connect the serial port interface to development machine. Thisinterface can be used for extra debug capabilities and system recovery in case of flashcorruption.

    There are two methods which can be used to access the IP base serial port. The first is byhyperTRM from the windows machine and the other is by using minicom in the virtual machine. Minicom ispreconfigured in the VM and is adviced to use this option as part of all-in-one development process.

    What to do! Additional info

    1.

    Connect a IPBASE to your PC with a USBto TTL converter cable.

    The black cable of the FTDI cableshould be connected to the

    connector pin marked as black.

    2.If you are connecting the IPBASE to yourcomputer for the first time, the hardware

    drivers need to be installed before you can

    proceed.

    3.

    On the virtual machine Device Menu, selectUSB Device and then the FTDI device.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    39/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 39 of 43Confidential

    4.

    On the virtual machine, click on the Rootterminal (uleuser is the password) and thetype ./serial_terminal.sh. This will open

    minico, a program used to send and receivecharacters from the UART.

    5. Alternatively you can use Windows

    HyperTerminal to access IPBASE COMport.

    6.

    Open menu File and select NewConnection

    Give the new connection a name and clickon OK . The Connect To window appears

    7.

    Select the that represents theUSB connecter, to which the USB-to-Serial

    cable is currently connected.Click on OK to continue.

    Note : If the mapping between andUSB port is not clear, check the devicemanager.

    On Windows XP go to the Control Panel ,item System .

    Under tab Hardware click on DeviceManager .

    Go to the item Ports (COM & LPT) .

    Check which COM port is the USB SerialPort

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    40/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 40 of 43Confidential

    8.

    Enter the following settings in the COM

    properties windows.Bits per second: 115200Data bits: 8Parity: NoneStop bits: 1Flow control: None

    9. The IPBASE is now connected with serialport.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    41/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 41 of 43Confidential

    11. Restoring the SC14DECTIPBS

    This section describes what to do if the SC14DECTIPBS is not responding anymore. Most likelythe 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 functionalityon the SC14DECTIPBS.

    What to do! Additional info

    1.

    Follow chapter 10 to connect the board aserial cable.

    The black cable of the FTDI cableshould be connected to the

    connector pin marked as black.

    2.

    The Virtual Machine should be running. Ithas a built in TFTP server that is hosting

    the Linux binary.

    Find the IP address of the Virtual Machineby typing ifconfig. Note that in this

    example the IP is 10.0.3.190 (which willmost likely be different in other cases).

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    42/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    April 10, 2012 v1.1 Dialog Semiconductor B.V. page 42 of 43Confidential

    3.

    Stop the autoboot by pressing any key in

    the serial terminal within three seconds.

    4.

    Program the following settings:

    setenv serverip 10.0.3.190This setting defines the IP addressof the Virtual Machine (where theTFTP server recides).

    setenv ipaddr 10.0.3.10

    The SC14DECTIPBS board needsan IP address to communicate(10.0.3.10 in this example, pleasecontact your system administratorwhich address is available).

    setenv netmask 255.255.0.0Set the netmask appropriately.Usually two subnets are sufficient.

    saveenvStore the settings with the saveenvcommand.

    5.

    After programming the correct settings the

    Linux image can be restored using thefollowing command:

    upgrade vmlinuz a00000 20000

    6. Reset the SC14DECTIPBS after theupgrade is done and the board is restored.

  • 8/14/2019 SC14DECTIPBS Quick Start Guide v1.1.pdf

    43/43

    S C 1 4 DE C T I P B S

    SC14DECTIPBS Quick Start Guide

    PRODUCT STATUS DEFINITIONS

    Datasheet Status Product Status Definition Advance Information Formative or in Design This data sheet contains the design specifications for

    product development. Specifications may change in anymanner without notice.

    Preliminary First Production This data sheet contains preliminary data. Supplementarydata will be published at a later date. Dialog SemiconductorBV reserves the right to make changes at any time withoutnotice in order to improve design and supply the bestpossible product.

    No IdentificationNoted

    Full production This data sheet contains final specifications. DialogSemiconductor BV reserves the right to make changes atany time without notice in order to improve design andsupply the best possible product.

    Obsolete Not in Production This data sheet contains specifications on a product that has

    been discontinued by Dialog Semiconductor BV. The data-sheet is printed for reference information only.

    Dialog Semiconductor BV reserves the right to make changes without notice to any products herein to improvereliability, function or design. Dialog Semiconductor BV does not assume any liability arising out of the applicationor use of any product or circuit described herein; neither does it convey any license under its patent rights, nor theright of others.

    Product Status DefinitionsDIALOGS PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORTDEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT ANDGENERAL COUNSIL OF DIALOG SEMICONDUCTOR BV. AS USED HEREIN:

    1. Life support devices or systems are devices

    or systems which,(a) are intended for surgical implant into thebody, or (b) support or sustain life, andwhose failure to perform, when properlyused in accordance with instructions for useprovided in the labeling, can be reasonablyexpected to result in a significant injury tothe user.

    2. Life support devices or systems are devices

    or systems which,(a) are intended for surgical implant into thebody, or (b) support or sustain life, andwhose failure to perform, when properlyused in accordance with instructions for useprovided in the labeling, can be reasonablyexpected to result in a significant injury tothe user.

    Dialog Semiconductor BV does not assume any responsibility for use of any circuit described, no circuit patentlicenses are implied, and Dialog reserves the right, at any time without notice, to change said circuitry orspecifications.

    RoHS Compliance

    Dialog Semiconductor complies to DIRECTIVE 2002/95/EC OF THE EUROPEAN PARLIAMENT AND OF THECOUNCIL of 27 January 2003 concerning Restriction of Hazardous Substances (RoHS).Dialog Semiconductors statement on RoHS can be found on http://www.dialogsemiconductors.com. SeeCorporate, Quality Policy RoHS certicates from our suppliers are available on request.

    Contacting Dialog SemiconductorDialog Semiconductor BV-HQHet Zuiderkruis 535215 MV s -HertogenboschThe NetherlandsTel: +31 (0) 73640 8822Fax: +31 (0) 73640 8823

    Dialog Semiconductor Hong Kong LtdDialog Semiconductor Japan LtdDialog Semiconductor SingaporeDialog Semiconductor US

    Refer to www.dialogsemiconductor.com for addresses andtelephone numbers

    Customer [email protected]

    Customer [email protected]@[email protected]@diasemi.com