Wi-Fi Combo Forum Discussions
hi Cypress:
do you have the app of android to show to connect to update the sensor date to cellphone via to WIFI ,
and contol the LED on board with wifi ?? how can we do it?? tks;
Show LessOccasionally on boot, in wiced_int, the code hangs while initializing the WLAN core through the WWD interface. I do not know exactly where it hangs but i assume it is in the WWD thread context which blocks the monitor thread from kicking the watchdog, both are set to the highest priority. I have submitted this issue to an internal ticket and the only solution was to add/increase a delay before configuring the country code. The occurrence rate has dropped but it still occurs and triggers a WDT, potentially forcing the failsafe app to load the factory reset image. I occasionally see this happening on boot after an OTA and it is pretty frustrating because the firmware gets rolled back to a really old version that was placed in the factory reset at time of manufacturing... This is a real big issue in my application.
If this issue occurs i would rather perform a SW reset versus the watchdog. The only way i see to this this is to lower the WWD priority below the system monitor and use the monitor thread hooks around the wiced_init call. Currently the monitor thread and WWD use priority 9 (FreeRTOS). From what I see, nothing else in my system is running at priority 8... Thoughts?
SDK: 6.2
Processor: CYW43907
FreeRTOS build
With the default 6.2 SDK i was able to reproduce this on the CWY43907 eval board with the reset button. After 20 or 30 presses the system would watchdog on boot.
By the way, i diffed 6.2.1 and 6.2 WWD folders and nothing has changed in the newer SDK.
For Admins, this is in reference to Startup hangs occasionally - CYW43907, which has been locked.
Here is a console printout between a bad and good boot
Bad
Starting WICED vWiced_006.002.000.0072
Platform InVue_RTD initialised
Started FreeRTOS v9.0.0
Initialising LwIP v2.0.3
DHCP CLIENT hostname WICED IP
WWD SoC.43909 interface initializing with US/0
Reset wlan core..
load_wlan_fw: write reset_inst : 0xb83ef1b0
Release WLA
½É•¹.
Good
Starting WICED vWiced_006.002.000.0072
Platform InVue_RTD initialised
Started FreeRTOS v9.0.0
Initialising LwIP v2.0.3
DHCP CLIENT hostname WICED IP
WWD SoC.43909 interface initializing with US/0
Reset wlan core..
load_wlan_fw: write reset_inst : 0xb83ef1b0
Release WLA
½É•¹.
DMA: TX reclaim
read pkt , p0: 0x505120
read pkt , p0: 0x504a00
intstatus: 0x0, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x5042e0
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x503bc0
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x5034a0
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x502d80
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x502660
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x501f40
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x501820
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x501100
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x5009e0
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x5002c0
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x4ffba0
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x4ff480
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x4fed60
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x4fe640
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
intstatus: 0x1000000, NO PACKET
read pkt , p0: 0x4fdf20
read pkt , p0: 0x4fd800
293: Event (interface, type, status, reason): WWD_STA_INTERFACE Unknown WLC_E_STATUS_SUCCESS WLC_E_REASON_INITIAL_ASSOC
read pkt , p0: 0x4fd0e0
302: Event (interface, type, status, reason): WWD_STA_INTERFACE Unknown WLC_E_STATUS_SUCCESS WLC_E_REASON_INITIAL_ASSOC
intstatus: 0x0, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x4fc9c0
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x4fc2a0
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x505120
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x504a00
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x5042e0
intstatus: 0x10000, NO PACKET
WLAN MAC Address : CC:C0:79:DF:57:04
DMA: TX reclaim
read pkt , p0: 0x503bc0
intstatus: 0x10000, NO PACKET
WLAN Firmware : wl0: May 15 2018 19:39:17 version 7.15.168.114 (r689934) FWID 01-d6f88905
DMA: TX reclaim
read pkt , p0: 0x5034a0
intstatus: 0x10000, NO PACKET
WLAN CLM : API: 12.2 Data: 9.10.74 Compiler: 1.31.3 ClmImport: 1.36.3 Creation: 2018-05-15 19:33:15
DMA: TX reclaim
read pkt , p0: 0x502d80
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x502660
intstatus: 0x10000, NO PACKET
DMA: TX reclaim
read pkt , p0: 0x501f40
intstatus: 0x10000, NO PACKET
Init took ~403 ms
Show LessWe are looking for arduino snippets (C++, C)
We are looking to have an android application control through a server the cypress controller AP cyw94343wwcd1 eval board. This cyw94343wwcd1 is being used as the Access point and control for other client devices.
The arduino code is attached.
If you could review and let us know how we have to implement this code with the cypress libraries that would be fantastic.
SIncerely,
Gillian
Show LessWe used ampak ap6255 (cyw43455) on our custom arm/linux board, running mainline kernel (5.1.5).
Our hardware guy forgot to connect the BT_DEV_WAKE pin to any pin on host processor (rockchip rk3328). The pin is merely pulled-up via a resistor.
We tried to load the driver and it works. The driver complains when failing to resolve the device-wakeup-gpios option in device tree blob. But no further problems found so far.
[ 3.547897] of_get_named_gpiod_flags: can't parse 'device-wakeup-gpios' property of node '/serial@ff110000/bluetooth[0]'
[ 3.547908] of_get_named_gpiod_flags: can't parse 'device-wakeup-gpio' property of node '/serial@ff110000/bluetooth[0]'
AFAIK, if BT_DEV_WAKE is kept asserted, the bluetooth device won't sleep. This is not a problem for our design since the board works as a server and the power consumption is a trivial issue.
My hope is that you can confirm such a configuration is OK, both for bluetooth device and for kernel driver. Then we don't need to modify and re-manufacture PCBs, saving us some time and money.
Or may there be any potential risk in functionality or stability we don't know, please tell us. Then we have to modify the design and allocate a host pin for suspending/resuming the bluetooth device.
Show Lessi have CYW943907AEVAL1F kit.. which have only WiFi.
but now i need to BT.. i'm use BT of 4343W chip. i interface this 4343W chip with 43907 via UART.
but now i need to add some change in platform file..
i need for your help for make platform file.
thanks
jignesh narola
Show LessHello,
I'm using the ISM43362_M3G_L44 evaluation board with FreeRTOS and LwIP, WICED Studio V6.2.
I would like to make a connection to AWS IoT using the demo application thing_shadow.
I'm using the same certificates as MQTT.fx that succeed to connect.
First, I found a bug in the demo code, file shadow.c l.249:
/* Get AWS Root CA certificate filename: 'rootca.cer' located @ resources/apps/aws/iot folder */
resource_get_readonly_buffer( &resources_apps_DIR_aws_DIR_iot_DIR_rootca_cer, 0, SHADOW_CERTIFICATES_MAX_SIZE, &size_out, (const void **)root_ca_certificate);
if( ret != WICED_SUCCESS )
{
WPRINT_APP_INFO(("[Shadow] Fail to read buffer ca, err %d\n", ret));
return ret;
}
The ret is not affected by the return of the function and initialized to WICED_ERROR.
Once corrected, I modified the resources\apps\aws\iot\rootca.cer. Through AP, I connect using my computer and upload the certificate, the key and select the wifi.
Then, the application crashed. I add printf to better understand what was happening.
Starting WICED vWiced_006.002.001.0002
Platform ISM43362_M3G_L44 initialised
Started FreeRTOS v9.0.0
Initialising LwIP v2.0.3
DHCP CLIENT hostname WICED IP
WLAN MAC Address : C4:7F:51:02:70:39
WLAN Firmware : wl0: May 16 2018 00:27:03 version 5.90.230.31 FWID 01-61657268
Please wait, connecting to network...
(To return to SSID console screen, hold USER switch for 5 seconds during RESET to clear DCT configuration)
Successfully joined : SSID
Setting IPv6 link-local address
Obtaining IPv4 address via DHCP
IPv6 Network ready IP: FE80::C67F:51FF:FE02:7039
IPv4 Network ready IP: 192.168.86.59
[Shadow] Reading Device's certificate and private key from DCT...
[Shadow] Thing Name: lightbulb
[Shadow] Shadow State Topic: $aws/things/lightbulb/shadow/update
[Shadow] Shadow Delta Topic: $aws/things/lightbulb/shadow/update/delta
[Shadow] Connect to AWS IoT
[AWS] AWS endpoint: xxxx is atxxx
[AWS] MQTT Connect
[AWS] MQTT Connect init
[AWS] MQTT network init
[AWS] MQTT network connect
[AWS] netconn connect
[AWS] WICED tcp start tls
[AWS] TLS 1
[AWS] TLS 3
[AWS] TLS 4
[AWS] AES init
[AWS] AES enc
[AWS] AES
The last line is:
wiced_result_t wiced_generic_start_tls_with_ciphers( wiced_tls_context_t* tls_context, void* referee, wiced_tls_endpoint_type_t type, wiced_tls_certificate_verification_t verification, const cipher_suite_t* cipher_list[], tls_transport_protocol_t transport_protocol )
{
...
WPRINT_APP_INFO(("[AWS] TLS 4\n" ));
if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy,
(const unsigned char *) pers,
strlen( pers )) ) != 0 )
{
WPRINT_APP_INFO(("[AWS] TLS 6\n" ));
WPRINT_SECURITY_ERROR(( " failed\n ! mbedtls_ctr_drbg_seed returned -0x%x\n", ret ));
result = TLS_ERROR;
goto exit_with_inited_context;
}
WPRINT_APP_INFO(("[AWS] TLS 5\n" ));
}
....
int mbedtls_ctr_drbg_seed( mbedtls_ctr_drbg_context *ctx,
int (*f_entropy)(void *, unsigned char *, size_t),
void *p_entropy,
const unsigned char *custom,
size_t len )
{
return( mbedtls_ctr_drbg_seed_entropy_len( ctx, f_entropy, p_entropy, custom, len,
MBEDTLS_CTR_DRBG_ENTROPY_LEN ) );
}
int mbedtls_ctr_drbg_seed_entropy_len(
mbedtls_ctr_drbg_context *ctx,
int (*f_entropy)(void *, unsigned char *, size_t),
void *p_entropy,
const unsigned char *custom,
size_t len,
size_t entropy_len )
{
int ret;
unsigned char key[MBEDTLS_CTR_DRBG_KEYSIZE];
memset( key, 0, MBEDTLS_CTR_DRBG_KEYSIZE );
WPRINT_APP_INFO(("[AWS] AES init\n" ));
mbedtls_aes_init( &ctx->aes_ctx );
ctx->f_entropy = f_entropy;
ctx->p_entropy = p_entropy;
ctx->entropy_len = entropy_len;
ctx->reseed_interval = MBEDTLS_CTR_DRBG_RESEED_INTERVAL;
WPRINT_APP_INFO(("[AWS] AES enc\n" ));
/*
* Initialize with an empty key
*/
mbedtls_aes_setkey_enc( &ctx->aes_ctx, key, MBEDTLS_CTR_DRBG_KEYBITS );
WPRINT_APP_INFO(("[AWS] AES\n" ));
if( ( ret = mbedtls_ctr_drbg_reseed( ctx, custom, len ) ) != 0 )
return( ret );
return( 0 );
}
Could you give more inputs to figure out what is happening ?
I use the same file with MQTT.fx and the upload to the device. I don't understand why it's crashing.
Thanks
Show Less采用CYW43455的方案产品,在出厂时如何写入wifi和BT的MAC地址?
Hi I am using CY8CKIT-062-WiFi-BT kit on WICED Studio v6.4.0.47 n successfully built demo.ble_wifi_introducer app. The demo app included an iOS peerapp for testing/demo (marketing showed a demo video to us so I knew it should work). However I am just a regular iPhone user, how can I build the iOS peerapps n install on my iPhone? I checked that App Store did not have this app. Is there an Android app?
My (succesful) log:
Starting WICED Wiced_006.004.000.0047
Platform CY8CKIT_062 initialised Rev: 0x22
Started ThreadX v5.8
WICED_core Initialized
Initialising NetX_Duo v5.10_sp3
Creating Packet pools
WLAN MAC Address : DC:EF:CA:25:3F:AD
WLAN Firmware : wl0: Jan 15 2019 20:50:27 version 7.45.98.74 (r709275 CY) FWID 01-2d50ef4b
WLAN CLM : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2019-01-15 20:37:36
WiFi Introducer Sensor Start
Joining : YOUR_AP_SSID
Failed to join : YOUR_AP_SSID
Joining : YOUR_AP_SSID
Failed to join : YOUR_AP_SSID
Joining : YOUR_AP_SSID
Failed to join : YOUR_AP_SSID
00:00:23.453000 GKI_create_task func=0x100245d9 id=1 name=BTU stack=0x0 stackSize=4096
00:00:23.454000 GKI_create_task func=0x10025ced id=0 name=HCISU stack=0x0 stackSize=3072
wifi_introducer_bt_management_callback: 15
[WiFi Introducer] Unhandled Bluetooth Stack Callback event :21
wifi_introducer_bt_management_callback: 0
hello_sensor_management_callback disabling sleep
> wifi_introducer_gatt_server_init
wiced_bt_gatt_register: 0
wiced_bt_gatt_db_init 0
wiced_bt_ble_set_advertisement_data 0
[WiFi Introducer] wifi_introducer_load_key_to_addr_resolution_db
[WiFi Introducer] reading DCT
wiced_bt_dev_add_device_to_address_resolution_db . result = 8042
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 3
wiced_bt_start_advertisements 0
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 4
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 0
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 4
wiced_bt_start_advertisements: 0
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 0
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 4
wiced_bt_start_advertisements: 0
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 0
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 4
wiced_bt_start_advertisements: 0
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 0
wifi_introducer_bt_management_callback: 17
Advertisement State Change: 4
wiced_bt_start_advertisements: 0
Show LessI copied the the code in the exercise 5-3 that expands 5-1 WPA2..
All works except printIP(ipAddress).
I commented /* printIp(ipAddress); */ out to see if that is the only thing wrong. All looked good, even MAC address.
Question.
Did I copy the line correct or is there another way to get the addresses.
Thanks AAO
==============================================================
#include "wiced.h"
/* 115200 */
/* Joins a specified SSID and Password */
void application_start()
{
wiced_result_t connectResult;
wiced_bool_t led = WICED_FALSE;
wiced_ip_address_t ipAddress;
wiced_mac_t mac;
wiced_init();
connectResult = wiced_network_up(WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL);
if(connectResult == WICED_SUCCESS)
{
wiced_gpio_output_high(WICED_LED1);
/* Print out network info */
WPRINT_APP_INFO(("NETWORK INFO\r\n"));
/* IP Info */
wiced_ip_get_ipv4_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("IP Addr :\r\n"));
/* printIp(ipAddress); */
/* Netmask */
wiced_ip_get_netmask(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Netmask : \r\n"));
/* printIp(ipAddress); */
/* Gateway */
wiced_ip_get_gateway_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Gateway : \r\n"));
/* printIp(ipAddress); */
/* Cypress */
wiced_hostname_lookup("www.cypress.com", &ipAddress, WICED_NEVER_TIMEOUT, WICED_STA_INTERFACE);
WPRINT_APP_INFO(("Cypress : \r\n"));
/* printIp(ipAddress); */
/* Device */
wwd_wifi_get_mac_address(&mac , WICED_STA_INTERFACE);
WPRINT_APP_INFO(("MAC Addtess: "));
WPRINT_APP_INFO(("%X:%X:%X:%X:%X:%X\r\n",
mac.octet[0], mac.octet[1], mac.octet[2],
mac.octet[3],mac.octet[4],mac.octet[5]));
}
while (1)
{
if (connectResult != WICED_SUCCESS)
{
if (led == WICED_TRUE)
{
wiced_gpio_output_low(WICED_LED1);
led = WICED_FALSE;
}
else
{
wiced_gpio_output_high(WICED_LED1);
led = WICED_TRUE;
}
}
wiced_rtos_delay_milliseconds(250);
}
}
/* 115200 */
/* Joins a specified SSID and Password */
void application_start()
{
wiced_result_t connectResult;
wiced_bool_t led = WICED_FALSE;
wiced_ip_address_t ipAddress;
wiced_mac_t mac;
wiced_init();
connectResult = wiced_network_up(WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL);
if(connectResult == WICED_SUCCESS)
{
wiced_gpio_output_high(WICED_LED1);
/* Print out network info */
WPRINT_APP_INFO(("NETWORK INFO\r\n"));
/* IP Info */
wiced_ip_get_ipv4_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("IP Addr :\r\n"));
/* printIp(ipAddress); */
/* Netmask */
wiced_ip_get_netmask(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Netmask : \r\n"));
/* printIp(ipAddress); */
/* Gateway */
wiced_ip_get_gateway_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Gateway : \r\n"));
/* printIp(ipAddress); */
/* Cypress */
wiced_hostname_lookup("www.cypress.com", &ipAddress, WICED_NEVER_TIMEOUT, WICED_STA_INTERFACE);
WPRINT_APP_INFO(("Cypress : \r\n"));
/* printIp(ipAddress); */
/* Device */
wwd_wifi_get_mac_address(&mac , WICED_STA_INTERFACE);
WPRINT_APP_INFO(("MAC Addtess: "));
WPRINT_APP_INFO(("%X:%X:%X:%X:%X:%X\r\n",
mac.octet[0], mac.octet[1], mac.octet[2],
mac.octet[3],mac.octet[4],mac.octet[5]));
}
while (1)
{
if (connectResult != WICED_SUCCESS)
{
if (led == WICED_TRUE)
{
wiced_gpio_output_low(WICED_LED1);
led = WICED_FALSE;
}
else
{
wiced_gpio_output_high(WICED_LED1);
led = WICED_TRUE;
}
}
wiced_rtos_delay_milliseconds(250);
}
}
/* 115200 */
/* Joins a specified SSID and Password */
void application_start()
{
wiced_result_t connectResult;
wiced_bool_t led = WICED_FALSE;
wiced_ip_address_t ipAddress;
wiced_mac_t mac;
wiced_init();
connectResult = wiced_network_up(WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL);
if(connectResult == WICED_SUCCESS)
{
wiced_gpio_output_high(WICED_LED1);
/* Print out network info */
WPRINT_APP_INFO(("NETWORK INFO\r\n"));
/* IP Info */
wiced_ip_get_ipv4_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("IP Addr :\r\n"));
/* printIp(ipAddress); */
/* Netmask */
wiced_ip_get_netmask(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Netmask : \r\n"));
/* printIp(ipAddress); */
/* Gateway */
wiced_ip_get_gateway_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Gateway : \r\n"));
/* printIp(ipAddress); */
/* Cypress */
wiced_hostname_lookup("www.cypress.com", &ipAddress, WICED_NEVER_TIMEOUT, WICED_STA_INTERFACE);
WPRINT_APP_INFO(("Cypress : \r\n"));
/* printIp(ipAddress); */
/* Device */
wwd_wifi_get_mac_address(&mac , WICED_STA_INTERFACE);
WPRINT_APP_INFO(("MAC Addtess: "));
WPRINT_APP_INFO(("%X:%X:%X:%X:%X:%X\r\n",
mac.octet[0], mac.octet[1], mac.octet[2],
mac.octet[3],mac.octet[4],mac.octet[5]));
}
while (1)
{
if (connectResult != WICED_SUCCESS)
{
if (led == WICED_TRUE)
{
wiced_gpio_output_low(WICED_LED1);
led = WICED_FALSE;
}
else
{
wiced_gpio_output_high(WICED_LED1);
led = WICED_TRUE;
}
}
wiced_rtos_delay_milliseconds(250);
}
}
/* 115200 */
/* Joins a specified SSID and Password */
void application_start()
{
wiced_result_t connectResult;
wiced_bool_t led = WICED_FALSE;
wiced_ip_address_t ipAddress;
wiced_mac_t mac;
wiced_init();
connectResult = wiced_network_up(WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL);
if(connectResult == WICED_SUCCESS)
{
wiced_gpio_output_high(WICED_LED1);
/* Print out network info */
WPRINT_APP_INFO(("NETWORK INFO\r\n"));
/* IP Info */
wiced_ip_get_ipv4_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("IP Addr :\r\n"));
/* printIp(ipAddress); */
/* Netmask */
wiced_ip_get_netmask(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Netmask : \r\n"));
/* printIp(ipAddress); */
/* Gateway */
wiced_ip_get_gateway_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Gateway : \r\n"));
/* printIp(ipAddress); */
/* Cypress */
wiced_hostname_lookup("www.cypress.com", &ipAddress, WICED_NEVER_TIMEOUT, WICED_STA_INTERFACE);
WPRINT_APP_INFO(("Cypress : \r\n"));
/* printIp(ipAddress); */
/* Device */
wwd_wifi_get_mac_address(&mac , WICED_STA_INTERFACE);
WPRINT_APP_INFO(("MAC Addtess: "));
WPRINT_APP_INFO(("%X:%X:%X:%X:%X:%X\r\n",
mac.octet[0], mac.octet[1], mac.octet[2],
mac.octet[3],mac.octet[4],mac.octet[5]));
}
while (1)
{
if (connectResult != WICED_SUCCESS)
{
if (led == WICED_TRUE)
{
wiced_gpio_output_low(WICED_LED1);
led = WICED_FALSE;
}
else
{
wiced_gpio_output_high(WICED_LED1);
led = WICED_TRUE;
}
}
wiced_rtos_delay_milliseconds(250);
}
}
/* 115200 */
/* Joins a specified SSID and Password */
void application_start()
{
wiced_result_t connectResult;
wiced_bool_t led = WICED_FALSE;
wiced_ip_address_t ipAddress;
wiced_mac_t mac;
wiced_init();
connectResult = wiced_network_up(WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL);
if(connectResult == WICED_SUCCESS)
{
wiced_gpio_output_high(WICED_LED1);
/* Print out network info */
WPRINT_APP_INFO(("NETWORK INFO\r\n"));
/* IP Info */
wiced_ip_get_ipv4_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("IP Addr :\r\n"));
/* printIp(ipAddress); */
/* Netmask */
wiced_ip_get_netmask(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Netmask : \r\n"));
/* printIp(ipAddress); */
/* Gateway */
wiced_ip_get_gateway_address(WICED_STA_INTERFACE, &ipAddress);
WPRINT_APP_INFO(("Gateway : \r\n"));
/* printIp(ipAddress); */
/* Cypress */
wiced_hostname_lookup("www.cypress.com", &ipAddress, WICED_NEVER_TIMEOUT, WICED_STA_INTERFACE);
WPRINT_APP_INFO(("Cypress : \r\n"));
/* printIp(ipAddress); */
/* Device */
wwd_wifi_get_mac_address(&mac , WICED_STA_INTERFACE);
WPRINT_APP_INFO(("MAC Addtess: "));
WPRINT_APP_INFO(("%X:%X:%X:%X:%X:%X\r\n",
mac.octet[0], mac.octet[1], mac.octet[2],
mac.octet[3],mac.octet[4],mac.octet[5]));
}
while (1)
{
if (connectResult != WICED_SUCCESS)
{
if (led == WICED_TRUE)
{
wiced_gpio_output_low(WICED_LED1);
led = WICED_FALSE;
}
else
{
wiced_gpio_output_high(WICED_LED1);
led = WICED_TRUE;
}
}
wiced_rtos_delay_milliseconds(250);
}
}
Show Less