LoRaWAN allows long-distance communication, allowing IoT devices to communicate with network servers over long distances, making it suitable for scenarios such as smart cities, agriculture, and industrial automation.
ChirpStack and TTN (The Things Network) are two LoRaWAN-related platforms used to build and manage LoRaWAN networks.
ChirpStack is an open source LoRaWAN network server solution. It provides a complete LoRaWAN network stack, including network server, application server and device terminal stack. Using ChirpStack, users can build and manage their own LoRaWAN network to achieve remote communication and management of IoT devices.
Function: ChirpStack supports LoRaWAN frequency bands in multiple regions, and provides device registration, activation, data uplink and downlink functions. It also provides a management interface for devices and applications, allowing users to effectively monitor and control devices connected to the LoRaWAN network.
TTN is a global, community-driven LoRaWAN network service. TTN provides an open, free LoRaWAN network that allows users to connect IoT devices and transmit data. TTN's network covers many regions around the world and is provided and maintained by community members.
Community-driven: TTN relies on a community of volunteers whose members contribute gateway equipment, extending the network’s reach. Users can register and connect their devices to the TTN network for low-power, long-distance LoRaWAN communication.
In general, both ChirpStack and TTN provide LoRaWAN network services, but ChirpStack focuses more on open source and user-owned networks, while TTN provides a global LoRaWAN network in a community-driven manner. Choosing which platform to use often depends on the user's needs, network size, and preference for autonomous management.
The communication protocol between LoRaWAN gateway and ChirpStack (formerly known as LoRaServer) server is based on ChirpStack
Web server implementation and interface specification. ChirpStack is an open source LoRaWAN network server for managing and processing LoRaWAN devices and data.
In the LoRaWAN network, the communication protocol between the gateway and the ChirpStack server usually includes the following aspects: 1. Packet Forwarder protocol:
○ LoRaWAN gateway uses Packet Forwarder protocol to communicate with ChirpStack server.
Modem & DTU sale . As a China Lorawan gateway Manufacturer and Lorawan node modules Factory, CDEBYTE focuses on providing wholesale Lorawan gateway and Lorawan node modules. Supports standard LoRaWAN network protocols, and access to standard LoRaWAN servers such as TTN, Tencent, and open-source chip stack. The instructions are simply configured to access the standard LoraWan In the network, it's a great choice for current IoT applications.

○ Packet Forwarder is an open source software responsible for forwarding LoRaWAN packets between gateway and network server.
○ The gateway sends the received LoRaWAN data packet to the ChirpStack server through the Packet Forwarder, and receives the ChirpStack server
The downlink data sent.
2. Gateway Bridge protocol:
The ChirpStack server provides the Gateway Bridge component for communicating with the gateway.
LoRaWAN Tutorial - Building a ChirpStack Server
○ Gateway Bridge implements the communication interface with Packet Forwarder and provides an interactive interface with ChirpStack server.
○ Gateway Bridge can use different protocols, such as UDP, MQTT, etc., to communicate with Packet Forwarder.
3. LoRaWAN protocol:
○ The data exchange between the gateway and the ChirpStack server follows the specification of the LoRaWAN protocol.
The gateway forwards the received uplink data packet of the terminal device to the ChirpStack server, and forwards the downlink data packet sent by the ChirpStack server
forwarded to the terminal device.
The format and processing of data packets follow the rules defined by the LoRaWAN protocol.
It should be noted that the ChirpStack server provides flexible configuration options, and different communication protocols and interfaces can be selected according to specific needs. Therefore, specific communication protocols and interface details may vary depending on the configuration and deployment of ChirpStack servers. In actual application, you need to refer to the documents and specifications of the ChirpStack server to understand the exact protocol and interface requirements.
To sum up, the communication protocol between LoRaWAN gateway and ChirpStack server involves Packet Forwarder protocol,
Gateway Bridge protocol and LoRaWAN protocol. Packet Forwarder is responsible for forwarding LoRaWAN data packets between the gateway and the server, Gateway Bridge provides a communication interface with the gateway, and the LoRaWAN protocol defines the format and processing rules of data packets
but. The specific protocol and interface selection should be determined according to the configuration and requirements of the ChirpStack server.
Communication steps
LoRaWAN (Low Power Wide Area Network) is a wireless communication protocol used to connect IoT devices to network servers. TTN (The Things Network) is an open, distributed network server based on the LoRaWAN protocol. When the device communicates with the TTN network through the LoRaWAN protocol, the following protocol and interaction process will be followed between them:
1. Activation: Before a device can connect to the TTN network, it needs to complete the activation process. LoRaWAN provides two activation methods:
ABP (Activation By Personalization) and OTAA (Over The Air Activation). The ABP activation method needs to be on the device and the network.
The key is pre-shared between the servers, and the OTAA activation method completes the activation process through the dynamic interaction between the device and the network server.
2. Join Request (Join Request): In OTAA activation mode, the device will send a Join Request message to the TTN network server to request to join
enter. The message includes information such as the device's unique identifier (DevEUI), application identifier (AppEUI), and device key (AppKey).
3. Join Accept (Join Confirmation): After receiving the Join Request message from the device, the TTN network server will send a Join Accept message as confirmation.
Acknowledge the reply. The Join Accept message contains information such as the device's network session key (NwkSKey) and application session key (AppSKey).
4. Data Communication (data communication): Once the device successfully joins the TTN network, it can send data to the network service through the uplink server, and can also receive data from a web server via the downlink. Data communication uses the MAC layer protocol defined in LoRaWAN, through data Messages and acknowledgments interact. Data messages may contain sensor data, control instructions, etc. of the device.
5. Security (Security): The LoRaWAN protocol provides a security protection mechanism, including message integrity verification, message encryption, and device authentication.
Communications between the device and the web server are protected using encryption keys to ensure data confidentiality and integrity.
In summary, the protocol between LoRaWAN and TTN involves aspects such as device activation, join request and confirmation, data communication and security.noodle. Through these protocols and interactions, LoRaWAN devices can communicate reliably with TTN network servers and implement IoT applications connection and data exchange.
Hardware and software
The protocol between LoRaWAN gateway and TTN (The Things Network) involves two main aspects: physical layer communication and protocol layer communication.
1. Physical layer communication:
LoRa Modem Communication: LoRaWAN gateway uses LoRa modem to communicate with end devices.
LoRa modem usage
LoRa modulation technology transmits data over a wireless channel.Channel selection between gateways and terminal devices: LoRaWAN gateways and terminal devices need to negotiate and select communication channels to ensure that they are in the same communicate on the frequency.
2. Protocol layer communication
Receive terminal device data: The LoRaWAN gateway receives LoRaWAN data packets from the terminal device through the LoRa modem.
Parsing and forwarding data: The gateway uses the LoRaWAN protocol to parse the received data packets and extract valid information (such as DevEUI,
AppEUI, AppKey, etc.) and forwarded to the TTN server.
Communication between the gateway and the TTN server: the gateway uses the protocol defined by TTN to communicate with the TTN server, including transmitting data packets, sending
Prepare information and receive downlink data, etc.
Data packet transmission: the gateway forwards the received terminal device data packets to the TTN server for subsequent processing and application.
It should be noted that the communication protocol between the LoRaWAN gateway and TTN is specific to the implementation of the TTN network, because different LoRaWAN network servers may have different communication protocols and interface specifications. Therefore, the specific protocol details and interaction methods may vary depending on the
Varies by web server.
To sum up, the protocol between LoRaWAN gateway and TTN includes physical layer communication and protocol layer communication. Physical layer communication involves LoRa modem and channel selection, while protocol layer communication involves receiving, parsing and forwarding of data packets, and communication between gateway and TTN server communication protocols and data transmission.