Raw API Over Ethernet to CPX2
From Digi Developer
Talking raw API Frames over Ethernet to the ConnectPort X2
The Digi ConnectPort X2 offers low-cost Ethernet access into your mesh. The CPX2 runs two very different firmwares, either of which you can flash in at will.
ConnectPort X2 Ethernet Python firmware (82001596)
This firmware provides a reduced-memory platform for your Python applications. It does not include the normal Digi IA engine for Modbus/TCP to Modbus serial bridging, nor does it offer raw API frame access to the XBee. Officially, these firmwares support XBee running the 802.15.4, ZNet and ZigBee (ZB) firmwares. The Wi-Fi version of the CPX2 with Python (so WiFi to Mesh) uses firmware number 82001630.
General comments:
- The CPX2 has one-half the normal RAM of an X4/X8, plus runs at less than half the CPU speed. Therefore it is not a perfect 'low-cost version' of the X4; it does introduce limitations.
- In general, your own Python code will run fine on either X2 or X4, however many stock public Python libraries (like HTTP or SMTP servers) assume RAM is virtual and free. So users expecting to make heavy use of external Python modules will find the CPX2 more challenging.
- You will find developing on the CPX2 frustrating, so you should develop on an X4 with an eye to keeping memory usage down, then 'port' your code to the X2 for testing and implementation.
- Some people get burned thinking 'My application is so functionally simple - it will run on the CPX2'. However, 'simple' does not equal 'low memory usage'. Some very complex applications require very little memory, while some very simple applications (like parsing XML) can consume many MB of RAM.
ConnectPort X2 Ethernet firmware w/ API Access (82001631)
Notice there is NO word 'Python' - this firmware offers the normal Digi IA engine for Modbus/TCP to Modbus serial bridging, or it can be configured for raw API frame access to the XBee. The Modbus bridging functions fully for ZNet and ZigBee, and partially for 802.15.4. The raw API frame support works for ALL versions of the XBee (including the point-to-multipoint models like the 868Mhz versions for Europe). The Wi-Fi version of the CPX2 with Python (so WiFi to Mesh) uses firmware number 82001597 - the numbers look swapped, but they are correct.
General comments:
- The Modbus/TCP bridge is documented here: Modbus_Bridge_on_CPX4 and Modbus_Serial_Over_Mesh
- You must select either the IA Engine/Modbus Bridge, or the raw API frames - the CPX2 does not support both functions concurrently
- The CPX4 and X8 have the same IA Engine/Modbus Bridge integrated in the normal firmware, however neither the X4 nor X8 support the raw API frames.
- The raw-API frames can be sent via TCP/IP, UDP/IP, SSL/TLS or Digi Realport.
