KKM KG04 USB Gateway User Guide

June 13, 2024
KKM

KKM KG04 USB Gateway

Product name USB Gateway
Model KG04
Version V1.1
Release date 2023-06-10

Download KGateway APP

  • Download the App ‘KGateway’ from iOS App Store or Android Google Play or scan the QR code below to down the App.

KKM-KG04-USB-Gateway-fig-1

Minimum requirements

  • Android version > 10.0, IOS version > 13.0
  • Reminder: This instruction uses Android App to demonstrate. The iOS App interface is slightly different from Android App.

LED Flashing Instruction

Status Description
Red light flashes rapidly The device enters the network configuration state.
Red light flashes slowly The device has successfully connected to Wi-Fi and

is trying to connect to the server.
The red light remains on| The device is connected to Wi-Fi.
A blue light remains on| The device connects to the cloud server successfully.

Network Provision

The KG04 gateway can be connected to the network through KGateway APP. There is no limit to the number of network configuration gateway, as long as the gateways are configured in the same Wi-Fi LAN network.

KKM-KG04-USB-Gateway-fig-2

  1. Ensure that the KG04 device enters configuration mode.
  2. Connect the mobile phone to a 2.4G Wi-Fi, open the KGateway APP and click “+” to enter the configuration mode.
  3. Select the 2.4G Wi-Fi network where the phone is located, enter the Wi-Fi password, and request network configuration. The gateway device uses the acquired Wi-Fi name and password (ie. SSID/ password/token) to connect to the router.

Setup flowchart

  • we using kkm_guest Wi-Fi as an example:

KKM-KG04-USB-Gateway-fig-3

The detailed setup process is as follows:

Enter Configuration Mode

  • Please make sure your gateway is plugged into the USB slot and powered on.
  • After pressing the button on the gateway, the gateway flashes a red light to enter the configuration mode.

Provision Wi-Fi

  • Click the “+” and then click the “Go to Wi-Fi Setting” to connect Wi-Fi. Please note that Wi-Fi must include the 2.4GHz frequency. Enter the password for Wi-Fi and click “Next”.

Kindly note

  • In order to scan the SSID information of Wi-Fi router, please allow the APP to acquire the location information of the phone.

KKM-KG04-USB-Gateway-fig-4 KKM-KG04-USB-Gateway-
fig-5

  • After connecting to Wi-Fi successfully, the provisioned gateway list will appear. Please select the gateway to configure based on its MAC address and then you will enter the parameter configuration page.

KKM-KG04-USB-Gateway-fig-6

Trouble Shooting

The APP cannot detect the Wi-Fi connected to the mobile phone.

  • Please grant the app permission to access the phone location.

The APP cannot scan the Wi-Fi signal of KG04.
Because the APP needs to call the Wi-Fi scanning function of the OS system, and sometimes the APP cannot scan the Wi-Fi signal of KG04 due to various reasons. At this time, the following suggestions are suggested:

  • Make sure you phone connect to 2.4G Wi-Fi not 5G Wi-Fi.
  • Press the button of KG04 to re-enter the configuration mode. Exit the KGateway APP, and then enter the APP again.
  • Turn off the Wi-Fi of the mobile phone, and then turn on the Wi-Fi. Then restart the KGateway APP to try again.
  • If it still doesn’t work, try to replace another Android phone or iOS phone.

Services Provision
KKM gateway currently supports the use of MQTT and HTTP protocol to communicate with local or Internet servers. Users can choose the desired protocol based on your server architecture.

MQTT Configuration
KG04 gateway supports the use of MQTT protocol to communicate with local or internet servers. The KG04 is connected to the KKM’s service by default when it leaves the factory. When using MQTT access, the KG04 gateway supports the function of regularly uploading BLE data and remote command control. The MQTT server configuration is as follows:

Basic Parameters

KKM-KG04-USB-Gateway-fig-7

Parameters Defaults Description
Host address api.ieasygroup.com The MQTT cloud address.
MQTT port 61613
Client ID mac address of the kg04 MQTT client ID
Name test MQTT client user name
Password test password MQTT client password
Qos Qos0 Qos0: Best effort for the MQTT report

Qos 1: The message will be sent to ensure that it can be

Parameters Defaults Description
Host address api.ieasygroup.com The MQTT cloud address.
MQTT port 61613
Client ID mac address of the kg04 MQTT client ID
Name test MQTT client user name
Password test password MQTT client password
Qos Qos0 Qos0: Best effort for the MQTT report

Qos 1: The message will be sent to ensure that it can be

MQTT with SSL

  • KG04 supports the following SSL methods:
  • SSL with CA certificate
  • The gateway needs to verify the server’s CA certificate. At this point, you need to deliver the server’s CA certificate to the gateway.
  • SSL with self signed certificate
  • Except the gateway needs to verify the server’s CA certificate. Your server also needs to verify the CA certificate on the gateway side.
  • SSL without certificate
  • The gateway and the server use SSL encrypted communication, but the gateway does not verify the CA certificate of the server, and there is a possibility of middle attach in this way.

How to upload the certificate to the gateway

  • When you choose to use certificate-based SSL, the APP will add a menu item for you to choose to upload a certificate. Click the menu to enter the upload certificate page.
  • When entering the upload certificate page, you can choose to copy the certificate into the text box, or you can choose to download the certificate from the specified URL. Then click upload to upload the certificate to the gateway.

KKM-KG04-USB-Gateway-fig-9

HTTP Configuration

  • The HTTP protocol adopts a request/response model.
  • The client sends a request message to the server, and the request message contains the requested method, URL, protocol version, request header, and request data.
  • The server responds with a status line containing the protocol version, success or error code, server information, response headers, and response data.

Basic Parameters

KKM-KG04-USB-Gateway-fig-10

Parameters Defaults Description
URL address http://api.ieasygroup.com:8091/postdata URL of the HTTP server
HTTP     Basic authentication ****

no

| ****

yes or no

Name| Authentication username| HTTP Basic Authentication
password| Authentication password| HTTP Basic Authentication


Upload interval

| ****

1

| KGateway uses this parameter to control the upload period of modified advertisement data of KBeacon to the Cloud.

HTTP with SSL

  • When using HTTP access, the HTTPS protocol is supported. Please make sure the URL address is begin with “https://”, then you can chose with SSL type for HTTPS.
  • The SSL configuration in HTTP mode is the same as the SSL configuration in MQTT mode, so please refer to section 4.1.2.

BLE Data Collection

Scan Settings

  • After the gateway is power on, it will continue to scan BLE advertisement data, and if the network is available, it will send data to the connected server. App operation is as follows:
Parameters Defaults Description
Scan interval 100ms Bluetooth scan interval

Scan duration

|

100ms

| Bluetooth scan windows.

The scan window parameter should not be larger than the scan interval. When the two parameters are equal, the scan duty cycle can reach 100%.

Reducing the scan window can help improve Wi-Fi performance.

KKM-KG04-USB-Gateway-fig-12

BLE Filter Parameters

KKM-KG04-USB-Gateway-fig-13

Parameters Defaults Description


Filter RSSI

| ****


-100

| When the received broadcast message signal is smaller than the filter value, the message will be discarded.

For example, when this parameters set to -67, weak signals below

-67 will not be uploaded to the server.


Mac List

| ****

NA

| You can scan the Mac address of the beacon device QR code for

filtering, and the maximum scanning limit is 15 Mac addresses.



Mac RegEx

| ****


NA

| Regular expression for BLE MAC address.

For example, if you only want to receive BLE MAC starting with BC5729, the regular expression is: ^BC5729* (Note: the gateway can only recognize uppercase raw data strings).



Raw data

| ****


NA

| Regular expression for BLE raw data.

For example, if you only want to receive BLE raw data starting with 020106, the expression is:^020106*   (Note: the gateway can only recognize uppercase raw data strings).

Cache BLE Data

  • Considering that the network connection may be unstable sometimes, KG04 has the function of Cache message. When sending data to the cloud fails, KG04 will cache the message to local buffer. It can cache up to 1000 BLE broadcast messages. When the network recovers, KG04 will report the cached message.
  • If the cached broadcast messages exceed 1000, the oldest message will be deleted.

Time Parameters

Parameters Defaults Description

NTP zone

| ****

UTC-0

| When KG04 uploads BLE message data to the server, it will carry a timestamp. The time zone of the timestamp can be configured through this parameter.
NTP server| pool.ntp.org| NTP time server

Apply Configuration

  • When all the configuration information is filled in, click the “COMPLETE” option, and “Reboot device” dialog appears. After clicking “OK”, the gateway will automatically restart and the green light will flash.

KKM-KG04-USB-Gateway-fig-15

Other settings

Device Lists

  • After the gateway is successfully configured, the APP will automatically save the gateway information (IP address, MAC, etc.) to the APP, so that if you want to modify the services data of the gateway, you do not need to perform network provisioning.
  • After opening the APP, the APP will periodically send hello messages to the gateway. If the gateway responds successfully, the status bar of the gateway will turn green, indicating that you can directly configure the gateway.

Kindly note

  • Please ensure that the mobile phone and the gateway are in the same network segment (under the same Wi-Fi router), otherwise the APP may not be able to connect to the gateway.

Device Settings

  • If the network between the APP and the gateway is connected, click on the device to enter the configuration page. If you want to modify the configuration data again, you can modify the data by clicking “Device setting”.

KKM-KG04-USB-Gateway-fig-17

Gateway IP Address

  • Sometimes, the IP address assigned to the gateway by the router may change, and at this time, the app will not be able to monitor the status of the gateway and modify the configuration. At this point you only need to modify it according to the actual IP address of the gateway.
  • Select a KGateway which you want to modify parameters. Click “IP Address” to modify the IP address, and then click “Save”.

KKM-KG04-USB-Gateway-fig-18

Firmware Update

  • Click the “Firmware update”, the APP will automatically check from the server whether there is the latest firmware that needs to be upgraded. If the latest firmware is found, it will prompt you if you need to upgrade.

KKM-KG04-USB-Gateway-fig-19

Remove Device

  • If you want to remove the gateway information on the app, please click “Remove Device”. And the information of the gateway will be deleted on the APP. Remove the device information from the APP will not cause any changes to the configuration data on the gateway.

KKM-KG04-USB-Gateway-fig-20

Reset Configuration

  • After plugging the KGateway and powering on, press the button for 10 seconds. The gateway flashes red, indicating successful factory reset.

Declaration

Statement of Rights

  • The contents of this manual belong to KKM Company Limited. Without the permission of the Company, no individual, organization, may modify, copy or use it for any commercial purpose. The Company reserves the right to pursue legal liability for the use of illegal means to obtain, reproduce or use the information in this manual.

Disclaimer

  • KKM team is not responsible for products developed independently by users without checking the product manual, instructions for use or technical specifications.
  • We reserve the right of final interpretation of the products, and are not responsible for any property or personal injury caused by improper operation.

FCC Statement

This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency
energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by
one or more of the following measures:

  • Reorient or relocate the receiving antenna.
  • Increase the separation between the equipment and receiver.
  • Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.
  • Consult the dealer or an experienced radio/TV technician for help.

Caution: Any changes or modi?cations to this device not explicitly approved by manufacturer could void your authority to operate this equipment.
This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions:

  1. This device may not cause harmful interference, and
  2. this device must accept any interference received, including interference that may cause undesired operation.

RF Exposure Information

  • The device has been evaluated to meet general RF exposure requirement.
  • The device can be used in portable exposure condition, compliance with exposure requirements.

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

KKM User Manuals

Related Manuals