ConnectPort® X2e ZB User’s Guide ConnectPort X2e ZB Ethernet ConnectPort X2e ZB Wi-Fi ConnectPort X2e ZB Cellular 90001298_C
©Digi International Inc. 2013. All Rights Reserved. The Digi logo, ConnectPort, iDigi Device Cloud, iDigi Manager Pro, iDigi Dia, and XBee are trademarks or registered trademarks of Digi International, Inc. All other trademarks mentioned in this document are the property of their respective owners. Information in this document is subject to change without notice and does not represent a commitment on the part of Digi International.
Contents Contents Contents ..............................................................................................................................................................................3 Chapter 1: Introduction ........................................................................................................................................................... 6 About this guide ............................................................................................................
Contents Industry Canada (IC) certifications ................................................................................................................30 Safety statements ............................................................................................................................................31 International EMC (Electromagnetic Emissions/Immunity/Safety) standards...............................................33 Chapter 3: Configuration.............................................
Contents Restore Factory Defaults ................................................................................................................................78 Reboot.............................................................................................................................................................78 Disconnect ......................................................................................................................................................78 Firmware........
About this guide Introduction C H A P T E R 1 About this guide This guide introduces the hardware, firmware, and software features of the ConnectPort® X2e ZB. It describes how to perform configuration and administrative tasks, and how to develop and run applications on the device. Programming focuses on basic programming concepts and teaching through examples. More detailed programming content and program examples are provided in the Digi ESP™ for Python development environment.
ConnectPort X2e ZB ConnectPort X2e ZB The ConnectPort X2e ZB is a compact, ZigBee®-to-IP gateway that provides low-cost IP connectivity of RF devices and sensor networks. Featuring an easy development environment, the ConnectPort X2e enables custom applications to run on the device, with access to XBee® or ZigBee wireless networks through an XBee RF interface, while providing WAN connectivity to cloud-based applications through Ethernet, Wi-Fi, or cellular interfaces.
Hardware interfaces Hardware interfaces ConnectPort X2e ZB hardware interfaces include a button for controlling various device operations, LEDs that indicate device state and status of connections, link and activity for Ethernet, Wi-Fi, cellular, and XBee network connections. Some of these hardware features can be controlled through programming. Hardware interfaces are covered in "Hardware" on page 15.
Configuration and management interfaces Web interface The web interface, available via a local network connection to the ConnectPort X2e ZB, provides an easy way to configure device settings and perform administrative tasks. Device Information displayed varies by model. Here is the Home page for a ConnectPort X2e Cellular model. Note that the model name varies according to the Cellular model (UMTS, EVDO Verizon, EVDO Sprint, etc).
Configuration and management interfaces iDigi Manager Pro ™ interface The default behavior of Connectport X2e ZB is to power up and connect to the iDigi® Device Cloud™. iDigi Manager Pro is a software-as-a-service, delivering capabilities that empower IT, network operations and customer support organizations to conquer the challenges of managing the vast array of equipment in their device networks. As a network grows, the complexity of effectively managing the network assets grows exponentially.
Configuration and management interfaces With iDigi Manager Pro, management of large populations of devices is made easy. Devices can be tagged and grouped together enabling management tasks to groups of devices within a network simultaneously. Furthermore, the Scheduled Operations feature allows device management tasks to be automated and scheduled to run either on a one-time or a recurring basis, against a single device or multiple devices.
Programming interfaces and capabilities Programming interfaces and capabilities The ConnectPort X2e ZB allows custom embedded logic via the Python scripting language. To meet the needs of customers with varying levels of Python expertise and application complexity, a number of development strategies are supported, which can be mixed and matched as a developer sees fit: Python development independent of the target device The ConnectPort X2e ZB features a standard Python 2.
Product differences from predecessor ConnectPort X products Linux command shell Note: The ConnectPort X2e ZB also has a Linux shell command-line interface. While Digi ESP for Python is intended as the main programming interface, this interface may be used for some programming and device management tasks. This interface is accessed with a username of python and password dbps, and is described in "The Linux command shell (command-line interface)" on page 95.
Where to find more information User interfaces: – The ConnectPort X2e ZB has a web user interface for both network configuration and access to the log file for troubleshooting the initial connection to iDigi. For more information on the web interface, see "Configuration" on page 34. – Command-line interface differences: The ConnectPort X2e ZB allows access to the Linux shell using SSH. This shell and common operations are described on page 95.
Hardware C H A P T E R 2 This section provides hardware specifications, reviews key hardware features, and lists regulatory statements and certifications of the ConnectPort X2e ZB. ConnectPort X2e ZB Ethernet and Wi-Fi hardware 2 3 1 4 5 6 7 1 2 3 4 5 6 7 Power requirements. See page 17. LED status indicators. See page 21. Button. See page 25. Ethernet features. See page 17. Wi-Fi features. See page 18. XBee RF module. See page 18. Antennas (internal). See page 27.
ConnectPort X2e ZB Cellular hardware 7 3 2 1 4 5 6 1 2 3 4 5 6 7 Power requirements. See page 19. LED status indicators. See the Getting Started Guide topic “Troubleshooting.” Button. See page 25. Cellular features. See page 20. XBee RF module. See page 18. Antennas (internal). See page 27. SIM card installation. See the Getting Started Guide topic “Configuring for GSM Networks.
Hardware specifications Hardware specifications ConnectPort X2e ZB Ethernet and Wi-Fi Specification Environmental Power requirements Value Operating temperature 32° F to 104° F (0° C to 40° C) Relative humidity 5% to 95% (non-condensing) Storage and transport temperature -40 to 185F (-40 to 85C) Altitude 6560 feet (2000 meters) Ethernet isolation 500 VAC min per IEEE802.3/ANSI X3.263 DC power input Voltage Dimensions Ethernet input: 5 VDC +/- 5% Power consumption: Typical: 1.
Hardware specifications Specification Value 802.11 b/g/n (2.4GHz only) Data Rate Up to 72.2 Mbps Transmit Power 18 dBm typical (varies by mode and channel) Receiver Sensitivity -87 dBm @ 11 Mbps Modes Infrastructure Client mode only XBee See the XBee/XBeePRO ZB SMT RF Modules Product Manual (90000976) for complete specifications and product information. Module type XBee® ZB SMT Transmit power The Receiver sensitivity (1% PER) -102 dBm Development Python version 2.7.
Hardware specifications ConnectPort X2e ZB Cellular Specification Environmental Power requirements Value Operating temperature 32° F to 104° F (0° C to 40° C) Relative humidity 5% to 95% (non-condensing) Storage and transport temperature -40 to 185F (-40 to 85C) Altitude 6560 feet (2000 meters) Ethernet isolation 500 VAC min per IEEE802.3/ANSI X3.263 DC power input Voltage Dimensions Ethernet input: 5 VDC +/- 5% Power consumption: Typical: Typical: 3.5W, Max: 15W Connector: 2.
Hardware specifications Specification Cellular Value EDGE 850, 900, 1800, 1900 MHz GSM UMTS / HSPA 800/850, 900, 1700 (AWS), 1900, 2100 MHz CDMA 1xRTT 800, 1900 MHz EV-DO 800, 1900 MHz Internal Antenna: Frequencies 24 – 960MHz to 1700 – 2170MHz VSWR 3:1 max Polarization Linear Impedance 50 Ohm XBee See the XBee/XBeePRO ZB SMT RF Modules Product Manual (90000976) for complete specifications and product information.
LEDs LEDs The ConnectPort X2e ZB has several LEDs. All LEDs have default behaviors, described in this section. LED descriptions are in the “Troubleshooting” section of the Getting Started Guide. Some LEDs can also be controlled programmatically, as discussed in "LED control" on page 89.
LEDs Power LED Color and blink pattern Description Off No power. Solid green Device is powered. This state does not indicate that the device is fully operational. The Network LED and its states convey such information. Blinking green (Cellular model only) Device is updating firmware. Do not unplug unit. XBee LED The XBee LED indicates the status of the connection of the XBee RF module in the ConnectPort X2e ZB to an XBee wireless network.
LEDs Signal strength LED Color and blink pattern Description OFF No or poor cellular signal. Moving device to a better location is recommended. Solid yellow Adequate cellular signal. This signal strength works for most applications. Solid green Good cellular signal.
LEDs Network LED The Network LED indicates the status of the connection of the ConnectPort X2e ZB to both a communications network and an iDigi server. The LED can be user-controlled; see page 89 for details. Color and blink pattern Ethernet Wi-Fi Cellular Off No Ethernet detected. No Wi-Fi AP or Ad-Hoc networks detected. No cellular network detected. Blinking yellow (slow) Ethernet interface identified; waiting for link. Wi-Fi AP or Ad-Hoc network detected. Connecting to Wi-Fi.
Button Button The button on the ConnectPort X2e ZB is capable of performing a number of Digi-defined actions, including: Reset the device configuration settings to their factory defaults Enable configuration changes via the device discovery tools within a five-minute window Enable the device web interface Enable a special purpose Wi-Fi configuration mode Some of these features are enabled on the button by default, but all behaviors can assigned either to the “default” button, or to “none” (
Button Factory reset Pressing the button for over 10 seconds after the ConnectPort X2e ZB is running resets the device to its factory default configuration. This action clears any configuration settings you may have entered through the supported device interfaces. This feature is assigned to the button by default.
Antennas Antennas The ConnectPort X2e ZB has internal antennas. All models have an internal antenna for the XBee RF module. Wi-Fi models have an additional internal antenna. Cellular models have an additional internal cellular antenna. For these models, if the Signal Strength LED is off, try moving the device to another location to improve signal strength. Placement can drastically increase the signal strength of a cellular connection.
Regulatory information and certifications Regulatory information and certifications RF exposure statement In order to comply with RF exposure limits established in the ANSI C95.1 standards, the distance between the antenna or antennas and the user should not be less than 20 cm. FCC certifications and regulatory information (USA only) FCC Part 15 Class B Radio Frequency Interface (RFI) (FCC 15.
Regulatory information and certifications European Community - CE Mark Declaration of Conformity (DoC) We: Manufacturer’s Name: Digi International of: Corporate Headquarters: 11001 Bren Road East Minnetonka MN 55343 Manufacturing Headquarters: 10000 West 76th Street Eden Prairie MN 55344 Declare under our sole responsibility that the product: Product Name Model Number ConnectPort X2e ZB 50X2E-Z3C-XXX-XX to which this declaration relates are in conformity with the essential requirements and other re
Regulatory information and certifications Industry Canada (IC) certifications This digital apparatus does not exceed the Class B limits for radio noise emissions from digital apparatus set out in the Radio Interference Regulations of the Canadian Department of Communications.
Regulatory information and certifications Safety statements Important Safety Information To avoid contact with electrical current: Never install electrical wiring during an electrical storm. Never install an Ethernet connection in wet locations unless that connector is specifically designed for wet locations. Use caution when installing or modifying lines. Use a screwdriver and other tools with insulated handles. Wear safety glasses or goggles.
Regulatory information and certifications 5.10 Ignition of Flammable Atmospheres Warnings for Use of Wireless Devices Observe all warning notices regarding use of wireless devices. ((( ))) Potentially Hazardous Atmospheres Observe restrictions on the use of radio devices in fuel depots, chemical plants, etc. and areas where the air contains chemicals or particles, such as grain, dust, or metal powders, and any other area where you would normally be advised to turn off your vehicle engine.
Regulatory information and certifications International EMC (Electromagnetic Emissions/Immunity/Safety) standards This product complies with the requirements of following Electromagnetic Emissions/Immunity/ Safety standards. There are no user-serviceable parts inside the product. Contact your Digi representative through "Digi contact information" on page 8 for repair information. Emissions AS/NZS 4268:2008 (Amended by A1:2010) Class B (Wi-Fi only) AS/NZS CISPR 22:2009 Class B EN 301 489-17 V2.1.
Configuration can be performed programmatically Configuration C H A P T E R 3 While the ConnectPort X2e ZB is designed to allow network communication with minimal configuration, there are several configuration settings that can be adjusted. This section covers those configuration settings and configuration of these settings from the web interface, and from iDigi Manager Pro.
Important configurable settings Important configurable settings For the ConnectPort X2e ZB, most settings have reasonable defaults that do not need to be changed. However, these are some important settings available in the configuration interfaces that get the device up and communicating.
Important configurable settings DNS servers A DNS (Domain Name System) server is an Internet service that resolves domain names into IP addresses. Name resolution is important when connecting to iDigi, as the Digi servers are provided as fully-qualified domain names. ConnectPort X2e ZB is capable of using up to three DNS servers. Up to two of these slots may be filled with DNS servers from dynamic IP assignment sources, leaving at least one slot always available for static DNS server configuration.
Important configurable settings Mobile settings and provisioning The mobile settings configure how to connect to mobile (cellular) networks using the mobile connection, including the service provider, service plan, and settings used in connecting to the mobile network.
Important configurable settings Raw SMS messaging In addition to iDigi-formatted messages, a user can send an SMS message without iDigi modifying it any way. This method is referred to as “raw SMS messaging”. This type of messaging is useful in cases when customers wish to use every byte of the SMS message (the iDigi protocol takes approximately 5 bytes per message of overhead), or when using a device that doesn't have iDigi protocol support but does have SMS support.
Important configurable settings iDigi remote device management The ConnectPort X2e ZB, as with many of its predecessors, is compatible with the iDigi device and data management platform. iDigi provides a mechanism to do more advanced device configuration than is generally possible in the web interface Once the device has established network connectivity to the iDigi server, it will be manageable remotely using the iDigi interface.
Additional device configuration settings Additional device configuration settings There are several additional device features that are not essential for IP network connectivity, but which will require configuration settings to be entered or changed from their defaults. Python Any Python programs loaded onto the ConnectPort X2e ZB can be configured to start automatically at system startup.
Configuration from the Web interface Configuration from the Web interface The web interface for ConnectPort X2e ZB is intended to support basic feature configuration as well as critical network configuration. Not every device setting is displayed in this interface. For more extensive access to settings, use the iDigi Manager Pro interface. Open the web interface To open the web interface, use the Digi Device Discovery utility in Digi ESP for Python to get the IP address for the device.
Configuration from the Web interface 4 A dialog is displayed for asking where to look for connected devices. Make sure the option Local Area Network is selected and click OK. 5 The Digi Device Discovery dialog is displayed, listing the devices found. The IP Address column displays the IP address of every device. Locate the device in the list of devices.
Configuration from the Web interface 6 Open an internal browser within Digi ESP by choosing Window > Show View > Other > Internal Web Browser. Click OK. 7 In the browser, enter the IP address of your device, in the address bar of the browser: http://device_ip_address For example: http://10.101.1.
Configuration from the Web interface The Home page When the web interface is opened, the Home page is displayed. The information listed on this page may vary based on product and supported features. Here is a sample Home page for a ConnectPort X2e ZB Cellular model. Device Information The Device Information section of the Home page summarizes current system parameters and network connectivity status.
Configuration from the Web interface Configuration and Administration links The left side of the Home page has a menu of choices that display pages for configuration and administration tasks. The choices under Configuration in the menu display pages for configuring settings for various features. Some of the configuration settings are organized on sets of linked screens. The choices in this menu may vary based on product and supported features.
Configuration from the Web interface Configuration settings pages Ethernet Network The Ethernet Network settings display the current IP address and DHCP settings for Ethernet network communications. The IP address can be changed, either by obtaining a new one through DHCP or by entering a static IP address. The Domain Name Service Configuration show the two Domain Name System servers to be used as static servers when dynamic mechanisms do not supply enough DNS servers.
Configuration from the Web interface Mobile Connectivity settings The Mobile Connectivity settings identify the service provider to use in connecting to the mobile network. Information displayed varies by product and whether the device is GSM- or CDMAbased. In addition, the Short Message Service (SMS) can be enabled and configured on this page. For GSM-based devices, enter the information for your account received from the mobile service provider.
Configuration from the Web interface Short Message Service (SMS) Settings: These options configure the cellular Short Message Service (SMS) capabilities of the cellular modem. – Enable cellular Short Message Service (SMS) services: Enables or disables SMS features on this Digi device. When this option is enabled, the remaining SMS options may be configured. This option is enabled (on) by default and can be disabled if desired.
Configuration from the Web interface SureLink™ Configuration settings Digi SureLink™ is an optional feature that monitors the integrity of an established network connection. Several settings and tests can be configured to perform a selected test to examine the functional integrity of the network connection, and take action to recover the connection in the event that it is lost. Currently SureLink is supported for cellular communications only.
Configuration from the Web interface Ping Test: Enables or disables the use of “ping” (ICMP) as a test to verify the integrity of the mobile connection. The test is successful if a valid ping reply is received in response to the ping request sent. The ping test actually sends up to 30 ping requests, one per second, to test the link. When a valid reply is received, the test completes successfully and immediately.
Configuration from the Web interface Repeat the selected link integrity test every N seconds: Specifies the interval, in seconds, at which the selected test is initiated (repeated). A new test will be started every N seconds while the mobile connection is established. This value must be between 10 and 65535. The default is 240. This setting is used by Ping, TCP Connection, and DNS Lookup tests only, not iDigi Connection.
Configuration from the Web interface Python: configure automatic starting and exit conditions for Python programs The Python Autostart Configuration page configures the automatic starting of Python programs that are loaded on the ConnectPort X2e ZB device. See "File management" on page 65 for details on loading files. These programs are executed through the specified “python” commands. Select the Enabled checkbox to set the program to be automatically started at system startup.
Configuration from the Web interface Network Services The Network Services page enables or disables common network services that are available on the ConnectPort X2e ZB, and configures the network port on which the service is listening. Disabling services may be done for security purposes. That is, certain services can be disabled so the device runs only those services specifically needed and to improve device security.
Configuration from the Web interface iDigi Connectivity The iDigi Connectivity page enables/disables the connection to the iDigi server used for managing the ConnectPort X2e ZB device, configures the iDigi server, and configures the proxy server, if used. iDigi Connectivity: Enables or disables the connection to the iDigi server. iDigi Server Name/ iDigi Server Port: Obtain this value from your iDigi server administrator. Typically this administrator is Digi.
Configuration from the Web interface XBee Network The ConnectPort X2e ZB provides a gateway between an Internet Protocol (IP) network and a network of various wireless devices containing XBee RF modules. Typically, these XBee devices are small sensors and controllers. Current Devices: Displays a view of XBee network devices, including the ConnectPort X2e ZB gateway and any nodes that have been discovered by the XBee module in the ConnectPort X2e ZB gateway.
Configuration from iDigi Manager Pro Configuration from iDigi Manager Pro The iDigi User’s Guide describes how to set up an iDigi account and add devices to the iDigi Manager Pro device list. Once your ConnectPort X2e ZB is added to the device list, you can view the device in the device list and access its configuration settings.
Configuration from iDigi Manager Pro Basic configuration settings In the iDigi Manager Pro interface, basic configuration settings for the ConnectPort X2e ZB are accessed by right-clicking the device in the device list and selecting Properties. The basic configuration settings located in this menu are: Ethernet settings Wi-Fi settings Domain Name Server (DNS) Python There are several other operations on the context menu, such as File Management, System Information, and Connection History.
Configuration from iDigi Manager Pro SureLink settings Digi SureLink™ is an optional feature that monitors the integrity of an established network connection. Several settings and tests can be configured to perform a selected test to examine the functional integrity of the network connection, and take action to recover the connection in the event that it is lost. Currently SureLink is supported for cellular communications only.
Configuration from iDigi Manager Pro Host List: Two hostnames may be configured for this test. Hostnames can be specified in the form of domain names or IP addresses. If the first hostname fails to get a reply, the same test is attempted for the second hostname. If no reply is received for either hostname, the test fails. The primary and secondary DNS names should be fully qualified domain names.
Configuration from iDigi Manager Pro XBee Networks page Clicking the XBee Networks menu within the iDigi Manager Pro tab opens the XBee Networks page. This page allows you to manage all the XBee Nodes in your inventory. The iDigi User’s Guide provides describes the settings and operations that can be performed from the XBee Networks pages and menus.
Configuration from iDigi Manager Pro XBee RF module settings The configuration information for an XBee node is displayed by opening its Properties page. To do this, either double-click on the node in the XBee Networks page, or right-click the node and select Properties or click the Properties toolbar button. The Basic Settings control basic operation of the XBee module in an XBee network. Advanced radio settings control behavior of the XBee module at a more detailed level.
Configuration from iDigi Manager Pro SMS settings There are three groups of SMS settings and tasks in the iDigi Manager Pro interface from the rightclick menu for the ConnectPort X2e ZB Cellular models: Properties > Advanced Configuration > Cellular SMS Properties > Advanced Configuration > iDigi SMS SMS > SMS commands | Configure Properties > Advanced Configuration > Cellular SMS Enabled: This setting enables or disables all SMS features on this Digi device.
Configuration from iDigi Manager Pro SMS > SMS commands | Configure Right-clicking the device and selecting SMS from the menu displays a set of SMS commands and an option to configure settings. Of the commands displayed in the list, the only ones currently supported are: Request Connect SMS > Request Connect sends an SMS message from iDigi to the iDigi device, calling it back to establish an EDP connection with the iDigi cloud server.
Common administrative tasks Administration/maintenance C H A P T E R 4 This chapter describes the administrative and maintenance tasks that need be performed for the ConnectPort X2e ZB periodically. It covers common administrative tasks and how to perform them through iDigi Manager Pro and the web interface.
Common administrative tasks XBee RF module firmware updates Updating the firmware for XBee RF modules involves two firmware update scenarios: Update firmware for the XBee module on the gateway Update firmware on XBee modules on nodes elsewhere in the network. This type of update is known as an over-the-air (OTA) firmware update. Download firmware update files from Digi There is only one firmware file for the XBee RF module in ConnectPort X2e ZB products. It is named XBP24-S2C_40XX.
Administration from the Web interface Administration from the Web interface Firmware Update The Firmware Update page updates the gateway operating system firmware. (Firmware updates for the XBee RF module on the gateway or nodes are done on the XBee Firmware Update page.) Volume Information: Displays the current directory and free space remaining. Firmware Information: Displays the current firmware version running on the device, and its state: Running, Updating, Recent update failed.
Administration from the Web interface Mobile Status The Mobile Status page items are specific to a cellular modem or service provider account. These vary in the information reported from modem to modem and also differ between CDMA and GSM services. Whether a value is displayed depends on the modem type and connection state; if there is no value for a status field, it is not displayed. This information can be useful for troubleshooting and technical support.
Administration from the Web interface Status field Cellular modem type Description Device type Both The type of cellular modem. For CDMA devices, the value for this field is CDMA. For GSM devices, the value for this field is GSM. Manufacturer Both Manufacturer of the cellular modem. Model Both Manufacturer’s model number for the cellular modem. Revision Both Manufacturer’s version number for the software running on the cellular modem.
Administration from the Web interface Status field Cellular modem type Description Provisioning status CDMA Specifies the status of the provisioning process for the cellular modem, in which it is configured with the required information used to access the cellular network. Not provisioned: Modem has not yet provisioned. Contact your mobile service provider to make sure your device is registered in your mobile account.
Administration from the Web interface Status field Cellular modem type Description Network ID CDMA The network identification number of the cellular network with which the cellular modem is registered. Location area code GSM Identifier of the location of a group of cellular base stations with which the cellular modem is registered, in hexadecimal format.
Administration from the Web interface Status field Cellular modem type Description Connection state Both The operating state of the cellular modem: Initializing: Modem is being reset and configured Registering: Modem is searching for a network Delay before connecting: Modem is delaying after an unsuccessful connection (Verizon only) Connecting: Mobile data connection is being established Connected: Mobile data connection is active Disconnecting: Mobile data connection is ending Di
Administration from the Web interface Status field Cellular modem type Description Disconnect reason Both Displayed after a previous connection was ended. Indicates the reason the previous connection was ended: User requested: Initiated by user action. Network disconnect: Initiated by cellular network or carrier. Carrier loss: Poor signal or disconnected by network. Connection timer: Connection did not complete. Receive idle timer: No data received for configured receive idle time.
Administration from the Web interface Status field Cellular modem type Description Idle timeout Both The number of connection resets because the idle timeout was reached/ exceeded for transmitted and received data. User disconnect Both The number of disconnects of the cellular connection performed by device users.
Administration from the Web interface File Management The File Management page loads files onto the ConnectPort X2e ZB and displays current information about loaded files. For a description of the filesystem layout, see page 94. Volume Information: Displays the current directory for loading files and free space remaining.
Administration from the Web interface System Log The System Message Log File Browser is a diagnostic tool that allows viewing entries in a system log file. The default log file that can be viewed from this browser is eventlog.txt. This file is the primary message log for informational notices. There are other system log file that are available for debugging specific parts of the system. Note that these log files have a fixed size and roll over when the maximum size is reached.
Administration from the Web interface Available log files and contents The following log files are available: Log file Contents eventlog.txt/ eventlog.txt.0 High-level system messages. python.log/ python.log.0 Captures any output of Python programs that were started with the Python auto-start feature. xbee.log/ xbee.log.0 A non-persistent log file that records all XBee traffic. digi.log/ digi.log.0 For internal use only. This file may be requested by the Digi technical support group. sef.log/sef.
Administration from iDigi Manager Pro Administration from iDigi Manager Pro In iDigi Manager Pro, administration tasks are organized in the right-click menu for the ConnectPort X2e ZB, under Administration and Firmware. The File Management task is launched from a link in the device Properties page.
Administration from iDigi Manager Pro Restore Factory Defaults Administration > Restore Factory Defaults restores the factory default configuration to the selected device or devices. The only supported choice is to reset all the configuration settings. Reboot Administration > Reboot reboots the selected device or devices. Disconnect Administration > Disconnect disconnects the device from iDigi.
Administration from iDigi Manager Pro File Management The File Management task is launched from the Properties page for ConnectPort X2e ZB, by clicking File Management. This page loads files, such as custom application files, onto the ConnectPort X2e ZB and displays current information about loaded files. This page can also be used to download system log files from the ConnectPort X2e ZB to view for troubleshooting or other purposes. These log files are in the /WEB/logging folder.
Administration from iDigi Manager Pro The File Management toolbar provides quick access to file management tasks. Button/ Field Name Description Upload file Opens a dialog for uploading files to the current folder (directory). Download file Downloads the selected file to a PC. You can choose to open the downloaded file with a specified tool or save it. Delete Deletes the selected items. Refresh Refreshes the list of folders and files displayed.
Administration from iDigi Manager Pro System information The System Information pages display general system information and system statistics. This information is typically used by technical support to troubleshoot problems. For example, here is the information for the mobile (cellular) interface.
Programming C H A P T E R 5 The ConnectPort X2e ZB offers a variety of interfaces that produce and/or consume data. Developing software programs for ConnectPort X2e ZB products allows Digi customers to provide custom logic to control the flow information to and from these interfaces. This chapter introduces the Digi programming tools and resources available to you, and, using annotated example programs, introduces programming elements and operations available for the ConnectPort X2e ZB.
Programming resources Programming resources Several tools and resources are available for developing software programs for the ConnectPort X2e ZB. Python Python is a dynamic, object-oriented language for developing software applications, from simple programs to complex embedded applications. The ConnectPort X2e ZB runs the standard Python 2.7.1 distribution.
Programming resources Program samples in Digi ESP Digi ESP for Python provides samples to use as a base for programming the ConnectPort X2e ZB, including specific examples for exercising specific interfaces available on the ConnectPort X2e ZB. These program samples can be accessed from the Python or iDigi Dia samples wizard. 1 Go to File > New > Digi Python Application Sample Project or File > New > iDigi Dia Sample Project. The samples wizard, Python or iDigi Dia, will be opened.
Programming resources iDigi Dia software The Digi ESP development environment includes iDigi Device Integration Application (iDigi Dia) software. This software simplifies connecting devices (sensors, PLCs, etc.) to communication gateways. It includes a comprehensive library of plug-ins that work out-of-the-box with common device types and can be extended to include new devices. Its unique architecture allows the user to add most devices in under a day.
Programming resources Digi Python Programmer’s Guide The Digi Python Programmer’s Guide introduces the Python programming language by showing how to create and run a simple Python program. It reviews Python modules, particularly those with Digi-specific behavior, and describes how to load and run Python programs onto Digi devices, and run sample Python programs. This guide is on the Digi Python Wiki; in the Start Here section, click the link titled Digi Python Programmer's Guide http://www.digi.
Digi-specific Python modules for programming Digi-specific Python modules for programming Several Digi-provided built-in modules apply to functionality in the ConnectPort X2e ZB. To learn more about these built-in modules, go to: http://www.digi.com/wiki/developer/index.php/ConnectPort_X2e From that page, navigate to the information pages on these modules: digihw: Provides an interface to local hardware.
Sample programs Sample programs These simple annotated samples introduce several programmable features for the ConnectPort X2e ZB, including button handling, LED control, watchdog, RCI callback, and XBee functions. Button handling The following sample program demonstrates functions for handling the button on the ConnectPort X2e ZB. import select fd=open('/var/run/reset_button') p=select.poll() p.register(fd, select.POLLPRI) fd.read() while True: p.poll() fd.seek(0) val = int(fd.
Sample programs LED control Controlling the LEDs on the ConnectPort X2e ZB is handled through the user_led_set function. This sample program controls the Network LED. Note that if native features are still assigned to the LED, those behaviors will mix with the behaviors in the sample program. import digihw import time (1) while True: digihw.user_led_set(True,1) time.sleep(1.0) digihw.user_led_set(False,1) digihw.user_led_set(True, 2) time.sleep(1.0) digihw.
Sample programs Watchdog The watchdog feature, provided through the watchdog module, exists as a safeguard. If there are critical operations that “must” happen periodically, or else the system will be irretrievably broken, an application can request that a “watchdog” be established. If the application threads do not service their watchdog within the promised interval, the entire system reboots. These software watchdogs can have their intervals changed, if necessary, and can be deleted.
Sample programs RCI callback An RCI callback involves two types of actions, demonstrated in the following programs: Making RCI requests from Python applications Extending RCI to allow iDigi to make requests of Python applications. This is known as an RCI callback. Make an RCI request-example program import rci (1) request_string=""" """ (2) print rci.
Sample programs Make an RCI request-example program Following is a simple RCI callback example: import rci (1) def cb(req): print "Received request: " + req (2) (3) r=rci.RciCallback() r.register_callback('test', cb) (4) (5) rci.process_request('') (6) Program notes 1 The rci module includes the RciCallback class needed by the program.
Sample programs XBee functions For a description of the xbee module and program samples, see this Wiki page: http://www.digi.com/wiki/developer/index.php/Module:zigbee Sending and receiving SMS messages For examples of using SMS send/receive in programs, see the ConnectPort X2e ZB program samples in Digi ESP for Python.
The ConnectPort X2e ZB filesystem The ConnectPort X2e ZB filesystem The ConnectPort X2e ZB has a Linux-based filesystem. This section gives an overview of the key directories of the filesystem and common operations performed on directories and files. Differences between Windows and Linux filesystems If you are transitioning from a Windows-based filesystem to a Linux filesystem, the following article covers some of the key differences between Linux and Windows filesystems. http://freeos.
The Linux command shell (command-line interface) The Linux command shell (command-line interface) A shell is a program that takes commands from the keyboard and gives them to the operating system to perform. On the ConnectPort X2e ZB, a a program called ash acts as the shell program. This shell can be useful in several instances, particularly in managing files, executing Python programs, and programming and executing commands the XBee RF module in the gateway.