V3.0.0.0.3
34
Great! As we see, the server has received the packet which RAK5010 sends out
successfully, and there are all sensor’s data in the packet.
8. How to connect with RAK5010 over BLE?
There are three modes in RAK5010 from the firmware V3.0.0.6 on, the peripheral mode,
the central mode and the Beacon scan mode. You can change the work mode of
RAK5010’s BLE using this command:
at+set_config=ble:work_mode:X:Y
, which is
defined in the section 5 of this document.
For the peripheral mode, you can scan RAK5010’s BLE and connect with it using your
normal mobile devices.
For the central mode, RAK5010’s BLE will not send out beacons so that your normal
mobile devices will not scan it. But it is useful for IoT use case, for example, you can
connect some BLE sensor node with RAK5010 when it works in the central mode,
because at this time RAK5010 act as a BLE gateway, and it can connect with other BLE
peripheral sensor nodes, up to 20 devices.
For the Beacon scan mode, RAK5010 can scan the around Beacon signal, it is useful for
Beacon usecase similar with iBeacon.
By default, RAK5010’s BLE will work in the peripheral mode so that users can config it
over BLE including DFU very easily, but you should know that, every time, after resetting,
you have only 60 seconds to connect your mobile device with RAK5010 over BLE,
because of power consumption. If you don’t connect with RAK5010 in 60 seconds after
resetting it, RAK5010’s BLE will not broadcast for saving power, but there is no limitation
once your mobile device has connected with RAK5010 over BLE in 60 seconds.
Surely, you can set RAK5010’s BLE to work in the central mode, when RAK5010 is reset,
there will be 30 seconds that RAK5010’s BLE works in the peripheral mode for users to
connect RAK5010 through BLE using their mobile device and configure RAK5010 over
BLE, in this case, if you don’t connect with RAK5010 through BLE in 30 seconds,
RAK5010’s BLE will work the central mode automatically and it can not be scanned by
your mobile devices until you change the work mode to the peripheral mode or reset
RAK5010 again.