[GH-ISSUE #317] Problem with custom parameters #267

Closed
opened 2026-02-28 01:24:24 +03:00 by kerem · 1 comment
Owner

Originally created by @safari2 on GitHub (Feb 17, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/317

Hi.
I tried to store/load BLYNK_TOKEN with ESP_BLYNK_AutoConnectWithFSParameters example.
It seems to library truncates BLYNK_TOKEN for 31 bytes (now the lengths is 32 bytes);
Example 1)
I'm trying to store:
c365a207fc3549d5ba0e5828e39e09d9
loads:
c365a207fc3549d5ba0e5828e39e09d

Example 2)
I'm trying to store:
----------++++++++++----------++
console said:
*WM: ----------++++++++++----------++

but json calls:
{"mqtt_server":"","mqtt_port":"8080","blynk_token":"----------++++++++++----------+"}

one symbol is truncated.
I've updated WIFIManager and ArduinoJson libraries today.

Originally created by @safari2 on GitHub (Feb 17, 2017). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/317 Hi. I tried to store/load BLYNK_TOKEN with ESP_BLYNK_AutoConnectWithFSParameters example. It seems to library truncates BLYNK_TOKEN for 31 bytes (now the lengths is 32 bytes); Example 1) I'm trying to store: c365a207fc3549d5ba0e5828e39e09d9 loads: c365a207fc3549d5ba0e5828e39e09d Example 2) I'm trying to store: ----------++++++++++----------++ console said: *WM: ----------++++++++++----------++ but json calls: {"mqtt_server":"","mqtt_port":"8080","blynk_token":"----------++++++++++----------+"} one symbol is truncated. I've updated WIFIManager and ArduinoJson libraries today.
kerem closed this issue 2026-02-28 01:24:25 +03:00
Author
Owner

@safari2 commented on GitHub (Feb 17, 2017):

Solved with this mod:
(-) WiFiManagerParameter custom_blynk_token("blynk", "blynk token", blynk_token, 32);

(+) WiFiManagerParameter custom_blynk_token("blynk", "blynk token", blynk_token, 36);

I suppose there are need to +1 byte for NULL terminated string. I've added more bytes for future reserving.
Also I've added in array declaration:
char blynk_token[36]

Please fix in example.

<!-- gh-comment-id:280711507 --> @safari2 commented on GitHub (Feb 17, 2017): Solved with this mod: (-) WiFiManagerParameter custom_blynk_token("blynk", "blynk token", blynk_token, 32); (+) WiFiManagerParameter custom_blynk_token("blynk", "blynk token", blynk_token, 36); I suppose there are need to +1 byte for NULL terminated string. I've added more bytes for future reserving. Also I've added in array declaration: char blynk_token[36] Please fix in example.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#267
No description provided.