-
Notifications
You must be signed in to change notification settings - Fork 5
/
basicTCP.ino
50 lines (36 loc) · 966 Bytes
/
basicTCP.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
basicTCP.ino - This is basic TCP example.
Created by Yasin Kaya (selengalp), August 18, 2018.
*/
#include "Sixfab_CellularIoT.h"
// for Arduino CellularIoT Shield
SixfabCellularIoT node;
// for Arduino CellularIoTApp Shield
// SixfabCellularIoTApp node;
char your_ip[] = "xx.xx.xx.xx"; // change with your ip
char your_port[] = "xxxx"; // change with your port
// setup
void setup() {
node.init();
node.getIMEI();
node.getFirmwareInfo();
node.getHardwareInfo();
node.setIPAddress(your_ip);
node.setPort(your_port);
node.setGSMBand(GSM_900);
//node.setCATM1Band(LTE_B5);
//node.setNBIoTBand(LTE_B20);
node.getBandConfiguration();
node.setMode(GSM_MODE);
node.connectToOperator();
node.getSignalQuality();
node.getQueryNetworkInfo();
node.deactivateContext();
node.activateContext();
node.closeConnection();
node.connectToServerTCP();
node.sendDataTCP("Hello World!\r\n");
}
// loop
void loop() {
}