ArduinoBLE and Arduino DS3231 library issue

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.

Update:

Troubleshot a bit more.
-Had the code call the RTC-DS3231 directly using wire.h commands: Issue persists.

It appears the reading of the DS3231 is somehow interfering with the bluetooth working… But yet further testing by doing a looping read of an eeprom does not cause issues. Any help would be appreciated.

Welcome to the forum.

Can you post your code? Please use code tags. Click on the </> button above and then place your code inside. It should look like this.

// Your example code