This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

reason for Disconnect 0x22 error

dear Devzone

A disconnect error 0x22 occurred.

I know that error 0x22 is LMP_RESPONSE_TIMEOUT / LL_RESPONSE_TIMEOUT.

However, the location of the error and the reason for its occurrence are not clear. I will also attach a log of this.

Disconnect reason error 0x22.zip

and

#ifndef NRF_SDH_BLE_GATT_MAX_MTU_SIZE

#if 1

#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 67

#etc

#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 136

#endif

#endif

Making it like above seems to make the error go away, but is it related to this error?

Ask again because the situation you saw in other questions is different.

I used nRF52832 (NFC, 2Mbps) and nexsus6.

thank!

youngsoo.bae

Parents Reply Children
  • thank for your answer!

    I'm very sorry, but can you take a look at the behavior of phone in an error situation?

    We don't want to put in a delay. because impossible to confirm that the error disappears with the delay.

    The rental period for the Nexus 6 is over.

    thank you!

    youngsoo.bae

  • I asked you to do a test by adding one line of code and you have not done so? During debugging we rely on you to test code to narrow down the root cause.

    What SDK and SD are you using?

    Does it happens every time with nexus 6? Or does it happen only sometimes?

    Does it happen with other phones than nexus 6?

    Does it happen when you try to disconnect?

    Best regards,
    Kenneth

  • used S132 SoftDevice and 15.3.0_59ac345 SDK.

    Occurs during data communication.
    confirmed phones, only Nexus 6. but other phones are not understood.
    A log that came out during the test will also be attached.
    0x22_002
    
    <00> info> dev: UART RECEIVE, length:114.
    <00> info> dev:  02 24 00 6C 02 7B 22 63|.$.l.{"c
    <00> info> dev:  6E 74 22 3A 31 30 30 2C|nt":100,
    <00> info> dev:  22 74 69 6D 65 22 3A 22|"time":"
    <00> info> dev:  32 30 31 38 30 34 31 30|20180410
    <00> info> dev:  54 30 30 30 30 30 30 5A|T000000Z
    <00> info> dev:  22 2C 22 74 79 70 65 22|","type"
    <00> info> dev:  3A 22 69 6E 6A 65 63 74|:"inject
    <00> info> dev:  69 6F 6E 22 2C 22 64 72|ion","dr
    <00> info> dev:  75 67 22 3A 22 4E 6F 5F|ug":"No_
    <00> info> dev:  31 30 30 22 2C 22 76 6F|100","vo
    <00> info> app: NUS packet sent
    <00> info> dev: UART SEND, length:9
    <00> info> dev:  02 24 00 03 02 06 03 03|.$......
    <00> info> dev:  00                     |.       
    <00> info> dev: UART RECEIVE, length:114.
    <00> info> dev:  02 24 00 6C 02 7B 22 63|.$.l.{"c
    <00> info> dev:  6E 74 22 3A 31 30 31 2C|nt":101,
    <00> info> dev:  22 74 69 6D 65 22 3A 22|"time":"
    <00> info> dev:  32 30 31 38 30 34 31 31|20180411
    <00> info> dev:  54 30 30 30 30 30 30 5A|T000000Z
    <00> info> dev:  22 2C 22 74 79 70 65 22|","type"
    <00> info> dev:  3A 22 69 6E 6A 65 63 74|:"inject
    <00> info> dev:  69 6F 6E 22 2C 22 64 72|ion","dr
    <00> info> dev:  75 67 22 3A 22 4E 6F 5F|ug":"No_
    <00> info> dev:  31 30 31 22 2C 22 76 6F|101","vo
    <00> info> app: NUS packet sent
    <00> info> dev: UART SEND, length:9
    <00> info> dev:  02 24 00 03 02 06 03 03|.$......
    <00> info> dev:  00                     |.       
    <00> info> app: Disconnected
    <00> info> app: Disconnected, reason: 0x22
    <00> info> app: whitelist has 1 addr and 1 irk
    <00> info> app: Fast advertising with Whitelist
    <00> info> dev: UART SEND, length:8
    <00> info> dev:  02 24 FF 02 00 01 03 00|.$......
    <00> info> app: Advertising started
    <00> error> dev: NRF_SERIAL_EVENT_DRV_ERR(0x00000001)
    
    
    
    
    
    
    
    0x22_003
    
    <00> info> dev:  22 74 69 6D 65 22 3A 22|"time":"
    <00> info> dev:  32 30 31 38 31 31 30 39|20181109
    <00> info> dev:  54 30 30 30 30 30 30 5A|T000000Z
    <00> info> dev:  22 2C 22 74 79 70 65 22|","type"
    <00> info> dev:  3A 22 69 6E 6A 65 63 74|:"inject
    <00> info> dev:  69 6F 6E 22 2C 22 64 72|ion","dr
    <00> info> dev:  75 67 22 3A 22 4E 6F 5F|ug":"No_
    <00> info> dev:  33 31 33 22 2C 22 76 6F|313","vo
    <00> info> app: NUS packet sent
    <00> info> dev: UART SEND, length:9
    <00> info> dev:  02 24 00 03 02 06 03 03|.$......
    <00> info> dev:  00                     |.       
    <00> info> dev: UART RECEIVE, length:114.
    <00> info> dev:  02 24 00 6C 02 7B 22 63|.$.l.{"c
    <00> info> dev:  6E 74 22 3A 33 31 34 2C|nt":314,
    <00> info> dev:  22 74 69 6D 65 22 3A 22|"time":"
    <00> info> dev:  32 30 31 38 31 31 31 30|20181110
    <00> info> dev:  54 30 30 30 30 30 30 5A|T000000Z
    <00> info> dev:  22 2C 22 74 79 70 65 22|","type"
    <00> info> dev:  3A 22 69 6E 6A 65 63 74|:"inject
    <00> info> dev:  69 6F 6E 22 2C 22 64 72|ion","dr
    <00> info> dev:  75 67 22 3A 22 4E 6F 5F|ug":"No_
    <00> info> dev:  33 31 34 22 2C 22 76 6F|314","vo
    <00> info> app: NUS packet sent
    <00> info> dev: UART SEND, length:9
    <00> info> dev:  02 24 00 03 02 06 03 03|.$......
    <00> info> dev:  00                     |.       
    <00> info> app: Disconnected
    <00> info> app: Disconnected, reason: 0x22
    <00> info> app: whitelist has 1 addr and 1 irk
    <00> info> app: Fast advertising with Whitelist
    <00> info> dev: UART SEND, length:8
    <00> info> dev:  02 24 FF 02 00 01 03 00|.$......
    <00> info> app: Advertising started
    <00> info> dev: UART SEND, length:8
    <00> info> dev:  02 24 FF 02 00 05 03 00|.$......
    <00> info> app: Enter sleep
    <00> info> app: Start to run!
    <00> info> dev: FDS Init completed
    <00> info> app: Enter sleep
    
  • It is difficult to know exactly what is failing here, there is no specific violation in the log that I can find. In the past I have seen some of the old phones do not gracefully handle if there is data length exchange initiated directly upon connection, so that is why I wanted you to try the delay to check if that is the cause. 

    Alternatively you may also want to try to check if you are somewhere calling pm_handler_secure_on_connection() and change that to pm_handler_secure_on_error() instead. What is the purpose of this change? Don't trigger security procedure upon connection, but only if security fails. This will follow apple guidelines that security should be initiated by the phone.

    I believe the only way to root cause this is for you to try with the specific phone again and check if any of the above remove the failure situation.

    Best regards,
    Kenneth

  • What we have confirmed is that an error occurs in two cases.

    1. Not responding to the host when restarting encryption
     
    2. Normal data communication, nRF52 not responding.

    Is the solution the same in both cases?

Related