Serial modul Bluetooth Dasar
1. Port seri modul Bluetooth
Antarmuka serial disingkat sebagai port serial, juga dikenal sebagai antarmuka komunikasi serial, umumnya juga dikenal sebagai port COM. Ini adalah istilah umum, dan antarmuka yang menggunakan komunikasi serial disebut port serial. Port serial adalah antarmuka perangkat keras.
UART adalah singkatan dari Universal Asynchronous Receiver/Transmitter, artinya Penerima/Pemancar Asinkron Universal.
UART mencakup port serial level TTL dan port serial level RS-232, dan kedua perangkat yang menggunakan komunikasi UART harus mematuhi protokol UART.
2. Protokol UART modul Bluetooth
Menurut format protokol yang berbeda, itu dapat dibagi lagi menjadi dua format protokol: H4 (TX/RX/CTS/RTS/GND) dan H5 (TX/RX/GND)
H4: Komunikasi tidak termasuk transmisi ulang, so CTS/RTS must use. UART communication is in “transparent transmission” mode, yaitu, the data monitored through the Logic analyzer is the actual communication data Direction Head DataType Host ->Controller 0x01 HCI Command Host ->Controller 0x02 ACL Packet Host ->Controller 0x03 SCO Packet Controller ->Host 0x04 HCI Event Controller ->Host 0x02 ACL Packet Controller ->Host 0x03 SCO Packet
H5: (also known as 3-wire), due to support for retransmission, CTS/RTS is optional. H5 communication data packets start and end with 0xC0, yaitu, 0xC0… payload 0xC0. If the payload contains 0xC0, it is converted to 0xDB 0xDC; If the payload contains 0xDB, it is converted to 0xDB 0xDD
3. Port serial modul Bluetooth
Most Bluetooth HCI modules support H5 mode,
A small portion (such as BW101/BW104/BW151) only supports H4 mode (i.e. CTS/RTS is required)
Whether H4 or H5, during Bluetooth initialization, the protocol stack connects with the module at a baud rate of 115200bps. After the connection is successful, it jumps to a high baud rate (>=921600bps). Commonly used are 921600/1M/1.5M/2M/3M
Catatan: The H4 serial port configuration does not include a check bit; H5 usually uses even check. Remember to set the format when grabbing serial port data packets with Logic analyzer.
4. Kasus
Basic parameters
FSC-DB004-BT826 integrates BT826 Modul Bluetooth and DB004 pin interface board, supports Bluetooth 4.2 dual mode protocol (BR/EDR/LE), integrates baseband controller, Cortex-M3 CPU, antena PCB
- ·Protocol: spp, HID, GATT, dll.
- ·Package size: 13 * 26.9 * 2mm
- ·Power level 1.5
- ·Default serial port baud rate: 115.2kbps Baud rate range: 1200bps~921kbps
- ·Support OTA upgrade
- ·BQB
- ·Compliant with ROHS specifications
5. Ringkasan
Bluetooth serial communication is a very simple and basic knowledge. Generally, when debugging, baca spesifikasi modul dengan cermat, dan perhatikan beberapa hal saat menggunakan penganalisis Logika. Jika Anda tidak memahami hal lain, Anda dapat menghubungi tim Feasycom!