[PR]
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
]
HTTP is essentially a TCP connection, but the protocol stipulates the use of port 80 and the format for sending commands or data, while TCP itself has no encryption function. The fatal thing is that during the data transmission process of HTTP, the data is transmitted in clear text. Since the data is not encrypted, it is easy for unsafe behaviors such as data eavesdropping, tampering or identity forgery to occur.
Is there any way to optimize it?
Since it is not safe to use plain text for data transmission, we can try to encrypt the data. For example, the communicating parties can agree on an algorithm that first encrypts the data to be sent according to certain rules,GPRS DTU and then decrypts it according to the same rules after the other party receives the message. This is the embodiment of symmetric encryption.
The so-called symmetric encryption means that the original text and the ciphertext can be encrypted and decrypted using the same key, that is, the same key can be used to encrypt the original text to obtain the ciphertext or to decrypt the ciphertext to obtain the original text. The advantage is that the encryption and decryption efficiency is high.
But there is a key point in using symmetric encryption, that is, the symmetric key. How to determine it? In HTTP requests, encryption key negotiation is still a difficult problem.
How does HTTPS ensure data security?
Data is encrypted during HTTPS data transmission. HTTPS uses symmetric encryption and asymmetric encryption, signature algorithms (signature algorithms are not used for encryption) and certificate mechanisms to process messages to achieve a safe and effective transmission.
HTTPS is based on the upper layer of HTTP and adds a security layer called TLS. Operations such as data encryption are processed in this security layer, and the bottom layer is still the HTTP of the application. HTTPS communication first uses asymmetric encryption to negotiate keys and negotiates a symmetric encryption key. Subsequent communications use this symmetric key for symmetric encryption ciphertext transmission. Because the algorithm of asymmetric encryption is extremely complex, the decryption efficiency is low, while the efficiency of symmetric encryption is significantly higher than a hundred times.
As we mentioned above, using the same key to encrypt and decrypt plaintext is symmetric encryption. So what about asymmetric encryption?
asymmetric encryption
Asymmetric encryption, that is, the original text encryption and the ciphertext encryption use two different keys, one is called the public key and the other is called the private key. Content encrypted using the public Industrial Router/Gateway key can be decrypted through the private key. Likewise, content encrypted using the private key can be decrypted using the public key. Public keys and private keys are relative. Generally speaking, the ones that are kept by oneself and cannot be disclosed to the public are called private keys, and the ones that can be released to the public are called public keys.
Asymmetric encryption uses different keys to encrypt and decrypt plaintext. However, we mentioned above that when using encryption, the difficulty lies in the key agreement process. So, how does HTTPS handle this key agreement process.
With the rapid development of the Internet of Things (IoT), integrating Bluetooth Low Energy (BLE) technology with cloud services has become an important part of realizing a comprehensive IoT solution. This article will take a deep dive into the integration of BLE with cloud services and how this integration enables smarter and more efficient IoT applications.
Integration advantages of BLE and cloud services
Data collection and storage: BLE sensors can collect environmental, health, safety, and other data, and send them to the cloud for storage and analysis. Cloud services provide large-capacity data storage, enabling users to access and analyze data anytime and anywhere.
Real-time monitoring: Combining BLE and cloud services, users can monitor sensor data in real-time. When data reaches a certain threshold, cloud services can send alerts to notify users, helping to take timely action.
Remote Control: BLE-connected devices can be remotely controlled through the cloud. Users can remotely control home appliances, Low-power wireless communication smart devices, etc. through cloud service applications.
Data analysis and insights: Cloud services provide powerful data analysis tools to help users extract valuable information from massive amounts of data and discover trends and patterns.
Flexibility: Cloud services make device deployment and management more flexible. Devices can be added, removed or updated at any time, while services in the cloud do not require large-scale physical deployment.
What is LORA?
Whenever someone asks me "what is LORA", if I don't know why he asked me this question, it is difficult for me to know how to answer his question, because LORA does not only refer to a thing, So I will let the editor of Chengdu Yibyte Electronic Technology Co., Ltd. answer this question for everyone. Technically speaking, LORA is a radio modulation scheme - a multi-symbol modulation radio signal using Chirp method; LORA technology also refers to systems that support modulation, including LORA chips and gateways; sometimes it refers to LORA communication networks in IoT applications. In essence, LORA chips are very cheap, but they have high acceptance sensitivity And low bit error rate (BER).
This means that in low-speed application scenarios, using LORA can get LoRaWAN farther than using other radio technologies of the same price. LoRaWAN is a media access control ( MAC) layer protocol, built using Semtech's LoRa modulation scheme (LoRa is just a physical layer protocol). However, LoRaWAN is rarely used in industrial (private network) application scenarios, it is more suitable for LoRa Wireless module public wide area networks because all channels are modulated to the same frequency ;For a private network, in order to avoid conflicts, it is best to have only one network running. The above picture is a network architecture diagram of LoRaWAN, all gateways in the network are bound to the same server, and the server decides which gateway should respond to the transmission. In a large In the network, any given transmission is usually detected by multiple receivers; then the server notifies a gateway to respond, and other gateways ignore the transmission.
This process helps to avoid conflicts between uplink and downlink, because only one gateway is transmitting, and overlapping A gateway can simply listen for other transmissions. What many people don't realize is that there is a way to use LoRaWAN's underlying technology (aka LoRa) without using LoRaWAN. LoRa module For example, Link Labs' Symphony Link in Semtech's A proprietary MAC layer is used on the chip, making it more suitable for enterprise and industrial customers who need to securely connect IoT devices to the cloud. In addition, there are many companies using LoRa chips in other protocols. From Answer "What is LoRa" at the technical level From a technical point of view, bluetooth Wireless Module is a unique modulation method. Semtech RF components (SX1272, SX1276/7/8 transceiver chips) integrate LoRa modulation technology (this technology is a proprietary modulation technology, currently Technical details have not been disclosed), the technology is called frequency modulation (FM) Chirp.
The core technology of LoRa is to use fractional phase-locked loop (PLL) to generate a stable Chirp signal. Other modulation formats include frequency shift keying (FSK), phase shift Keying (PSK), etc. It is important to note that LoRa itself does not describe system functionality above the physical (RF medium) layer. Let's first look at the Chirp signal (this word comes from the signal characteristics of the bird's call of the same name, and it can also be called frequency sweep for signal processing). The characteristic of Chirp is that the frequency of the signal changes with a certain rule, while the signal of FSK will only switch between two frequency points. The following figure is a linear Chirp signal time domain diagram. LoRa Internet of Things Protocol Semtech acquired the French Cycleo SAS for $5 million in 2012, thus obtaining LoRa wireless technology. The modem can filter the Chirp signal when processing the LoRa message, so it can obtain additional processing gain and improve the receiving sensitivity. In order to "lock" the LoRa signal, a long "constant Chirp" preamble needs to be transmitted (see Figure 1). This is the uniqueness of Lora - very high receiving sensitivity can be obtained using cheap chips and crystals.
This leading signal can be set to a variable number of "symbols", that is, the number of Chirps. It is conceivable that there is no selectivity between the preamble signals of different LoRa transmitters, but the LoRa demodulator can listen to a constant Chirp signal at the appropriate frequency and Chirp change rate (regardless of whether it comes from the intended system or not). The anti-interference performance of a LoRa receiving system in the face of conventional power interference and LoRa interference is very important, which is also the key technology of Symphony Link. Once the LoRa modem "locks" to the preamble, the end of the preamble is signaled by the "Reverse Chirp" shown in Figure 1. Data transmission then begins, which has a series of "symbols" that function much like M-ARY FSK symbols, but occur on Chirps, see Figure 2. Another powerful feature of LoRa is the ability to demodulate several "orthogonal" or simultaneous signals of the same frequency, as long as they have different chirp change rates. In the data sheet, the LoRa Chirp change rate is called the spread factor (Spread Factor). The higher the spread factor, the slower the Chirp change. Semtech's SX1301 chip supports this feature and has the ability to decode many LoRa Chirps simultaneously, a feature that makes it possible to create large networks. Building such a LoRa network or system requires a lot of development. Going from LoRa to a wireless system is like going from a BPSK wireless chip to a WiFi network. OSI Layer 2 and above functions for large networks include gateways, repeaters, addressing, adaptive data rates, message retries, message acknowledgments, and high-capacity OFDM downlink signaling, which are functions of systems such as LoRaWAN and Symphony Link. LoRa Alliance The LoRa Alliance was founded in 2015 to standardize the MAC function of the LoRa network. The LoRa Alliance developed the LoRaWAN protocol to facilitate mobile network operators using unlicensed spectrum to communicate with IoT devices on their networks. Some details about LoRaWAN are listed below: LoRaWAN is a server-side implementation of a multi-access protocol designed to reduce collisions for a large number of endpoints. It requires a server application to run the MAC function on the network connection; LoRaWAN network architecture usually adopts a star topology, where the gateway is a transparent bridge that relays messages between the end device and the backend central network server; the client logic is built into the network in a server; it is primarily designed for uplink-only applications with multiple endpoints, or applications that only require a small number of downlink messages (limited by the number of applications or endpoints); gateways in the same network need to be synchronized; end-devices and Communication between gateways is distributed over different frequencies and data rates. There is a trade-off between transmission distance and data rate (that is, the longer the transmission distance, the lower the data rate); Different data rates do not interfere with each other and create a set of "virtual" channels to increase the capacity of the gateway; LoRaWAN network server Data rate and RF output per end device managed through an Adaptive Data Rate (ADR) scheme, which is typically updated every 24 hours; Multi-layered security/encryption (EUI64 at network level and application level and EUI128 keys specific to the device ); AES CCM (128 bits) is used for encryption and authentication; The working range is within the range of 1% and 10% of the transmission time duty cycle ETSI, working in the 868 band; According to the draft, the B-type downlink node can be Polling a beacon from 1 second to 128 seconds (now using the engineering prototype provided by IBM's LMiC), the beacon period is 128 seconds (2^n), where n is 0 to 7; antenna diversity, because all gateways listen to the same uplink channel. LoRa Technology Applications Some companies are using all LoRa technology and LoRaWAN technology in interesting ways.
Chinese bike-sharing company OfO, which has equipped its bikes with LoRa devices and radio-frequency technology to determine the location of bikes, operates in more than 180 cities in China. Another example of LoRa network utilization comes from PNI Sensors in Santa Rosa, California. PNI uses LoRaWAN-based wireless connectivity to provide real-time city parking data, making it easier for drivers to find available parking spaces for on-street and off-street public and private parking management. The ultimate goal is to reduce traffic congestion and carbon emissions, which are caused by drivers repeatedly turning back and forth to find a parking space. Many industries are utilizing the open LoRaWAN IoT device standard, including agriculture (for irrigation/water level monitoring and pest control), utilities (for smart meters, lighting and energy management scenarios) and building construction (for building door and window sensors and Building Structural Health Applications).
There are also many companies that do LoRa networks that are not based on LoRaWAN. Deploying IoT devices with LoRa modules If you want to build on a public network owned and operated by an operator, LORAWAN is a very good choice, there are a lot of hardware and network servers providing services in this field, so there are many options is also a Very big advantage. However, the process of developing and deploying a system around LORAWAN is quite complicated. If you do not have much professional knowledge or experience in radio frequency protocols or wireless systems and planning, this will be a challenge. You also need to consider whether deploying a LORAWAN network can meet need. In some cases it may be better to use a custom protocol, where all you have to do is send the data to a node already written to link to the cloud. That's all for today's sharing. EBYTE people are committed to better assisting the development of IoT, intelligence, and automation every day, improving resource utilization, more products and more information. Interested partners can log in to us Visit the official website of Ebyte to understand, and there is also online customer service to answer questions!
WiFi Wireless Module and LoRa module are two different wireless communication technologies, and they have obvious differences and contrasts in several aspects.
Communication range:
WiFi Wireless Module: WiFi modules are usually suitable for relatively short-distance communication, and generally can cover a range of tens of meters to hundreds of meters in an indoor environment. Its transmission distance is affected by physical obstacles and signal interference.
LoRa module: LoRa module adopts low-power wide area network (LPWAN) technology, has a long communication range, can cover a range of several kilometers to tens of kilometers in an outdoor environment, and has good penetration and anti-interference capabilities.
Transmission rate:
WiFi Wireless Module: WiFi modules usually provide a higher transmission rate and can support data transmission speeds up to several hundred megabits per second. This makes WiFi suitable for applications that require the transfer of large amounts of data quickly, such as video streaming and large file transfers.
LoRa module: The transmission rate of the LoRa module is low, generally in the range of several kilobits per second to hundreds of kilobits per second. It is mainly used in IoT applications with low power consumption and more emphasis on long-range transmission and long battery life.
Power consumption and battery life:
WiFi Wireless Module: WiFi modules typically require high power consumption, which can be a burden on battery-powered devices, limiting their usage time in low-power applications.
LoRa module: LoRa module uses low power consumption technology, has excellent energy efficiency, and can run on battery power for a long time, usually up to several years of battery life.
Network topology and deployment:
WiFi Wireless Module: The WiFi module is usually used to build a local area network (LAN), and the device needs to connect to an existing WiFi network or communicate through a WiFi router. This network topology requires certain infrastructure support.
LoRa module: The LoRa module can build a low-power wide-area network (LPWAN), has the ability to self-organize the network, does not require complex infrastructure support, and can achieve wide-area coverage and long-distance communication.
According to specific application requirements, select the appropriate wireless communication technology. The WiFi Wireless Module is suitable for short-distance, high-speed transmission applications, while the LoRa module is suitable for long-distance, low-power Internet of Things applications.
The MQTT protocol has become a hot word in the Internet of Things communication. Today, let's discuss some knowledge about the MQTT protocol.
Andy Stanford-Clark of IBM and Alan Nip of Cirrus Link wrote the first version of the protocol in 1999. In 2013, IBM submitted the MQTT version 3.1 specification to the Structured Information Standards Promotion Organization, with relevant charters to ensure that only a small number of changes can be made to the specification.
The MQTT (Message Queue Telemetry Transport) protocol is a message protocol based on the publish/subscribe paradigm under the ISO standard (ISO/IEC PRF 20922). It works on the TCP/IP protocol family and is a publish/subscribe message protocol designed for remote devices with low hardware performance and poor network conditions.
MQTT is a client-server-based message publishing/subscribing transport protocol. The MQTT protocol is lightweight, simple, open, and easy to implement. These characteristics make it widely applicable. Such as machine-to-machine (M2M) communication and the Internet of Things (IoT). They are also widely used in communicating sensors via satellite links, occasional dial-up medical devices, smart homes, and some miniaturized devices.
Due to the particularity of the IoT environment, MQTT design needs to comply with the following specifications:
① Streamlined, without adding dispensable functions;
② Publish/Subscribe (Pub/Sub) mode to facilitate message transfer between sensors;
③ Allow users to dynamically create topics, with zero operation, and maintenance costs;
④ Minimize the amount of transmission to improve transmission efficiency;
⑤ Take factors such as low bandwidth, high latency, and unstable network into consideration;
⑥ Support continuous session control;
⑦ Understand that the computing power of the client may be low;
⑧ Provide service quality management;
⑨ Assuming that the data is agnostic, the type and format of the transmitted data are not required to maintain flexibility.
features
The MQTT protocol is a protocol designed for communication between remote sensors and control devices in low-bandwidth, unreliable networks. It has the following main characteristics:
① Use the publish/subscribe message mode to provide one-to-many message publishing and decouple application programs.
② Message transmission for payload content masking.
③ Use TCP/IP to provide a network connection.
④ There are three kinds of message publishing service qualities: "at most once", "at least once" and "only once".
⑤ Small transmission, small overhead (fixed-length header is 2 bytes), protocol exchange is minimized to reduce network traffic.
⑥ Use the Last Will and Testament features to notify the relevant parties of the mechanism of abnormal client interruption.
The realization of the MQTT protocol requires the completion of communication between the client and the server. During the communication process, there are three identities in the MQTT protocol: Publisher (Publish), Broker (Server), and Subscriber (Subscribe). Among them, the publisher and subscriber of the message are clients, the message agent is the server, and the publisher of the message can be the subscriber at the same time.
The message transmitted by MQTT is divided into two parts: topic (Topic) and load (payload):
Topic, which can be understood as the type of message, after the subscriber subscribes (Subscribe), he will receive the message content (payload) of the topic;
payload, which can be understood as the content of the message, refers to the specific content that the subscriber wants to use.
An MQTT client is an application or device using the MQTT protocol that always establishes a network connection to a server. Clients can be:
(1) Publish information that other clients may subscribe to;
(2) Subscribe to messages published by other clients;
(3) Unsubscribe or delete messages from the app;
(4) Disconnect from the server.
The MQTT server is called a "message broker" (Broker), which can be an application or a device. It is located between message publishers and subscribers. It can accept network connections from customers; accept application information published by customers; process subscription and unsubscribe requests from clients; and forward application messages to subscribed customers.