Skip to content

Wifi: ublox fix to keep the credentials stored #8566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ nsapi_error_t OdinWiFiInterface::set_credentials(const char *ssid, const char *p
osStatus res = _mutex.lock();
MBED_ASSERT(res == osOK);

_sta.ssid = ssid;
_sta.passwd = pass;
strncpy(_sta.ssid, ssid, cbWLAN_SSID_MAX_LENGTH);
strncpy(_sta.passwd, pass, cbWLAN_MAX_PASSPHRASE_LENGTH);
_sta.security = security;

res = _mutex.unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ class OdinWiFiInterface : public WiFiInterface, public EMACInterface
};

struct sta_s {
const char *ssid;
const char *passwd;
char ssid[cbWLAN_SSID_MAX_LENGTH];
char passwd[cbWLAN_MAX_PASSPHRASE_LENGTH];
nsapi_security_t security;
uint8_t channel;
int timeout_ms;
Expand Down