Developer World
Spresense Arduino Library v3.2.0-77d75a4
LTEAccessProvider.h
Go to the documentation of this file.
1/*
2 * LTEAccessProvider.h - LTEAccessProvider include file for Spresense Arduino
3 * Copyright 2019, 2021 Sony Semiconductor Solutions Corporation
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
43#ifndef __SPRESENSE_LTEACCESSPROVIDER_H__
44#define __SPRESENSE_LTEACCESSPROVIDER_H__
45
46#ifdef SUBCORE
47#error "LTE library is NOT supported by SubCore."
48#endif
49
57/****************************************************************************
58 * Included Files
59 ****************************************************************************/
60
61#include <LTEDefinition.h>
62
63class IPAddress;
64
65/****************************************************************************
66 * class declaration
67 ****************************************************************************/
68
81public:
82
87
92
120 LTEModemStatus begin(char* pinCode = NULL, bool restart = true, bool synchronous = true);
121
129 void shutdown();
130
174 LTEModemStatus attach(const char *apn,
175 const char *userName = NULL,
176 const char *password = NULL,
179 bool synchronous = true);
180
227 const char *apn,
228 const char *userName = NULL,
229 const char *password = NULL,
232 bool synchronous = true);
233
259
282 IPAddress getIPAddress();
283
301 unsigned long getTime();
302
315};
316
319#endif // __SPRESENSE_LTEACCESSPROVIDER_H__
Definition used in LTE library.
LTENetworkRatType
RAT(Radio Access Technology)
Definition: LTEDefinition.h:111
[en] The class to construct a path for communication between the LTE network and modem....
Definition: LTEAccessProvider.h:80
LTEModemStatus attach(LTENetworkRatType rat, const char *apn, const char *userName=NULL, const char *password=NULL, LTENetworkAuthType authType=LTE_NET_AUTHTYPE_CHAP, LTENetworkIPType ipType=LTE_NET_IPTYPE_V4V6, bool synchronous=true)
Register the modem on the LTE network after configuring RAT.
unsigned long getTime()
Gets the number of seconds since the epoch.
LTEModemStatus getStatus()
Get the modem status.
LTEModemStatus attach(const char *apn, const char *userName=NULL, const char *password=NULL, LTENetworkAuthType authType=LTE_NET_AUTHTYPE_CHAP, LTENetworkIPType ipType=LTE_NET_IPTYPE_V4V6, bool synchronous=true)
Register the modem on the LTE network.
void shutdown()
Power off the LTE modem and detach the modem from the LTE network.
LTEModemStatus begin(char *pinCode=NULL, bool restart=true, bool synchronous=true)
Power on the modem and start the network search.
IPAddress getIPAddress()
Get IP address assigned by LTE network.
LTEAccessProvider()
Construct LTEAccessProvider instance.
LTEModemStatus detach()
Detach the modem from the LTE network.
~LTEAccessProvider()
Destruct LTEAccessProvider instance.
LTENetworkAuthType
[en] Authentication type. [ja] 認証形式
Definition: LTEDefinition.h:98
LTEModemStatus
[en] Status code of the modem. [ja] モデムのステータスコード
Definition: LTEDefinition.h:70
LTENetworkIPType
[en] Internet protocol type. [ja] インターネット・プロトコル形式
Definition: LTEDefinition.h:85
@ LTE_NET_AUTHTYPE_CHAP
Definition: LTEDefinition.h:101
@ LTE_NET_IPTYPE_V4V6
Definition: LTEDefinition.h:88