This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Auto connection with BLE from iOS app swift

Hi , I'm beginner of iOS development with swift. I start working on BLE based iOS application for BLE photometry device.

In my application, I did OTA update to image B.

So as a first step, I reset Image B to move pointer to Image A.

Then as a second step, I need to update Image B via Over the Air.

My problem is "after first stage (Resetting Image B), BLE peripheral is automatically disconnected.

So before I start second step , it need to reconnect again.

Therefore, I would like to save MAC address before resetting , then auto connect by using this MAC address.

So my questions are  

1: I read some answer "MAC address is changing periodically , so is it possible to change within one or two sec? 

2: If yes, there have another possible way to solve my problem? 

Thanks a lot

Best Regards,

NyoSeint Lay

  • Hello NyoSeint,

    The BLE Device Address (BD_ADDR) usually doesn't change on the peripheral unless you have enabled privacy. On the iOS side will change, but you seem to be programming on the iOS side.

    I'll let others chime in but may I also suggest that you x-post in a smart device forum, such as stackoverflow.net or the iOS dev forums.

    Best wishes
  • Hi JXS,

    Thanks for your reply. I already solved this issue. You are correct. That is I can handle from programming side.

    I was forgot to update in this page. 

    Actually in iOS, we do not use MAC address. We use NSUUID to identified BLE. 

    Then I just call connectPeripheral method.

    Anyway, again thanks for you reply.

    Best Regards,

    NyoSeint Lay