Detailed instructions for the KT6368A obtaining the time of the mobile phone through the Bluetooth chip, along with UART command examples
I. Function Introduction
The KT6368A dual-mode Bluetooth chip supports connection to a mobile phone to obtain the date and time information of the phone and can synchronize the RTC clock.
1.There is no need to install any app. It can be achieved directly by using the system Bluetooth.
2.AT the same time, it does not affect audio Bluetooth and also supports some simple AT commands for operation.
3. Implementation method: The mobile phone can connect to the Bluetooth chip KT6368A through "Settings" - "Bluetooth" - "Search" - "Connect". The chip will automatically send back the date and time of the mobile phone every 1 second to achieve the function of time synchronization.
4. The default factory Bluetooth name is: KT6368A-RTC-V221, and it can be modified by the AT command.
5. The hardware reference design is as follows, which is completely consistent with the dual-mode chip of the standard KT6368A.
The default baud rate of the factory chip is 115200.
6.Pin 2 of the KT6368A chip also outputs a low level when not connected and a high level when connected. The power consumption remains at 5mA for a long time. If low power consumption is required, the power supply can be controlled by a MOSFET.
II. Test examples - Android - Xiaomi - Huawei - Honor
At present, there are still some differences among Android phones, especially the time required for the Bluetooth chip to obtain the phone's calendar varies.
1.We tested Xiaomi phones such as Xiaomi 12pro, Xiaomi 6, Xiaomi 15, etc. The acquisition time was relatively fast. Basically, after connecting and enabling the permissions, the calendar information could be obtained in about 2 seconds.
2.Huawei phones are relatively slower, taking about 4 seconds to obtain calendar information.
The operation guide for an Android phone is as follows: The following two steps must be agreed upon; otherwise, the time cannot be obtained.
After the connection is successful, the Bluetooth chip will automatically return the time every second, as shown in the following figure:
The Bluetooth chip will automatically return: The time may vary among different mobile phones. Xiaomi is relatively fast, approximately once per second.
AT+AT20250527134944
Corresponding to hexadecimal, it is: 41 54 2B 41 54 32 30 32 35 30 35 32 37 31 33 34 39 34 34 0D 0A
AT+AT20250527134945
AT+AT20250527134946
AT+AT20250527134947
AT+AT20250527134948
AT+AT20250527134949
AT+AT20250527134950
AT+AT20250527134951
AT+AT20250527134952
The AT command returned by an Android phone is: AT+AT
The AT command returned by the iPhone is: AT+PT
Please pay attention to the distinction. The identification is deliberately made to facilitate the customer in determining what device is currently connected.
III. Test Example -ios Section - iPhone
Based on the current testing results, the consistency of ios devices is very good. I tested iPhone 7 and iPhone 12, and both were very fast. As long as you connect to the phone, you can immediately obtain the calendar information, and there are no Windows that require clicking "Agree".
Just go to "Settings" on your phone - "Bluetooth" - search and connect.
The Bluetooth chip will automatically return: The time on the ios phone is very accurate, definitely once every second.
AT+PT20250527135333
41 54 2B 50 54 32 30 32 35 30 35 32 37 31 33 35 33 33 33 0D 0A
AT+PT20250527135334
AT+PT20250527135335
AT+PT20250527135336
AT+PT20250527135337
AT+PT20250527135338
AT+PT20250527135339
AT+PT20250527135340
AT+PT20250527135341
AT+PT20250527135342
AT+PT20250527135343
Finally, let's summarize with AI:
The KT6368A dual-mode Bluetooth chip can directly synchronize time via mobile phone Bluetooth without the need to install an APP. This chip automatically sends back the date and time of the mobile phone every second. It supports modifying parameters by AT instructions. The default Bluetooth name is KT6368A-RTC-V221. Tests show that Android phones need authorization to obtain time (about 2 seconds for Xiaomi and about 4 seconds for Huawei), and the return format is AT+AT. Apple devices connect and synchronize immediately (about 1 second for iPhone), and the return format is AT+PT. Different command formats are specially set to distinguish device types. The power consumption of the chip is 5mA and it can be used in conjunction with MOSFETs to achieve low-power control. The hardware design is fully compatible with the standard KT6368A dual-mode chip, with a factory baud rate of 115200.
#Bluetoothchip #AIoT #EmbeddedSystems #electronics #BLE #KT6368A #
评论
发表评论