SIM5320 interface library
The SIM5320 driver library for mbed-os.
The SIM5320 documentation can be found here:
The library allows:
- get GPS coordinates and current UTC time
- send/receive SMS
- resolve host names
- establish TCP connections
- establish UPD connections
- work with FTP/FTPS servers
The library is compatible with a mbed-os 6.3 or higher.
Driver usage
Typical library usage consists of the following steps:
-
Initialization:
-
create
SIM5320
driver instances; - optionally invoke
SIM5320::reset
method to reset device. -
invoke
SIM5320::init
. This method checks that device works, and sets some default settings; -
Usage:
-
invoke
SIM5320::request_to_start
orSIM5320CellularDevice::init
method directly;
It will set the device into full functionality mode. - use GPS/network to do some things
- invoke
SIM5320::request_to_stop
orSIM5320CellularDevice::shutdown
method directly.
It will set device into low power mode. But in this mode it cannot use network or GPS;
The examples of the GPS/FTP/network/sms usage can be found in the examples
directory.
Troubleshooting
If after some AT commands the UART interface configuration was changed and it doesn’t work,
you can reset device to factory settings, using the following steps:
- connect device to PC using usb (usually boards have micro connector);
- find virtual COM device for AT commands. The PC can find up to 6 virtual com ports,
so you probably should check each port using baud rate 115200 andAT
orAT+CFUN?
;
commands to check if it’s AT command interface. - send
AT&F1
command to reset device to factory settings; - restart device manually.
Tests
To run library tests you should:
- create an empty test project
- connect modem to you board
- fill “sim5320-driver.test_*” settings in the you “mbed_app.json”
- run
mbed test --greentea --tests-by-name "sim5320-driver-tests-*"