Most efficient way to use ble with arduino

Hello guys, i have a project using an arduino pro micro + accelerometer + bluetooth low energy device(HM-10) sending data to an app every time the accel picks up something so the app reacts according to the input and for that i need to be paired with the phone the entire time.

The problem is that i need to run this project on a battery, so i thought i will put the hm-10 to sleep, disable leds and all that good stuff, and when it get the signal from accel it will wake up, connect to the last connected device, send the data to the phone and goes back to sleep, but i could not get connect to the last device as a slave module.

So i was wondering if there is something i am missing, i know that i am suppose to make multiple short connection instead of a long unique connection since that is BLE philosophy, but maybe you guys have some different ideas on how i should approach this problem.

Are you using AT commands in your code?

When youre ready to connect use AT+CON"put mac address of phone's bluetooth here, no quotes"

example: AT+CON22C22FF22DA2

On an iphone you can find the phone's bluetooth mac address in the 'About' in the settings. Probably similiar for android.

I am not 100% sure this will connect to a phone's bluetooth. It will connect the hm-10 to another hm-10(if the address after AT+CON is of the other hm-10). Phones may? have a security feature where they will not let random ble devices connect.

For low power purposes you can also change the hm-10s power consumption using AT+POWE[0-3]
example: AT+POWE2

Use AT+POWE? to determine what power setting it is on/double check if updated. Default is 2. 0 = -23dbm and 3 = 6dpm

Hope this helps

When i try to use the at command to connect back to the last device or connect direct using a mac address i get connect error output OK+CONNE and that is it, it could have some sort of log or a way to debug why is not pairing with the device.

In the other hand, i did not know i could make this module less powerful to save more battery, that is perfect since for my project to work you are required to have your close to you, thank you for that, i read the datasheet before but i guess i missed that at command completly :o