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

Changed the variable length of wifi_psk #402

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

tobi-sys
Copy link
Contributor

Correct the length of the variable wifi_psk

WiFi PSK can be 256 bits = 32 Bytes and can be represented by a 64 character long hexadecimal string
The size of the variable must be 65 bytes to hold the string and the trailing \0

WiFi PSK can be 256 bits = 32 Bytes and can be represented by a 64 character long hexadecimal string
The size of the variable must be 65 bytes to hold the string and the trailing \0
@CLAassistant
Copy link

CLAassistant commented Nov 10, 2023

CLA assistant check
All committers have signed the CLA.

@garthvh
Copy link
Member

garthvh commented Nov 10, 2023

This change would need to be made in the protobufs repo

@garthvh garthvh closed this Nov 10, 2023
@garthvh garthvh reopened this Nov 10, 2023
@garthvh
Copy link
Member

garthvh commented Nov 10, 2023

Sorry, missed the repo, was looking at another issue. Is 1 byte more enough to save a 64 byte password? We probably can’t go much bigger.

@tobi-sys
Copy link
Contributor Author

currently 63 character long key can be stored in the variable
meshtastic --set network.wifi_psk 123456789A123456789B123456789C123456789D123456789E123456789F123
Connected to radio
Set network.wifi_psk to 123456789A123456789B123456789C123456789D123456789E123456789F123
Writing modified preferences to device
meshtastic --get network.wifi_psk
Connected to radio
network.wifi_psk: 123456789A123456789B123456789C123456789D123456789E123456789F123
Completed getting preferences

a one byte longer variable (so 65 bytes) can hold the possible 64 character long PSK and the string termination (\0)

@tobi-sys
Copy link
Contributor Author

relates to the pull request meshtastic/meshtastic#875

@thebentern
Copy link
Contributor

Please sign the CLA

@caveman99 caveman99 merged commit c845b78 into meshtastic:master Nov 15, 2023
1 check failed
@tobi-sys tobi-sys deleted the patch-1 branch November 15, 2023 22:10
andrekir added a commit to meshtastic/Meshtastic-Android that referenced this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants