Konnect-Wi
Quick Reference Guide
Version: 1.1 Date: 1 December 2017
Страница 1: ...Konnect Wi Quick Reference Guide Version 1 1 Date 1 December 2017...
Страница 2: ...Status Flag 11 1 2 2 Wi Fi Connection Operations 11 1 2 3 TCP Operations 12 1 2 4 GPIO Operations 13 1 2 4 1 Configure Enable input ports 13 1 2 4 2 Configure EnablRead all input port s current statu...
Страница 3: ...gital signal outputs APIs provide easy access to the Wi Fi modem to connect to desired network request access and connect to server send receive data to server and schedule tasks 2 Product Overview Ko...
Страница 4: ...ol mobile tower infrastructure POS water and electric meters heavy equipment medical devices vending machines vehicles and more 3 Technical Specification 1 Sl No Particular 1 4 Analog inputs with inpu...
Страница 5: ...voltage is 5V put the corresponding jumper at 5V side to get optimum resolution If maximum voltage is 12V put the corresponding jumper at 12V side Please note that the input voltage in the port shoul...
Страница 6: ...gramming PC Interface USB programming cable between device and PC It may show as unknown device in device manager Right click on the device and select Update Driver Software You may select Browse my c...
Страница 7: ...erated a COM port will be assigned It may show as AT91 UAB to Serial Converter COMx Start SAM BA utility Select correct COM port select the board as samd21_xplained_pro Click Connect Figure 7 Select t...
Страница 8: ...rogram 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 th...
Страница 9: ...eceive_tcp_data at_close_server 4 GPIO Operations app_config_konnect_ports app_read_input_port_curr app_read_input_port_stats app_set_output_port 5 UART Operations app_config_ext_com_port app_read_com...
Страница 10: ...Crevavi Confidential Page 10 of 25 Document Template V1 1 jwArr_bool jwArr_null jwArr_object jwArr_array jwEnd jwObj_raw jwArr_raw...
Страница 11: ...ag is low Example Check if AP is already connected if check_konnect_status STATUS_AP_CONNECTED TRUE It is connected to Crevavi_AP you can connect to server now 1 2 2 Wi Fi Connection Operations Name a...
Страница 12: ...now you can try to connect if at_join_access_point ap_string password PASS It is connected to Crevavi_AP you can connect to server now 1 2 3 TCP Operations Name at_tcp_connect at_connect_to_server at_...
Страница 13: ...unsigned int Length of data read from server at_close_server Returns unsigned character 1 If disconnection is successful 0 if failed to disconnect or already disconnected Example unsigned char ap_stri...
Страница 14: ...tal_in_port_conf dinx_conf 4 analog_out_port_conf doutx_conf 2 Where analog_in_port_conf contains unsigned char enable unsigned char sampling_interval interval in multiple of 1 024ms unsigned char sam...
Страница 15: ...on analog data port1 read You have current ADC reading Do business logic if port_data din_curr 2 HIGH Performing a check on digital data port3 read You have current 1 0 status of digital port Do busin...
Страница 16: ...unsigned char state Purpose Sets the desired output port status to Low High as per input The port must be enabled using app_config_konnect_portsbefore executing this command Input parameters unsigned...
Страница 17: ...g baud_rate BAUD_9600 com_port_config data_bits DATA_BITS_8 com_port_config parity PARITY_NONE com_port_config stop_bits STOP_BITS_1 app_config_ext_com_port com_port_config 1 2 5 2 Read Data from COM...
Страница 18: ...ake the callback function as blocking one I case of a blocked function the other scheduled function calls also will get blocked till the block is removed Maximum 10 such callbacks can be scheduled Inp...
Страница 19: ...tr unsigned char destStr Pointer to the Source and Destination Strings strCopyLen unsigned char destStr const unsigned char sourceStr unsigned int len Pointer to Destination Source string and length o...
Страница 20: ...ions Names mqtt_connect mqtt_disconnect mqtt_publish mqtt_subscribe mqtt_display_message Purpose mqtt_connect Connects to the MQTT server mqtt_disconnect Disconnects from MQTT server mqtt_publish Publ...
Страница 21: ...ions Names modbus_send_data modbus_query ModRTU_CRC Purpose modbus_send_data Sending data using RS485 modbus_query Receiving data from RS485 ModRTU_CRC Computes Cyclic Redundancy Check Input parameter...
Страница 22: ...key value pairs into an object jwObj_int Object insertion function for integer Used to insert key value pairs into an object jwObj_double Object insertion function for double Used to insert key value...
Страница 23: ...eters jwOpen char buffer unsigned int buflen enum jwNodeType rootType int isPretty Pointer to Buffer and buffer length rootType is the base JSON type JW_OBJECT or JW_ARRAY isPretty controls prettifyin...
Страница 24: ...wArr_string void No return value jwArr_int void No return value jwArr_double void No return value jwArr_bool void No return value jwArr_null void No return value jwArr_object void No return value jwAr...
Страница 25: ...address of the Server 4 port_no Port no of the Server 5 device_mac_address Machine ID of the device this is preferable to be unique for each device In future version of software this parameter will be...