Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: UbloxCellularBase.cpp
- Revision:
- 13:158a035b1b50
- Parent:
- 12:aa3cbc3f88c5
- Child:
- 14:e420232ee4e7
--- a/UbloxCellularBase.cpp Tue Jan 09 12:34:53 2018 +0500
+++ b/UbloxCellularBase.cpp Tue Jan 09 15:08:31 2018 +0500
@@ -209,31 +209,6 @@
return success;
}
-/** Get the IMEI.
- *
- * @return true if successful, otherwise false.
- */
-bool UbloxCellularBase::get_imei(char *imei_to_send, int size)
-{
- bool success;
- LOCK();
-
- MBED_ASSERT(_at != NULL);
-
- // International mobile equipment identifier
- // AT Command Manual UBX-13002752, section 4.7
- success = _at->send("AT+CGSN") && _at->recv("%15[^\n]\nOK\n", _dev_info.imei);
- tr_info("DevInfo: IMEI=%s", _dev_info.imei);
-
- if (success) {
- memcpy(imei_to_send,_dev_info.imei,size);
- imei_to_send[size-1] = '\0';
- }
-
- UNLOCK();
- return success;
-}
-
bool UbloxCellularBase::get_meid()
{
bool success;
@@ -934,5 +909,30 @@
return success;
}
+/** Get the IMEI.
+ *
+ * @return true if successful, otherwise false.
+ */
+bool UbloxCellularBase::get_imei(char *imei_to_send, int size)
+{
+ bool success;
+ LOCK();
+
+ MBED_ASSERT(_at != NULL);
+
+ // International mobile equipment identifier
+ // AT Command Manual UBX-13002752, section 4.7
+ success = _at->send("AT+CGSN") && _at->recv("%15[^\n]\nOK\n", _dev_info.imei);
+ tr_info("DevInfo: IMEI=%s", _dev_info.imei);
+
+ if (success) {
+ memcpy(imei_to_send,_dev_info.imei,size);
+ imei_to_send[size-1] = '\0';
+ }
+
+ UNLOCK();
+ return success;
+}
+
// End of File