2

I coded a JavaScript react-native project and ran it on my Android phone & iPhone.

It works on android phone but it doesn't work on iPhone.

  • I am Using BLE manager Library.
  • I can find & connect devices using ios and android.
  • I can subscrible and send data using anroid.
  • I know that there are no mistakes on code because it works on Android.
  • I can't start notifications and send data using the same react native project on IOS
  • I think it is because of BLE manager library but don't know how to solve it

It works perfectly on android. As shown below.

            ANDROID IMAGE(Console below Code Top)

enter image description here

Then I uploaded the same project on my iPhone. I get the following UUID mismatch. Code is the same but can't communicate.

             IOS IMAGE (Console Top Code Below)

enter image description here

Note LightBlue Info:

If Someone can tell me what to write on ID,ServiceUUID,CharUUID It would be lovely.

LightBlue Info




UPDATE***

I tried this:

As seen on the picture below, I connected to device using ID, But can't find service with UUID

enter image description here

HUV
  • 59
  • 7
  • If `4c:24:98:13:37:08` is the device MAC address, then this won't work on iOS. iOS apps have no access to the device MAC address. You would typically discover your peripheral by looking for the service it is advertising. – Paulw11 Oct 06 '22 at 09:29
  • I tried [link](https://ibb.co/8007VHR) Can you tell me what to type on Device Id, ServiceUUID, CharUUID. I'm trying stuff if I found I'll tell – HUV Oct 06 '22 at 10:16
  • On iOS the identifier that you get for a peripheral is unique for that peripheral on that iOS device. No other iOS device will see that same identifier for that peripheral. You can download the LightBlue app from the App Store to discover the services advertised by your peripheral if you don't know what they are – Paulw11 Oct 06 '22 at 10:18
  • [LightBlueImage](http://example.com) I tried diffirent values, if you can tell ID ServiceUUID CharUUID Like: Id:"" ServiceUUID"" CharUUID "" I would be great much love – HUV Oct 06 '22 at 11:18
  • That image link doesn't work – Paulw11 Oct 06 '22 at 11:42
  • I updated the question if you check it I would be so happy. – HUV Oct 06 '22 at 11:44
  • It looks like it is a temperature sensor. It is advertising service `FFE0`. That is the service you will need to scan for to discover the peripheral. – Paulw11 Oct 06 '22 at 12:02
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/248594/discussion-between-huseyin-safa-unlu-and-paulw11). – HUV Oct 06 '22 at 12:24

0 Answers0