Greetings. I am working on a nixie clock project and have encountered an issue I have not been able to find any information on while googling. I am trying to add bluetooth functionality to my nixie clock to control some RGB LEDs, setting time, etc. When I upload the code to my Nano 33 IoT it broadcasts the BLE advertising for a short period, while my phone does connect to the nano's bluetooth for a short bit it can't discover any of the characteristics and then gets a GATT error 22 (gatt conn terminate local host [Galaxy S10 using nRF Connect]) shortly after connecting. With the connection disappearing from the nRF Connect's scan page.
The weird thing about this is that when I comment out the function(s) that use the DS3231 library the nRF Connect app can see, connect, and discover the services just fine.
I have confirmed that the BLE service on the Nano is running properly (to the best of my ability).
The following are the troubleshooting that I have tried:
-Changed from the DS3231FS to the Arduino DS3231 library: Problem corrected BUT returned the next day.
-Used 3 different BLE scanners: All had the same issue.
-Verified the BLE initialization code multiple times, and compared to examples: found no issues.
-Searched for similar issues and the GATT error 22: got no useful information
Any help in this is greatly appreciated. I can also provide my phone's bluetooth dump logs if necessary.