WICED SDK working on Ubuntu 13.X

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi All

Now I will share the experience for development environment building on Ubuntu OS based on EVK Board

The default SDK.tar.gz downloaded from Web can be used directly after unzipping. But the virtual Serial port can't be created By linux kernel of Ubuntu(Windows is ok). Also the wl tool was prebuilt for Window Only.  Located in path: WICED-SDK-3.1.1/apps/test/mfg_test/wl43362A2.exe, wl43341B0.exe, wl4390A1.exe and other three dll file. So the SDK can work perfectly on Windows in compare to work smoothly on Ubuntu. We wanna the sdk can work perfectly on Ubuntu also.

So we should fix tty issue first, Broadcom  EVK Board use FT2232HQ chip for programming. The chip can support USB->JTAG and USB->Serial. The usb device will be registered in kernel when we powered on the board. But the ttyUSB device can't be created.

First we will fix the ttyUSB issue, the FT2232 vid/pid was designed with brcm ID "0a5c 43fa". The kernel will not install driver successfully.

Let's fix it now:

Part A: ttyUSB issue

1 Create a new file:

# vi   /etc/udev/rules.d/73-broadcom-ftdi.rules

2 Paste the below info to edit window:

====================================================================================================

ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="0a5c", ATTRS{idProduct}=="43fa", RUN+="/sbin/modprobe -b ftdi_sio"

ACTION=="add", SUBSYSTEM=="drivers", ENV{DEVPATH}=="/bus/usb-serial/drivers/ftdi_sio", ENV{MODALIAS}="usb:v0A5Cp43FAd0700dc00dsc00dp00icFFiscFFipFFin01" ATTR{new_id}="0a5c 43fa"

====================================================================================================

3 Press "Shift + :" and type "wq" to save and exit

4 run udev restart cmd:

# service udev restart

5 Unplug USB cable connected to Board in previous and re-plug again.

6 check the ttyUSB device. The ttyUSB device will created 2, ttyUSB[num] and ttyUSBX[num+1], e.g: ttyUSB0, ttyUSB1. The first one(ttyUSB0) is JTAG interface so we should by pass, and the second one(ttyUSB1) is the tty interface, we can use this.

7 We can run "openocd-all-brcm-libftdi -f ./tools/OpenOCD/BCM9WCD1EVAL1.cfg -f ./tools/OpenOCD/stm32f2x.cfg -f ./tools/OpenOCD/stm32f2x_gdb_jtag.cfg" to disconnect ttyUSB0. There is ttyUSB1 only now.

8 enter minicom

# minicom -D /dev/ttyUSB1

we can debugging via serial now, the function is same as window.

Part B: wl tool issue

In the apps/test/mft_test, we can find the wlxxx.exe and wlxxx.dll prebuilt tool for windows.

1 modify the Makefile : WICED-SDK-3.1.1/apps/test/mft_test/Makefile .  I have attached the modified Makefile.

2 Patched wl source:

Three files must be patched:

WICED-SDK-3.1.1/apps/test/mfg_test/43362A2/wl/exe/wlu_linux.c

WICED-SDK-3.1.1/apps/test/mfg_test/4390A1/wl/exe/wlu_linux.c

WICED-SDK-3.1.1/apps/test/mfg_test/43341B0/wl/exe/wlu_linux.c

Patch like below:

======================================================================

+#ifndef TARGETENV_x86

#ifndef TARGETENV_android

typedef u_int64_t u64;

typedef u_int32_t u32;

typedef u_int16_t u16;

typedef u_int8_t u8;

typedef u_int64_t __u64;

typedef u_int32_t __u32;

typedef u_int16_t __u16;

typedef u_int8_t __u8;

#endif /* TARGETENV_android */

+#endif

=======================================================================

3 enter into apps/test/mft_test/

# cd apps/test/mft_test/Makefile

# make

We will get Binary :

wiced_wlm_43362A2.so wl43362A2

wiced_wlm_43341B0.so wl 43341B0

wiced_wlm_4390A1.so wl4390A1

4 please build the test.mfg_test application and use wl tool test

5 wl test:

# ./apps/test/mfg_test/wl43362A2 --serial /dev/ttyUSB1 ver

5.90 RC230.255

wl0: Sep 10 2014 11:29:07 version 5.90.230.10 (WLTEST) FWID 01-2e323232

# ./apps/test/mfg_test/wl43362A2 --serial /dev/ttyUSB1 scan

# ./apps/test/mfg_test/wl43362A2 --serial /dev/ttyUSB1 scanresults

SSID: "jinyang"

Mode: Managed    RSSI: -61 dBm    SNR: 0 dB    noise: -92 dBm    Flags: RSSI on-channel     Channel: 6

BSSID: 8C:21:0A:A3:83:C6    Capability: ESS WEP ShortPre ShortSlot

Supported Rates: [ 1(b) 2(b) 5.5(b) 11(b) 6 9 12 18 24 36 48 54 ]

WPA:

    multicast cipher: AES-CCMP

    unicast ciphers(1): AES-CCMP

    AKM Suites(1): WPA-PSK

    No WPA Capabilities advertised

RSN:

    multicast cipher: AES-CCMP

    unicast ciphers(1): AES-CCMP

    AKM Suites(1): WPA-PSK

    Capabilities(0x0000): No Pre-Auth, Pairwise, 1 PTK Replay Ctr1 GTK Replay Ctr

802.11N Capable:

    Chanspec: 2.4GHz channel 6 20MHz (0x2b06)

    Control channel: 6

    802.11N Capabilities: SGI20 SGI40

    Supported MCS : [ 0 1 2 3 4 5 6 7 ]

wl tool can be used to test RF performance of BRCM WiFi chip. Such as Tx,Rx, Single Carrier Test.

OK, everything is ok now. WICED SDK can run perfectly on Ubuntu OS now.

Have a good experiencing with wiced sdk...

Regards

Harry

3 Replies
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi,

Very nice. Thanks for sharing your experience with forum users.

Thanks,

Seyhan

0 Likes
Anonymous
Not applicable

Hi,

Can we use Android to program in BCM43341?

Please advice?

Thank you.

0 Likes

Hi,

WICED SDK is eclipse based and supported on Windows, MacOS and Linux. On targer WICED modules, like BCM43341 + MCU, ThreadX and FreeRTOS are supported.


For Android, Broadcom offers multiple WiFi, BT, BLE and combo devices. Please contact your local Broadcom sales office, Sales Offices | Broadcom.

Seyhan

0 Likes