Library to easily communicate with XBee modules.

Dependencies:   DigiLogger

Dependents:   WaterLogger XbeeGateway XBee_Cooker ProjetReceiver ... more

Resetting the local module

In some situations it might be interesting to reset the local XBee module to start from a known situation (for example, to ensure that it is disconnected or that all the parameters are the ones saved in the flash). Regardless which method is used, the library will wait up to 5 seconds for the module to reset. There are three methods for issuing a reset:

  • hardware_reset(): if the reset pin was specified when constructing the device object, this method will toggle such pin to issue the reset. It returns Success if operation succeeded or Failure if there is no reset pin or if the timeout exceeded.

Information

Take into account that there are some mbed products that do not have a reset pin configured such as the ARCH PRO board. With these devices the hardware reset cannot be performed.

  • software_reset(): this method is always available. It works by sending an AT command to reset the module. It returns Success if the operation succeeded or Failure if the timeout was exceeded.
  • device_reset(): this method is a wrapper that will try first issuing a hardware_reset() and if it fails, it will perform with software_reset(). It returns Success if the operation succeeded or Failure otherwise.

Information

The init() method internally issues a device_reset().