Mobile Life IoT project using the AT&T IoT Starter Kit Software and files for my device to monitor the status or our Airstream travel trailer RV. A full description of the project is at Hackster.IO here as part of the Realtime AT&T IoT Starter Kit Challenge: https://www.hackster.io/Anubus/mobile-life-iot-9c10be

Dependencies:   FXOS8700CQ MODSERIAL mbed

Committer:
Anubus
Date:
Sun Apr 02 12:28:21 2017 +0000
Revision:
0:bd276b1f1249
public version commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Anubus 0:bd276b1f1249 1 /* ===================================================================
Anubus 0:bd276b1f1249 2 Copyright © 2016, AVNET Inc.
Anubus 0:bd276b1f1249 3
Anubus 0:bd276b1f1249 4 Licensed under the Apache License, Version 2.0 (the "License");
Anubus 0:bd276b1f1249 5 you may not use this file except in compliance with the License.
Anubus 0:bd276b1f1249 6 You may obtain a copy of the License at
Anubus 0:bd276b1f1249 7
Anubus 0:bd276b1f1249 8 http://www.apache.org/licenses/LICENSE-2.0
Anubus 0:bd276b1f1249 9
Anubus 0:bd276b1f1249 10 Unless required by applicable law or agreed to in writing,
Anubus 0:bd276b1f1249 11 software distributed under the License is distributed on an
Anubus 0:bd276b1f1249 12 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
Anubus 0:bd276b1f1249 13 either express or implied. See the License for the specific
Anubus 0:bd276b1f1249 14 language governing permissions and limitations under the License.
Anubus 0:bd276b1f1249 15
Anubus 0:bd276b1f1249 16 ======================================================================== */
Anubus 0:bd276b1f1249 17
Anubus 0:bd276b1f1249 18 #ifndef __WNC_CONTROL_H_
Anubus 0:bd276b1f1249 19 #define __WNC_CONTROL_H_
Anubus 0:bd276b1f1249 20
Anubus 0:bd276b1f1249 21 static const unsigned WNC_TIMEOUT_MS = 10000;
Anubus 0:bd276b1f1249 22
Anubus 0:bd276b1f1249 23 // Core function that sends data to the WNC UART
Anubus 0:bd276b1f1249 24 extern int send_wnc_cmd(const char * s, string ** r, int ms_timeout);
Anubus 0:bd276b1f1249 25
Anubus 0:bd276b1f1249 26 // Low level command functions
Anubus 0:bd276b1f1249 27 extern void at_init_wnc(bool hardReset = false);
Anubus 0:bd276b1f1249 28 extern void at_sockopen_wnc(const string & ipStr, const char * port );
Anubus 0:bd276b1f1249 29 extern void at_sockclose_wnc(void);
Anubus 0:bd276b1f1249 30 extern int at_dnsresolve_wnc(const char * s, string * ipStr);
Anubus 0:bd276b1f1249 31 extern void at_sockwrite_wnc(const char * s);
Anubus 0:bd276b1f1249 32 extern unsigned at_sockread_wnc(string * pS, unsigned n, unsigned retries);
Anubus 0:bd276b1f1249 33 extern void at_at_wnc(void);
Anubus 0:bd276b1f1249 34 extern int at_send_wnc_cmd(const char * s, string ** r, int ms_timeout);
Anubus 0:bd276b1f1249 35 extern int check_wnc_ready(void);
Anubus 0:bd276b1f1249 36
Anubus 0:bd276b1f1249 37 // High level functions that attempt to correct for things going bad with the WNC
Anubus 0:bd276b1f1249 38 extern void software_init_mdm(void);
Anubus 0:bd276b1f1249 39 extern void resolve_mdm(void);
Anubus 0:bd276b1f1249 40 extern void sockopen_mdm(void);
Anubus 0:bd276b1f1249 41 extern void sockwrite_mdm(const char * s);
Anubus 0:bd276b1f1249 42 extern unsigned sockread_mdm(string * sockData, int len, int retries);
Anubus 0:bd276b1f1249 43 extern void sockclose_mdm(void);
Anubus 0:bd276b1f1249 44 extern void display_modem_firmware_version(void);
Anubus 0:bd276b1f1249 45
Anubus 0:bd276b1f1249 46 #endif
Anubus 0:bd276b1f1249 47
Anubus 0:bd276b1f1249 48