meshtastic / python

The Python CLI and API for talking to Meshtastic devices
https://meshtastic.org
379 stars 160 forks source link

CLI --ch-set psk random not working #95

Closed jfirwin closed 3 years ago

jfirwin commented 3 years ago
~ $ meshtastic --ch-set psk random
Connected to radio
Aborting due to: name 'genPSK256' is not defined

I believe the issue has to do with these lines based on the error message. Or the function not being imported properly? I really need to step up my python skills so I can be more effective at debugging.

geeksville commented 3 years ago

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/encryption-clarification/3425/4

jfirwin commented 3 years ago

I'm on macOS, I'll confirm this is the case with windows as well. On macOS I saw the following in terminal based off of this line.

~ $ python3
Python 3.9.0 (v3.9.0:9cf6752276, Oct  5 2020, 11:29:23) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.urandom(32)
b'[byte information]'
>>> 
~ $ python3
Python 3.9.2 (default, Feb 19 2021, 17:09:53) 
[Clang 12.0.0 (clang-1200.0.32.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.urandom(32)
b'[byte information]'
>>>
jfirwin commented 3 years ago

Confirmed on Windows 10 running gitbash that same error

Aborting due to: name 'genPSK256' is not defined
$ winpty python
Python 3.9.4 (...)
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.urandom(32)
b'[byte information]'
>>>
geeksville commented 3 years ago

1.2.36 just pushed to pypi!