This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:iot-open:iotprogramming2 [2023/10/10 10:26] – [Programming for IoT Networking] ktokarz | en:iot-open:iotprogramming2 [2023/11/23 10:45] (current) – pczekalski | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== ==== | + | ====== |
- | <box # | + | {{: |
- | <box # | + | The Internet of Things has revolutionised how we interact with the physical world mainly because of the ease of data exchange, which we can make almost everywhere. IoT relies on exchanging information between a myriad of devices and sensors, all of which need to communicate with each other and often with the cloud or other servers. The most exciting Internet of Things features are the possibility of using data transmission between nodes, between nodes and servers, and the ability to read measurements and control the behaviour of devices remotely. All these features use networking functionality. IoT networking is the backbone of the IoT ecosystem, enabling devices to collect and transmit data, receive instructions, |
- | ==== Programming for IoT Networking ==== | + | |
- | <box # | + | |
- | <box # | + | |
- | The Internet | + | Network programming is specific to IoT devices. It uses hardware built into the microcontroller or as an external communication coprocessor connected to the main MCU using one of the popular embedded systems protocols. Many IoT MCUs include |
- | In the previous chapters, some examples were presented for sensors, actuators | + | Programming details are related to the specific hardware, programming language |
- | In WiFi networks, | + | |
- | In this chapter, the emphasis will be put on the ESP8266 SoC, and all the examples will present software for this chip. | + | |
+ | Fog class devices use OS-level networking for low-level communication. Thus, there is no need to explicitly write a code that connects, e.g. to the WiFi AP, set up one or makes Bluetooth pairing: it is configured and handled on the OS level.\\ That is not the case in edge-class devices, where developers must implement and control the full networking stack. For this reason, parallel and asynchronous programming techniques are extensively used (such as multitasking, | ||
+ | In the previous chapters, some examples were presented for sensors, actuators and other interesting elements, but without computer networks. This chapter presents some elementary programming examples for networking using Espressif SoCs as the Edge-class devices and Raspberry PI as the Fog-class device. Espressif SoCs can be used as WiFi network controllers connected to other microcontrollers (e.g. Arduino Uno) and programmed with " | ||
+ | ESP8266 and ESP32 can use WiFi connectivity, | ||
+ | In WiFi networks, the Espressif chips can operate as the network client (like a regular computer connected to the Access Point or Router), as the network provider (Access Point), or in both modes simultaneously (as the Repeater).\\ | ||
+ | Currently, none of the STM32 devices supports WiFi, but the Wireless Series of the STM32 family have built-in Bluetooth radio and can use other 802.15.4 IoT protocols.\\ | ||
+ | Nordic Semiconductor nRF52 family of SoCs supports Bluetooth, Bluetooth Low Energy, and 802.15.4 protocols. These chips cannot connect to the WiFi network directly. | ||
+ | |||
+ | In the first part of this chapter, the emphasis will be put on the ESP8266 SoC, and all the examples will present software for this chip. The second part of the chapter presents some Scripting examples in Python (and Micropython) for the Fog and Edge classes of IoT devices.\\ | ||
+ | |||
+ | <WRAP excludefrompdf> | ||
+ | The following subchapters present more details on the networking programming: | ||
+ | * [[en: | ||
+ | * [[en: | ||
+ | </ |