A simple project for sending button input up to AT&T Flow

Dependencies:   FXOS8700CQ MODSERIAL mbed

For instructions on using this program, see the AT&T Starter Kit tutorial on it.

Committer:
rfinn
Date:
Fri Aug 12 21:47:22 2016 +0000
Revision:
72:0afdd141157c
Parent:
69:a99e384b720f
updated comment

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JMF 2:0e2ef866af95 1 #ifndef __CONFIG_ME_H_
JMF 2:0e2ef866af95 2 #define __CONFIG_ME_H_
JMF 2:0e2ef866af95 3
JMF 2:0e2ef866af95 4 // User must set these for own context:
fkellermavnet 21:d0038d14ee7c 5
fkellermavnet 50:8ac42961458c 6 #define BUF_SIZE_FOR_N_MAX_SOCKREAD (10)
fkellermavnet 50:8ac42961458c 7 #define MAX_WNC_SOCKREAD_PAYLOAD (1500)
fkellermavnet 50:8ac42961458c 8
rfinn 72:0afdd141157c 9 // This is the server's base server name. Example "www.google.com"
stefanrousseau 24:bd480d2aade4 10 // Note that when you Fork a FLOW, it will typically assign either
stefanrousseau 24:bd480d2aade4 11 // "run-east.att.io" or "run-west.att.io", so be sure to check this.
rfinn 69:a99e384b720f 12 static const char * MY_SERVER_NAME = "run-west.att.io"; // CHECK ME, might be different
rfinn 68:d38834307b17 13
rfinn 68:d38834307b17 14 //This is for normal HTTP. If you want to use TCP to a specific port, change that here:
rfinn 68:d38834307b17 15 static const char * MY_PORT_STR = "0000"; // CHANGE ME
fkellermavnet 21:d0038d14ee7c 16
rfinn 69:a99e384b720f 17 // Only used if you program void GenerateModemString() to use them and send HTTP
stefanrousseau 24:bd480d2aade4 18 // These are FLOW fields from the Endpoints tab:
rfinn 69:a99e384b720f 19 #define FLOW_BASE_PATH "/..../in/flow" // CHANGE ME
rfinn 68:d38834307b17 20 #define FLOW_INPUT_NAME "/buttons"
rfinn 69:a99e384b720f 21 // The full URL will be "http://"+MY_SERVER_NAME+":"+MY_PORT_STR+FLOW_PATH_PATH+FLOW_INPUT_NAME
fkellermavnet 21:d0038d14ee7c 22
stefanrousseau 24:bd480d2aade4 23 // Unless you want to use a different protocol, this field should be left as is:
stefanrousseau 12:7c94ec5069dc 24 #define FLOW_URL_TYPE " HTTP/1.1\r\nHost: "
stefanrousseau 12:7c94ec5069dc 25
stefanrousseau 24:bd480d2aade4 26 // This identifier specifies with which FLOW device you are communicating.
stefanrousseau 24:bd480d2aade4 27 // If you only have one devive there then you can just leave this as is.
stefanrousseau 24:bd480d2aade4 28 // Once your FLOW device has been initialized (Virtual Device Initialize clicked),
stefanrousseau 24:bd480d2aade4 29 // the Virtual Device will show up in M2X. This is its "DEVICE SERIAL" field
rfinn 68:d38834307b17 30 #define M2X_DEVICE_SERIAL "starterkit001"
fkellermavnet 21:d0038d14ee7c 31
stefanrousseau 24:bd480d2aade4 32 // This constant defines how often sensors are read and sent up to FLOW
stefanrousseau 24:bd480d2aade4 33 #define SENSOR_UPDATE_INTERVAL_MS 5000; //5 seconds
stefanrousseau 24:bd480d2aade4 34
fkellermavnet 21:d0038d14ee7c 35 // This is the APN name for the cellular network, you will need to change this, check the instructions included with your SIM card kit:
stefanrousseau 12:7c94ec5069dc 36 static const char * MY_APN_STR = "m2m.com.attz";
fkellermavnet 21:d0038d14ee7c 37
JMF 2:0e2ef866af95 38 #endif