question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ExtendedInvalidCipherTextException message response after switching from iOS to Android

See original GitHub issue

Describe the bug We have the scenario in which same Mesh Network can be edited on both Android and iOS devices. We managed to successfully restore Mesh Network with import and export built-in procedures, by creating different provisioners for each device and platform. The issue we’re facing is that after iOS can succesfully get the response after sending a Vendor Model Message, Android receives the Exception i reported below in Logs / Screenshots section. Only powering the BT peripheral off and back on seems to fix the issue on the Android side.

To Reproduce Steps to reproduce the behavior:

  1. Create Mesh Network from Android
  2. Provision a Node
  3. Import Mesh Network on iOS
  4. Get a parameter from one vendor model
  5. Switch back to Android
  6. Get a parameter from same vendor model

Expected behavior Successfully read response value

Platform details:

  • Library Version 2.1.1

Logs / Screenshots

no.nordicsemi.android.meshprovisioner.utils.ExtendedInvalidCipherTextException: mac check in CCM failed
    at no.nordicsemi.android.meshprovisioner.transport.BaseMeshMessageHandler.parseMeshPduNotifications(BaseMeshMessageHandler.java:163)
    at no.nordicsemi.android.meshprovisioner.MeshMessageHandler.parseMeshPduNotifications(MeshMessageHandler.java:61)
    at no.nordicsemi.android.meshprovisioner.MeshManagerApi.parseNotifications(MeshManagerApi.java:263)
    at no.nordicsemi.android.meshprovisioner.MeshManagerApi.handleNotifications(MeshManagerApi.java:235)
    at com.vimar.p406.ble.viewmodel.NrfMeshRepository.onDataReceived(NrfMeshRepository.java:540)
    at com.vimar.p406.ble.BleMeshManager$1.lambda$initialize$0$BleMeshManager$1(BleMeshManager.java:145)
    at com.vimar.p406.ble.-$$Lambda$BleMeshManager$1$menHcS3BNZmUA4ruRSpuglMOKeA.onDataReceived(Unknown Source:2)
    at no.nordicsemi.android.ble.ValueChangedCallback.notifyValueChanged(ValueChangedCallback.java:123)
    at no.nordicsemi.android.ble.BleManager$BleManagerGattCallback.onCharacteristicChangedSafe(BleManager.java:2884)
    at no.nordicsemi.android.ble.MainThreadBluetoothGattCallback.lambda$onCharacteristicChanged$4$MainThreadBluetoothGattCallback(MainThreadBluetoothGattCallback.java:135)
    at no.nordicsemi.android.ble.-$$Lambda$MainThreadBluetoothGattCallback$7AU42XLOqZKSRIMVuifw3eecBbw.run(Unknown Source:8)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:8016)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
philips77commented, Apr 23, 2020

I don’t know but you requested it anyway. I will discourage using it on doc, but want people to use it correctly.

1reaction
roshanrajaratnamcommented, Apr 21, 2020

Hi @antoniovillanova , so I gave this a try and i was unable to reproduce the same issue as you are facing. I can detail the steps I took just like you had mentioned.

  1. Create Mesh Network from Android
  2. Provision a Node
  3. Import Mesh Network on iOS (I did not use the same provisioner as on Android as this is bound to fail because the sequence numbers are not exported for any given provisioner)
  4. Bind key to vendor model using iOS
  5. Control vendor model
  6. Switch back to Android
  7. Go to vendor model pull to refresh to get the newly bound key configuration that was added using iOS
  8. Control the vendor model.

I repeated the process 3 times and it worked 3 out of 3 times. Also I extended the test process by

  1. Unbinding the key on the vendor model from Android
  2. Pulled to refresh on iOS to update the the unbound key setting
  3. Bind again
  4. Control

All messages worked as it should. Have you checked if you are encrypting your message properly on the fw side? If you want me to test against your fw you can create a private ticket on devzone

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apple can fix the messaging between Androids & iPhones
The bad experience you get when texting Android users is created by Apple. But they can fix it by switching from SMS/MMS to...
Read more >
Not getting texts after switching from iPhone to Android ...
iMessage works by routing iPhone to iPhone messages through Apple's servers instead of sending them as actual text messages.
Read more >
Android not Receiving Text after Switching from iPhone
If you switched to Android and are not getting texts from iPhone, here is the easy fix.Before you switch from an iPhone iOS...
Read more >
Switch texting from iMessage to Messages - Android Help
To get text messages on your new Android phone, switch from Apple's iMessage to Android's Messages. Before you remove the SIM card from...
Read more >
If you have an issue with Messages or FaceTime after setting ...
iMessage and FaceTime might not complete activation on iPhone 14 and iPhone 14 Pro. Update to the latest version of iOS to address...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found