mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
set pin
This commit is contained in:
parent
cffaaf2db3
commit
1d2fad9cec
1 changed files with 6 additions and 0 deletions
6
mccli.py
6
mccli.py
|
|
@ -501,6 +501,10 @@ class MeshCore:
|
|||
+ int(0).to_bytes(1, 'little')\
|
||||
+ int(0).to_bytes(1, 'little'))
|
||||
|
||||
async def set_devicepin (self, pin):
|
||||
return await self.send(b"\x37" \
|
||||
+ int(pin).to_bytes(4, 'little'))
|
||||
|
||||
async def get_contacts(self):
|
||||
""" Starts retreiving contacts """
|
||||
return await self.send(b"\x04")
|
||||
|
|
@ -652,6 +656,8 @@ async def next_cmd(mc, cmds):
|
|||
case "set":
|
||||
argnum = 2
|
||||
match cmds[1]:
|
||||
case "pin":
|
||||
print (await mc.set_devicepin(cmds[2]))
|
||||
case "radio":
|
||||
params=cmds[2].split(",")
|
||||
print (await mc.set_radio(params[0], params[1], params[2], params[3]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue