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.

IV index doesn't update on a imported network

See original GitHub issue

Describe the bug When a network is exported and imported to a new mobile device, the iv index of network is lost. Although it should update on receiving a secure network beacon after connecting to proxy, app discards the message and hence any message the app sends is ignored by the proxy.

Issue seems to be that when network is imported, IVIndex default transitionDate is set to currentDate and thus always failing the following condition image

To Reproduce Steps to reproduce the behavior:

  1. Create a mesh network
  2. Add multiple nodes
  3. Generate enough traffic to increment iv index (or change it manually if possible)
  4. Export network
  5. Import on another phone
  6. Change provisioner address on the new phone
  7. Try provisioning new node in the vicinity of existing nodes.
  8. It fails 90% of the time at Sending Composition Data Get as the node will ignore messages with older IV

Expected behavior Expected The IV index to get updated on first secure beacon

Platform details:

  • Device: Redmi 9 power
  • OS: Android 11
  • Library Version : 3.2.4

Logs / Screenshots

2022-06-22 19:58:08 [INFO]  BleManager: Connected to D7:31:53:E5:D3:DE
2022-06-22 19:58:09 [INFO]  BleManager: PHY updated (TX: LE 2M, RX: LE 2M)
2022-06-22 19:58:09 [INFO]  BleManager: Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 200ms)
2022-06-22 19:58:09 [INFO]  BleManager: Services discovered
2022-06-22 19:58:09 [INFO]  BleManager: MTU changed to: 247
2022-06-22 19:58:09 [INFO]  BleManager: Notification received from 00002ade-0000-1000-8000-00805f9b34fb, value: (0x) 01-01-00-DD-05-4B-24-03-2B-24-ED-00-00-00-03-0B-34-C1-F4-8B-B3-B7-A1
2022-06-22 19:58:09 [INFO]  BleManager: Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
2022-06-22 19:58:09 [INFO]  BleManager: Notifications enabled

** The problem point
2022-06-22 19:58:09 [OTHER]  MeshManagerApi/Received mesh beacon: SecureNetworkBeacon { KeyRefreshActive: false, IV Index: IV Index: 3, IV Update Active: false, Authentication Value: 0x0B34C1F48BB3B7A1}
2022-06-22 19:58:09 [OTHER]  MeshManagerApi/Secure Network Beacon authenticated.
2022-06-22 19:58:09 [OTHER]  MeshManagerApi/Last IV Index: 0
2022-06-22 19:58:09 [WARN]  MeshManagerApi: Discarding beacon IV Index: 3, IV Update Active: false, last 0, changed: 0h ago, test mode: false
**


2022-06-22 19:58:09 [INFO]  BleManager: Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
2022-06-22 19:58:10 [INFO]  BleManager: Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 200ms)
2022-06-22 19:58:11 [OTHER]  MeshTransport/Src address: 7FFF
2022-06-22 19:58:11 [OTHER]  MeshTransport/Dst address: 0021
2022-06-22 19:58:11 [OTHER]  MeshTransport/Key: EC3A1FA4903D5320049C69424C805AE3
2022-06-22 19:58:11 [OTHER]  MeshTransport/akf: 0
2022-06-22 19:58:11 [OTHER]  MeshTransport/aid: 0
2022-06-22 19:58:11 [OTHER]  MeshTransport/aszmic: 0
2022-06-22 19:58:11 [OTHER]  MeshTransport/Sequence number: 2
2022-06-22 19:58:11 [OTHER]  MeshTransport/Access message opcode: 8008
2022-06-22 19:58:11 [OTHER]  MeshTransport/Access message parameters: FF
2022-06-22 19:58:11 [OTHER]  AccessLayer/Created Access PDU 8008FF
2022-06-22 19:58:11 [OTHER]  UpperTransportLayer/Device nonce: 02000000027FFF002100000000
2022-06-22 19:58:11 [OTHER]  UpperTransportLayer/Encrypted upper transport pdu: 959D5EF58D5EBE
2022-06-22 19:58:11 [OTHER]  LowerTransportLayer/Unsegmented Lower transport access PDU 00959D5EF58D5EBE
2022-06-22 19:58:11 [OTHER]  NetworkLayer/Encryption key: 6E46DED43FC00F629C620A59C48E7265
2022-06-22 19:58:11 [OTHER]  NetworkLayer/Privacy key: 27D5F91E8D8FDDA3AEC347217878A354
2022-06-22 19:58:11 [OTHER]  NetworkLayer/Sequence Number: 000002
2022-06-22 19:58:11 [OTHER]  NetworkLayer/Encrypted Network payload: 6B6358D42F28B044FF90AA6E6A60
2022-06-22 19:58:11 [INFO]  BleManager: Data written to 00002add-0000-1000-8000-00805f9b34fb, value: (0x) 00-1E-64-67-B9-BB-F5-ED-6B-63-58-D4-2F-28-B0-44-FF-90-AA-6E-6A-60
2022-06-22 19:58:11 [OTHER]  MeshManagerApi/MeshNetwork pdu sent: 0x001E6467B9BBF5ED6B6358D42F28B044FF90AA6E6A60
2022-06-22 19:58:14 [INFO]  BleManager: Notification received from 00002ade-0000-1000-8000-00805f9b34fb, value: (0x) 01-01-00-DD-05-4B-24-03-2B-24-ED-00-00-00-03-0B-34-C1-F4-8B-B3-B7-A1
2022-06-22 19:58:14 [OTHER]  MeshManagerApi/Received mesh beacon: SecureNetworkBeacon { KeyRefreshActive: false, IV Index: IV Index: 3, IV Update Active: false, Authentication Value: 0x0B34C1F48BB3B7A1}
2022-06-22 19:58:14 [OTHER]  MeshManagerApi/Secure Network Beacon authenticated.
2022-06-22 19:58:14 [OTHER]  MeshManagerApi/Last IV Index: 0
2022-06-22 19:58:14 [WARN]  MeshManagerApi: Discarding beacon IV Index: 3, IV Update Active: false, last 0, changed: 0h ago, test mode: false
2022-06-22 19:58:35 [WARN]  BleManager: Error: (0x13): GATT CONN TERMINATE PEER USER
2022-06-22 19:58:35 [INFO]  BleManager: Disconnected

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
anees17861commented, Jun 23, 2022

@R0m4in-dooz Thanks for this. Instead of removing the check completely, I decided to update the iv index date after import is done since that api is public. I set the year to 1970 😛. The advantage was I did not need to put the library under source control. I could still use maven plugin

0reactions
anees17861commented, Jun 28, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Instead change the require of index.js, to a dynamic import ...
I did npm i node-fetch@2.6.1, it seems like it fixed it, then i wrote node utils/nftport/uploadFiles.js in the terminal (dont know the proper ......
Read more >
Send and update your data - Algolia
How to send your data to Algolia, batch large datasets, synchronize via incremental updates and atomic reindexing, or handle concurrency.
Read more >
Release Notes for Cisco Identity Services Engine, Release 3.1
When Essential License is disabled on the Cisco ISE GUI, the Smart Licensing Portal does not report license consumption. CSCwb39638. Unable to import...
Read more >
Configuring and managing networking Red Hat Enterprise ...
Engage with our Red Hat Product Security team, access security updates, and ensure your environments are not exposed to any known security vulnerabilities....
Read more >
Troubleshooting index lifecycle management errors - Elastic
The most common problem is that the index name does not contain trailing digits.
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