Changes between Version 3 and Version 4 of ZigbeeGateway


Ignore:
Timestamp:
Sep 17, 2010, 10:00:32 AM (14 years ago)
Author:
Sensei
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ZigbeeGateway

    v3 v4  
    11= Zigbee to SENSEI Gateway Cookbook =
    2 
    3 This document includes instructions how to install and run the Zigbee to SENSEI Gateway in a compueter.
    42
    53**UNDER CONSTRUCTION**
    64
     5This document includes instructions about installing and running the Zigbee to SENSEI Gateway in a computer.
    76
    87[[PageOutline(2-3,Table of Contents,inline)]]
     8
    99== Introduction ==
    10 The Zigbee to SENSEI gateway is a software that allows to connect a zigbee WS&AN island into the SENSEI framework. This software operates under a a computer using a Windows Operating System, and needs a zigbee USB dongle.
     10The Zigbee to SENSEI gateway is a software that allows connecting a zigbee WS&AN island into the SENSEI framework. The gateway implements the REP (Resource End Point) of the island resources publishing into the RD (Resource Directory) and implements the RAI (Resource Access Interface) that allows a client to get and actuate over resources together with subscribe for notify.
    1111
    12 UNDER CONSTRUCTION
     12This software runs under Windows Operating System, and needs a zigbee USB dongle.
     13
     14== Installation ==
     15There is not an installation package available. To run this software is it needed to paste the files in a directory and run the exe file “Zb2SenseiGw.exe”. Prior to that it is convenient to adjust the configuration file (see [#Configuration Configuration section]).
     16
     17=== Requirements ===
     18The package requires
     19* Windows XP operating system version or upper.
     20* No special requirements of memory speed or hard disk needed. It is very light.
     21* External Hardware: Zigbee dongle. It has been tested the zigbee dongle of “Integration” model “IA DAUB-DK1 2400”.
     22       * Drivers of this dongle should be properly installed before running the package.
     23* IP connection. Make sure that the firewall allows the package to establish a TCP server.
     24
     25=== Package Content ===
     26* Main executable file:
     27       * //ZB2SenseiGW.exe//
     28* Resource files:
     29       * //connect.bmb//, //disconnect.bmp//, //linked.bmp//
     30* Configuration files:
     31       * //ZB2SenseiGW.exe.config//, //rpi.xml// (more configuration files can be added, see [#Configuration Configuration section])
     32* Libraries of zigbee dongle:
     33       * //STKUSB.dll//, //ZB.dll//
     34
     35== Specification ==
     36
     37Two ways of connecting to a zigbee gateway, with zigbee dongle or throw a external ip gateway … 
     38 UNDER CONSTRUCTION
     39
     401. Throw a zigbee dongle
     412. Throw an external gateway
     42
     43The software discovers nodes of the zigbee net, and for each node it discovers sensors and actuators. This software operates under the following zigbee configuration:
     44* It has been tested upon zigbee 2007. Zigbee Pro should work depending on the zigbee dongle
     45* It is needed to known a priori physical zigbee parameters
     46       * Frequency channel number (1 to 26)
     47       * zigbee net password
     48       * extended PAN Identification helps but not needed.
     49* Not all the zigbee profiles are detected. It have been tested under temperature, light, human presence, acceleration sensors and electricity on/off actuator.
    1350
    1451
    15 == Requeriments ==
    16 This software requieres
    17 * Windows XP operating system version or upper.
    18 * No special requeriments of memory, speed or hard disk
    19 * External Hardware: Zigbee dongle. It has been tested the Integration zegbee dongle IA DAUB-DK1 2400.
    20      * Drivers properly installed.
    21 * IP connection
     52The Gateway has the following features regarding Resource End Point implementation
     53* Allows **publication** against a Resource Directory
     54* Allows **getting** data from sensor and **acting** over an actuator using **RESTful** access
     55* Allows **subscription** to resources. Notification can be requested upon one or several of the following conditions:
     56       * Periodic time. If active, it sends a new notification when it takes the specified time after the last sent notification.
     57       * Value change. If active, it sends a notification when the value changed
     58       * Threshold. When the value goes beyond a threshold a notification is sent.
     59* Allows **mobility**. Several gateways can be located in the vicinity and in case the Zigbee Island allows nodes to move, both gateway communicates each other to properly handle the mobility.
     60
     61In order to not saturate the islands with possible huge requests from the internet world, the gateway do not bypass the entire requests to the island. For that reason the gateways stores the last value of the resources in order to respond by itself to request targeting the same resource that arrives in a short period of time.
    2262
    2363
    24 == Specification ==
    25 This software operates under the following zigbee configuration
    26 * It has been tested upon zigbee 2007. Zigbee Pro should work depending on the zigbee dongle
    27 * It is needed to kown a priori physical zegbee parameters as channel and net password
    28    * extended PAN Identification helps but not needed.
    29 * Notification
    30 * Mobility
    31 
    32 The software discover nodes of the zigbee net, and for each node it discovers sensors and actuators.
    33 
    34 UNDER CONSTRUCTION
    3564
    3665== Configuration ==
    37 The Zb2SenseiGw.exe.config file
    38 * Zigbee parameters, channel, extPANid target, net password
    39 * proxy
    40 * IP list
    41 * RAI server
    42 * auto connect
    43 * RPI resource directory target
    44 * REP description
    45 * mobility
     66Two xml files need to be edited for properly configuring the software package before running it. These configuration files allows to establish most of the behaviour of the package without the needed of compile the software.
    4667
    47 The xxxx.xml file
    48 * individual REP description
     68Remember that these files are read when application starts. If you change a value, it will not be considered after restarting the application.
     69
     70It is not needed special editor for changing these files. Whichever text editor used is enough. But special care should be followed for not modifying the overall xml structure, and the rest of the tags. Read this manual before proceed to edit the files.
     71
     72Do not worry if you are not familiar with **xml basis**. Look for the target name that follow “//key=//”, and you must **edit only** the text between double apostrophes after the “//value=//” text.
     73
     74=== Zb2SenseiGw.exe.config file===
     75The "**//Zb2SenseiGw.exe.config//**" file allows establishing:
     76
     77"**//autoConnectType//**" and "**//autoConnectIndexCh//**": Indicates if you want to connect to the Zigbee island automatically when the application starts. It is very useful for non attended servers if the computer or application restarts for whatever reason. The possible values of "//autoConnectType//" are:
     78* "//off//": do not connect automatically. Manually connection needed after application start. "//autoConnectIndexCh//" value is ignored.
     79* "//ch//": connect automatically using zigbee dongle. "//autoConnectIndexCh//" indicates the frequency channel; allowed values are from 11 to 26.
     80* "//ip//": connect automatically to a //ip// zigbee gateway. "//autoConnectIndexCh//" indicates the index "**//<netConn>//**" list to be used. The first index is 0.
     81
     82"**//<netConn>//**" list. Contains a list of ip address that the gateway can connect to when non local connection is used. Each element in the list contains:
     83* "//idNet//": description or name that appears in the application.
     84* "//remoteip//": ip adress.
     85* "//remoteport//": remote server tcp port.
     86* "//localport//": local server tcp port to be used when connected. Used for receiving responses. Beware not to use local ports used by other software in the computer.
     87* "//com//": if local rs232 modem is used, it indicated the port number. Not implemented.
     88* "//remotetelephone//": for communication using SMS instead of ip. Not implemented.
     89* "//manufacturer//", "//model//", "//imei//", "//imsi//", "// msisdn //": Parameters of other end modem, if a modem is used. These is for information only and it is not used at all. Leave empty, but do not delete.
     90
     91"**//netPassword//**": zigbee net key in hexadecimal format. Leave empty for no security options.
     92
     93"**//netExtPANid//**": target zigbee extended PAN identifier in hexadecimal format: leave empty for any (example: "//20DB765432144010//").
     94
     95"**//Sensei_RPI_ProxiHost//**","**//Sensei_RPI_ProxiPort//**","**//Sensei_RPI_ProxiBypass//**": If proxy is used for accessing internet both for publication and notification, proper configuration is needed here. If not, leave empty. Insert Host as name or IP address, TCP port to be used and bypass contains local IP address ranges that do not use the proxy, as for example "//192.168.0.0/192.168.255.255//"
     96
     97"**//Sensei_RAI_BaseURL//**": Base URL for the SENSEI RAI Resource Access Interface server. For example "//http://myIP:8081/sensei/rai/resources/ //". If empty, the application will not implement the RAI server. It is mandatory to include the port event if the default port is used. It is also mandatory to end in "/". "//myIP//" text will be replaced by first real computer IP address. If the computer has several IP address and you want to use another, put it explicitly. Finally, the application will append the //nodeID/[s or a]/number // to this URL.
     98
     99"**//Sensei_RPI_URL//**": SENSEI Target Resource Directory URL for Publishing. Leave Empty for not publishing resources into Resource Directory. End with "/". Application will add "rpi", "rli" or "rd" suffix when needed. For example "//http://sensei-dev1.grid.pub.ro:8184/ //".
     100
     101"**//Sensei_RPI_RAIBaseURL//**": URL published in "<Rai-Description> <REP-Locator>" into Resource Directory for each resource.  If empty it will take Sensei_RAI_BaseURL, but it can be different if needed for example if gateway fo throw a proxy or a router that changes the local IP into a public IP. End with "/". Application will append //nodeID/[s or a]/number // to this URL. "//myIP//" text will be replaced by first real computer IP address.
     102
     103"**//Sensei_RPI_ExpirationTime//**": Expiration date for each resource published into the Resource Directory, in hours from first publication. If empty, one week will apply.
     104
     105"**//ZB2SenseiGw_Password//**": This is used in case of mobility. Contains a text password that it is needed to provide from one gateway for credentials. The gateways that take part in the mobility of a node need to be the same password.
     106
     107=== rpi.xml file===
     108The **// rpi.xml //** file indicates what exactly format should be sent to the resource directory for publishing a resource. In that way format can be completely changed  for new versions without the need of compilation.
     109
     110In addition "**// rpi.xml //**" is a generic file for all the resources, but you can specify individual files for each resource. Simple insert a file with the same structure in the package directory and with the name equals to "//**nodeID**s**number.xml**//" for a sensor or "//**nodeID**a**number**.xml//" for and actuator. Where "//nodeID//" is the node MAC address in hexadecimal format, (16 characters), and  "//number//" is the index of the sensor or actuator starting by 0. If an individual file is present it will be considered, if not, the generic one is considered.
     111
     112The "**//*.xml //**" file can include the following text that will be replaced with the proper values by the application:
     113* "//**_ResT**//": name of the resource, for example temperature, light, etc.
     114* "//**_NODE **//": node id, that is the MAC address in hexadecimal format with capital letters (16 characters).
     115* "//**_NET **//": net id, that is, coordinator MAC address in hexadecimal format with capital letters (16 characters).
     116* "//**_RES**//": will be replaced by "a" for an actuator or "s" for a sensor.
     117* "//**_NUMBER **//": number of the sensor or actuator, starting by 0. If the node contains several, the order of appearance is considered.
     118* "//**_TYPE **//": will be replaced by "actuator" for an actuator or "sensor" for a sensor.
     119* "//**_TIME**//": expiration time contained in the "//Sensei_RPI_ExpirationTime//" variable of the "//Zb2SenseiGw.exe.config//" file.
     120* "//**_ RAI**//": value of the "// Sensei_RPI_URL //" variable of the "//Zb2SenseiGw.exe.config//" file.
    49121
    50122== User manual ==