Newer
Older
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef LIBMOBILE_H
#define LIBMOBILE_H
#include <stdio.h>
#include <curl/curl.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#define BUFFER_SIZE (256 * 1024) //256kb
#define TAG_CONTENT_SIZE 100
#define DEBUG 1
#define DEBUG_RESULT 0
#define ENABLE 1
#define DISABLE 0
struct write_result {
char *data;
int pos;
};
//DeviceName, SerialNumber, Imei, Imsi, Iccid, Msisdn, HardwareVersion, SoftwareVersion,
//WebUIVersion, MacAddress1, MacAddress2, ProductFamily, Classify, supportmode, workmode
struct write_result *mobile_get_device_info();
//ConnectionStatus, WifiConnectionStatus, SignalStrength, SignalIcon, CurrentNetworkType, CurrentServiceDomain, RoamingStatus, BatteryStatus
//BatteryLevel, BatteryPercent, simlockStatus, WanIPAddress, WanIPv6Address, PrimaryDns, SecondaryDns, PrimaryIPv6Dns, SecondaryIPv6Dns,
//CurrentWifiUser, TotalWifiUser, currenttotalwifiuser, ServiceStatus, SimStatus, WifiStatus, CurrentNetworkTypeEx, maxsignal, wifiindooronly, wififrequence,
//classify, flymode, cellroam
struct write_result *mobile_get_monitoring_status();
//CurrentConnectTime, currentUpload, CurrentDownload, CurrentDownloadRate, CurrentUploadRate, TotalUpload, TotalDownload, TotalConnectTime, showtraffic
struct write_result *mobile_get_trafficstatistics();
//State, FullName, ShortName, Numeric, Rat
struct write_result *mobile_get_provider();
///SimState, PinOptState, SimPinTimes
struct write_result *mobile_get_pin_status();
//RoamAutoConnectEnable, MaxIdelTime, ConnectMode, MTU, auto_dial_switch, pdp_always_on
struct write_result *mobile_get_connection_status();
struct write_result *mobile_get_apn_profiles();
//UnreadMessage, SmsStorageFull, OnlineUpdateStatus
struct write_result *mobile_get_notification();
//LocalUnread, LocalInbox, LocalOutbox, LocalDraft, LocalDeleted, SimUnread, SimInbox, SimOutbox
//SimDraft, LocalMax, SimMax, SimUsed, NewMsg
struct write_result *mobile_get_sms_count();
struct write_result *mobile_get_language();
struct write_result *mobile_create_apn_profile(char *name, char *apn_name, char *username, char *password);
struct write_result *mobile_set_apn_profile_default(char *name, char *apn_name, char *username, char *password);
struct write_result *mobile_delete_apn_profile(int profile_name_location);
struct write_result *mobile_sms_read(int sms_location);
struct write_result *mobile_sms_delete(int sms_location);
struct write_result *mobile_reset_traffic();
/* mobile_LTE_register has to be called to enbale or disable LTE */
struct write_result *mobile_LTE_register();
struct write_result *mobile_LTE_enable();
struct write_result *mobile_LTE_disable();
/* 00 - default- 4g, 01 - 2g, 02 - 3g */
struct write_result *mobile_set_connection_type(int connection_type);
struct write_result *mobile_data_roaming_enable();
struct write_result *mobile_data_roaming_disable();
/* 00 -> enter pin, 01 -> activate pin, 02 ->disable pin, 03 -> change pin, 04 -> enter puk */
struct write_result *mobile_pin_enable(char *current_pin);
struct write_result *mobile_pin_disable(char *current_pin);
struct write_result *mobile_pin_set(char *current_pin, char *new_pin);
struct write_result *mobile_set_language(char *language_name);
#endif