Skip to content

Commit

Permalink
Matter tentative fix for SmartThings (#19620)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger authored Sep 30, 2023
1 parent f0b7984 commit d1c643a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
8 changes: 4 additions & 4 deletions lib/libesp32/berry_matter/src/embedded/Matter_Session.be
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ class Matter_Session : Matter_Expirable
def get_fabric_id() return self._fabric.fabric_id end
def get_fabric_index() return self._fabric ? self._fabric.fabric_index : nil end
def get_device_id() return self._fabric ? self._fabric.device_id : nil end
def get_fabric_compressed() return self._fabric.fabric_compressed end
def get_fabric_label() return self._fabric.fabric_label end
def get_admin_subject() return self._fabric.admin_subject end
def get_admin_vendor() return self._fabric.admin_vendor end
def get_fabric_compressed() return self._fabric ? self._fabric.fabric_compressed : nil end
def get_fabric_label() return self._fabric ? self._fabric.fabric_label : nil end
def get_admin_subject() return self._fabric ? self._fabric.admin_subject : nil end
def get_admin_vendor() return self._fabric ? self._fabric.admin_vendor : nil end

#############################################################
# Get operational key pair (private key)
Expand Down
40 changes: 28 additions & 12 deletions lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session.h
Original file line number Diff line number Diff line change
Expand Up @@ -811,10 +811,14 @@ be_local_closure(Matter_Session_get_admin_subject, /* name */
}),
be_str_weak(get_admin_subject),
&be_const_str_solidified,
( &(const binstruction[ 3]) { /* code */
( &(const binstruction[ 7]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x88040301, // 0001 GETMBR R1 R1 K1
0x80040200, // 0002 RET 1 R1
0x78060002, // 0001 JMPF R1 #0005
0x88040100, // 0002 GETMBR R1 R0 K0
0x88040301, // 0003 GETMBR R1 R1 K1
0x70020000, // 0004 JMP #0006
0x4C040000, // 0005 LDNIL R1
0x80040200, // 0006 RET 1 R1
})
)
);
Expand All @@ -840,10 +844,14 @@ be_local_closure(Matter_Session_get_fabric_compressed, /* name */
}),
be_str_weak(get_fabric_compressed),
&be_const_str_solidified,
( &(const binstruction[ 3]) { /* code */
( &(const binstruction[ 7]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x88040301, // 0001 GETMBR R1 R1 K1
0x80040200, // 0002 RET 1 R1
0x78060002, // 0001 JMPF R1 #0005
0x88040100, // 0002 GETMBR R1 R0 K0
0x88040301, // 0003 GETMBR R1 R1 K1
0x70020000, // 0004 JMP #0006
0x4C040000, // 0005 LDNIL R1
0x80040200, // 0006 RET 1 R1
})
)
);
Expand Down Expand Up @@ -1261,10 +1269,14 @@ be_local_closure(Matter_Session_get_fabric_label, /* name */
}),
be_str_weak(get_fabric_label),
&be_const_str_solidified,
( &(const binstruction[ 3]) { /* code */
( &(const binstruction[ 7]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x88040301, // 0001 GETMBR R1 R1 K1
0x80040200, // 0002 RET 1 R1
0x78060002, // 0001 JMPF R1 #0005
0x88040100, // 0002 GETMBR R1 R0 K0
0x88040301, // 0003 GETMBR R1 R1 K1
0x70020000, // 0004 JMP #0006
0x4C040000, // 0005 LDNIL R1
0x80040200, // 0006 RET 1 R1
})
)
);
Expand Down Expand Up @@ -1481,10 +1493,14 @@ be_local_closure(Matter_Session_get_admin_vendor, /* name */
}),
be_str_weak(get_admin_vendor),
&be_const_str_solidified,
( &(const binstruction[ 3]) { /* code */
( &(const binstruction[ 7]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x88040301, // 0001 GETMBR R1 R1 K1
0x80040200, // 0002 RET 1 R1
0x78060002, // 0001 JMPF R1 #0005
0x88040100, // 0002 GETMBR R1 R0 K0
0x88040301, // 0003 GETMBR R1 R1 K1
0x70020000, // 0004 JMP #0006
0x4C040000, // 0005 LDNIL R1
0x80040200, // 0006 RET 1 R1
})
)
);
Expand Down

0 comments on commit d1c643a

Please sign in to comment.