sigfox

Fork of Sigfox by Belkacem DAHMANI

Files at this revision

API Documentation at this revision

Comitter:
Raffaello
Date:
Tue Apr 18 15:05:57 2017 +0000
Parent:
0:5e0ae613c18c
Child:
2:d07e3b39ff74
Commit message:
Added new commands

Changed in this revision

Sigfox.cpp Show annotated file Show diff for this revision Revisions of this file
Sigfox.h Show annotated file Show diff for this revision Revisions of this file
--- a/Sigfox.cpp	Tue Apr 18 13:49:20 2017 +0000
+++ b/Sigfox.cpp	Tue Apr 18 15:05:57 2017 +0000
@@ -9,4 +9,19 @@
 bool Sigfox::send(const char *data) {
     _at->send("AT$SF=%s", data);
     return _at->recv("OK");
+}
+
+bool Sigfox::setPowerMode(uint8_t power) {
+    _at->send("AT$P=%d", power);
+    return _at->recv("OK");
+}
+
+void Sigfox::getID() {
+    _at->send("AT$I=10");
+    // TODO add return value
+}
+
+void Sigfox::getPAC() {
+    _at->send("AT$I=11");
+    // TODO add return value
 }
\ No newline at end of file
--- a/Sigfox.h	Tue Apr 18 13:49:20 2017 +0000
+++ b/Sigfox.h	Tue Apr 18 15:05:57 2017 +0000
@@ -34,4 +34,10 @@
     bool ready();
     
     bool send(const char *data);
+    
+    bool setPowerMode(uint8_t power);
+    
+    void getID();
+    
+    void getPAC();
 };
\ No newline at end of file