ttblue icon indicating copy to clipboard operation
ttblue copied to clipboard

Change dev_code to string to allow for codes starting with 0.

Open Grimler91 opened this issue 6 years ago • 0 comments

Add new var read_code and read -c argument into it and then strcpy into dev_code. I couldn't figure out how to read the popt arg straight into dev_code (and therefore added read_code)

I also removed the check if the code has length 6. Trying a too short or too long code now just gives authorization error. Trying to pair and giving more than 6 digits succeeds since fgets just reads 6 characters.

I get no compiler warnings and pairing and re-auth (with or without leading 0) works with a v2 watch.

Fixes #12.

Grimler91 avatar Dec 05 '18 17:12 Grimler91