1. Introduction Konnect-Wi is a device to Monitor/control machines from a central server over Wi-Fi to implement IOT/M2M applications. It connects to smart machines via RS232/RS485 port, and also has direct Digital and Analog inputs of wide voltage range that can read sensors inputs and voltages from the machine. Konnect-Wi also has Signal/power output to trigger external device or control the machines.
Button for initiating SAMD21 microcontroller programming mode Press the button and power on the device to enter programming mode Boots from the SAM-BA boot-loader, and enables USB interface to program Microcontroller RESET Crevavi Confidential Page 4 of 25 Document Template V1.1...
If output voltage requirement is 5V, put the corresponding jumper at 5V side If output voltage requirement is 12V, put the corresponding jumper at 12V side Please note that the maximum outputcurrent capacity is 500mA. Crevavi Confidential Page 5 of 25 Document Template V1.1...
4.4. Install SAM-BA SAM-BA (SAM Boot Assistant) tool is used for programming applications in Konnect-Wi • Install SAM-BA in development/programming PC • Interface USB programming cable between device and PC • It may show as “unknown device” in device manager •...
You may also press and hold “Program” button, and press “Reset” while the button is still pressed • Program button marked in Figure-6, also marked “6” in Figure-2 • Interface PC and Konnect-Wi using USB cable • Once device is enumerated, a COM port will be assigned •...
The development environment (IDE) for Application program is Atmel Studio 7 • Install Atmel Studio 7 in development PC • Open Konnect-Wi project provided by Crevavi in the IDE Figure 8 • The Sample main.c code in the project can be modified to read/write the ports, send/receive Wi-Fi data to server and schedule new tasks •...
A pointer to string containing target AP name at_join_access_point unsigned char * ap_string A pointer to string containing target AP name unsigned char * password A pointer to string containing password for the target AP Crevavi Confidential Page 11 of 25 Document Template V1.1...
* server_ip A pointer to string containing server IP address or URL unsigned char * port_no A pointer to string containing port number for the server at_sent_tcp_data mqtt_broker_handle *broker Crevavi Confidential Page 12 of 25 Document Template V1.1...
* port_data port_reading_stats contains: unsigned int ain_stats[4] – reads no of pulses in configured duration unsigned int din_stats[4] – reads average of configured no. of ADCreadings Output Parameter None Example: Crevavi Confidential Page 15 of 25 Document Template V1.1...
Name (com_config_structcom_port_config) Purpose Configures external COM port for baud rate, data bits, parity, and stop bits At initialization, default values are: BAUD_115200, DATA_BITS_8, PARITY_NONE, STOP_BITS_1 Input parameters com_config_structcom_port_config com_config_struct contains: Crevavi Confidential Page 16 of 25 Document Template V1.1...
If max_len is 40, and input data is 60 bytes, only 40 bytes will be copied. Output Parameter unsigned int – length of copied bytes Example: unsigned intchCount; unsigned char str[24]; Crevavi Confidential Page 17 of 25 Document Template V1.1...
Returns 1 if scheduling is successful Example: void my_func1 (void) /* Do business logic */ void my_func2 (void) /* Do business logic */ void main (void) init_konnect_wi(); /* Initializes the board */ app_schedule_function_callback(0, my_func1, 500); Crevavi Confidential Page 18 of 25 Document Template V1.1...
– Length of the String strCopy unsigned int– Length of the copied String strCopyLen Unsigned int–Length of the copied String strCat unsigned int– Length of the concatenated String Crevavi Confidential Page 19 of 25 Document Template V1.1...
Pointer to Broker, Topic, Message and Quality of Service mqtt_subscribe mqtt_broker_handle *broker, const unsigned char *topic, QoS qos Pointer to Broker, Topic and Quality of Service mqtt_display_message mqtt_broker_handle *broker, int (*print)(int) Crevavi Confidential Page 20 of 25 Document Template V1.1...
ModRTU_CRC uint16_t – Cyclic Redundancy Check of 16 bit Example modbus_write_struct *temp_data; modbus_write_struct *write_data; /*Send data to slave using modbus*/ modbus_send_data(temp_data); /*Verifies the data received data from the slave*/ modbus_query(write_data, temp_data); Crevavi Confidential Page 21 of 25 Document Template V1.1...
Used to insert "key":"value" pairs into an object jwArr_string Array insertion function for string Used to insert "value" elements into an array jwArr_int Array insertion function for integer Used to insert "value" elements into an array Crevavi Confidential Page 22 of 25 Document Template V1.1...
Page 23
Input Integer value jwArr_double double value Input Double value jwArr_bool int oneorZero Input Boolean value jwArr_null None jwArr_object None jwArr_array None jwEnd None jwObj_raw char *key, char *rawtext Pointer to Key and rawtext Crevavi Confidential Page 23 of 25 Document Template V1.1...
"anArray": [ 1.1. Important Variable Configurations Following are list of variables that need to be modified to configure the devices for different access point and servers. The variables are declared in main.c. Crevavi Confidential Page 24 of 25 Document Template V1.1...
Page 25
In future version of software, this parameter will be programmable through serial / USB port topic_pub Topic to publish data to the server user_name User name of server server_password Password of the server ---------------------------: END OF DOCUMENT :--------------------------- Crevavi Confidential Page 25 of 25 Document Template V1.1...
Need help?
Do you have a question about the Konnect-Wi and is the answer not in the manual?
Questions and answers