KKM Co.Ltd KGateway(for KBeacon) Configuration KGateway(for KBeacon) Configuration Manual Revision History Version Date Change Description Author V1.0 2017/7/1 initial V1.1 2018/8/20 Add hidden Wi-Fi function Hogen V1.2 2018/12/1 Modify network architecture picture Hogen V1.3 2019/12/1 Add the Cellular info Hogen V1.31 2020/03/1 Add MQTT configuration example Hogen Copyright by KKM Inc.
KKM Co.Ltd KGateway(for KBeacon) Configuration Catalogue 1. Purpose .................................................................................................................................. 3 2. Introduction ................................................................................................................................... 3 3. External interface .......................................................................................................................... 4 3.
KKM Co.Ltd KGateway(for KBeacon) Configuration 1. Purpose This document describes the basic functions and physical interfaces of the KGateway, which are mainly used to guide users to install and configure. 2. Introduction The KGateway is made of PC material and is waterproof and dustproof. It supports outdoor installation and can be installed by wall mounting. After the KGateway power on, it will periodically scan the KBeacon advertisement packet then report the data through Wi-Fi or Ethernet.
KKM Co.Ltd API protocol KGateway(for KBeacon) Configuration • Wi-Fi • Wi-Fi hopping • 3G/4G USB Dongle(optional) • HTTPS • MQTT Installation way Screw Waterproof/Dustproof IP54 Size 173*90*40mm Material ABS 3. External interface 3.1 Network interface The KGateway supports following ways to connect to the internet: 1. through Wi-Fi; 2. through the Ethernet cable; 3. Though Cellular network (optional, only available when the LTE usb dongle was insert); 4.
KKM Co.Ltd KGateway(for KBeacon) Configuration 1. Red indicator light: If the red led flash, it means the gateway connect to the cloud fails. 2. Green indicator light: 2-seconds or less frequency flash: indicates that the KGateway is successfully connected to the cloud and report KBeacon advertisement packet success. 10-second frequency flash: indicating that the KGateway connect to the cloud success, but it didn’t find any KBeacon devices. 3.
KKM Co.Ltd KGateway(for KBeacon) Configuration As shown above, each base station has two interfaces with different IP addresses. One of these IP addresses (referred to as the WAN port) is used to connect to the internet network (MQTT server), which has a series of firewall rule protection. The other IP address (referred to as LAN port, also known as the intranet interface) is used for Wi-Fi hotspot broadcasting. WAN Port: This interface supports Wi-Fi and ETH (network wire).
KKM Co.Ltd KGateway(for KBeacon) Configuration The default Wi-Fi connection password is“12345678” The default KGateway configuration IP address is 192.168.8.1 Login in to the gateway by typing http://192.168.8.1 in the browser. 5. Enter the user name: ‘admin’ and password: ‘admin’ 4.2 Network interface 4.2.1 Configure WAN interface Tap on Network to go to the network configuration page. You can choose to connect to the internet network using Wi-Fi /Ethernet/Cellular connection.
KKM Co.Ltd KGateway(for KBeacon) Configuration 4.2.1.1 Connect to internet by Ethernet The IP address can be assigned in DHCP or static configuration. 4.2.1.2 Connect to internet by Wi-Fi Copyright by KKM Inc.
KKM Co.Ltd KGateway(for KBeacon) Configuration Click on “Nearby WLAN”, then you can see the Wi-Fi name and the signal strength (0~100). 100 means the signal is very strong. Connect to an hidden Wi-Fi AP: You can see some Wi-Fi name like mac address; it means that Wi-Fi was hidden. You should input the Wi-Fi name and password if you want to connect to it. If your Wi-Fi AP name does not appear in the nearby WLAN list, please try to reboot the KGateway.
KKM Co.Ltd KGateway(for KBeacon) Configuration 4.2.1.3 Connect to internet by Cellular Please make sure SIM card was insert into the KGateway. 4.2.2 View the WAN interface status 4.2.2.1 Ethernet status The AP MAC was also printed in the KGateway shell. WAN IP: The gateway IP address in WAN interface. Router IP: Your router IP address. UP time: How long the network interface was active. RX Bytes: received data from WAN interface. TX Bytes: sent data to WAN interface. Copyright by KKM Inc.
KKM Co.Ltd KGateway(for KBeacon) Configuration 4.2.2.2 Cellular status If the KGateway connect to internet by cellular, the cellular signal will show in this page. Very good signal: RSRP>-85dBm; Good signal: RSRP=-85~-95dBm; Middle signal: RSRP=-95~-105dBm; Pool signal: RSRP=-105~-115dBm; Very pool signal: RSRP<-115dB; 4.2.1 Configure KGateway Wi-Fi AP Check status about KGateway, you can change the AP LAN IP address. Copyright by KKM Inc.
KKM Co.Ltd KGateway(for KBeacon) Configuration 4.3 Service configuration Click Services to go to the service configuration page, where each field is defined as follows: 4.3.1 Advertisement Upload Parameters Click Services to go to the service configuration page, where each field is defined as follows: 1. Upload period: KGateway uses this parameter to control upload period of modified advertisement data about KBeacon to Cloud.
KKM Co.Ltd KGateway(for KBeacon) Configuration 3. Max Packet Size: This parameter is used to control max packet size when upload KBeacon advertisement data to KBeacon. 4. Rssi filter: If this parameter is set, the KGateway will only report the advertisement packet which signal is > Min Rssi value. 5. Ble Services filter: If this parameter is set, the KGateway will only report the advertisement packet which includes the setting BLE services ID.
KKM Co.Ltd KGateway(for KBeacon) Configuration advertisement. 11. Upload Unknown: hex string. ‘Yes’ means KGateway will report unknown advertisement that using 12. Include RSSI only: ‘Yes’ means KGateway will only report RSSI and not include advertisement content. This option will reduce the advertisement packet size. 4.3.2 MQTT without SSL configuration 1. Service Access: select MQTT and the KGateway will using MQTT protocol to connect to cloud server. 2. Url: the MQTT cloud address.
KKM Co.Ltd KGateway(for KBeacon) Configuration Qos is fixed to 0. 5. Username: mqtt client user name 6. User Password: mqtt client password 7. Publish Topic: The status of the status release message, the status of the gateway scanning to each label, published through this topic. 8. Publish Action: The response message of the gateway to the MQTT server, such as pictures and new response messages, is published through this topic. 9.
KKM Co.Ltd KGateway(for KBeacon) Configuration MQTT URL address and MQTT port. Our test MQTT server SSL port is 8883. 3. Client ID: Mqtt client id 4. Qos: MQTT qos value for publish action and subscribe action topic. The publish Topic Qos is fixed to 0. 5. Username: mqtt client user name 6. User Password: mqtt client password SSL Parameters, the KGateway support self-signed certificates MQTT access. 7.
KKM Co.
KKM Co.
KKM Co.Ltd KGateway(for KBeacon) Configuration Also the KGateway can support simple password that connect to clouds. 4.4 Modifying the Web Portal Login Password The default login password is “root” and users can change it to other password. 5. Quickly verify KGateway API In order for customer easily integrates our gateway, KKM provides test servers for HTTP Copyright by KKM Inc.
KKM Co.Ltd KGateway(for KBeacon) Configuration and MQTT. 5.1 How to verify HTTP API 1. The gateway is setting to MQTT server by default after factory. So please reference section<< 4.3.4 HTTP configuration>> to change the service’s type. 2. KKM provides a test HTTP server, and the address is: http://api.ieasygroup.com:8091/postdata 3. After KGateway connect to the HTTP service success, it will flash green LED and periodically post the KBeacon advertisement data to HTTP server. 4.
KKM Co.Ltd KGateway(for KBeacon) Configuration 6.1.1.1 Step1: Check if the network connection is normal Check if the network type is right. Check the network status: If Gateway connects network success, it will get the IP address and DNS IP address. Also the RX Bytes and TX Bytes will increase. 6.1.1.2 Step2: Check the connection between KGateway and cloud server Scenario 1: The KGateway and Server are deployed in the same LAN Copyright by KKM Inc.
KKM Co.Ltd KGateway(for KBeacon) Configuration It is necessary to ensure that the base station and server are in the same network, that is, the assigned IP address is in the same network. For example, if the IP address of the MQTT server is 192.168.3.127, the base station 1 can be configured as the following address (192.168.3.128). Try to using PING command detection KGateway on MQTT/HTTP server. The PING command is used to detect whether the base station and the MQTT server network are connected.
KKM Co.Ltd KGateway(for KBeacon) Configuration Assuming that the IP address of the router is 192.168.3.1, the IP address of the base station can be configured as 192.168.3.128. KKM MQTT server information: Address: api.ieasygroup.com:61613 Test user name: kkmtest password: testpassword Copyright by KKM Inc.
KKM Co.Ltd KGateway(for KBeacon) Configuration Wait 30 seconds to 1 minute after saving the settings. If the base station flashes green light, the network connection between the base station and the cloud is normal. If it still flash red LED, the network connection between KGateway and the Cloud maybe failed. 6.1.1.3 Check if the HTTP/MQTT server running normal Scenario 1: Using MQTT server Please refer to section 7.
KKM Co.Ltd KGateway(for KBeacon) Configuration 6.1.2 The Cellular signal was very pool If cellular signal < -110dBm, it means the LTE signal was pool. Please check like follow: Step1: Using iPhone to check your cellular provide signal. Input *3001#12345#* on the dial UI, then tap on call. Please check the rsrp0 signal. You can goto step2 if the iPhone’s signal was much bigger then KGateway showing. If it is almost same, please contact your cellular provider.
KKM Co.Ltd KGateway(for KBeacon) Configuration 7. Appendix1 Advertisement Upload Filter for different scenario KGateway supports a variety of filtering conditions to meet the filtering requirements in different scenarios. 7.1 Scenario 1: Only upload nearby beacon advertisement Sometimes we want the KGateway only report the KBeacon that nearby KGateway. For example, the Gateway is deployed on door, then we need the Gateway only report the beacons signal to clouds which is near the door.
KKM Co.Ltd KGateway(for KBeacon) Configuration Report to cloud Beacon1 1 meter Beacon3 Gateway Beacon2 Beacon4 Set the min RSSI filter to -59dBm. 7.2 Scenario 2: Reduce advertisement message to clouds Sometimes we may use third part MQTT hub to receive advertisement. Then we need to reduce the advertisement message number. Also some MQTT hub may limit the max MQTT message size.
KKM Co.Ltd KGateway(for KBeacon) Configuration 7.3 Scenario 3: Only upload specific MAC address to clouds The KBeacon default mac address starts with DD33. And the BLE mac address is reversed; it means the BLE mac address end with 33DD. We can set the BLE mac filter to 33DD$ to filter KBeacon device. The Gateway only report KBeacon advertisement packet to clouds. 7.
KKM Co.Ltd KGateway(for KBeacon) Configuration { "dmac": "51DC0EA4AE30", "refpower": -75, "uuid": "FB349B5F80000080001000003CFE0000", "majorID": "4115", "rssi": -80, "minorID": "077F", "type": 4, "time": "2019-09-02 09:47:42" }, { "dmac": "231824EA7DE0", "refpower": -59, "uuid": "7777772E6B6B6D636E2E636F6D000001", "majorID": "0001", "rssi": -64, "minorID": "0001", "type": 4, "time": "2019-09-02 09:47:43" } ], "gmac": "D03304002122" } 7.
KKM Co.Ltd KGateway(for KBeacon) Configuration }, { "dmac": "7996010A33DD", "advCnt": 13848450, "vbatt": 3113, "secCnt": 13917330, "temp": 26, "time": "2019-09-02 09:51:12", "rssi": -75, "type": 8 } ], "gmac": "D03304002122" } 7.6 Scenario 6: Filter advertisement packet by service ID The BLE advertisement packet can include Services ID. For example, the Eddystone beacon packet’s services ID is 0xFEAA. If we set the service id, then the KGateway will only report Google Eddystone packet. 7.
KKM Co.Ltd KGateway(for KBeacon) Configuration "dmac": "3636000A33DD", "data1": "", "type": 32, "time": "2019-09-02 09:22:22", "rssi": -59 }, { "dmac": "5055010A33DD", "data1": "", "type": 32, "time": "2019-09-02 09:22:23", "rssi": -44 }, { "dmac": "7355010A33DD", "data1": "", "type": 32, "time": "2019-09-02 09:22:25", "rssi": -45 }], "gmac": "D03304002122" } 8. Appendix2 Setup your own MQTT Server There is some third-party MQTT server software.
KKM Co.Ltd KGateway(for KBeacon) Configuration log_timestamp true log_timestamp_format %Y-%m-%dT%H:%M:%S websockets_log_level 0 4. Run mqtt server mosquitto -c mosquitto.conf 5. Verify mqtt server a. Subscribet all topic: we assume the username is test and the password is abcabc. mosquitto_sub -h localhost -p 61613 -t mqtt -u test -P abcabc b.
KKM Co.Ltd KGateway(for KBeacon) Configuration 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 Warning Statements: This equipment complies with FCC radiation exposure limits set forth for an uncontrolled environment.