Integration with Find My iOS

Last Updated on : 2024-06-24 08:13:32download

The generic Bluetooth Low Energy (LE) module offers integration with Find My iOS, helping implement the device’s location and search features in the iOS system.

Overview

Application scenarios

  • Applies to scenarios that require the device’s location and search features.

Features

  • Support pairing Bluetooth LE modules by using mobile phones and gateways.
  • Offer the integration with Find My iOS, providing users with an excellent device location feature.
  • Enable or disable the Find My iOS as needed.
  • Get an optional switch for Tuya pairing, making the product more flexible and suitable for different scenarios.
  • Adopt a low power design to ensure long-term stable operation of the device.
  • Provide certification services for Find My iOS.
  • Support both the Find My app and Tuya-enabled app.

Find My protocol

The protocol in this section applies to Bluetooth LE generic firmware that integrates Apple’s Find My feature. This protocol only applies to the GR5513 Bluetooth LE generic firmware.

(Optional) Find My advertising feature (0xC300)

  • Find My is an optional feature, and this command is used to turn Find My advertising on and off. Turning off Find My advertising means turning off the Find My feature. Therefore, if you want to use the Find My feature, you must turn on Find My advertising.
  • Firmware with the Find My feature has the Find My advertising feature enabled by default.
    • When a Find My device is in an unpaired state, the device will enter pairing mode when powered on and start the Find My advertising and pairing. The advertising and pairing will automatically turn off after 10 minutes. Repeating this command to turn on the Find My advertising will restart the device and refresh the timer.
    • When a Find My device is paired, powering on the device will initiate and keep Find My slow advertising.

The MCU sends the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0xC3
4
5
2 Data length (Len) 0x00
0x02
6 1 Subcommand 0x00
7 1 Config
  • 0x00: Disable the Find My advertising feature.
  • 0x01: Enable the Find My advertising feature.
8 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Example:

  • Send 55 AA 00 C3 00 02 00 01 C5 to enable the Find My advertising feature.
  • Send 55 AA 00 C3 00 02 00 00 C4 to disable the Find My advertising feature.

The module returns the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0xC3
4
5
2 Data length (Len) 0x00
0x02
6 1 Subcommand 0x00
7 1 Status
  • 0x00: Success
  • 0x01: Failure
8 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Example:

  • The module replies 55 AA 00 C3 00 02 00 01 C5, indicating that the setting failed.
  • The module replies 55 AA 00 C3 00 02 00 00 C4, indicating that the setting was successful.

Local unbinding (0xC301)

When an offline device is unbound from the Find My app, a local unbinding operation needs to be performed on the device so that the device can be paired again.

The MCU sends the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0xC3
4
5
2 Data length (Len) 0x00
0x01
6 to 6+Len-1 1 Subcommand 0x01
6+Len 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

For example, the MCU sends the command 55 AA 00 C3 00 01 01 C4, and the device is locally unbound from Find My.

The binding relationship of Find My iOS is independent of that of the Tuya-enabled app. If a device is locally unbound from Find My, it will not be unbound from the Tuya-enabled app. However, the unbinding from Find My will trigger a device restart to initialize related parameters. As a result, the Bluetooth connection to the Tuya-enabled app might be interrupted.

The module returns the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0xC3
4
5
2 Data length (Len) 0x00
0x02
6 1 Subcommand 0x01
7 1 Status
  • 0x00: Success
  • 0x01: Failure
8 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Example:

  • The module replies 55 AA 00 C3 00 02 01 01 C6, indicating a failure.
  • The module replies 55 AA 00 C3 00 02 01 00 C5, indicating a success.

Configure the serial number to be readable (0xC302)

The certification test by Find My Certification Assistant (FMCA) requires reading the serial number (SN) of the device. However, for security reasons, the device prohibits reading the SN by default. This command can be used to temporarily enable the device to read the SN in order to get the necessary information for the FMCA certification test. The device will disable the read permission after 5 minutes each time it is enabled.

The MCU sends the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0xC3
4
5
2 Data length (Len) 0x00
0x02
6 1 Subcommand 0x02
7 1 Config 0x01: Allow to read the SN.
8 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Example:

  • The MCU sends the command 55 AA 00 C3 00 02 02 01 C7 to temporarily enable reading the Find My SN.

The module returns the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0xC3
4
5
2 Data length (Len) 0x00
0x02
6 1 Subcommand 0x02
7 1 Status
  • 0x00: Success
  • 0x01: Failure
8 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Example:

  • The module replies 55 AA 00 C3 00 02 02 01 C7, indicating a failure.
  • The module replies 55 AA 00 C3 00 02 02 00 C6, indicating a success.

Notify the status (0xC301)

This command provides status notifications related to Find My, including but not limited to notifications on the Find My app about actions triggered, such as finding the device and playing music, and the changes in the pairing and binding status of Find My.

The module sends the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0xC3
4
5
2 Data length (Len) 0x00
0x02
6 1 Subcommand 0x03
7 1 PlayScene The status. Valid values:
  • 0x00: Initiate a call on the Find My app.
  • 0x01: End the call on the Find My app.
  • 0x02: Implement a local unbinding.
  • 0x03: Enter pairing mode.
  • 0x05: Pairing succeeded.
  • 0x06: Pairing timed out.
8 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Example:

  • When the Play Sound feature is turned on in the Find My app, the module will send the command 55 AA 00 C3 00 02 03 00 C7.
  • When the Play Sound feature is turned off in the Find My app, the module will send the command 55 AA 00 C3 00 02 03 01 C8.
  • When the MCU successfully unbinds Find My locally, the module will send the command 55 AA 00 C3 00 02 03 02 C9.
  • When the device enters pairing with Find My, the module will send the command 55 AA 00 C3 00 02 03 03 CA.
  • When the device is successfully paired with Find My, the module will send the command 55 AA 00 C3 00 02 03 05 CC.
  • If the device stays in the pairing mode for more than 10 minutes and is not successfully paired, the module will automatically turn off the Find My advertising and exit the pairing state. In this case, the module will send the command 55 AA 00 C3 00 02 03 06 CD to notify the change of the device status.

After receiving the notification of pairing timeout, the MCU should have the logic to put the device into pairing mode again. Refer to Find My advertising feature (0xC300) and send the command 55 AA 00 C3 00 02 00 01 C5 to put the device into pairing mode again.

The MCU returns the following data.

No. Bytes Field Description
0
1
2 Header 0x55
0xAA
2 1 Version number 0x00
3 1 Command (CMD) 0xC3
4
5
2 Data length (Len) 0x00
0x02
6 1 Subcommand 0x03
7 1 Status
  • 0x00: Success
  • 0x01: Failure
8 1 CRC8 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Example:

  • The MCU replies 55 AA 00 C3 00 02 03 01 C8, indicating a failure.
  • The MCU replies 55 AA 00 C3 00 02 03 00 C7, indicating a success.

FAQs

Can the Find My app and the Tuya-enabled apps connect and control devices simultaneously?

Yes, the Find My feature is independent of the Tuya-enabled connection and control features, and the device supports multiple connections. Therefore, devices can be connected to and controlled by the Find My app and Tuya-enabled apps at the same time.

Can the connection and control features of the Find My app and Tuya-enabled apps be turned off?

Yes.

  • Find My is an optional feature, and users can turn Find My advertising on and off by using the 0xC300 command. Turning off Find My advertising will disable the Find My feature.
  • Bluetooth advertising (0xA3) can be used to turn on or off the advertising feature on the Tuya-enabled apps. If the advertising of the Tuya-enabled apps is turned off, the devices cannot be added and connected to the Tuya-enabled apps.

If you have any problems with TuyaOS development, you can post your questions in the Tuya Developer Forum.