Jim Flynn / Mbed OS aws-iot-device-sdk-mbed-c
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers easy-connect.h Source File

easy-connect.h

00001  
00002 #ifndef __EASY_CONNECT_H__
00003 #define __EASY_CONNECT_H__
00004 
00005 #include "mbed.h"
00006 
00007 #define CELLULAR_WNC14A2A 203
00008 #define CELLULAR_BG96     204
00009 
00010 // This is address to mbed Device Connector
00011 #define MBED_SERVER_ADDRESS "coap://api.connector.mbed.com:5684"
00012 
00013 /* \brief print_MAC - print_MAC  - helper function to print out MAC address
00014  * in: network_interface - pointer to network i/f
00015  *     bool log-messages   print out logs or not
00016  * MAC address is print, if it can be acquired & log_messages is true.
00017  *
00018  */
00019 void print_MAC(NetworkInterface* network_interface, bool log_messages);
00020 
00021 
00022 /* \brief easy_connect - easy_connect function to connect the pre-defined network bearer,
00023  *                       config done via mbed_app.json (see README.md for details).
00024  * IN: bool  log_messages  print out diagnostics or not.
00025  */
00026 NetworkInterface* easy_connect(bool log_messages);
00027 
00028 // This is address to mbed Device Connector
00029 #define MBED_SERVER_ADDRESS "coap://api.connector.mbed.com:5684"
00030 
00031 /* \brief print_MAC - print_MAC  - helper function to print out MAC address
00032  * in: network_interface - pointer to network i/f
00033  *     bool log-messages   print out logs or not
00034  * MAC address is print, if it can be acquired & log_messages is true.
00035  *
00036  */
00037 void print_MAC(NetworkInterface* network_interface, bool log_messages);
00038 
00039 
00040 /* \brief easy_connect - easy_connect function to connect the pre-defined network bearer,
00041  *                       config done via mbed_app.json (see README.md for details).
00042  * IN: bool  log_messages  print out diagnostics or not.
00043  */
00044 NetworkInterface* easy_connect(bool log_messages = false);
00045 
00046 /* \brief easy_get_netif - easy_connect function to get pointer to network interface w/o connect it.
00047                            You might need this for example getting the WiFi interface, then doing a scan
00048                            and then connecting to one of the SSIDs found with a password end user supplies.
00049  * IN: bool  log_messages  print out diagnostics or not.
00050  */
00051 NetworkInterface* easy_get_netif(bool log_messages);
00052 
00053 #endif // __EASY_CONNECT_H__