Handling WiFi network.
More...
|
kvrStatus | kvrNetworkConnectionTest (kvrConfigHandle handle, int32_t active) |
|
kvrStatus | kvrNetworkGetRssiRtt (kvrConfigHandle handle, kvrRssiHistory *rssi, uint32_t rssi_size, uint32_t *rssi_count, kvrRttHistory *rtt, uint32_t rtt_size, uint32_t *rtt_count) |
|
kvrStatus | kvrWlanStartScan (kvrConfigHandle handle, int32_t active, int32_t bss_type, int32_t domain) |
|
kvrStatus | kvrWlanGetScanResults (kvrConfigHandle handle, int32_t *rssi, int32_t *channel, kvrAddress *mac, int32_t *bss_type, char *ssid, uint32_t *capability, uint32_t *type_wpa, kvrCipherInfoElement *wpa_info, kvrCipherInfoElement *rsn_info) |
|
kvrStatus | kvrNetworkGetHostName (kvrConfigHandle handle, char *buffer, uint32_t buffer_size) |
|
kvrStatus | kvrHostName (uint32_t ean_hi, uint32_t ean_lo, uint32_t ser_no, char *buffer, uint32_t buffer_size) |
|
kvrStatus | kvrNetworkGetConnectionStatus (kvrConfigHandle handle, int32_t *state, int32_t *tx_rate, int32_t *rx_rate, int32_t *channel, int32_t *rssi, int32_t *tx_power) |
|
kvrStatus | kvrNetworkGetAddressInfo (kvrConfigHandle handle, kvrAddress *address1, kvrAddress *address2, kvrAddress *netmask, kvrAddress *gateway, int32_t *dhcp) |
|
Handling WiFi network.
◆ kvrHostName()
kvrStatus kvrHostName |
( |
uint32_t |
ean_hi, |
|
|
uint32_t |
ean_lo, |
|
|
uint32_t |
ser_no, |
|
|
char * |
buffer, |
|
|
uint32_t |
buffer_size |
|
) |
| |
Read the generated Hostname.
- Parameters
-
[in] | ean_hi | The device EAN_high number. |
[in] | ean_lo | The device EAN_low number. |
[in] | ser_no | The device serial number. |
[out] | buffer | The device Hostname as a C string. |
[in] | buffer_size | The device Hostname buffer size. |
- Returns
- kvrOK on success or any other kvrStatus on failure.
◆ kvrNetworkConnectionTest()
◆ kvrNetworkGetAddressInfo()
Get information about the network address settings. For a WLAN connected device, address1, netmask and gateway are IP addresses and address2 is the MAC address.
- Parameters
-
[in] | handle | A configuration handle. |
[out] | address1 | The first address associated with the device. |
[out] | address2 | The second address associated with the device. |
[out] | netmask | The netmask for the device. |
[out] | gateway | The gateway for the device. |
[out] | dhcp | The device ueses Dynamic Host Configuration Protocol (DHCP). |
- Returns
- kvrOK on success or any other kvrStatus on failure.
- Examples:
- example/c/kvrConfig.c.
◆ kvrNetworkGetConnectionStatus()
kvrStatus kvrNetworkGetConnectionStatus |
( |
kvrConfigHandle |
handle, |
|
|
int32_t * |
state, |
|
|
int32_t * |
tx_rate, |
|
|
int32_t * |
rx_rate, |
|
|
int32_t * |
channel, |
|
|
int32_t * |
rssi, |
|
|
int32_t * |
tx_power |
|
) |
| |
Get connection status information.
- Parameters
-
[in] | handle | A configuration handle. |
[out] | state | Network connection state, see kvrNetworkState_xxx. |
[out] | tx_rate | Transmit rate in kbit/s. |
[out] | rx_rate | Receive rate in kbit/s. |
[out] | channel | Channel. |
[out] | rssi | Receive Signal Strength Indicator (RSSI). |
[out] | tx_power | Transmit power level in dB. |
- Returns
- kvrOK on success or any other kvrStatus on failure.
- Examples:
- example/c/kvrConfig.c.
◆ kvrNetworkGetHostName()
Read the device Hostname.
- Parameters
-
[in] | handle | A configuration handle |
[out] | buffer | The device Hostname as a C string. |
[in] | buffer_size | The device Hostname buffer size. |
- Returns
- kvrOK on success or any other kvrStatus on failure.
◆ kvrNetworkGetRssiRtt()
Get a history of Receive Signal Strength Indicator (RSSI) and round-trip delay time (RTT) from the connection test.
- Parameters
-
[in] | handle | A configuration handle. |
[out] | rssi | Receive Signal Strength Indicator. |
[in] | rssi_size | Number of entries in rssi. |
[out] | rssi_count | Number of RSSI elements returned. |
[out] | rtt | Round-trip delay time. |
[in] | rtt_size | Number of entries in rtt. |
[out] | rtt_count | Number of RTT elements returned. |
- Returns
- kvrOK on success or any other kvrStatus on failure.
- See also
- kvrNetworkConnectionTest()
- Examples:
- example/c/kvrConfig.c, and example/c/kvrNetworkConnectionTest.c.
◆ kvrWlanGetScanResults()
Get results from WLAN scan. Call kvrWlanGetScanResults() until it returns kvrERR_BLANK to mark that no more information is available from this scan.
To convert the security information into a more human readable form, use kvrWlanGetSecurityText().
- Parameters
-
[in] | handle | A configuration handle. |
[out] | rssi | Receive Signal Strength Indicator (RSSI). |
[out] | channel | WLAN Channel. |
[out] | mac | Media Access Control address. |
[out] | bss_type | Basic Service Set (BSS) (see kvrBss_xxx). |
[out] | ssid | Service Set Identifier(SSID) as a C string. Maximum length is 32 bytes. |
[out] | capability | The advertised capabilities of the BSS. |
[out] | type_wpa | Only type 1 (802.1X) is supported for connection. |
[out] | wpa_info | Advertised information for WPA (see kvrCipherInfoElement). |
[out] | rsn_info | Advertised information for RSN (see kvrCipherInfoElement). |
- Returns
- kvrOK on success, kvrERR_NO_ANSWER when waiting for further scan results kvrERR_BLANK when no further scan results are available or any other kvrStatus on failure.
- Examples:
- example/c/kvrConfig.c.
◆ kvrWlanStartScan()
Initiate a scan for existing WLAN networks. The result is acquired with consecutive calls to kvrWlanGetScanResults(). A new scan can not be initiated until all data has been retrieved from the previous one.
- Note
- The device should not be connected to a network when scanning. This includes the implicit connection done by kvrNetworkConnectionTest().
- Parameters
-
[in] | handle | A configuration handle. |
[in] | active | If set, performs an active scan. |
[in] | bss_type | Basic service set (BSS) selection. kvrBss_xxx. |
[in] | domain | Regulatory domain. See kvrRegulatoryDomain_xxx. |
- Returns
- kvrOK on success, kvrERR_NO_ANSWER when previous scan is ongoing or any other kvrStatus on failure.
- Examples:
- example/c/kvrConfig.c.