There are two methods for controlling the on/off state of the GPRSbee. The “old” method is to toggle DTR which toggles the on-off state of the SIM900. The “new” method is to switch the power supply of GPRSbee. This new method is only supported by SODAQ Mbili. The SODAQ Mbili board has a connector (JP2) which is switched on or off by setting GPRSbeePower (D23) to HIGH or LOW.
The On-Off Toggle Method¶
The power (battery) connections are as follows:
- Connect the battery to one of the GPRSbee power connectors.
- Connect the other GPRSbee power connector to the LiPo connector on the SODAQ board.
The default setting for the GPRSbee library is to use this mode.
The Switched Power Method¶
(Only supported by the SODAQ Mbili) The power (battery) connections are as follows:
- Connect the battery to the LiPo connector on the SODAQ Mbili board.
- Connect the SODAQ Mbili JP2 connector to one of the power connectors on the GPRSbee.
To enable this mode you must add the following toВ your setup or initialization code:
Calling the above method and passing the parameter false, will switch the mode back to the On-Off Toggle method.
The methods within the supplied GPRSbee library will automatically switch the GPRSbee on and off as required. However, if you wish to manually switch the GPRSbee on or off you can use the following code snippets:
The On-Off Toggle Method:
The Switched Power Method: