5.13.0.0R1
Software Development Kit
WiFi Neighborhood Area Networking

Functions

wiced_result_t wiced_nan_config_disable (void)
 
wiced_result_t wiced_nan_config_enable (wiced_wifi_nan_event_handler_t nan_event_handler)
 
wiced_result_t wiced_wifi_register_nan_event_handler (wiced_wifi_nan_event_handler_t event_handler)
 
wiced_result_t wiced_wifi_unregister_nan_event_handler (void)
 
wwd_result_t wwd_nan_config_band (uint8_t band)
 
wwd_result_t wwd_nan_config_clear_counters (void)
 
wwd_result_t wwd_nan_config_cluster_id (wiced_bool_t set, wwd_nan_cluster_id_t *ether_addr)
 
wwd_result_t wwd_nan_config_device_state (wiced_bool_t set, uint8_t *role)
 
wwd_result_t wwd_nan_config_disable (void)
 
wwd_result_t wwd_nan_config_discover_window_length (wiced_bool_t set, uint16_t *dw_len)
 
wwd_result_t wwd_nan_config_discovery_beacon_interval (wiced_bool_t set, uint16_t *interval)
 
wwd_result_t wwd_nan_config_enable (void)
 
wwd_result_t wwd_nan_config_get_count (wwd_nan_config_count_t *config_count)
 
wwd_result_t wwd_nan_config_get_status (wwd_nan_state_t *nan_state)
 
wwd_result_t wwd_nan_config_hop_count (wiced_bool_t set, uint8_t *hop_count)
 
wwd_result_t wwd_nan_config_hop_limit (wiced_bool_t set, uint8_t *hop_limit)
 
wwd_result_t wwd_nan_config_interface_address (wiced_bool_t set, struct ether_addr *addr)
 
wwd_result_t wwd_nan_config_oui (wiced_bool_t enable, wwd_nan_config_oui_type_t *oui_type)
 
wwd_result_t wwd_nan_config_rssi_threshold (wiced_bool_t set, wwd_nan_config_rssi_threshold_t *rssi_thresh)
 
wwd_result_t wwd_nan_config_service_discovery_frame_tx_time (wiced_bool_t set, uint16_t *time)
 
wwd_result_t wwd_nan_config_service_id_beacon (wiced_bool_t set, wwd_nan_sid_beacon_control_t *service_id_bcn_control)
 
wwd_result_t wwd_nan_config_set_chanspec (chanspec_t *chanspec)
 
wwd_result_t wwd_nan_config_stop_beacon_transmit (wiced_bool_t set, uint16_t *stop_beacon)
 
wwd_result_t wwd_nan_config_warmup_time (wiced_bool_t set, uint32_t *warmup_time)
 
wwd_result_t wwd_nan_election_host_enable (wiced_bool_t set, uint8_t *host_enable)
 
wwd_result_t wwd_nan_election_join (wwd_nan_join_t *join)
 
wwd_result_t wwd_nan_election_merge (wiced_bool_t set, uint8_t *enable_merge)
 
wwd_result_t wwd_nan_election_metric_config (wwd_nan_election_metric_config_t *config)
 
wwd_result_t wwd_nan_election_metric_state_get (wwd_nan_election_metric_config_t *config)
 
wwd_result_t wwd_nan_election_stop (wwd_nan_cluster_id_t *cluster_id)
 
wwd_result_t wwd_nan_sd_cancel_publish (uint8_t instance_id)
 
wwd_result_t wwd_nan_sd_cancel_subscribe (uint8_t instance_id)
 
wwd_result_t wwd_nan_sd_publish (wiced_bool_t set, wwd_nan_sd_publish_t *nan_sd_params)
 
wwd_result_t wwd_nan_sd_publish_list (wwd_nan_service_list_t *nan_service_list)
 
wwd_result_t wwd_nan_sd_subscribe (wiced_bool_t set, wwd_nan_sd_subscribe_t *nan_sd_params)
 
wwd_result_t wwd_nan_sd_subscribe_list (wwd_nan_service_list_t *nan_service_list)
 
wwd_result_t wwd_nan_sd_transmit (wwd_nan_sd_transmit_t *nan_sd_transmit)
 
wwd_result_t wwd_nan_sync_timeslot_release (uint32_t *release)
 
wwd_result_t wwd_nan_sync_timeslot_reserve (wwd_nan_timeslot_t *reserve)
 

Detailed Description

WLAN NAN (neighborhood area networking) WICED Wi-Fi functions for NAN enable, disable and register/de-register of event handlers.

NAN (Neighbor Area Networking) APIs

WLAN NAN (neighborhood area networking) WICED Wi-Fi functions for NAN enable, disable and register/de-register of event handlers.

Function Documentation

wiced_result_t wiced_nan_config_disable ( void  )

Disable NAN service

Returns
wiced_result_t
wiced_result_t wiced_nan_config_enable ( wiced_wifi_nan_event_handler_t  nan_event_handler)

Enable NAN service

Parameters
[in]wiced_wifi_nan_event_handler_t: A function pointer to the event handler
Returns
wiced_result_t
wiced_result_t wiced_wifi_register_nan_event_handler ( wiced_wifi_nan_event_handler_t  event_handler)

Register NAN event handler

Parameters
[in]wiced_wifi_nan_event_handler_t: A function pointer to the event handler
Returns
wiced_result_t
wiced_result_t wiced_wifi_unregister_nan_event_handler ( void  )

DeRegister NAN event handler

Returns
wiced_result_t
wwd_result_t wwd_nan_config_band ( uint8_t  band)

Configure NAN band

Parameters
[in]uint8_t band
Returns
wwd_result_t
wwd_result_t wwd_nan_config_clear_counters ( void  )

Clear NAN counters

Parameters
[in]none
Returns
wwd_result_t
wwd_result_t wwd_nan_config_cluster_id ( wiced_bool_t  set,
wwd_nan_cluster_id_t *  ether_addr 
)

set/get cluster id

Parameters
[in]set/get: 1 is to set and 0 is to get
wwd_result_t wwd_nan_config_device_state ( wiced_bool_t  set,
uint8_t *  role 
)

set/get NAN device state

Parameters
[in]set/get: 1 is to set and 0 is to get
wwd_result_t wwd_nan_config_disable ( void  )

disable NAN services

Parameters
[in]none
Returns
wwd_result_t
wwd_result_t wwd_nan_config_discover_window_length ( wiced_bool_t  set,
uint16_t *  dw_len 
)

set/get NAN Discovery Window length

Parameters
[in]set/get: 1 is to set and 0 is get
wwd_result_t wwd_nan_config_discovery_beacon_interval ( wiced_bool_t  set,
uint16_t *  interval 
)

set/get NAN discovery beacon interval

Parameters
[in]set/get: 1 is to set and 0 is get
wwd_result_t wwd_nan_config_enable ( void  )

Enables NAN (Neighbor Area Networking)

Parameters
[in]none
Returns
wwd_result_t
wwd_result_t wwd_nan_config_get_count ( wwd_nan_config_count_t *  config_count)

get NAN count

Parameters
[out]wwd_nan_config_count_t uint32_t cnt_bcn_tx : TX discovery/sync beacon count uint32_t cnt_bcn_rx : RX discovery/sync beacon count uint32_t cnt_svc_disc_tx : TX service discovery frame count uint32_t cnt_svc_disc_rx : RX service discovery frame count
Returns
wwd_result_t
wwd_result_t wwd_nan_config_get_status ( wwd_nan_state_t *  nan_state)

get NAN status

Parameters
[out]wwd_nan_state_t uint8 enabled : NAN status enabled(1)/disabled(0) uint8 inited : NAN status initialized or not uint8 joined : NAN status joined to cluster or not uint8 role : NAN role uint32 chspec[2] : NAN channel specification uint8 mr[8] : Master Rank uint8 amr[8] : Anchor Master Rank uint32 cnt_pend_txfrm : pending TX frames wwd_nan_config_count_t nan_config_status : NAN TX/RX status uint32 ambtt : Anchor master beacon target time wwd_nan_config_params_t : NAN config parameters
Returns
wwd_result_t
wwd_result_t wwd_nan_config_hop_count ( wiced_bool_t  set,
uint8_t *  hop_count 
)

set/get NAN hop count

Parameters
[in]set/get: 1 is to set and 0 is to get
wwd_result_t wwd_nan_config_hop_limit ( wiced_bool_t  set,
uint8_t *  hop_limit 
)

set/get NAN hop limit

Parameters
[in]set/get: 1 is to set and 0 is to get
wwd_result_t wwd_nan_config_interface_address ( wiced_bool_t  set,
struct ether_addr *  addr 
)

set/get interface address

Parameters
[in]set/get: 1 is to set and 0 is get
wwd_result_t wwd_nan_config_oui ( wiced_bool_t  enable,
wwd_nan_config_oui_type_t *  oui_type 
)

get/set NAN OUI

Parameters
[in]set/get: 1 is to set and 0 is to get
wwd_result_t wwd_nan_config_rssi_threshold ( wiced_bool_t  set,
wwd_nan_config_rssi_threshold_t *  rssi_thresh 
)

set/get NAN RSSI threshold

Parameters
[in]set/get: 1 is to set and 0 is to get
wwd_result_t wwd_nan_config_service_discovery_frame_tx_time ( wiced_bool_t  set,
uint16_t *  time 
)

set/get NAN service discovery frame Transmit Time

Parameters
[in]set/get: 1 is to set and 0 is get
wwd_result_t wwd_nan_config_service_id_beacon ( wiced_bool_t  set,
wwd_nan_sid_beacon_control_t *  service_id_bcn_control 
)

set/get NAN Service ID beacon

Parameters
[in]set/get: 1 is to set and 0 is get
wwd_result_t wwd_nan_config_set_chanspec ( chanspec_t *  chanspec)

Configure NAN channel

Parameters
[in]chanspec_t
Returns
wwd_result_t
wwd_result_t wwd_nan_config_stop_beacon_transmit ( wiced_bool_t  set,
uint16_t *  stop_beacon 
)

set/get NAN STOP beacon transmit

Parameters
[in]set/get: 1 is to set and 0 is get
wwd_result_t wwd_nan_config_warmup_time ( wiced_bool_t  set,
uint32_t *  warmup_time 
)

set/get NAN warmup time

Parameters
[in]set/get: 1 is to set and 0 is to get
wwd_result_t wwd_nan_election_host_enable ( wiced_bool_t  set,
uint8_t *  host_enable 
)

set/get NAN host enable

Parameters
[in]set/get: 1 is to set and 0 is get
wwd_result_t wwd_nan_election_join ( wwd_nan_join_t *  join)

NAN election join

Parameters
[in]wwd_nan_join_t uint8 start_cluster : Start a cluster uint8 pad[3] wwd_nan_cluster_id_t cluster_id : Cluster ID to join
Returns
wwd_result_t
wwd_result_t wwd_nan_election_merge ( wiced_bool_t  set,
uint8_t *  enable_merge 
)

NAN election merge get/set

Parameters
[in]set/get: 1 is to set and 0 is get
wwd_result_t wwd_nan_election_metric_config ( wwd_nan_election_metric_config_t *  config)

set NAN election metrics configuration

Parameters
[in]wwd_nan_election_metric_config_t
Returns
wwd_result_t
wwd_result_t wwd_nan_election_metric_state_get ( wwd_nan_election_metric_config_t *  config)

get NAN election metrics state

Parameters
[out]wwd_nan_election_metric_config_t uint8 random_factor : configured random factor uint8 master_pref : configured master preference uint8 pad[2]
Returns
wwd_result_t
wwd_result_t wwd_nan_election_stop ( wwd_nan_cluster_id_t *  cluster_id)

NAN command election stop

Parameters
[in]wwd_nan_cluster_id_t : struct ether_addr cluster_id (stop participating in the cluster id)
Returns
wwd_result_t
wwd_result_t wwd_nan_sd_cancel_publish ( uint8_t  instance_id)

NAN Service Discovery cancel publish

Parameters
[in]uint8_t instance_id
Returns
wwd_result_t
wwd_result_t wwd_nan_sd_cancel_subscribe ( uint8_t  instance_id)

NAN Service Discovery cancel subscribe

Parameters
[in]uint8_t instance_id
Returns
wwd_result_t
wwd_result_t wwd_nan_sd_publish ( wiced_bool_t  set,
wwd_nan_sd_publish_t *  nan_sd_params 
)

NAN Service Discovery Publish

Parameters
[in]1 is to set and 0 is get
[in]wwd_nan_sd_publish_t uint8_t instance_id : if get then Instance ID of an active publish instance * uint16 length : length including options uint16 flags : bitmap representing aforesaid optional flags uint8 svc_hash[WL_NAN_SVC_HASH_LEN]: Hash for the service name uint8 instance_id : Instance of the current service int8 proximity_rssi : RSSI limit to RX subscribe or publish SDF 0 no effect uint8 period : period of the unsolicited SDF transmission in DWs int32 ttl : TTL for this instance id, -1 will run till cancelled tlv_t optional[1] :optional fields in the SDF as appropriate
Returns
wwd_result_t
wwd_result_t wwd_nan_sd_publish_list ( wwd_nan_service_list_t *  nan_service_list)

Get NAN Service Discovery publish list

Parameters
[in]wwd_nan_service_list_t uint16_t id_count : Number of registered publish/subscribe services wwd_nan_service_info_t list[1] : service info defined by nan_service instance uint8_t instance_id : Publish instance ID uint8_t service_hash[WL_NAN_SVC_HASH_LEN] : Hash for service name
Returns
wwd_result_t
wwd_result_t wwd_nan_sd_subscribe ( wiced_bool_t  set,
wwd_nan_sd_subscribe_t *  nan_sd_params 
)

NAN Service Discovery Subscribe

Parameters
[in]1 is to set and 0 is get
[in]wwd_nan_sd_subscribe_t uint8_t instance_id : if get then Instance ID of an active subscribe instance uint16 length : length including options uint16 flags : bitmap representing aforesaid optional flags uint8 svc_hash[WL_NAN_SVC_HASH_LEN]: Hash for the service name uint8 instance_id : Instance of the current service int8 proximity_rssi : RSSI limit to RX subscribe or publish SDF 0 no effect uint8 period : period of the unsolicited SDF transmission in DWs int32 ttl : TTL for this instance id, -1 will run till cancelled tlv_t optional[1] :optional fields in the SDF as appropriate
Returns
wwd_result_t
wwd_result_t wwd_nan_sd_subscribe_list ( wwd_nan_service_list_t *  nan_service_list)

Get NAN Service Discovery subscribe list

Parameters
[in]wwd_nan_service_list_t uint16_t id_count : Number of registered publish/subscribe services wwd_nan_service_info_t list[1] : service info defined by nan_service instance uint8_t instance_id : Subscribe instance ID uint8_t service_hash[WL_NAN_SVC_HASH_LEN] : Hash for service name
Returns
wwd_result_t
wwd_result_t wwd_nan_sd_transmit ( wwd_nan_sd_transmit_t *  nan_sd_transmit)

NAN Service Discovery Transmit

Parameters
[in]wwd_nan_sd_transmit_t uint8_t local_service_id : Sender Service ID uint8_t requestor_service_id : Destination Service ID struct ether_addr destination_addr : Destination MAC uint16_t token : follow_up_token when a follow-up message is queued successfully uint8_t priority : requested relative priority uint8_t service_info_len : size in bytes of the service info payload wwd_nan_service_info_t service_info[1] : Service Info payload
Returns
wwd_result_t
wwd_result_t wwd_nan_sync_timeslot_release ( uint32_t *  release)

NAN sync timeslot release

Parameters
[in]uint32_t NAN timeslot bitmap to release
Returns
wwd_result_t
wwd_result_t wwd_nan_sync_timeslot_reserve ( wwd_nan_timeslot_t *  reserve)

NAN set timeslot reserve

Parameters
[in]wwd_nan_timeslot_t uint32 abitmap : available bitmap uint32 chanlist[NAN_MAX_TIMESLOT]
Returns
wwd_result_t