Driver for CC3000 Wi-Fi module
Dependencies: NVIC_set_all_priorities
Dependents: CC3000_Simple_Socket Wi-Go_IOT_Demo
Netapp
Functions | |
long | netapp_config_mac_adrress (unsigned char *mac) |
Configure device MAC address and store it in NVMEM. | |
long | netapp_dhcp (unsigned long *aucIP, unsigned long *aucSubnetMask, unsigned long *aucDefaultGateway, unsigned long *aucDNSServer) |
Configure the network interface, static or dynamic (DHCP). | |
long | netapp_timeout_values (unsigned long *aucDHCP, unsigned long *aucARP, unsigned long *aucKeepalive, unsigned long *aucInactivity) |
Set new timeout values for DHCP lease timeout, ARP refresh timeout, keepalive event timeout and socket inactivity timeout. | |
long | netapp_ping_send (unsigned long *ip, unsigned long ulPingAttempts, unsigned long ulPingSize, unsigned long ulPingTimeout) |
send ICMP ECHO_REQUEST to network hosts | |
long | netapp_ping_stop (void) |
Stop any ping request. | |
void | netapp_ping_report (void) |
Ping status request. | |
void | netapp_ipconfig (tNetappIpconfigRetArgs *ipconfig) |
Get the CC3000 Network interface information. | |
long | netapp_arp_flush (void) |
Flush ARP table. |
Function Documentation
long netapp_arp_flush | ( | void | ) |
long netapp_config_mac_adrress | ( | unsigned char * | mac ) |
Configure device MAC address and store it in NVMEM.
The value of the MAC address configured through the API will be
stored in CC3000 non volatile memory, thus preserved over resets.
- Parameters:
-
mac device mac address, 6 bytes. Saved: yes
- Returns:
- return on success 0, otherwise error.
Definition at line 38 of file netapp.cpp.
long netapp_dhcp | ( | unsigned long * | aucIP, |
unsigned long * | aucSubnetMask, | ||
unsigned long * | aucDefaultGateway, | ||
unsigned long * | aucDNSServer | ||
) |
Configure the network interface, static or dynamic (DHCP).
In order to activate DHCP mode, aucIP, aucSubnetMask, aucDefaultGateway must be 0.
The default mode of CC3000 is DHCP mode. The configuration is saved in non volatile memory
and thus preserved over resets.
- Parameters:
-
aucIP device mac address, 6 bytes. Saved: yes aucSubnetMask device mac address, 6 bytes. Saved: yes aucDefaultGateway device mac address, 6 bytes. Saved: yes aucDNSServer device mac address, 6 bytes. Saved: yes
- Returns:
- 0 on success, otherwise error.
- Note:
- If the mode is altered, a reset of CC3000 device is required to apply the changes.
Also note that an asynchronous event of type 'DHCP_EVENT' is generated only when
a connection to the AP was established. This event is generated when an IP address
is allocated either by the DHCP server or by static allocation.
Definition at line 44 of file netapp.cpp.
void netapp_ipconfig | ( | tNetappIpconfigRetArgs * | ipconfig ) |
Get the CC3000 Network interface information.
This information is only available after establishing a WLAN connection.
Undefined values are returned when this function is called before association.
- Parameters:
-
[out] ipconfig pointer to a tNetappIpconfigRetArgs structure for storing the network interface configuration.
tNetappIpconfigRetArgs: aucIP - ip address,
aucSubnetMask - mask aucDefaultGateway - default gateway address
aucDHCPServer - dhcp server address
aucDNSServer - dns server address
uaMacAddr - mac address
uaSSID - connected AP ssid
- Returns:
- none
- Note:
- This function is useful for figuring out the IP Configuration of
the device when DHCP is used and for figuring out the SSID of
the Wireless network the device is associated with.
Definition at line 172 of file netapp.cpp.
void netapp_ping_report | ( | void | ) |
Ping status request.
This API triggers the CC3000 to send asynchronous events: HCI_EVNT_WLAN_ASYNC_PING_REPORT.
This event will create the report structure in netapp_pingreport_args_t.
This structure is filled with ping results until the API is triggered.
netapp_pingreport_args_t: packets_sent - echo sent
packets_received - echo reply
min_round_time - minimum round time
max_round_time - max round time
avg_round_time - average round time
- Parameters:
-
none
- Returns:
- none
- Note:
- When a ping operation is not active, the returned structure fields are 0.
Definition at line 133 of file netapp.cpp.
long netapp_ping_send | ( | unsigned long * | ip, |
unsigned long | ulPingAttempts, | ||
unsigned long | ulPingSize, | ||
unsigned long | ulPingTimeout | ||
) |
send ICMP ECHO_REQUEST to network hosts
- Parameters:
-
ip destination IP address pingAttempts number of echo requests to send pingSize send buffer size which may be up to 1400 bytes pingTimeout Time to wait for a response,in milliseconds.
- Returns:
- 0 on success, otherwise error.
- Note:
- A succesful operation will generate an asynchronous ping report event.
The report structure is defined by structure netapp_pingreport_args_t.
- Warning:
- Calling this function while a Ping Request is in progress will kill the ping request in progress.
Definition at line 106 of file netapp.cpp.
long netapp_ping_stop | ( | void | ) |
Stop any ping request.
- Parameters:
-
none
- Returns:
- 0 on success -1 on error
Definition at line 152 of file netapp.cpp.
long netapp_timeout_values | ( | unsigned long * | aucDHCP, |
unsigned long * | aucARP, | ||
unsigned long * | aucKeepalive, | ||
unsigned long * | aucInactivity | ||
) |
Set new timeout values for DHCP lease timeout, ARP refresh timeout, keepalive event timeout and socket inactivity timeout.
- Parameters:
-
aucDHCP DHCP lease time request, also impact
the DHCP renew timeout.
Range: [0-0xffffffff] seconds,
0 or 0xffffffff = infinite lease timeout.
Resolution: 10 seconds.
Influence: only after reconnecting to the AP.
Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds.
The parameter is saved into the CC3000 NVMEM.
The default value on CC3000 is 14400 seconds.
aucARP ARP refresh timeout, if ARP entry is not updated by
incoming packet, the ARP entry will be deleted by
the end of the timeout.
Range: [0-0xffffffff] seconds, 0 = infinite ARP timeout
Resolution: 10 seconds.
Influence: at runtime.
Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 seconds
The parameter is saved into the CC3000 NVMEM.
The default value on CC3000 is 3600 seconds.
aucKeepalive Keepalive event sent by the end of keepalive timeout
Range: [0-0xffffffff] seconds, 0 == infinite timeout
Resolution: 10 seconds.
Influence: at runtime.
Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec
The parameter is saved into the CC3000 NVMEM.
The default value on CC3000 is 10 seconds.
aucInactivity Socket inactivity timeout, socket timeout is
refreshed by incoming or outgoing packet, by the
end of the socket timeout the socket will be closed
Range: [0-0xffffffff] sec, 0 == infinite timeout.
Resolution: 10 seconds.
Influence: at runtime.
Minimal bound value: MIN_TIMER_VAL_SECONDS - 20 sec
The parameter is saved into the CC3000 NVMEM.
The default value on CC3000 is 60 seconds.
- Returns:
- 0 on success,otherwise error.
- Note:
- A parameter set to a non zero value less than 20s automatically changes to 20s.
Definition at line 72 of file netapp.cpp.
Generated on Wed Jul 13 2022 18:31:31 by 1.7.2