Skip navigation
Home > All Places > WICED Studio Wi-Fi/Combo > WICED Studio Wi-Fi/Combo Forums > Blog > Authors GregG_16
GregG_16

WICED FTDI chip programming

Posted by GregG_16 Jun 6, 2014

** This is one of the ways to program an FTDI chip, see following blog post for alternative method running an automatic script instead of this program.

WICED FTDI Chip Programming (2) via Script

 

WICED Evaluation boards have a FTDI FT2232 chip which provides debug capability with USB to UART+JTAG.

To provide this functionality, the FTDI chip must be configured with the correct settings, which is done via an EEPROM. This EEPROM should be programmed via USB with the correct settings for the WICED board.

The EEPROM can be programmed using a tool called FT_PROG which is available from : http://www.ftdichip.com/Support/Utilities/FT_Prog_v2.8.2.0.zip

The configuration file to be programmed via FT_PROG is attached: BCM9WCD1EVAL1_FTDI.xml

 

Note: it is possible that FT_PROG cannot detect your board.  This means that the USB VID/PID of the board do match the default FTDI VID/PID.  If this is the case you will need to :

  • Open Windows Device Manager, and right click the device and select properties. Then select the Details tab and Hardware Ids property. Make a note of the VID/PID
  • Download FTDI drivers from http://www.ftdichip.com/Drivers/VCP.htm
  • Unzip and open the following files in a text editor: ftdiport.inf,  ftdibus.inf
  • Modify the VID/PID to match those you noted earlier.
  • Install the driver by right clicking the device (in Device Manager) and selecting "Update Driver Software", then "Browse my computer for driver software" and select the directory with the modified driver files.
  • Now FTDI should be able to detect the board.

 

Important Note in relation to the FTDI programming:

The pin mapping between the FTDI chip and the host processor must exactly match that used on the WICED boards otherwise the board will be incompatible with the TCL scripts. If the board is incompatible please use a new VID/PID and TCL script to avoid making your system incompatible with WICED EVBs.

If you are selling boards with FTDI parts on them, you MUST NOT use BroadcomVendor ID. This means they you will need to change the driver and TCL scripts to pick up your new values.

Using AP(softAP) and STA(client) simultaneously

 

Several people have asked about using the WICED module as a SoftAP (AP) and a Client (STA) at the same time.

In this Blog, we will demonstrate this with the Console test App.

First, compile, download and run the Console Test App:

This can be done with the following "Make Target" test.console-BCM943362WCD4 download run

ap1.JPG

 

Next assure via the Serial port console window that the Console app is running

For more information on this Serial Port Communication to WICED Module

Using AP and STA simul..JPG

Typing 'help'  will scroll a long list of commands.

 

> help

Console Commands:

     help [<command> [<example_num>]]

         - Print help message or command example.

     loop <times> [ <semicolon_separated_commands_list> ]

         - Loops the commands inside [ ] for specified number of times

     antenna <0|1|3>

         - Antenna selection. 3 = Auto

     get_noise

         - Get PHY noise after successful TX

     get_ap_info

         - Get AP information

     get_access_category_parameters_sta

         - Get access category parameters for STA

     get_associated_sta_list

         - Get list of associated clients

     get_counters

         - Get counters

     get_country

         - Get country.

     get_rate

         - Get current rate.

     get_data_rate

         - Get data rate.

     get_mac_addr

         - Get the device MAC address.

     get_pmk <key>

         - Get PMK

     get_random

         - Get a random number.

     get_rssi

         - Get the received signal strength of the AP (client mode only).

     get_soft_ap_credentials

         - Get SoftAP credentials

     get_tx_power

         - Gets the tx power in dBm.

     join <ssid> <open|wep|wpa_aes|wpa_tkip|wpa2|wpa2_tkip> [key] [ip netmask gateway]

         - Join an AP. DHCP assumed if no IP address provided

     join_specific <ssid> <bssid> <channel> <open|wep|wpa_aes|wpa_tkip|wpa2|wpa2_tkip> [key] [ip netmask gateway]

         - Join specified AP. DHCP assumed if no IP address provided

     leave

         - Leave an AP.

     scan

         - Scan all enabled channels and print a list of APs found.

     set_legacy_rate <1|2|5.5|6|9|11|12|18|24|36|48|54>

         - Set legacy (CCK/OFDM) rate on PHY

     set_mcs_rate <MCS Index> <Override MCS only>

         - Set MCS rate on PHY

     disable_11n

         - Disable 11n mode operation

     enable_11n

         - Enable 11n mode operation

     set_data_rate <1|2|5.5|6|9|11|12|18|24|36|48|54>

         - Set data rate.

     set_ip <ip> <netmask> <gateway>

         - Set a static IP.

     set_listen_interval <listen interval> <time unit>

         - Set listen interval in time unit 0 = Beacon Intervals. 1 = DTIM Intervals

     wifi_powersave <mode> [delay]

         - Enable/disable Wi-Fi powersave mode. 0 = disable. 1 = PS Poll. 2 = Wait [delay] ms before entering powersave

     set_tx_power <0-31>

         - Set the tx power in dBm.

     start_ap <ssid> <open|wpa2|wpa2_aes> <key> <channel> <wps>

         - Start AP mode.

     status

         - Print status of the Wi-Fi and network interfaces.

     stop_ap

         - Stop AP mode.

     test_ap <ssid> <open|wpa2|wpa2_aes> <key> <channel> <wps> <iterations>

         - Test AP mode.

     test_join <ssid> <open|wep|wpa_aes|wpa_tkip|wpa2|wpa2_tkip> [key] [ip netmask gateway] <iterations>

         - Test joining an AP. DHCP assumed if no IP address provided

     test_join_specific <ssid> <bssid> <channel> <open|wep|wpa_aes|wpa_tkip|wpa2|wpa2_tkip> [key] [ip netmask gateway] <iterations>

         - Test joining an AP. DHCP assumed if no IP address provided

     test_cred <ssid> <bssid> <channel> <open|wep|wpa_aes|wpa_tkip|wpa2|wpa2_tkip> [key]

         - Test joining an AP

     ping <destination> [-i <interval in ms>] [-n <number>] [-l <length>]

         - Pings the specified IP or Host.

     force_alignment

         - Force aligned memory accesses

     join_wps <pbc|pin> [pin] [<ip> <netmask> <gateway>]

         - Join an AP using WPS

     join_wps_specific [pin] [<ip> <netmask> <gateway>]

         - Join a specific WLAN using WPS PIN mode

     scan_wps

         - Scan for APs supporting WPS

     start_registrar <pbc|pin> [pin]

         - Start the WPS Registrar

     stop_registrar

         - Stop the WPS Registrar

     p2p_connect <pin|pbc> [8 digit PIN]

         - Connect to an existing Group Owner or negotiate to form a group

     p2p_client_test <SSID> <8 digit PIN> [Iterations]

         - Test P2P client connection to existing group owner

     p2p_discovery_disable

         - Disable P2P discovery mode

     p2p_discovery_enable

         - Enable P2P discovery mode

     p2p_discovery_test [iterations]

         - Test enable/disable of P2P discovery mode

     p2p_go_start <p|n> [<ssid_suffix> <key> <operating channel>]

         - Start P2P (p)ersistent or (n)on-persistent group

     p2p_go_stop

         - Stop P2P group owner

     p2p_go_test <p|n> [iterations]

         - Test start/stop of (p)ersistent or (n)on-persistent group

     p2p_go_client_test_mode <enable=1|disable=0> <pin value>

         - Allow test client to join using PIN value

     p2p_leave

         - Disassociate from P2P group owner

     p2p_negotiation_test <8 digit PIN> [Iterations]

         - Test P2P negotiation handshake

     p2p_peer_list

         - Print P2P peer list

     p2p_registrar_start <pin|pbc> [8 digit PIN]

         - Start P2P group owner's WPS registrar

     p2p_registrar_stop

         - Stop P2P group owner's WPS registrar

     p2p_set_go_intent <intent value>

          - Set P2P group owner intent (0..15 where 15 = must be GO)

     p2p_set_go_pbc_mode_support <0|1>

          - Set P2P group owner support for PBC mode (1 = allow, 0 = disallow)

     p2p_set_listen_channel <channel>

         - Set listen channel (1, 6 or 11)

     p2p_set_operating_channel <channel>

         - Set operating channel (1..11)

     iperf

         - Run iperf --help for usage.

     iperf_test

         - iperf_test [iterations] iperf command

     malloc_info

         - Print memory allocation information

     thread_list

         - [ThreadX only] Lists the current running threads

     thread_kill <thread id>

         - [ThreadX only] Kills the specified running thread

     thread_spawn [priority] <cmds>

         - [ThreadX only] Spawns a new thread for the specified command. Optionally run at a specific priority.

     reboot

         - Reboot the device

     mcu_powersave <0|1>

         - Enable/disable MCU powersave

     traffic_stream_ipv4 [-c <destination ip>] [-p <port>] [-u (for udp)] [-l <length>] [-d <duration in seconds>] [-r <rate (pps)>] [-S <type of service>] [-i <interface>]

         - Start a traffic stream.

>

 

 

In this demo we will use the following commands:


status

     - Print status of the Wi-Fi and network interfaces.


scan

     - Scan all enabled channels and print a list of APs found.


start_ap <ssid> <open|wpa2|wpa2_aes> <key> <channel> <wps>

     - Start AP mode.


stop_ap

     - Stop AP mode.


join <ssid> <open|wep|wpa_aes|wpa_tkip|wpa2|wpa2_tkip> [key] [ip netmask gateway]

    - Join an AP. DHCP assumed if no IP address provided

 

leave

- Leave an AP.



First let's check the "status"

> status
WICED Version  : 3.1.2
Platform              : BCM943362WCD4
MAC Address     : 44:39:C4:31:14:83

STA Interface     : Down
AP Interface       : Down
P2P Interface     : Down

 

You can see from the output that the STA and AP interfaces are both down.

 

Next we can join an existing network:


Type 'scan' to see who is available:

> scan

Waiting for scan results...

  # Type  BSSID                      RSSI  Rate Chan Security    SSID

----------------------------------------------------------------------------------------------

  0 Infra 00:16:01:A1:98:38     -68    144.4     1    Open              Nidal-Out

  1 Infra 00:90:4C:10:E2:20    -57     216.7    1    Open              BSD-Android-Test

  2 Infra B8:BE:BF:15:AF:B2  -38     144.4    1    WPA2 AES    BRCMWiFi

  3 Infra B8:BE:BF:15:AF:B1  -38     144.4    1    WPA2 AES    brcmwpa

  4 Infra 04:A1:51:38:63:AD    -65     216.7   1    WPA2 AES    NETGEAR24-BT

  5 Infra B8:BE:BF:15:AF:B0   -36     54.0     1    WPA2 AES    BRCMGUEST

 

End of scan results

 

Next we will join an AP, in this example "BRCMGUEST"

> join BRCMGUEST wpa2 <passphrase>

Joining : BRCMGUEST

Successfully joined : BRCMGUEST

Obtaining IPv4 address via DHCP

Setting IPv6 link-local address

IPv4 network ready IP: 10.16.101.9

 

Now check the status:

> status
WICED Version  : 3.1.2
Platform              : BCM943362WCD4
MAC Address     : 44:39:C4:31:14:83

STA Interface
   MAC Address : 44:39:C4:31:14:83
   SSID               : BRCMGUEST
   IP Addr           : 10.16.101.9
   Gateway         : 10.16.96.1
   Netmask         : 255.255.248.0
AP Interface      : Down
P2P Interface    : Down

 

You can see we have successfully joined the network and received an IP address via the DHCP server.

 

Next we start an AP:

If you type start_ap you will see the correct syntax:

> start_ap

Usage: start_ap <ssid> <open|wpa2|wpa2_aes> <key> <channel> <wps>

 

Let's start an AP with the SSID 'gangi' with WPA2 security and a passphrase of '12345678' on Channel 1

PLEASE NOTE: The AP and STATION need to be on the same channel!  In this case it is 2.4GHz Channel 1.

> start_ap gangi wpa2 12345678 1
Setting IPv6 link-local address
IPv4 network ready IP: 192.168.0.1

 

Look at the Status again:

> status

WICED Version  : 3.1.2

Platform              : BCM943362WCD4

MAC Address     : 44:39:C4:31:14:83

STA Interface
   MAC Address  : 44:39:C4:31:14:83
   SSID                : BRCMGUEST
   IP Addr            : 10.16.101.9
   Gateway          : 10.16.96.1
   Netmask          : 255.255.248.0
AP Interface
   MAC Address  : 44:39:C4:31:14:83
   SSID                : gangi
   IP Addr            : 192.168.0.1
   Gateway          : 192.168.0.1
   Netmask          : 255.255.255.0
P2P Interface     : Down


Now you can see we have a AP interface and a STA Interface simultaneously running.

 

 

You can easily stop the soft AP using 'stop_ap' and leave the AP using the 'leave' command

> stop_ap
> status
WICED Version  : 3.1.2
Platform              : BCM943362WCD4
MAC Address     : 44:39:C4:31:14:83

STA Interface
   MAC Address  : 44:39:C4:31:14:83
   SSID                : BRCMGUEST
   IP Addr            : 10.16.101.9
   Gateway          : 10.16.96.1
   Netmask          : 255.255.248.0
AP Interface      : Down
P2P Interface     : Down

 

 

> leave
> status
WICED Version  : 3.1.2
Platform              : BCM943362WCD4
MAC Address     : 44:39:C4:31:14:83

STA Interface    : Down
AP Interface       : Down
P2P Interface     : Down

 

 

Enjoy. Hope this helps!

 

Please direct questions and comments to:

seyhan and GregG_16

GregG_16

Discussion Format Template

Posted by GregG_16 May 22, 2014

To better serve you and allow multiple resources to work on your case we have a suggested Template to follow with all Bug reports, questions, Issues, etc.

 

Please feel free to add any and all details, cut, paste, edit old posts so you don't have to re-enter everything every time.

As a friendly reminder, we may point you to this blog to remind you from time to time.

We certainly don't want to discourage input, but this will help us support you faster, and allow better collaboration between all parties.

Also please do not combine multiple issues into one discussion, and if one issue spawns a secondary issue, please start a new discussion.

Don't be shy, we can edit and delete anything we need to.

 

Summary Issue or question:

    Feel free to elaborate on the issue, steps to reproduce, environment, workarounds already tried, etc.


Example code to recreate the bug


SDK version


HW Platform (if it is a peripheral or MCU issue)


Development environment (usually agnostic, but needed if you have an installer or toolchain issue)


Log/console output (if needed)


Sniffer trace (if needed) as an attachment.


help.JPG

Thanks to seyhana_ for putting this snip together.

It is a good use of the scan application, the push button SW, and the GPIOs

 

This "snip" will launch the "scan" snip, scan for WiFi networks and display the details on the Console.

The red LED will remain illuminated while the scan is running. 

The scan will repeat until the button press and the LED will go out.

 

Here's how to use it...

 

Extract the attached "push2scan.zip" directory, to a directory of your choice.

p2s1.JPG

Copy the directory to your WICED SDKs .../Apps/snip directory.  You will see the other snips there as well.

p2s2.JPG

When you launch the Eclipse SDK (or Refresh/F5) next you will see your new push2scan "snip" populated.

push2scan apps new.JPG

Copy and Paste the "scan" make target and rename it "snip.push2scan-BCM943362WCD4 download run"

p2s4.JPG

Keep in mind it has to match exactly the name of the directory "push2scan"...

Your "Make Target" should look similar to this

p2s5.JPG

 

Double-click the target and let it complete until "Target running"  is displayed in the "Console" tab

p2s6.JPG

Now have a look at your Console window.  In this example we are using the WICEDSerial Windows executable provided here:

WICEDSerial - Console tool to communicate to your WICED Board

 

You will see the following output on the console:

p2s8.JPG

Notice the red LED is illuminated.  This indicates the "scan" is running.

p2s9.JPG

Push SW1 (lower left corner in this photo) to "stop" and "start" the scanning and toggle the LED on/off.

 

Thank you.seyhana_

This was taken from a previous discussion started by jasonrc with input from userc_2168 and userc_2095  thank you for the input...


Having trouble capturing packets to debug your application?  Here are some  tools to use: 


We recommend using a USB wireless sniffer from one of the following vendors.

 

 

 

AirPCAP Nx -- works with Wireshark

 

Good, well-priced, easy-to-use network network analyser

 

http://www.riverbed.com/us/products/cascade/wireshark_enhancements/airpcap.php

 

http://www.wireshark.org   [Win32 v1.4.14 is stable and works well]

 

All versions downloadable here: http://wiresharkdownloads.riverbed.com/wireshark/win32/all-versions/

 

 

Omnipeek

 

Full featured network analyser

 

http://www.wildpackets.com/products/network_analysis_and_monitoring/omnipeek_network_analyzer

 

 

AirMagnet

 

Full featured network analyser

 

http://www.flukenetworks.com/enterprise-network/wlan-security-and-analysis

 

 

Microsoft Network Monitor 3

 

A free tool which uses the Wi-Fi card in the laptop/PC. 

 

http://support.microsoft.com/kb/933741



For doing analysis of the RF/WiFi environment, the following tools are useful:

 

 

WiSpy - PC dongle to do 2.4GHz and 5GHz spectrum capture.  Can show 802.11 and non-802.11 interference.

 

http://www.metageek.net/products/wi-spy/

 

 

inSSIDer - Free scanning tool to show other 802.11 networks within range.

 

http://www.metageek.net/products/inssider/

 

Basic network scans are also available using the wireless utility in your PC or Mac.


Also for RF/WiFi environments if you have an iPad/iPhone/iPod Touch

 

 

WiPry - iPhone/iPad/iPod Touch dongle for 2.4GHz analysis

 

http://www.oscium.com/products/wipry-combo-spectrum-analyzer-and-dynamic-power-meter

 

 

The power meter function is quite handy if you want to make duty cycle measurements or measure actual TX times.


Here is another great tutorial for MACOS users...

http://wlanpros2.project.ihelphosting.com/wp-content/uploads/2013/06/Wireless-Diagnostic-Utility-in-Mac-OS-10.pdf



Need to send wl commands?  Check out this important guide.

WICED™ Development System, Manufacturing Test User Guide

Restricted Operation

---------------------------------------------------------

The mfg test firmware image allows modes of operation that can violate radio regulations. The mfg test firmware must not be used for any purpose other than testing during design and manufacturing.

This Blog will explain the sample application appliance.c that comes with the WICED SDK.

Thanks to  davida_06 for putting this together.

 

The Appliance application demonstrates how a simple web page can be used to send information to a UART when a button on the webpage is clicked. The application mimics a very basic user interface to control a home appliance such as a washing machine or dryer.

 

See attached presentation.

Many "snips" or applications require you to associate to an existing router so you can obtain an IP address, ping devices, send traffic, and various other things.

This is simple to do by editing the wifi_config_dct header file.

In the directory on the left side of the IDE in the application you are running, there is a header file "wifi_config_dct.h" listed.

     For example: <WICED-SDK>/apps/snip/apsta/wifi_config_dct.h

If you open this in the editor window and scroll down, you will see the CLIENT_AP_SSID and CLIENT_AP_PASSPHRASE" define values.

Simply edit these to match your router credentials and save the file.

In the example below, the SSID broadcasting is ASUS and the PASSPHRASE is 12345678.

dht.png

Compile, download and run the target and you will have success associating the the AP.

In the terminal window you will see the association details and the IP address:

terminal_reset.png

As you know from reading the Quick Start Guide the USB port on the module acts as a power source, an interface to the IDE, and also provides serial port communications.

This allows you to use a terminal emulation application such as TeraTerm, PuTTY or CoolTerm (OS X) to communicate with the device from the USB port on your PC.

 

After installing the terminal emulator of your choice you will need to know which COM port it is on. In the device manager of Windows you can see this.

device manager.JPG

 

Next you will need to configure the emulator (PuTTY is used here).  In the case above it is on COM5 so you will need to go to the Serial port settings of your Terminal Program and change it to COM5. The setting default is probably 9600-8-1-N but should be changed to 115200-8-1-N, shown below. Next go to the Session category on the left side and make sure that Serial is chosen as the connection type and then open the terminal.

puttyconfig.JPGputtyconfig2.JPG

When working correctly, you will see the ">" prompt and output to the terminal.


When you press the reset button on the module, you will see output to the terminal window, and some useful information depending on what you are running.

putty terminal.JPG


Note: Sometimes the terminal has to be reset.  If you are not getting any output, close the terminal, reopen and setup serial port again.


GregG_16

WICED Wi-Fi Help Blog

Posted by GregG_16 Feb 12, 2014

Greetings,

From time to time we will blog useful information here related to WICED WiFi.

We would like to keep this interactive, so if you have suggestions on what you would like to see here, please comment or message me.  We will keep things generic, so everyone can benefit.

 

EXAMPLES:

  • Tutorials on using WICED modules along with the development environment (IDE).
  • Step by step guides to show applications running on the WiCED modules
    • iperf
    • wifi scanning
    • Ping
    • APSTA
    • Powercycle
    • and other examples from the SDK.
  • Roadmap information for SW and HW as it becomes public

Filter Blog

By date:
By tag: