Hi,
Entering a static OOB key in meshctl requires all 16 bytes. With the
following change a shorter
key can be entered. I have never created a patch, so sorry about the format:
In agent.c @ line 102:
static bool response_hexadecimal(const char *input)
{
uint8_t buf[MAX_HEXADECIMAL_OOB_LEN];
if (!str2hex(input, strlen(input), buf, pending_request.len) ) {
rl_printf("Incorrect input: expecting %d hex octets\n",
pending_request.len);
return false;
}
...
changes to:
static bool response_hexadecimal(const char *input)
{
uint8_t buf[MAX_HEXADECIMAL_OOB_LEN];
memset(buf, 0, pending_request.len);
str2hex(input, strlen(input), buf, strlen(input)/2);
...
Kind regards,
Jehudi
SGkgSmVodWRpLA0KDQpXZSBuZWVkIHRvIGJlIGNhcmVmdWwgdGhhdCB3ZSBkbyBub3QgY29tcHJv
bWlzZSB0aGUgc2VjdXJpdHkgbGV2ZWwgd2hlbiBvcGVyYXRpbmcgd2l0aCBISUdIIHNlY3VyaXR5
LiANCg0KSElHSCBTZWN1cml0eSBwcm92aXNpb25pbmcgIGlzIGRlZmluZWQgYXMgdGhlIHByb3Zp
c2lvbmVyIGdldHRpbmcgZWl0aGVyIHRoZSBmdWxsIDY0IGJ5dGVzIG9mIHRoZSBuZXcgZGV2aWNl
J3MgUHVibGljIEtleSBPdXQtT2YtQmFuZCwgKm9yKiB0aGUgZnVsbCAxNiBieXRlcyBvZiBoaWdo
IHF1YWxpdHkgU3RhdGljIERhdGEgT3V0LU9mLUJhbmQuDQoNCkFueSAiV2VsbCBLbm93biIga2V5
cyBvciBzdGF0aWMgZGF0YSwgb3IgU3RhdGljIGRhdGEgdGhhdCBkb2VzIG5vdCB1c2UgYWxsIHRo
ZSBieXRlcyBhdmFpbGFibGUgY29tcHJvbWlzZXMgdGhlIHNlY3VyaXR5IG9mIE1lc2guDQoNCg0K
QXMgSSBzYWlkIGluIGFub3RoZXIgdGhyZWFkIGhlcmUsICB0d2Vha3MgdG8gdGhlIGNvZGUgdG8g
c2ltcGxpZnkgdGVzdGluZyBjYW4gYmUgdmFsdWFibGUgZHVy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