Skip to content

Migrate From Z1 to RE Mote

Antonio Lignan edited this page Dec 18, 2015 · 2 revisions

Migrating your Z1 application to the Zoul (RE-Mote)

So you are already a proud Zolertia Z1 mote owner, congrats!

Now that the Zoul is out, you should really consider migrating your Z1-based application, why? check out the next section.

Differences between the Z1 mote and the Zoul (RE-Mote)

The table below briefly list the differences between the platforms:

Platform ROM RAM Frequency Lowest current draw # Radios Maximum Radio Range
Z1 92KB 8KB 16MHz 3.5-18uA 1 100 mts (0dBi antenna, LOS)
RE-Mote 512KB 32KB 32MHz 150nA (shutdown mode) 2 20 Km (868/915MHz, LOS)

Note also the following feature differences:

Platform Z1 RE-Mote
Sensors on board TMP102 (temperature), ADXL345 (accelerometer), voltage (internal) CC2538 internal (core temperature, voltage)
External Storage M25P16 (2MB) MicroSD slot (up to 8GB)
Radio interfaces 2.4GHz IEEE 802.15.4/6LoWPAN 2.4GHz and 868/915MHz IEEE 802.15.4/6LoWPAN
Buttons User and Reset User and Reset
LEDs 3 LEDs (red, green, blue) RGB LED (HTML colours possible)
Debugging/programming Serial to USB converter Serial to USB converter
Real Time Clock Calendar None On-board
External Watchdog Timer None On-board
USB 2.0 native None On-board
External antenna On U.Fl connector, requires pigtail On-board RP-SMA
Dual Radio None On-board
Hardware Security acceleration None On-board
Emulation support Cooja None

Migrating a Z1 Contiki application to the RE-Mote

You should be on the safe side if you are using Contiki libraries and hardware-abstracted components, for example most networking related features such as RPL, UDP, TCP will both transparently for the Z1 and the RE-Mote. The main difference will be the RE-Mote having more ROM/RAM available, for example to have a larger routing table, enabled resources, etc.

The following are some recommendations about what to replace, if you miss anything else from this list please send us an email to support@zolertia.com.

Battery sensor

We should replace the following:

  • Replace #include "dev/battery-sensor.h" with #include "dev/zoul-sensors.h"
  • Replace SENSORS_ACTIVATE(battery_sensor) with SENSORS_ACTIVATE(vdd3_sensor)
  • Replace battery_sensor.value(0) with vdd3_sensor.value(CC2538_SENSORS_VALUE_TYPE_CONVERTED)) (this returns the already converted voltage value)

ADC sensors

Zolertia platforms historically have named its on-board Analog to Digital converters as Phidgets, as the defacto connector has the pin-out matching the sensor's manufacturers products. The phidget driver is nothing more than the ADC drivers to read analogue sensors.

  • Replace #include "dev/z1-phidgets.h" with #include "dev/zoul-sensors.h"
  • Replace SENSORS_ACTIVATE(phidgets) with adc_sensors.configure(SENSORS_HW_INIT, ZOUL_SENSORS_ADC_ALL), this will initialize all ADC channels available (up to 3 for the RE-Mote as default). Check the platform/zoul/dev/adc-sensors.h for more detail
  • Replace phidgets.value(PHIDGET5V_1)) or equivalent with adc_sensors.value(ZOUL_SENSORS_ADC1)), with the requires channel

TMP102 temperature sensor

Sorry, the RE-Mote doesn't have an on-board TMP102 sensor, however you could alternatively use the CC2538 built-in core temperature sensor, that is, the ARM-Cortex M3 current temperature operation. If this is acceptable for you, then:

  • Replace #include "dev/tmp102.h" with #include "dev/zoul-sensors.h"
  • Replace tmp102_init() with SENSORS_ACTIVATE(cc2538_temp_sensor)
  • Replace tmp102_read_temp_x100() or alike with cc2538_temp_sensor.value(CC2538_SENSORS_VALUE_TYPE_CONVERTED))

LEDs

The same LEDs calls (LEDS_RED, LEDS_BLUE, LEDS_GREEN) can be used for both platforms, however the RE-Mote includes more colours as default (LEDS_PURPLE, ``LEDS_YELLOW, LEDS_WHITE`). Alternatively if using the `pwm` module, you can use HTML like colours.

Choose with radio to use

The Z1 mote has only one radio (2.4GHz), while the RE-Mote has two (2.4GHz and 868/915Mhz). To select which radio interface to use with the RP-SMA connector for external antennas, add this in your project-conf.h file:

868/915MHz

#define NETSTACK_CONF_RADIO       cc1200_driver
#define ANTENNA_SW_SELECT_DEFAULT ANTENNA_SW_SELECT_SUBGHZ

2.4GHz

#define NETSTACK_CONF_RADIO       cc2538_rf_driver
#define ANTENNA_SW_SELECT_DEFAULT ANTENNA_SW_SELECT_2_4GHZ

Or from the application you can alternatively enable one or another by:

  • Including #include "antenna-sw.h"
  • Call antenna_sw_select(ANTENNA_SW_SELECT_SUBGHZ) or antenna_sw_select(ANTENNA_SW_SELECT_2_4GHZ)

Note that this only selects which antenna/radio to use, the radio driver must match your selection as well! don't forget to also include the cc2538_rf_driver or cc1200_driver as done above.

Clone this wiki locally