UG65 Custom Profile Template

This topic describes how to create a custom Profile template for UG65.

Background information

A Profile template contains both Basic Settings and Advanced Settings. Basic settings can edited with the visual interface provided by Milesight Development Platform, while the advanced settings can ONLY be edited in JSON format.

Follow the workflow below to create and apply a custom Profile template:

  1. Create a custom Profile template on Milesight Development Platform.
  2. Configure the basic settings with the visual interface.
  3. Configure the advanced settings in the JSON format.
  4. Save and apply the custom Profile template accordingly.

Step 1. Create a custom Profile template

  1. Log in to Milesight Development Platform.
  2. On the top bar, click Device, then select the Custom Profile Template tab.

  3. Click Add.
  4. In the Basic Configuration section, configure the basic information:

    1. In the Profile Template Name field, specify a name to help you identify this template.
    2. In the Select Product Profile Template field, search and select UG65_Profile_Template.
    3. In the Profile Template Version drop-down list, select the version of the Profile template.

Step 2. Configure the connecting platform

  1. Select the Generic Configuration tab.
  2. In the Device Management Connections section, decide whether to connect the device to Milesight platform for remote management and configuration.
    Connect the device to Milesight Development Platform
    Retain the default settings.

    Connect the device to Milesight DeviceHub
    1. In the Connecting Platforms field, select DeviceHub 2.0.
    2. In the Milesight DeviceHub Server Address field, enter the server address of the Milesight DeviceHub.
    Do NOT connect to Milesight platform
    Uncheck the Platform Connection.

Step 3. Configure the LoRa RF Channel Setting

  1. Select the Basic Configuration tab, then go to the LoRa RF Channel Setting section.

  2. In the LoRa RF Channel Setting section, select the frequency of the device. The LoRaWAN® frequency plan used for the uplink and downlink frequencies and datarates. Available options depend on the gateway's model:

    -470M: CN470

    -868M: EU868, RU864, IN865

    -915M: US915, AU915, KR920, AS923-1&2&3&4

Step 4. Configure the Packet Forward settings

UG65 can serve as a packet forwarder to facilitate communication between LoRaWAN® end devices and the network server.

  1. In the Type drop-down list, specify the packet forward type and configure the settings accordingly

    Type Settings
    Embedded NS Connect to gateway embedded network server.
    Semtech Connect network server through the Semtech UDP protocol,which supports connecting to most mainstream network servers.
    • Server Address: Specify the LoRaWAN® server address.
    • Port UP: The UDP port to forward uplinks from end device to network server.
    • Port Down: The UDP port to forward downlinks from network server to end device.
    Basics Station
    Connect network server through Basic Station TCP protocol.
    Note: You only need to set up the LNS URI or CUPS URI. In this case, we take LNS URI as an example.
    • LNS URI: The URI of LoRaWAN® network server. Enter the URI as below format and replace <server-address> and <port> as YOUR server address and server port:

      wss://<server-address>:<port> or ws://<server-address>:<port>

    • CA File(*.trust): Upload the CA certificate to secure the server domain.
    • Client Certificate File(*.crt): Upload the client certificate file to verify the identity of the gateway.
    • Client Key File(*.key): Upload the private key file to verify the identity of the gateway.
    Chirpstack-Generic Connect to Chirpstack v3 via generic MQTT gateway bridge.
    • Server Address: Specify the LoRaWAN® network server IP address or domain.
    • MQTT Port: Specify the LoRaWAN® network server port.
    • User Credentials: After enabled, username and password are required to type for verification.
    • TLS Authorization Enable: Decide whether to enable TLS authorization. When enabled, you need to specify the type of TLS certificates.
      • CA signed server certificate: verify with the certificate issued by Certificate Authority (CA) that pre-loaded on the device.
      • Self signed certificates: upload the custom CA certificates, client certificates and secret key for verification.
    Chirpstack-V4 Connect to Chirpstack v4 via generic MQTT gateway bridge.
    • Server Address: Specify the LoRaWAN® network server IP address or domain.
    • MQTT Port: Specify the LoRaWAN® network server port.
    • User Credentials: After enabled, username and password are required to type for verification.
    • TLS Authorization Enable: Decide whether to enable TLS authorization. When enabled, you need to specify the type of TLS certificates.
      • CA signed server certificate: verify with the certificate issued by Certificate Authority (CA) that pre-loaded on the device.
      • Self signed certificates: upload the custom CA certificates, client certificates and secret key for verification.
    Remote Embedded NS

    Connect embedded network server of Milesight UG65/UG67/UG56 gateways.

    Server Address: Specify the IP address or domain name of Milesight controller gateway.

    MQTT Port: Specify the communication port to Milesight controller gateway.

    Milesight Development Platform LNS Connect Milesight Development Platform LNS. This needs to select and enable Milesight Development Platform option on System > Device Management > Management Platform page and add the gateway to your platform account.
    Everynet Connect to Everynet network server.
    • Username(RAN): Specifiy the username of your network server account.
    • Password(RAN): Specifiy the password of your network server account.
    • Region: Specifiy the region of your network server account.
    • Band: Specifiy the LoRaWAN® frequency plan.
    Loriot Connect Loriot network server through the Loriot packet forwarder.
    Note: this option only works old hardwares. If there is not this option, please select Semtech or Basic Station option to connect Loriot network server.
    • Server Address: Specify the Loriot LoRaWAN® server address.
    • Port UP: The UDP port to forward uplinks from end device to network server.
    • Port Down: The UDP port to forward downlinks from network server to end device.

Step 5. Configure the Packet Forward Filters

In the Packet Forward Filters section, filter uplink packets via different conditions to reduce network congestion, save network traffic and ensure the safety operations.

  1. Select the filter mode as black list or white list.

    Setting Description
    NetID Filtering Mode Forward/Not forward the uplink packets that meet the NetID.
    • White List: Only forward the packets in this list to the network server.
    • Black List: Only forward the packets except this list to the network server
    JoinEui Filtering Mode Forward/Not forward the join request packets that meet the JoinEUI range.
    • White List: Only forward the packets in this list to the network server.
    • Black List: Only forward the packets except this list to the network server
    DevEUI Filtering Mode

    Forward/Not forward the join request packets that meet the DevEUI range.

    • White List: Only forward the packets in this list to the network server.
    • Black List: Only forward the packets except this list to the network server
  2. Set the specific filtering value or range list. Every condition supports to add 5 lists at most.

Step 6. Configure the LoRa Beacon

In the LoRa Beacon section, select the beacon period and specify the beacon time offset of the device.

The Beacon Period is the interval of gateway sending beacons for Class B device time synchronization. 0 means the gateway will not send beacons. Please select the value as 128 if end device type is Class B.

Step 7. Configure the Link Failover

UG65 supports to set the priorities of three network links.
Note:
  • Cellular interface is only supported for cellular version. Please check PN of device on the label to confirm if this gateway supports cellular feature.
  • WLAN interface is only supported when work mode of WLAN is Client.
  1. In the Link Failover section, select the main interface.

  2. Select the secondary interface.

Step 8. Configure the Ethernet

UG65 supports to connect Ethernet port to a router to get network access. In the Ethernet section, specify the WAN information.

  1. In the Ethernet section, select the connection type.
    • Static IP: assign a static IP address, netmask and gateway for Ethernet WAN port.
    • DHCP Client: configure Ethernet WAN interface as DHCP Client to obtain IP address automatically.
    • PPPoE: configure Ethernet WAN interface as PPPoE client.

  2. Specify the Ethernet settings according to the connection type.
    Setting Description
    DHCP Client Use Peer DNS: Obtain DNS from DHCP server.
    Static IP IP Address: Set the IPv4 address of the Ethernet port.
    Netmask: Set the Netmask for Ethernet port.
    Gateway: Set the gateway for Ethernet port's IPv4 address.
    PPPoE Username: Set the username provided by your Internet Service Provider (ISP).
    Password: Set the password provided by your Internet Service Provider (ISP).
    Link Detection Interval: Set the heartbeat interval for link detection.
    Max Retries: Set the maximum retry times after it fails to dial up.
    Use Peer DNS: Obtain DNS from the Internet Service Provider (ISP).
    Other Settings Primary DNS Server: Set the primary IPv4 DNS server.
    Secondary DNS Server: Set the secondary IPv4 DNS server.
    MTU: Set the maximum transmission unit.
    NAT: Enable or disable NAT function. When enabled, a private IP can be translated to a public IP.

Step 9. Configure the Cellular

The device supports to insert a SIM card to get cellular network connections. In the Cellular section, specify the cellular information.

Setting Description
APN

Specify the Access Point Name for cellular dial-up connection provided by local ISP. Please contact cellular operator or search for the Internet to get it.

Username

Specify the username for cellular dial-up connection provided by local ISP.

Password Specify the password for cellular dial-up connection provided by local ISP.
Authorization Type

Select from None, PAP and CHAP.

PIN Code

Specify a 4-8 characters PIN code to unlock the SIM.

Step 10. Configure the WLAN

In the WLAN section, specify the WLAN information. The WLAN works as AP mode to configure device or works as Client mode to connect to other access points.

  1. Click to enable Wi-Fi feature.

  2. Select the work mode as AP or Client.

  3. Specify the information of the Wi-Fi feature when work mode is AP.

    1. Enable or disable the SSID Braodcast as required. If disabled, this AP can not be found directly.
    2. Specify the SSID as needed. The unique name for this device Wi-Fi access point. The default SSID is Gateway_xxxxxx. (xxxxxx is the last 6 digits of MAC address.)
    3. Specify the Encryption Mode.
    4. Specify the Key. The default key is iotpassword.
  4. Specify the information of the Wi-Fi feature when work mode is Client.

    1. Specify the SSID of Wi-Fi access point.
    2. Specify the BSSID of Wi-Fi access point. (Optional)
    3. Specify the Encryption Mode of Wi-Fi access point..
    4. Specify the Key of Wi-Fi access point..

Step 11. Configure the User Management

In the User Management section, you can specify the user name and a new password of the device.

Step 12. Configure the Time

In the Time section, specify the time settings of the device.

  1. Specify the Time Zone you are in.
  2. Show the Time Synchronization Type as Sync with NTP Server or Set up Manually.
    • Sync with NTP Server: Specify the NTP Server's IP address or domain name.
    • Set up Manually: Specify the date and time directly.

Step 13. Save the custom Profile template

  1. On the left-bottom of the page, click Save.
  2. Apply the custom Profile template according to the operation method.
    • Web page: Select the Profile template when adding devices.
    • API: Do as follow:
      1. In the Operation column, click to download the Profile in JSON.

      2. Include the entire JSON in the API request of Add a Device.