I’m having trouble with customizing the AP name via the host MCU. All my other setup/config is working (ie hub set, sensors, syncing data, etc).
This is my request:
{
J *req = notecard.newRequest("card.wifi");
JAddStringToObject(req, "name", "hellonotecard");
JAddStringToObject(req, "org", "helloorg");
JAddBoolToObject(req, "start", true);
notecard.sendRequest(req);
}
Which starts the AP with the name “Notecard”
I also tried separately:
{
J *req = notecard.newRequest("card.wifi");
JAddStringToObject(req, "name", "hellonotecard");
JAddStringToObject(req, "org", "helloorg");
notecard.sendRequest(req);
}
which responds:
{"version":"WFM200.0.0.0","name":"hellonotecard","org":"helloorg","security":"open"}
Then i turn on AP mode:
{
J *req = notecard.newRequest("card.wifi");
JAddBoolToObject(req, "start", true);
notecard.sendRequest(req);
}
And the name is still “Notecard”
I even tried without the notecard library just in case that was causing the problem but same result.
But the Funny thing is if i set the AP name via USB / notehub browser terminal in one request ie:
{ "req": "card.wifi", "name": "test", "start": true}
It starts the AP with the name “Notecard” still, ignoring my request.
BUT if i send it as two requests:
{ "req": "card.wifi", "name": "test"}
//get response and then i send:
{ "req": "card.wifi", "start": true}
Then it finally saves the name and loads the AP with the name “test”. It keeps the new name regardless of what i do via MCU requests and also keeps it even after device restore {“req”:“card.restore”, “delete”: true}
Card version was 3.5.2.15620 but i thought it might be a fixed bug so i updated to latest and tried again, same issue.
{
"version": "notecard-4.1.1.4015681",
"device": "dev:xxxxxxxxxxx",
"name": "Blues Wireless Notecard",
"sku": "NOTE-WIFI",
"board": "2.11",
"api": 4,
"body": {
"org": "Blues Wireless",
"product": "Notecard",
"version": "notecard-4.1.1",
"ver_major": 4,
"ver_minor": 1,
"ver_patch": 1,
"ver_build": 4015681,
"built": "Dec 5 2022 12:54:58"
}
I’ve tried everything i can think of, what am i doing wrong or missing here?