First, check why the module restarts during pairing. Preferentially check the power supply of the module. Verify that the output power of the power supply meets the peak current requirements of the module during pairing.
Then, check the causes for sending a string of garbled characters.
1. Check whether the module correctly sends heartbeat packets and other interactive packets after sending the string of garbled characters.
2. During the module restart, clutters may exist on the serial bus.
3. The garbled characters may also be caused because the baud rate used for baud rate detection is different from the actually used one.