Page 1 of 1

Wifi driver question

Posted: Thu Jul 07, 2022 7:53 am
by SeeCwriter
When I build a v3.x project there are a number of warnings about an unsigned conversion regarding the error codes in NB::Error::GeneralErrors. For example, in file nbWiFiWilcDriver.cpp there are a number of functions, such as GetSecurity(), that return an uint8_t value. But the error codes all exceed the range of an unsigned byte, hence the warning. For example, in GetSecurity(), it can return a Timeout error, which is a value of -256. When that value is converted to a byte to be returned, it becomes a value of 0, which is "NoError".

I don't use the WiFi feature, but if I did I would be concerned. Is this behavior intentional?

Re: Wifi driver question

Posted: Tue Jul 12, 2022 1:28 pm
by mlara
Thanks for bringing this to our attention. This has now been patched for the next release of the NNDK.

To answer your question, that behavior was not intentional.

For anyone using the NBWIFIIN modules, this did not affect it's driver since it does not return values outside the range of a uint8_t. This was an error in a driver for an unreleased product. It was an oversight in our NBWIFI API, though, that could have affected potential WiFi products that we may develop in the future.

Re: Wifi driver question

Posted: Tue Jul 12, 2022 3:14 pm
by SeeCwriter
Thanks for the update.