Network-dat/Bluetooth-dat/BLE-SDK-dat/BLE-SDK-dat.md
... ...
@@ -0,0 +1,41 @@
1
+
2
+# BLE-SDK-dat
3
+
4
+## Which BLE Example to Use for Sending ADC Voltage to Phone
5
+
6
+Your goal:
7
+- ESP32 reads ADC (battery voltage).
8
+- Phone should receive/read the value over BLE.
9
+
10
+### Best Choices
11
+- **Notify** ✅
12
+ - ESP32 acts as a BLE server.
13
+ - Sends **automatic notifications** with the ADC voltage.
14
+ - Best if you want real-time updates on your phone.
15
+
16
+- **Server** ✅
17
+ - ESP32 acts as a BLE server.
18
+ - Phone connects and **reads the ADC value on demand**.
19
+ - Good if you don’t need constant updates.
20
+
21
+- **UART** ✅
22
+ - Implements a BLE serial-like service.
23
+ - You can "print" ADC values and read them with a BLE UART app.
24
+ - Easiest for testing/debugging, but less standard.
25
+
26
+### Not Suitable
27
+- **Beacon / iBeacon / EddystoneTLM_Beacon / EddystoneURL_Beacon** ❌
28
+ - These only broadcast fixed or simple data.
29
+ - Not designed for continuous ADC updates.
30
+
31
+- **Scan / Beacon_Scanner / Client / Client_secure_static_passkey** ❌
32
+ - These examples make ESP32 a **client/scanner**, not a server.
33
+ - Your phone should be the client, so not useful here.
34
+
35
+- **BLE5_extended_scan / BLE5_multi_advertising / BLE5_periodic_advertising / BLE5_periodic_sync** ❌
36
+ - Advanced BLE5 features (scanning, multi-adv, periodic sync).
37
+ - Not needed for simple ADC-to-phone communication.
38
+
39
+- **Server_multiconnect / Server_secure_authorization / Server_secure_static_passkey** ❌
40
+ - Variants of the Server example with multi-client or security features.
41
+ - Only needed if you want multiple phones connected or secure pairing.
... ...
\ No newline at end of file
Network-dat/Bluetooth-dat/BLE-dat/BLE-dat.md
... ...
@@ -5,6 +5,9 @@
5 5
6 6
- [[nimBLE-dat]]
7 7
8
+- [[ibeacon-dat]] - [[BLE5-dat]]
9
+
10
+
8 11
9 12
10 13
Network-dat/Bluetooth-dat/iBeacon-dat/iBeacon-dat.md
... ...
@@ -6,4 +6,20 @@
6 6
需要配置 iBeacon 模式,请发送 AT+ROLE3,再发 AT+RESET 重启
7 7
- 第一步配置 iBeacon 的 UUID:AT+IBUUID 例子:AT+IBUUIDFDA50693A4E24FB1AFCFC6EB07647825
8 8
- 第二步配置 iBeacon 的 MAJOR:AT+MAJOR0007
9
-- 第一步配置 iBeacon 的 MINOR:AT+MINOR000A
... ...
\ No newline at end of file
0
+- 第一步配置 iBeacon 的 MINOR:AT+MINOR000A
1
+
2
+
3
+
4
+## ESP32
5
+
6
+ #include <BLEDevice.h>
7
+ #include <BLEServer.h>
8
+ #include <BLEUtils.h>
9
+ #include <BLE2902.h>
10
+ #include <BLEBeacon.h>
11
+
12
+ #define DEVICE_NAME "ESP32"
13
+ #define SERVICE_UUID "7A0247E7-8E88-409B-A959-AB5092DDB03E"
14
+ #define BEACON_UUID "2D7A9F0C-E0E8-4CC9-A71B-A21DB2D034A1"
15
+ #define BEACON_UUID_REV "A134D0B2-1DA2-1BA7-C94C-E8E00C9F7A2D"
16
+ #define CHARACTERISTIC_UUID "82258BAA-DF72-47E8-99BC-B73D7ECD08A5"
... ...
\ No newline at end of file
Network-dat/network-dat.md
... ...
@@ -10,12 +10,12 @@
10 10
11 11
## Network tech by range
12 12
13
-| Technology | Range | Data Rate | Notes |
14
-|-----------------|-----------------------------|------------------|---------------------------------------------|
15
-| [[M2M-dat]] | Almost infinite (provider) | Varies | Limited by service provider network |
16
-| [[lora-dat]] | Long, up to 10 km | Low | |
17
-| [[RF-link-dat]] | Medium, up to 1 km | Low | |
18
-| [[ELRS-dat]] | Medium, up to 1 km (5 km) | High | |
13
+| Technology | Range | Data Rate | Notes |
14
+| --------------- | -------------------------- | --------- | ----------------------------------- |
15
+| [[M2M-dat]] | Almost infinite (provider) | Varies | Limited by service provider network |
16
+| [[lora-dat]] | Long, up to 10 km | Low | |
17
+| [[RF-link-dat]] | Medium, up to 1 km | Low | |
18
+| [[ELRS-dat]] | Medium, up to 1 km (5 km) | High | |
19 19
20 20
21 21
... ...
@@ -109,7 +109,45 @@ EtherCAT (Ethernet for Control Automation Technology) is a high-performance, rea
109 109
- [[RTU-dat]] - [[modbus-dat]]
110 110
111 111
112
+## info
112 113
114
+### What is DTE and DCE?
115
+
116
+**DCE** = **Data Circuit-terminating Equipment** (also called Data Communications Equipment).
117
+
118
+- In the context of modems, the **DCE** is the modem itself.
119
+- It connects to a **DTE** (**Data Terminal Equipment**), which is typically your computer, microcontroller, or router.
120
+
121
+**Roles:**
122
+
123
+| Device Type | Meaning | Example |
124
+| ----------- | ------------------------------------------------------------------------------ | -------------------------------------- |
125
+| **DTE** | Data Terminal Equipment — device that generates/uses data | PC, microcontroller, router |
126
+| **DCE** | Data Circuit-terminating Equipment — device that provides a communication path | Modem, serial adapter, cellular module |
127
+
128
+
129
+- The DTE and DCE sides determine **who provides clock signals**, and how cables are wired (TX/RX pins).
130
+- In UART serial communication, for example:
131
+ - DTE sends data to DCE, which modulates/transmits it.
132
+ - DCE receives data from DTE, demodulates it, and sends it to the remote device.
133
+
134
+
135
+
136
+## What is PPP?
137
+
138
+**PPP** (**Point-to-Point Protocol**) is a data link layer protocol used to establish a **direct connection between two network nodes**.
139
+It allows the transmission of **multi-protocol datagrams** (e.g., IP, IPv6, IPX) over serial links, phone lines, or other point-to-point connections.
140
+
141
+---
142
+
143
+### 2. Key Uses of PPP
144
+- Connecting two devices over a serial link.
145
+- Dial-up Internet access (historical).
146
+- VPN connections (PPP over SSH or PPP over Ethernet).
147
+- Cellular data connections (PPP over UART for modems).
148
+
149
+Example:
150
+A microcontroller talking to a cellular modem (SIMCom, Quectel) over UART often uses PPP to establish an IP connection.
113 151
114 152
115 153
SDK-dat/ESP-SDK-dat/ESP32-SDK-dat/ESP32-SDK-dat.md
... ...
@@ -12,7 +12,7 @@
12 12
13 13
- [[partition-table-dat]]
14 14
15
-- [[BLE-dat]]
15
+- [[BLE-dat]] - [[network-dat]]
16 16
17 17
- [[LVGL-dat]] - [[RTOS-dat]]
18 18
... ...
@@ -21,6 +21,59 @@
21 21
- [[micropython-dat]] - [[circuitpython-dat]]
22 22
23 23
24
+
25
+
26
+# ESP32 Examples
27
+
28
+- **ArduinoOTA** → Update firmware over Wi-Fi (Over-The-Air).
29
+- **BLE** → Use Bluetooth Low Energy (GATT server/client).
30
+- **BluetoothSerial** → Classic Bluetooth SPP for serial communication.
31
+- **DNSServer** → Implement a basic DNS server (e.g., captive portal).
32
+- **EEPROM** → Read/write non-volatile storage like Arduino EEPROM.
33
+- **ESP Insights** → Cloud monitoring/debugging for ESP devices.
34
+- **ESP RainMaker** → IoT framework to connect ESP to cloud & apps.
35
+- **ESP_I2S** → Use I2S peripheral for digital audio
36
+- **ESP_NOW** → Low-power peer-to-peer wireless protocol by Espressif.
37
+- **ESP_SR** → Speech recognition and audio processing examples.
38
+- **ESP32** → General ESP32 hardware feature demos.
39
+- **ESP32 Async UDP** → Non-blocking UDP networking example.
40
+- **ESPmDNS** → Multicast DNS service (Bonjour/ZeroConf).
41
+- **Ethernet** → Wired Ethernet networking examples.
42
+- **FFat** → Flash FAT file system support on ESP32.
43
+- **Firmata** → Protocol to control Arduino/ESP from PC software.
44
+- **Hash** → Generate cryptographic hashes (SHA1, MD5, etc.).
45
+- **HTTPClient** → Make HTTP requests from ESP32.
46
+- **HTTPUpdate** → Update firmware via HTTP download.
47
+- **HTTPUpdateServer** → Web server that allows OTA updates.
48
+- **Keyboard** → Emulate USB keyboard (for ESP32-S2/S3).
49
+- **LiquidCrystal** → Control HD44780-compatible LCDs.
50
+- **LittleFS** → Flash-based file system alternative to SPIFFS.
51
+- **Matter** → Smart home standard integration (formerly CHIP).
52
+- **NetBIOS** → Windows NetBIOS name service support.
53
+- **NetworkClientSecure** → Secure TLS client connections.
54
+- **OpenThread** → Thread networking protocol (IPv6 mesh).
55
+- **PPP** → Point-to-Point Protocol (e.g., cellular modems).
56
+- **Preferences** → Non-volatile key/value storage API.
57
+- **SD** → Access SD cards via SPI.
58
+- **SD_MMC** → Access SD cards via SDIO/MMC interface.
59
+- **Servo** → Control hobby servo motors.
60
+- **SimpleBLE** → Simplified BLE server/client examples.
61
+- **SPI** → Use SPI bus for peripherals.
62
+- **SPIFFS** → Legacy flash file system (deprecated, use LittleFS).
63
+- **Stepper** → Control stepper motors.
64
+- **TFLite Micro** → Run TensorFlow Lite ML models on ESP32.
65
+- **TFT** → Drive TFT LCD displays.
66
+- **Ticker** → Timer-based periodic task execution.
67
+- **Update** → Update firmware from local binary data.
68
+- **USB** → USB host/device features (ESP32-S2/S3/C3).
69
+- **WebServer** → Run a simple HTTP web server.
70
+- **WiFi** → Connect to Wi-Fi and manage connections.
71
+- **WiFiProv** → Provision Wi-Fi credentials via BLE/SoftAP.
72
+- **Wire** → I²C communication with sensors/devices.
73
+- **Zigbee** → Zigbee mesh networking protocol support.
74
+
75
+
76
+
24 77
## other reference
25 78
26 79
- [Enabling ESP32 Secure Boot V2 (SBV2)](https://www.hackster.io/syncom/enabling-esp32-secure-boot-v2-sbv2-df32d5)