UPDATE: Got it half working! The script boots up and re-connects to a previously-saved WiFi network just fine now - and runs through the entire cycle. The issue is that "wifi-pw" gets skipped if the saved WiFi network is not found. Need to fix.
Got it almost working using these steps:
- Burn "oledp4wnp1.img" to SD card and boot it up
- Copy the "entire folder" zip file I created 2021-11-17, extract it to the home folder
- Edit all the script files to have full path references or relative references
Next steps:
- Test each individual script (starting with wifi-scan.py) and its behavior on startup until they all work properly.
- Then run /usr/bin/python3 /root/BeBoXGui/wifi-wrap.py
Attempts:
This didn't work
- /etc/rc.local
Didn't work in Kali Linux.
This worked:
- crontab -e
* But you must adhere to pretty strict "rules":
- *** Must use full path to python3 binary (ex: /usr/bin/python3) and full path to script file (ex: /root/BeBoXGui/script.py)
- Inside the script files, any file references must be full path (or us "." like './fonts/font.ttf')
- Also, I had to put the script calls in "crontab -e" all on one line separated by "&&".
Crontab - Wait for Script to Finish w/"&&"
Adding "&&" at the end of a command in crontab forces the device to wait for one script to finish before the next starts.
Success:
- (Upon boot-up) Re-connecting to a previously saved network works great! (100%)
Known Issues:
- (Upon boot-up) Connecting to an unknown network fails
Next Steps:
- Make sure wifi-disp and wifi-pw display if Saved WiFi network is not found in scan.