Here are listed all the functions that implement the Wlan Configuration APIs.
Functions | |
sint8 | m2m_wifi_get_mac_address (uint8 *pu8MacAddr) |
Request the current MAC address of the device (the working mac address). (the function is Blocking until response received) More... | |
sint8 | m2m_wifi_get_otp_mac_address (uint8 *pu8MacAddr, uint8 *pu8IsValid) |
Request the MAC address stored on the OTP (one time programmable) memory of the device. (the function is Blocking until response received) More... | |
sint8 | m2m_wifi_set_battery_voltage (uint16 u16BattVoltx100) |
Set the battery voltage to update the firmware calculations. Not implemented in WINC3400 firmware. More... | |
sint8 | m2m_wifi_set_cust_InfoElement (uint8 *pau8M2mCustInfoElement) |
Asynchronous API to add or remove a user-defined Information Element. More... | |
sint8 | m2m_wifi_set_device_name (uint8 *pu8DeviceName, uint8 u8DeviceNameLength) |
Set the WINC3400 device name which is used as P2P device name. More... | |
sint8 | m2m_wifi_set_mac_address (uint8 au8MacAddress[6]) |
Asynchronous API for assigning a MAC address to the WINC. More... | |
sint8 | m2m_wifi_set_tx_power (uint8 u8TxPwrLevel) |
set the TX power tenuM2mTxPwrLevel More... | |
Request the current MAC address of the device (the working mac address). (the function is Blocking until response received)
Synchronous API to retrieve the MAC address currently in use by the device.
[out] | pu8MacAddr | Output MAC address buffer of 6 bytes size. |
This function obtains the MAC address that is currently in use by the device. If the function returns with @ref M2M_SUCCESS then the content of the memory referenced by pu8MacAddr will be populated with the 6 byte MAC address; otherwise, that memory will be left unchanged.
[out] | pu8MacAddr | Pointer to a buffer in memory containing a 6-byte MAC address (provided function returns M2M_SUCCESS). |
References hif_chip_sleep(), hif_chip_wake(), M2M_SUCCESS, and nmi_get_mac_address().
Request the MAC address stored on the OTP (one time programmable) memory of the device. (the function is Blocking until response received)
Synchronous API to query the MAC address programmed into the WINC OTP memory.
[out] | pu8MacAddr | Output MAC address buffer of 6 bytes size. Valid only if *pu8Valid=1. |
[out] | pu8IsValid | A output boolean value to indicate the validity of pu8MacAddr in OTP. Output zero if the OTP memory is not programmed, non-zero otherwise. |
This function attempts to read the device's MAC address from the One Time Programmable (OTP) memory on the WINC. The presence (yes or no) of a MAC address in the OTP memory and, in the case of it being present, its value is returned via RAM pointed to by the input arguments. Request the MAC address stored on the One Time Programmable(OTP) memory of the device. The function is blocking until the response is received.
[out] | pu8MacAddr | Output MAC address buffer 6 bytes in size. Valid only if *pu8Valid=1. |
[out] | pu8IsValid | A boolean value set by the callee to indicate the validity of pu8MacAddr in OTP. If no MAC has been programmed in the OTP the value of this parameter will be zero; otherwise it will be non-zero. |
References hif_chip_sleep(), hif_chip_wake(), M2M_SUCCESS, and nmi_get_otp_mac_address().
Set the battery voltage to update the firmware calculations.
Not implemented in WINC3400 firmware.
Set the battery voltage to update the firmware calculations.
Not implemented in WINC3400 firmware.
[in] | u16BattVoltx100 | battery voltage multiplied by 100 |
[in] | u16BattVoltx100 | Battery voltage multiplied by 100 |
References hif_send(), M2M_REQ_GROUP_WIFI, M2M_SUCCESS, M2M_WIFI_REQ_SET_BATTERY_VOLTAGE, NULL, and tstrM2mBatteryVoltage::u16BattVolt.
Asynchronous API to add or remove a user-defined Information Element.
This function allows the application to provide a custom Information Element to the WINC that will be included in all beacon and probe response frames, while in Access Point mode. If it is required to delete these IEs, fill the buffer with zeros.
[in] | pau8M2mCustInfoElement | Pointer to Buffer containing the IE to be used. It is the application developer's responsibility to ensure on the correctness of the information element's ordering passed in. If the pointer is null, this removes any current custom IE. If non-null, the pointer must reference data in the following format: |
--------------- ---------- ---------- ------------------- -------- -------- ----------- ----------------------- | Byte[0] | Byte[1] | Byte[2] | Byte[3:length1+2] | ..... | Byte[n] | Byte[n+1] | Byte[n+2:lengthx+2] | |---------------|----------|----------|-------------------|-------- --------|-----------|---------------------| | #of all Bytes | IE1 ID | Length1 | Data1(Hex Coded) | ..... | IEx ID | Lengthx | Datax(Hex Coded) | --------------- ---------- ---------- ------------------- -------- -------- ----------- -----------------------
The example demonstrates how the information elements are set using this function.
References hif_send(), M2M_REQ_GROUP_WIFI, M2M_WIFI_REQ_CUST_INFO_ELEMENT, and NULL.
Set the WINC3400 device name which is used as P2P device name.
Asynchronous API to set the Wi-Fi Direct "Device Name" of the WINC.
[in] | pu8DeviceName | Buffer holding the device name. |
[in] | u8DeviceNameLength | Length of the device name. |
Sets the WINC device name. The name string is used as a device name in DHCP hostname (option 12). If a device is not set through this function a default name is assigned. The default name is WINC-XX-YY, where XX and YY are the last 2 octets of the OTP MAC address. If OTP (eFuse) is programmed, then the default name is WINC-00-00.
[in] | pu8DeviceName | Buffer holding the device name. Device name is a null terminated C string. |
[in] | u8DeviceNameLength | Length of the device name. Should not exceed the maximum device name's length M2M_DEVICE_NAME_MAX (including null character). |
References tstrM2MDeviceNameConfig::au8DeviceName, hif_send(), M2M_DEVICE_NAME_MAX, m2m_memcpy(), M2M_REQ_GROUP_WIFI, M2M_WIFI_REQ_SET_DEVICE_NAME, and NULL.
Asynchronous API for assigning a MAC address to the WINC.
This function is intended to allow non-production software to assign a MAC address to the WINC.
[in] | au8MacAddress | MAC Address to be provisioned to the WINC. |
References tstrM2mSetMacAddress::au8Mac, hif_send(), m2m_memcpy(), M2M_REQ_GROUP_WIFI, M2M_WIFI_REQ_SET_MAC_ADDRESS, and NULL.
set the TX power tenuM2mTxPwrLevel
Set the TX power tenuM2mTxPwrLevel.
[in] | u8TxPwrLevel | change the TX power tenuM2mTxPwrLevel |
[in] | u8TxPwrLevel | Change the TX power based on the enumeration tenuM2mTxPwrLevel. |
References hif_send(), M2M_REQ_GROUP_WIFI, M2M_SUCCESS, M2M_WIFI_REQ_SET_TX_POWER, NULL, and tstrM2mTxPwrLevel::u8TxPwrLevel.