User Guide Babel Buster 2 Model BB2-7040 BACnet ZigBee Gateway Rev. 1.
User Guide Babel Buster 2 Model BB2-7040 BACnet ZigBee Gateway Rev. 1.2 – February 2011 IMPORTANT SAFETY CONSIDERATIONS: Proper system design is required for reliable and safe operation of distributed control systems incorporating Babel Buster series gateways and other such devices. It is extremely important for the user and system designer to consider the effects of loss of power, loss of communications, and failure of components in the design of any monitoring or control application.
Contents 1 Overview ...................................................................................................................................................................... 1 1.1 How to Use This Guide ....................................................................................................................................... 1 1.2 The BB2-7040’s Role on the ZigBee Network ................................................................................................... 1 1.
A.3 Generic Configuration and the X-CTU Profile ................................................................................................. 48 Appendix B Connecting Digi International Wireless Devices ..................................................................................... 50 B.1 Configuring the Digi XBee Sensor.................................................................................................................... 50 B.2 Configuring the Digi XBee SmartPlug..............
1 Overview 1.1 How to Use This Guide Section 1 gives an overview of the BB2-7040 gateway. Section 2 talks about connecting your PC to the BB2-7040 for the first time. Section 3 talks about connecting your first ZigBee device. The remaining sections provide additional detail about using the BB2-7040. 1.2 The BB2-7040’s Role on the ZigBee Network The Babel Buster BB2-7040 will function as the Coordinator on the ZigBee network. Other devices on the network should be Endpoints or Routers.
a slave to a larger system. In this instance, the BB2-7040 should be reprogrammed with the ZigBee module functioning as a router. Contact the factory about obtaining a router version of the BB2-7040. Using ZigBee as a wireless link between a BACnet device and the BACnet network, with two BB2-7040’s – one on each end – is possible. However, only one of the BB2-7040’s can be a coordinator, meaning one must be reprogrammed as a router.
1.4 Overview of the BB2-7040 Control Solutions’ Babel Buster® BB2-7040 is a BACnet client/server device that functions as a ZigBee Coordinator and gateway. After setting up the appropriate mappings in the BB2-7040, data from ZigBee sensors will appear as BACnet objects on BACnet IP and/or BACnet MS/TP. Data written to BACnet objects can also be propagated to ZigBee actuators by the BB2-7040. The BB2-7040 expects most ZigBee endpoints to be low power devices that spend most of their time sleeping.
2 Out of the Box – Connecting for the First Time You only need to connect 24V power and Ethernet to begin working with the BB2-7040. Connect the Ethernet via a switch (or crossover cable) as you would any other Ethernet network device. Upon power-up, the embedded server will take about a minute to boot up. A blue LED should be visible inside the device indicating power is present. Both the Ethernet Link and Activity LEDs should light up upon power-up assuming Ethernet is connected to a switch.
Once you have identified your PC’s IP address, use the route command to add a routing table entry. The syntax, using the above IP address as the example, would be: route add 10.0.0.0 mask 255.255.255.0 192.168.1.101 Note that the mask you use should also match whatever you found with ipconfig. Once you have done the route command, you can simply do ‘route print’ to verify your routing table.
Once your route entry is established, open your browser, and browse to “http://10.0.0.101”. You should see the “home” page of the BB2-7040 illustrated below. You may now begin to browse your BB2-7040. You will need to log in with a password. There are two default user accounts pre-configured as shipped: User: system Password: admin User: root Password: buster (must log in as ‘root’ to change IP address) Once you have established a connection with the gateway, you can proceed to change its IP address.
which takes several seconds. Once the update is done, you must reboot (power cycle) to get the new IP address to take effect. BB2-7040 User Guide – Rev. 1.
3 Initial Connection of ZigBee Device This section will show the general sequence of activity for connecting a ZigBee device for the first time. We will be using a generic XBee Series 2 ZigBee device with firmware programmed to be an endpoint using API mode. This will be typical of Control Solutions sensors, Digi International sensors, and various other ZigBee devices. When a device is first connected, it will hopefully show up in the Node List.
One of several commands you will send to a remote device, assuming it recognizes remote API commands, will be the NI or Network Identifier command. This assigns a name to this device, and after the WR command is sent, it becomes stored in the remote ZigBee device’s non-volatile memory. Commands sent to remote devices ultimately turn into a string of raw binary bytes most often represented as two hexadecimal digits. If you recognize ‘FF’ as meaning decimal 255, you’ve got this hex stuff figured out already.
Once Send has been clicked and you see the confirmation of the packet actually sent in hexadecimal form, click Check to see if you have received a reply yet. The reply will be displayed as illustrated below when received. When a device is in sleep mode, it is important to note that your Send will not be received until the end of the device’s sleep period. As first shipped, devices are often not configured to sleep. But once configured, you will have to wait a while for your response.
Status codes for XBee endpoint devices using API mode are as follows: 00 01 02 03 04 No error Error (unspecified) Invalid Command Invalid Parameter Remote command transmission failed. BB2-7040 User Guide – Rev. 1.
4 Creating a Data Parse Mask The data parse mask may have been provided for you in a related document pertaining to a specific endpoint, or in an appendix of this document. If you need to create a new data parse mask for a new device, start by getting the device online and sending its data packets to the BB2-7040. Correlate the packets observed with the manufacturers documentation to begin to recognize its data. The screen shot below shows several packets observed in the Message Log.
After typing mask characters out in a one to one correlation with the packet, make another copy of that line and then eliminate all embedded blanks. Finally, copy the data parse mask into the Client Read Map, select the device from the device list, add scale and offset, select a local object as the destination of the data, and click Update. The BB2-7040 will now be listening for this data. See Section 6 for further detail on constructing a Data Parse Mask. BB2-7040 User Guide – Rev. 1.
5 Setting Up the ZigBee Device List There are three ways to get the BB2-7040 to recognize a device. Devices must be recognized one way or another so that we know the right data is ending up in the right BACnet objects. 5.1 Network Identifier The Network Identifier is a 20-character ASCII string naming the device. The name needs to be unique on the PAN.
5.2 Fixed 64-bit Address In the event setting the Network Identifier is not possible, but the 64-bit address is known, you can enter that fixed address along with non-zero Rx Timeout. The name becomes a local reference only. The 64-bit address will be automatically used by the BB2-7040 any time this device is referenced. 5.3 Search String A method used by some ZigBee devices for identification is including an ASCII string, such as device serial number, in every data stream sent by that device.
6 Setting Up ZigBee Client Read and Write Maps 6.1 ZigBee Client Read Maps A note about "reading" ZigBee devices: ZigBee is optimized for low power battery operated sensors that sleep most of the time. This means the traditional "polling" of the remote device cannot be done with ZigBee as it can with Modbus or other remote hard wired devices. Most Babel Buster family members are set up to periodically poll remote devices.
An abbreviated version of a list of maps is shown on this page. Any of the parameters shown may be changed here and registered by clicking the Update button. To view and/or modify the complete set of parameters, click on the map number in the left most column. For each remote object to be read, select the device from the list, and provide a data parse map. Select a local object where the resulting data should be placed.
When the remote data is received, data may be manipulated before being written to the local object. First, binary data is parsed from the received packet based on the data parse mask. Second, the raw data is masked by ANDing with the binary mask if non-zero. Next, the value will be converted to floating point, and the value will be multiplied by the scale factor, then the offset is added. The final result is written to the local object number given (with conversion back to binary or integer as applicable).
“TT” needs to show up in pairs (“TTTT” in the mask) and is unique to Control Solutions ZB25-T or ZB25-TH sensors. This mask will parse the thermistor reading and linearize it to a normalized reading in degrees Celsius x 100. Refer to Appendix A for examples specific to the Control Solutions ZB25 series sensors. The first byte in the above example is the API frame type code. The next 10 bytes are the 64-bit and 16-bit addresses of the remote device the packet was received from.
Selecting "none" for remote device effectively deletes the map even though it will still appear in the list until deleted. Unused maps at the end of the list will always show none as the type. Local Object is internally a coded number consisting of BACnet object type multiplied by 1000, then added to the object number starting from #1.
for transmission to the ZigBee device. After conversion to integer, the data is ANDed with the AND mask, and then ORed with the OR mask. The resulting data is then inserted into the format string (see below). Delete will remove the rule number shown in the "Map #" box. Insert will insert a new map before the map number shown, and is used for placing maps between existing maps.
7 Setting Up BACnet 7.1 BACnet Device List Device number simply shows you where you are on the device list. Click "next" and "prev" to scroll through the list. Remote BACnet devices to be accessed by this device are specified here. Enter the Device Instance of the remote device, a name to reference in other pages, a poll rate, default reply timeout, and default write priority. Select IP or MS/TP (physical network on which to look for this device). Then click "update".
7.2 BACnet Client Read Maps Map number simply tells you where you're at on the list of register maps. Click "next" and "prev" to scroll through the list. To advance directly to a specific map, enter the desired number in the "Showing" box, then click Update. Maps entered on this page only read data from remote devices. Go to the Client Write Map to write data to those devices. The full parameter set is different for read versus write. An abbreviated version of a list of maps is shown on this page.
Object numbers start at #1. The maximum available number varies by object type, and these limits may be found on the System Capacities link from the home/index page (click graphic at top). Rule number simply tells you where you're at on the list of object maps. Click "next" and "prev" to scroll through the list. To advance directly to a specific map, enter the desired number in the "Map #" box, then click Update. For each remote object to be read, enter the object instance and type, and location (device).
The number of maps enabled simply limits the scope of map review so that you do not have to review a lot of unused maps. If the displayed maps are used up and you need more, increase the enabled number. 7.3 BACnet Client Write Maps Map number simply tells you where you're at on the list of register maps. Click "next" and "prev" to scroll through the list. To advance directly to a specific map, enter the desired number in the "Showing" box, then click Update.
MO n = Multi-state Output #n MV n = Multi-state Value #n Object numbers start at #1. The maximum available number varies by object type, and these limits may be found on the System Capacities link from the home/index page (click graphic at top). Rule number simply tells you where you're at on the list of object maps. Click "next" and "prev" to scroll through the list. To advance directly to a specific map, enter the desired number in the "Map #" box, then click Update.
Delete will remove the rule number shown in the "Map #" box. Insert will insert a new map before the map number shown, and is used for placing maps between existing maps. It is not necessary to use Insert to add maps to the bottom of the list or to define any map presently having zero for a source object or "none" for remote type. Selecting "none" for remote type effectively deletes the map even though it will still appear in the list until deleted.
8 System Setup 8.1 Configuration Files IMPORTANT: Configuration changes will be lost the next time you cycle power if you did not click the "save" button to place those changes in non-volatile memory (Flash file). Click "Save" to store the present configuration to a Flash file. The configuration will overwrite the selected file in the local file directory unless you check "create new file" and enter a new file name. Click "Load" to load the currently selected file in the local file directory.
Note: There may be a delay of several seconds while Flash memory is updated by any of the above actions. Note: Your browser may cache files. If you view a file, make configuration changes, save the file, then view the file again, you may see the old file cached by the browser. To see the updated file, go to "Internet Options" in your browser's "Tools" menu, and delete temporary Internet files (or delete cache files).
The description is the device property returned when Description, property ID 28, is read from the gateway. The location is the device property returned when Location, property ID 58, is read from the gateway. If you will be using BBMD, the port, time-to-live, and IP address of the remote BBMD must be given (for up to three BBMD's). The local BBMD will attempt to register with the remote BBMD's whose addresses are given.
To change the IP address of this device, enter the address, subnet mask, and gateway, then click "change IP". Set the IP address to 255.255.255.255 to specify that DHCP should be used to obtain an IP address upon power-up. IP address change will take effect upon next power cycle. The default port for web page serving is 80. If you wish to change it, enter the port number and click Set Port. This change will take effect upon the next power-up.
9 Data Objects The source of data for an Analog Input object will be reading an object in another BACnet device, or receiving of data from a ZigBee device. The device link will point to a BACnet client read map or a ZigBee client read map. Out of Service means any polling of the slave device will stop. While out of service, the present value may be written by the BACnet client. Data may be forced via this web page at any time, but will be overwritten by the next poll unless the object is out of service.
Device link will indicate BAC or ZB, followed by R for read or W for write, and a number which is the rule number in the table of read or write rules for mapping external devices or objects to this BACnet object. The designation R means read from external device, and W means write to external device. BB2-7040 User Guide – Rev. 1.
10 ZigBee Diagnostic Pages The BB2-7040 contains a Digi International/Maxstream XBee PRO (Ember 250 chip) operating as a coordinator. You can do a variety of things with the BB2-7040 using API commands for the XBee PRO as found in XBee PRO documentation at www.digi.com. You can also find links to applicable documentation on the BB2-7040 product page at www.csimn.com. The XBee PRO ZigBee coordinator is programmed to operate in API mode (rather than AT mode) as defined in XBee PRO documentation.
' " ' (quote) -- results in accepting a quote delimited string, required for including blanks or punctuation NN -- literal number, always interpreted as hexadecimal, delimited by blanks, creates a single byte with this hex code. Remote API commands are constructed and sent on this page. Remote API commands work exactly like local API commands, except that they are sent to a remote ZigBee device. These API commands are specific to XBee PRO/Ember 250.
Configuration changes at the remote device will not take effect immediately unless you check the Accept Changes box. However, there are circumstances where you do not want to do this. If changing a number of parameters affecting how the remote device transmits, you may wish to make several changes, followed by sending the /AC command to accept the changes at that point. This page shows the list of devices that have associated themselves with the BB2-7040's ZigBee radio functioning as a coordinator.
This page provides a log of the last 64 packets (API frames) sent or received by the BB2-7040. It does not show all ZigBee RF traffic in the air, only that which was addressed to or broadcast to the BB2-7040 (which operates as a coordinator). Packet status indicates how the packet was processed, as follows. The designation XXX-> means outgoing, and >XXX means incoming.
The difference between Raw TX (raw transmission) and Remote API is that nothing is done automatically here and you can send any raw string you like to the local radio, some of which might be transmitted to another radio depending on what you constructed. Do note the warning about Raw TX. API frames created here require that you explicitly provide the API frame type code, the 64-bit and 16-bit addresses of the remote device as applicable, and any packet data as applicable.
11 Programming ZigBee I/O in Basic 11.1 Web Interface Pages for Programming Click "Apply" to change directory and refresh the file list from that directory. Only files with a suffix of .sb will appear in this list. Click "Select" to select the program file. This selection will apply to "Start", and also carry over to the edit and virtual terminal pages. Click "New" to create a new file having the name entered in the window. Click "Start" to run the selected program in the background.
Note: There may be a delay of several seconds while Flash memory is updated by some of the above actions. Click "Get" to get the source code for the program shown. Edit using standard text editing (cut, paste, etc). Click "Save" to save changes back to selected file shown. To create a new file, start by creating a new file in the Program File page. This file will initially be empty, but is needed as a place holder so you have somewhere to save the text on this page when you click "Save".
This page emulates terminal I/O interaction with your Basic program as best an HTML page can. Start the program by clicking "Start". While running, input you type in the input window will be made available to your program each time you click "Enter". Each time you click "Refresh", the output window will be updated with any output generated by your program since the last time you clicked "Refresh". Click "Clear" to discard old output.
A program code snippet that will send the IS command to a remote device and print its reply is as follows: $api = "Remote,C9,00:13:A2:00:40:2D:37:7A,Y,IS" print #1, $api timeout 10 line input #1, $r print $r, "\n" The format for the API string is as follows: "Local,FF,CC,hhhhhh..hh" "Remote,FF,Vnn,Y,CC,hhhhhh..hh" "Remote,FF,00:00:00:00:00:00:00:00,Y,CC,hhhhhh..hh" "Raw,hhhhhh..hh" The first comma separated field must be one of Local, Remote, or Raw.
c = c - 48 e = e * 16 + c next i unstuff = e END FUNCTION open "API" for comm as 1 $api = "Remote," & stuff(201) & ",00:13:A2:00:40:48:5A:2B,Y,IS" print #1, $api timeout 10 line input #1, $r print $r, "\n" $hv = mid($r,53,4) print $hv n = unstuff($hv) print "\n", n setreg 4, n/10 end BB2-7040 User Guide – Rev. 1.
12 Object Properties 12.1 Data Object Properties (Analog, Binary, Multi-state) The following properties are found in the Analog, Binary, and Multi-state types of Input, Output, and Value objects. Some properties apply only to certain object types as noted where applicable.
Priority_Array (87) BACnetPriorityArray (commandable objects only) SEQUENCE SIZE (16) OF BACnetPriorityValue REAL (each element, analog output objects) ENUMERATED (each element, binary output objects) Unsigned (each element, multi-state output objects) Relinquish_Default (104) (W) REAL (analog objects) ENUMERATED (binary objects) Unsigned (multi-state objets) Polarity (84) BACnetPolarity (binary objects only) ENUMERATED: normal(0) Number_Of_States (74) Unsigned (multi-state objects only) Units (117)
APDU_Timeout (11) Unsigned Number_Of_APDU_Retries (73) Unsigned Device_Address_Binding (30) List of BACnetAddressBinding Database_Revision (155) Unsigned BB2-7040 User Guide – Rev. 1.
13 Trouble Shooting 13.1 Error Codes, Reliability Codes Error codes returned by a Modbus device are encoded into reliability codes presented by the respective object. Reliability codes (read via the Reliability property) are as follows: BACnet device timeout (82) BACnet error returned by server/slave BACnet device (83) ZigBee device timeout (84) ZigBee device error (85) ZigBee reported invalid command (86) ZigBee reported invalid parameter (87) Other (99) 13.
Appendix A Connecting Control Solutions Wireless Devices Control Solutions uses Digi XBee Series 2 ZigBee OEM modules with standard Digi endpoint firmware. Complete details about the XBee modules may be found on Digi’s web site. A link to the XBee manual may be found on Control Solutions web site, on the BB2-7040 support page. A.1 Configuring the Temperature Sensor You can use the Network Identifier method of identifying sensors.
BB2-7040 User Guide – Rev. 1.
Appendix B Connecting Digi International Wireless Devices The Digi devices mentioned here may be purchased from Digi International. B.1 Configuring the Digi XBee Sensor Send the following commands to the Digi Sensor, substituting your own PAN ID for the example shown.
Appendix C Connecting Point Six Wireless Devices ZigBee sensors from Point Six Wireless (Point Six, Inc.) are compatible with the BB2-7040 but require some special handling. The Point Six devices use pin sleep mode under control of a second small microprocessor, and therefore will not recognize the remote API commands the BB2-7040 is capable of sending.
The serial number taken from the label on the back of the Point Six sensor may be entered as the device search string (with offset 48) in the device list. Once this string is recognized, the device’s 64-bit address will be listed here. The screen shots below illustrate the data parse mask for temperature and humidity data fields from the Point Six sensor. The expanded view also includes the slope and intercept for obtaining relative humidity as a percent, and temperature in degrees Fahrenheit.
The conversion factor for degrees Celsius is scale (slope): 0.03053, offset (intercept): -40.00. BB2-7040 User Guide – Rev. 1.
BB2-7040 User Guide – Rev. 1.
Appendix D Gateway Setup Quick Start There are just a couple of settings that need to be made to the ZigBee radio in the BB2-7040 to get started. One is to set the PAN ID, and the other is to set the sleep period. The BB2-7040 is shipped with its ZigBee radio set as a coordinator, and with PAN ID set to 0, which means it will automatically pick a random PAN ID at power-up. To set the PAN ID to a chosen fixed ID, go to the ZigBee Diagnostics tab set, and select Local API.
Revision History 1.0 March 2010 Initial Release 1.1 April 2010 Added Appendix D, notes about use of /SP in routers, Appendix A and B. 1.2 February 2011 Updated configuration information for Control Solutions ZB25 series sensors. BB2-7040 User Guide – Rev. 1.