Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chip-tool] OpCSRResponse parsing failure in chip-tool #6867

Closed
gjc13 opened this issue May 17, 2021 · 1 comment
Closed

[chip-tool] OpCSRResponse parsing failure in chip-tool #6867

gjc13 opened this issue May 17, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@gjc13
Copy link
Contributor

gjc13 commented May 17, 2021

Problem

Currently the add operational credential flow cannot run with chip-tool and all-cluster-app.

chip-tool output:

CHIP:IN: Secure transport received message destined to node ID (112233)                                                                      
CHIP:IN: Setting fabricID BC5C01 on admin.   
CHIP:IN: Since admin was modified, persisting changes to KVS
CHIP:EM: Received message of type 9 and protocolId 327680
CHIP:DMG: InvokeCommand =                                             
CHIP:DMG: {                                                           
CHIP:DMG:       CommandList =                                         
CHIP:DMG:       [                                                     
CHIP:DMG:               CommandDataElement =                          
CHIP:DMG:               {                                                
CHIP:DMG:                       CommandPath =                         
CHIP:DMG:                       {                                     
CHIP:DMG:                               EndpointId = 0x0,
CHIP:DMG:                               ClusterId = 0x3e,             
CHIP:DMG:                               CommandId = 0x5,
CHIP:DMG:                       },                                    
CHIP:DMG:                                                             
CHIP:DMG:                       CommandData =  
CHIP:DMG:                       {                                                                                                            
CHIP:DMG:                               0x0 = [ 
CHIP:DMG:                                       0x30, 0x81, 0xc8, 0x30, 0x70, 0x2, 0x1, 0x0, 0x30, 0xe, 0x31, 0xc, 0x30, 0xa, 0x6, 0x3, 0x55, 0x4, 0xa, 0xc, 0x3, 0x43, 0x53, 0x52, 0x30, 0x59, 0x30, 0x13, 0x6, 0x7, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x2, 0x1, 0x6, 0x8, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x3,                                                      
CHIP:DMG:                       ]                                     
CHIP:DMG:                               0x1 = [
CHIP:DMG:                                       0x30, 0x53, 0x9f, 0x5d, 0xf7, 0x2b, 0xe3, 0x2a, 0x89, 0x8e, 0x4c, 0xae, 0xfb, 0x8c, 0xfb, 0x78, 0x53, 0xb1, 0x19, 0x90, 0xb2, 0x6a, 0x74, 0xb6, 0xf, 0x19, 0x14, 0x62, 0xc7, 0xf, 0xdf, 0x29,                                             
CHIP:DMG:                       ]                                     
CHIP:DMG:                               0x2 = [
CHIP:DMG:                                                             
CHIP:DMG:                       ]                                     
CHIP:DMG:                               0x3 = [
CHIP:DMG:                                                             
CHIP:DMG:                       ]                                     
CHIP:DMG:                               0x4 = [    
CHIP:DMG:                                                             
CHIP:DMG:                       ]                                     
CHIP:DMG:                               0x5 = [    
CHIP:DMG:                                                             
CHIP:DMG:                       ]                                     
CHIP:DMG:                       },                                    
CHIP:DMG:               },                                            
CHIP:DMG:                                                             
CHIP:DMG:       ],                                                    
CHIP:DMG:                                                             
CHIP:DMG: }                                                           
CHIP:ZCL: Received Cluster Command: Cluster=3e Command=5 Endpoint=0
CHIP:ZCL: Unknown command 5 for cluster 3e         
CHIP:DMG: ICR moving to [Initialize]         
CHIP:ZCL: DefaultResponse:                                            
CHIP:ZCL:   Transaction: 0x5591b1881b20      
CHIP:ZCL:   status: EMBER_ZCL_STATUS_SUCCESS (0x00)
CHIP:CTL: Received certificate signing request from the device
CHIP:CTL: Generating operational certificate for device bc5c01
CHIP:CR:  ssl err  asn1 encoding routines ASN1_get_object header too long                                                                    
                                                                      
CHIP:CR:  ssl err  asn1 encoding routines asn1_check_tlen bad object header                                                                  
                                                                      
CHIP:CR:  ssl err  asn1 encoding routines asn1_item_embed_d2i nested asn1 error                                                              
                                                                      
CHIP:CTL: Failed to process the certificate signing request
CHIP:TOO: Secure Pairing Failed                                       
CHIP:TOO: Pairing Failure: CHIP Error 4172 (0x0000104C): Internal error                                                                      

all-cluster-app output on rapberry pi:

CHIP:IN: Secure transport received message destined to node ID (12344321)                                                                                                                                                                                                                 
CHIP:IN: Setting nodeID BC5C01 on admin.                                                                                                                                                                                                                                                  
CHIP:IN: Setting fabricID 1B669 on admin.                                                                                                                                                                                                                                                 
CHIP:IN: Since admin was modified, persisting changes to KVS                                                                                                                                                                                                                              
CHIP:SVR: Stored value in server storage                                                                                                                                                                                                                                                  
CHIP:DL: writing settings to file (/tmp/chip_server_kvs.tmp)                                                                                                                                                                                                                              
CHIP:DL: renamed tmp file to file (/tmp/chip_server_kvs)                                                                                                                                                                                                                                  
CHIP:DIS: Admin (0) persisted to storage. Calling OnAdminPersistedToStorage.                                                                 
CHIP:ZCL: OpCreds: Admin 0 was persisted to storage. FabricId 1B669, NodeId BC5C01, VendorId AAAAE794283C                                    
CHIP:ZCL: OpCreds: Call to writeAdminsIntoFabricsListAttribute
CHIP:ZCL: OpCreds: Skipping over unitialized admin with fabricId 1B669, nodeId BC5C01 vendorId 0                                             
CHIP:ZCL: OpCreds: Stored 0 admins in fabrics list attribute.
CHIP:EM: Received message of type 8 and protocolId 327680
CHIP:EM: ec id: 39018, Delegate: 0xbf4c0248      
CHIP:DMG: ICR moving to [Initialize]             
CHIP:DMG: InvokeCommand =                                             
CHIP:DMG: {                                                           
CHIP:DMG:       CommandList =                                         
CHIP:DMG:       [                                                     
CHIP:DMG:               CommandDataElement =            
CHIP:DMG:               {                                             
CHIP:DMG:                       CommandPath =                         
CHIP:DMG:                       {                                                                                                            
CHIP:DMG:                               EndpointId = 0x0,                                                                                    
CHIP:DMG:                               ClusterId = 0x3e,             
CHIP:DMG:                               CommandId = 0x4,
CHIP:DMG:                       },                                    
CHIP:DMG:                                                             
CHIP:DMG:                       CommandData = 
CHIP:DMG:                       {                                     
CHIP:DMG:                               0x0 = [
CHIP:DMG:                                       0x30, 0x53, 0x9f, 0x5d, 0xf7, 0x2b, 0xe3, 0x2a, 0x89, 0x8e, 0x4c, 0xae, 0xfb, 0x8c, 0xfb, 0x78, 0x53, 0xb1, 0x19, 0x90, 0xb2, 0x6a, 0x74, 0xb6, 0xf, 0x19, 0x14, 0x62, 0xc7, 0xf, 0xdf, 0x29, 
CHIP:DMG:                       ]                                     
CHIP:DMG:                       },                                    
CHIP:DMG:               },                                            
CHIP:DMG:                                                             
CHIP:DMG:       ],                                                    
CHIP:DMG:                                                             
CHIP:DMG: }                                                           
CHIP:ZCL: Received Cluster Command: Cluster=3e Command=4 Endpoint=0
CHIP:ZCL: OpCreds: commissioner has requested an OpCSR
CHIP:ZCL: OpCreds: Finding admin with fabricId  1B669.
CHIP:DIS: Looking at index 0 with fabricID 112233 nodeID 12344321 vendorId 0 to see if it matches fabricId 112233 nodeId 0 vendorId 0.       
CHIP:DIS: Found a match!                                              
CHIP:ZCL: OpCreds: NewCertificateSigningRequest returned 0
CHIP:DMG: ICR moving to [AddCommand]
CHIP:IN: Secure message was encrypted: Msg ID 1
CHIP:IN: Sending msg from 0x0000000000bc5c01 to 0x000000000001b669 at utc time: 1750332605 msec                                              
CHIP:IN: Sending secure msg on generic transport
CHIP:IN: Secure msg send status No Error
CHIP:DMG: ICR moving to [   Sending]
CHIP:DMG: ICR moving to [Uninitiali]
CHIP:BLE: Indication confirmation, 0xffffa0030790

Not sure if related, but command 5 OpCSRResponse is missing from the generated ZCL code in chip-tool.

Proposed Solution

@gjc13 gjc13 added TE3 bug Something isn't working labels May 17, 2021
@gjc13 gjc13 changed the title [chip-tool] OpCSRResponse parsing failure missing in chip-tool zap [chip-tool] OpCSRResponse parsing failure in chip-tool May 17, 2021
@gjc13
Copy link
Contributor Author

gjc13 commented May 26, 2021

Fixed in #6873

@gjc13 gjc13 closed this as completed May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants