Programming Information

Equipped with the sophisticated 32bit MCU, the TOCOS wireless engine is a high-performance wireless module that mounts your original application software.

There are three different ways to develop application software on the TOCOS wireless engine TWE-001 series. All these methods use the C language (using GNU C compiler) as the development language.

  • Use IEEE802.15.4 API.
  • Use JenNet API.
  • Use ZigBee PRO API.

The sections below will describe their features.

IEEE802.15.4

Wireless communication using IEEE802.15.4 API has the following features.

This method directly conducts wireless operation at the level of the MAC layer of the wireless communication standard IEEE802.15.4 without the use of a protocol stack. This is best to the extent of flexibility in development and broader potentiality, and suitable for transmitting relatively large volume data such as voice communication or tuning low-power consumption operation like energy harvesting.

  • High in the degree of freedom and allows flexible development.
  • The method using the lower-layer API has fewer restrictions than that using the protocol stack.
  • Involves a larger number of steps due to many procedures.
  • The level of difficulty and development man-hours increase when routing or other complicated functions are implemented.
  • Suitable for one-to-one and one-to-many (star network) implementations.
  • No specification restrictions in the network size. (Restricted by the communication frequency or data size.)
  • RAM is occupied by 10 to 20KB.

JenNet

Wireless communication using JenNet API has the following features.

This is a high-level protocol stack that easily achieves advanced networks like tree network. The method provides the functions to form network, add or delete devices, self-recover communication routes, and conduct multi-hop communication. Transmission and reception are organized in a simple API to construct the advanced communication network relatively easily. The communication program created by this means is also compliant to the communication network IEEE802.15.4.

This stack expects routing performance because its tree structure rather than the complicated mesh structure in addition to the limited number of child nodes achieves the optimal network structure.

However, this method is not suitable if there are more end devices than routers or if the end devices require 5-second or longer sleep. The use of 802.15.4 MAC API is recommended. In this case, it must be combined with a routing system (e.g. TWE-Zero series) to achieve the relay function.

  • Provides the high-level routing function and easily achieve linear network.
  • Automatically constructs network and conducts routing (e.g. self-healing, self-forming)
  • Automatically switches to a different router in case the router breaks down or cannot make communication.
  • Not suitable for applications with small redundancy such as the execution of strict cycles.
  • Has a small number of source code steps due to the high-layer API.
  • Does not require the license or alliance fees for use.
  • Operation and specification are restricted by the protocol stack.
  • The maximum number and depth of child nodes connectable to a single router are 16 (including routers) and 255 (the number of hops), respectively.
  • RAM is occupied for the coordinator (45.4KB), router (42.7KB), and end device (31.9KB).

ZigBee PRO

Wireless communication using ZigBee PRO API has the following features:

  • Achieves mesh network.
  • The use of the common profile achieves mutual compatibility with competitors’ products.
  • Suitable for use at the locations with good reception as it makes frequent communications to maintain mesh network.
  • Not suitable for applications with small redundancy such as the execution of strict cycles.
  • Development and failure analysis are highest in the level of difficulty.
  • Need to join the ZigBee Alliance to use the trademark.
  • Operation and specification are restricted by the protocol stack.

For software development, determine the network form and communication details optimal for the application, understand their features, and select the API to be used. (Contact us for any inquiry.)

    For the software development environment (SDK), see ZigBee Evaluation and Development Kit (Introduction), which describes the flow of a series of steps below:
  • How to install the development tool (SDK)
  • How to compile
  • How to download into the flash ROM with the built-in wireless engine

To Use IEEE802.15.4

software_802.15.4

The three APIs namely: IEEE802.15.4 API, Peripherals API, and System API are used to create the user application program on IEEE802.15.4. The IEEE802.15.4 API is used for communications and controls data transmission/reception. The Peripherals API controls peripheral I/O like ADC or GPIO. Finally, the System API controls power supply and transitions to sleep etc.

You will understand the development steps on IEEE802.15.4 by the use of the sample program shown below. This is an example of transmitting data from the end device to the coordinator and executing the general communication processing including ACK processing of the transmitted data and the sleep processing of the end device.

*The use with TWE-001 STRONG requires high-power settings and output settings.

Information

To Use JenNet

software_JenNet

The two APIs namely: Jenie API and Peripherals API are used to create the user application program on JenNet. The Jenie API is used for communications and controls data transmission/reception. Processing like network construction or routing is executed by JenNet and needs not be created on the user application. The Peripherals API controls peripheral I/O like ADC or GPIO. (NB: The IEEE802.15.4 API and System API are accessible when JenNet is used. However, do not use them as they could operate in an unexpected manner.)

You will understand the development steps on JenNet by the use of the sample program shown below. This is an example of collecting the sensor data from the sensor node/s and outputting the result to UART0 at the coordinator.

*The use with TWE-001 STRONG requires high-power settings and output settings.

    Use the following template to create a new program on JenNet.
  • JenNet template

Information

To Use Peripherals (Common to IEEE802.15.4 and JenNet)

Hardware Specifications

Others

FAQs

Manuals

The manuals do not guarantee the accuracy in their contents although we pay attention to ensuring it. They could contain descriptions based on semiconductor or stack library vendors’ unique analysis independent of official information.

Contact us if you have any concerns.