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.
Fork of Sigfox by
Revision 15:5cac9747f00f, committed 2018-02-27
- Comitter:
- helmi_heyliot
- Date:
- Tue Feb 27 12:45:51 2018 +0000
- Parent:
- 14:e858a765590a
- Commit message:
- v0 dev heymag;
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 Feb 20 15:07:48 2018 +0000
+++ b/Sigfox.cpp Tue Feb 27 12:45:51 2018 +0000
@@ -31,7 +31,7 @@
bool Sigfox::send(const char *data) {
// If require a response add plus in message
// Add request response data
- _at->send("AT$SF=%s,1", data);
+ _at->send("AT$SF=%s", data);
// Wait response from sigfox after send
return _at->recv("OK");
@@ -43,6 +43,12 @@
}
+bool Sigfox::setCwEU(uint8_t mode ,uint8_t power) {
+ _at->send("AT$CW=868130000,%d,%d",mode,power);
+ return _at->recv("OK");
+}
+
+
bool Sigfox::setPower(uint8_t power) {
_at->send("ATS302=%d", power);
return _at->recv("OK");
--- a/Sigfox.h Tue Feb 20 15:07:48 2018 +0000
+++ b/Sigfox.h Tue Feb 27 12:45:51 2018 +0000
@@ -1,29 +1,9 @@
-/* Copyright (c) 2015 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @section DESCRIPTION
- *
- * Send command to Sigfox
- *
- */
#ifndef SIGFOX_H
#define SIGFOX_H
#include "ATParser.h"
#include "mbed.h"
-// https://www.disk91.com/2016/technology/sigfox/test-of-sigfox-wisol-wssfm10r1-module/
typedef struct _sigfoxvoltage {
double current;
@@ -50,6 +30,12 @@
* false = private
*/
bool setKey(bool type);
+ /**
+ * mode = 0 / 1
+ * power = default 15 | 0 .. 15
+ */
+
+ bool setCwEU(uint8_t mode ,uint8_t power=15 ) ;
bool setPower(uint8_t power=15);
