C027_SupportTest_xively_locationで使用しているC027用ライブラリ

Fork of C027_Support by u-blox

下記のプログラムC027_SupportTest_xively_locationで使用しているC027用ライブラリです。

Import programC027_SupportTest_xively_location

インターフェース2014年10月号のu-blox C027で3G通信する記事で使用したプログラム。   CQ publishing Interface 2014.10 issue, C027 3G test program.

オリジナルのライブラリは下記を参照してください。

Import libraryC027_Support

support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.

MDMAPN.h

Committer:
mazgch
Date:
2014-06-06
Revision:
87:64f54572ea74
Parent:
85:dd8f4f0d0ca9
Child:
88:135fb4bb7aac

File content as of revision 87:64f54572ea74:

#pragma once 

/* ----------------------------------------------------------------
   APN stands for Access Point Name, a setting on your modem or phone
   that identifies an external network your phone can access for data 
   (e.g., 3G or 4G Internet service on your phone). 
   
   The APN settings can be forced when calling the join function.
   Below is a list of known APNs that us used if no apn config 
   is forced. This list could be extended by other settings.
   
   For further reading:
   wiki apn: http://en.wikipedia.org/wiki/Access_Point_Name
   wiki mcc/mnc: http://en.wikipedia.org/wiki/Mobile_country_code
   google: https://www.google.de/search?q=APN+list   
---------------------------------------------------------------- */

//! helper to generate the APN string
#define _APN(apn,username,password) apn "\0" username "\0" password "\0"

//! helper to extract a field from the config string 
#define _APN_GET(cfg) \
    *cfg ? cfg : ""; \
    cfg  += strlen(cfg) + 1
                    
//! APN lookup struct
typedef struct { 
    const char* mccmnc; //!< mobile country code (MCC) and mobile network code MNC  
    const char* cfg;    //!< APN configuartion string, use _APN macro to generate
} APN_t;

//! default APN settings used by many networks
static const char* apndef = _APN("internet",,); 

//! this is a list of special APNs for different network operators 
static const APN_t apnlut[] = {

// Germany 
    { /*T-Mobile*/ "26201",     _APN("internet.t-mobile","t-mobile","tm") },

// Switzerland
    { /*Swisscom*/ "22801",     _APN("gprs.swisscom.ch",,) },
    { /*Orange*/   "22803",     _APN("internet",,) /* post-paid */ 
                                _APN("click",,)    /* pre-paid */ },
    
// USA
    { /*T-Mobile*/ "310026|310260|310490",
                                _APN("epc.tmobile.com",,) 
                                _APN("fast.tmobile.com",,) /*LTE*/ },
    { /*AT&T*/     "310030|310150|310170|310260|310410|310560|310680",
                                _APN("phone",,)
                                _APN("wap.cingular","WAP@CINGULARGPRS.COM","CINGULAR1")
                                _APN("isp.cingular","ISP@CINGULARGPRS.COM","CINGULAR1") },
    // ...     
};