8 #ifndef NETWORK_FUNCTIONS_H
9 #define NETWORK_FUNCTIONS_H
14 #define ERR_PHONE_FUNCTION 48
15 #define ERR_SIM_PRESENCE 49
16 #define ERR_PIN_WRONG 50
17 #define ERR_WEAK_SIGNAL 51
18 #define ERR_REGISTRATION 52
19 #define ERR_GPRS_ATTACH 52
20 #define ERR_PDP_DEACTIVATED 53
21 #define ERR_PDP_DEFINE 54
22 #define ERR_PDP_ACTIVATE 55
26 #define ERR_MQTT_EMPTY_PARAM 100
34 #define MAX_LENGTH_MQTT_PACKET 128
35 #define MQTT_KEEP_ALIVE 15
94 uint8_t
publish_mqtt_msg(
char * ip_address,
char * tcp_port,
char * topic,
char * client_id,
char * message);
uint8_t enable_gprs()
gprs_enable() enables GPRS connection. GPRS must be enabled before trying to establish TCP connection...
Definition: network_functions.c:46
uint8_t send_tcp_data(uint8_t *data, uint8_t data_length)
sends data over an open TCP connection.
Definition: network_functions.c:594
uint8_t close_tcp_connection()
closes an open TCP connection.
Definition: network_functions.c:575
uint8_t disable_gprs()
disables the GPRS functionality and the whole radio module.
uint8_t publish_mqtt_msg(char *ip_address, char *tcp_port, char *topic, char *client_id, char *message)
publishes a message to an MQTT topic with QoS 1 by default.
Definition: network_functions.c:623
uint8_t open_tcp_connection(char *server_address, char *port)
opens a new TCP connection. if the function is called when there is already an open TCP connection th...
Definition: network_functions.c:465