Closed cschwick closed 3 months ago
Hi Chris, thanks for your contribution. The code is still partly from version 1. I have edited the part that reads the networks.csv. I don't have a public network to test, but hope it works. _TFT_SCK, _TFT_MISO and TFT_MOSI in the tft lib are leftovers from days gone by, I've removed them. I'll look at the rest of your suggestions later. If you still find "problematic code", please let me know.
best regards Wolle
Thanks Wolle, I just tested your mod "in the field" and the radio connects flawlessly to my password-free network!
Chris
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Dear Wolle,
I have spotted a small "feature" when trying to connect the radio to a Wifi network without password (e.g. when security in companies or institutes is provided via registration of devices they usually do not require a password to connect to the Wifi).
In the function (main.cpp) connectToWifi() the parsing of the lines in the file "stations.csv" is done in a loop reading all characters and searching for the TAB separator. However, if a line in "stations.csv" does not contain a password and hence 2 consecutive TABs, the algorithm misses the second TAB since it assumes between 2 TABs there is always something written. (The i++ in the code below makes the character index i increment by 2 characters when a TAB is found):
A very simple modification solves the issues and allows to also connect to networks without a password (Note that also the line checking for an empty password is commented out in order to "allow" for empty passwords.):
Finally two "cosmetical" hints: In tft.h I think the variables _TFT_SCK, _TFT_MISO and TFT_MOSI are actually never used and hence the declarations could be removed. And finally the constructor of dlnaList (in common.h line 1685) you assign a default value to the parameter m_name in case the user did not supply a name in the constructor. I guess the value comes from some "copy/paste" coding of the AlarmClock class and probably you want to assign a value like "dlnaList" here... (not that it matters much...)). Similarly the default value for m_name in the slider, vuMeter, displayHeader, and displayFooter classes is "textBox" at the moment. (I understand that in the constructors always the correct name is provided).
I hope you find this useful! Thanks again for this cool project,
Chris