wl tool and scripts for Raspberry Pi Compute Module 4 - based system certification

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

cross mob
adrix_m
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Hello,

we are considering the Raspberry Pi Compute Module 4 (CM4) for one of our products, and because we will use a non pre-certified antenna we need to run a subset of the certification tests.

The CM documentation declares that the wireless module is BCM43455, which I understand is produced by Broadcom around Cypress technology, is this correct?

Could you provide the related software tools and documentation?

We will use standard Raspbian.

Has the Raspberry Pi 4B+ the same wireless module? It would be nice to be able to familiarize with the tools and the scripts with the "consumer" Raspberry before system integration with the CM.

Thanks,

Adriano

 

 

0 Likes
1 Solution
raks_99
Moderator
Moderator
Moderator
First question asked 250 replies posted 250 sign-ins

Hi adrix,

I think the error means it has trouble finding the libnl library files on the rpi.

So I tried this version that I am attaching right now on my RPI 3B+ and seems to work fine. 

run the commands:

"./wlarm_le ver"

"./wlarm_le scan"

"./wlarm_le scanresults"

 

View solution in original post

29 Replies
raks_99
Moderator
Moderator
Moderator
First question asked 250 replies posted 250 sign-ins

Hi adrix,

Yes, The Wireless Radio  BCM43455 (CYW43455) is by Cypress.

What are the certification tests you are planning to conduct?

I'm not sure if there is a Raspberry Pi 4B+ out there but you can contact Raspberry Pi to know the Wireless Radio they used in it.

I can provided wl tool cross-compiled for aarch64 with "aarch64-linux-gnu-gcc" toolchain. Would it work for you?

Thanks and Regards

Raks

Cypress Application Support

0 Likes

Hi raks,

the cross build with aarch64-linux-gnu-gcc (I presume you are cross compiling on Ubuntu or Debian ) should be OK, thanks.

Regarding the tests: since the Rpi CM 4 is already certified by Raspberry Pi (Trading) Limited for the EU, to certify the entire product we have to emit at maximum power in selected channels, both for WiFi and BT.

Hence the need for the wl tool.

Best regards,

Adriano

0 Likes
raks_99
Moderator
Moderator
Moderator
First question asked 250 replies posted 250 sign-ins

Hi adrix,

Yes, cross compiled on Ubuntu 18.04

Please find the attached wl tool zip file Let me know if you have issues using it.

Thanks and Regards

Raks

Cypress Application Support

Hi Raks,

this version does not run, readelf says that is a shared library and not an executable.

However, the tool wl_fmac_rpi3 runs but when I try to use it gives this error:

pi@raspberryPT:~/wireless $ ./wl_fmac_rpi3 up
./wl_fmac_rpi3: wl driver adapter not found

What I am missing?

Thanks,

Adriano.

 

 

 

 

 

0 Likes
DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

Hi adrix,

Do you have try ./wl ver command?
Can you please share the logs after the ./wl help command,TKS!

Br,

 

0 Likes
raks_99
Moderator
Moderator
Moderator
First question asked 250 replies posted 250 sign-ins

Hi Adriano,

I'm building the wl tool again slightly differently, I will provide it to you shortly.

Also , What certifications are you planning to conduct? FCC/Regulatory Related or WFA certs?

 

Best Regards,

Raks

 

0 Likes
adrix_m
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Rigth now I am polishing the BT tests, when I return to WiFi I will update this thread

 

Thanks,

Adriano

0 Likes
raks_99
Moderator
Moderator
Moderator
First question asked 250 replies posted 250 sign-ins

Hi adrix,

Sure, you can come back later and update the thread.

I have attached the wl tool for fmac.

Best Regards,

Rakshith

adrix_m
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Hello Raks,

again, this is a shared library, not an executable

if i run on the Rpi4:

readelf -a wl > wl.elf

I obtain the attached file, which says that the wl binary is a shared object file (a DLL)

an executable would be of type EXEC (Executable file).

I suppose your build is set to build a library and not an executable.

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

I compiled a trivial "hello, world" on the Rpi4 and I have attached the readelf output as reference

Best regards,

Adriano

 

 

 

 

 

0 Likes
DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

Hi Adrix,

Do you have try(the wl tool for fmac) ./wl ver command?
Can you please share the logs after the ./wl help command,TKS!

Br,

 

 

 

 

 

0 Likes
adrix_m
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Lin,

the wl provided above is not executable, so this is what happens when I try to execute it:

pi@raspberryPT:~/repos/protube-sys-pi/wireless/wifi/wl $ ./wl
bash: ./wl: cannot execute binary file: Exec format error

 

DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

Hi Adrix,

Your can try the following instructions to check the current system (32BIT/64BIT)

root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 5.10.27-v7+ #1409 SMP Tue Apr 6 18:23:37 BST 2021 armv7l GNU/Linux
root@raspberrypi:/home/pi# cat /proc/version
Linux version 5.10.27-v7+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1409 SMP Tue Apr 6 18:23:37 BST 2021
root@raspberrypi:/home/pi# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
root@raspberrypi:/home/pi#

DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

Hi Adrix,

It seems the OS is 32 bit.

Could you try the attached wlfmac( ) for arm32?

0 Likes
raks_99
Moderator
Moderator
Moderator
First question asked 250 replies posted 250 sign-ins

Hello adrix,

 

So GCC has enabled to build position-independent executables by default on the newer GCC version. These position independent executables are incorrectly interpreted as a shared object by the "file" command.

 

However, these should be executed just fine like any other executables.

For example on the Jetson platform, the wl tool built for it runs fine even though it doesn't say it is executable.

 

jetbot@jetson-4-3:~$ file wl

wl: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=666cb15be45e14c09a00cdd700aa55ea4ef4e69c, with debug_info, not stripped

jetbot@jetson-4-3:~$ ./wl

type -h for help

 

Looks like this is not happening with the RaspberryPi.

However, I have attached the 32bit tool which I native compiled and is working fine on my 32bit Raspberry Pi OS.

Output from Pi:

"pi@raspberrypi:~ $ file wl

wl: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=89e30d4a7c426aa15c06f4e0570c3fdd546e3439, with debug_info, not stripped

pi@raspberrypi:~ $ ./wl

type -h for help"

 

There are two executables, try them out. Let me know if this worked for you.

 

Thanks and Regards,

Rakshith

DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

DS_Lin_0-1618880634783.png.....

^^.....try 32bit ...

 

0 Likes
adrix_m
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Hello,

the wl executable provided above runs correctly:

pi@raspberryPT:~/repos/protube-sys-pi/wireless/wifi/wl_new/raspberrypi $ wl
type -h for help

But apparently something is missing:

pi@raspberryPT:~/repos/protube-sys-pi/wireless/wifi/wl_new/raspberrypi $ wl -v
wl: wl driver adapter not found

What I am missing?

Thanks,

Adrix

0 Likes
DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

Hello adrix,

What is the production firmware that you are using?
If the wl tool works with mfg firmware, it leads me to believe that the tool is compiled correctly and there might be something else which could be causing this.

0 Likes
adrix_m
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

The directory /lib/firmware/brcm contains, among others, the files

-rw-r--r-- 1 root root 631467 Jan 25 11:17 brcmfmac43455-sdio.bin
-rw-r--r-- 1 root root 7163 Jan 25 11:17 brcmfmac43455-sdio.clm_blob
-rw-r--r-- 1 root root 2074 Jan 25 11:17 brcmfmac43455-sdio.txt

My understanding is that:

- the . bin file is the firmware;

- the .clm_blob file is the Country Locale Matrix blob;

- the .txt file is the nvram configuration file.

The  kernel module brcmfmac.ko (this should be the wifi device driver) contains the string "brcmfmac43455-sdio.bin", so it appears that the firmware filename is embedded in the device driver.

Can the wl tool use this configuration?

Thanks,

Adrix

0 Likes
DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

Hello adrix,

The wl tool works with mfg firmware,

Your log  FW seems to be for normal not mfg.

-rw-r--r-- 1 root root 631467 Jan 25 11:17 brcmfmac43455-sdio.bin

I could not provide MFG FW for brcmfmac on CYW43455 here.

Could you create MyCase technical support?

Then ask to provide MFG FW for brcmfmac on CYW43455

1. Please visit MyCases site below.

https://www.cypress.com/mycases

2.Please select MyCases

DS_Lin_0-1618932884410.png

3.Please select Technical Support, then you can create new MyCases.

If your account does not has Technical Support,

please report it on following link.

https://www.cypress.com/webform/website-support

DS_Lin_1-1618932927669.png

Br,
DS

 

 

adrix_m
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Hello DS,

it seems I can not create a technical support case, see attached screenshot.

 

0 Likes
DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

Hi Adrix,

please report it on following link.

DS_Lin_0-1620032177008.png

 

 

0 Likes
raks_99
Moderator
Moderator
Moderator
First question asked 250 replies posted 250 sign-ins

Hi adrix!

Looks like the executable is running fine, so you are Running Raspberry Pi OS 32 bit.

The ver command was supposed to print out the firmware version.

Looks like it has trouble finding the wifi adapter.

However, can you try with the attached file. 

Let me know your results.

Thanks and Regards,

Rakshith

 

0 Likes
DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

FYI

DS_Lin_0-1619489161992.png

 

0 Likes
adrix_m
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

i have the same output running wlarm32

0 Likes
raks_99
Moderator
Moderator
Moderator
First question asked 250 replies posted 250 sign-ins

Hi adrix,

I think the error means it has trouble finding the libnl library files on the rpi.

So I tried this version that I am attaching right now on my RPI 3B+ and seems to work fine. 

run the commands:

"./wlarm_le ver"

"./wlarm_le scan"

"./wlarm_le scanresults"

 

DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

FYI

Linux raspberrypi 5.10.27-v7+ #1409 SMP Tue Apr 6 18:23:37 BST 2021 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon May 3 09:50:01 2021 from 192.168.2.14
pi@raspberrypi:~ $ sudo su
root@raspberrypi:/home/pi# ./wlarm_le ver
./wlarm_le: /lib/arm-linux-gnueabihf/libnl-3.so.200: no version information available (required by ./wlarm_le)
./wlarm_le: /lib/arm-linux-gnueabihf/libnl-genl-3.so.200: no version information available (required by ./wlarm_le)
1.28 RC0.0
wl0: Mar 2 2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2
root@raspberrypi:/home/pi# ./wlarm_le scan
./wlarm_le: /lib/arm-linux-gnueabihf/libnl-3.so.200: no version information available (required by ./wlarm_le)
./wlarm_le: /lib/arm-linux-gnueabihf/libnl-genl-3.so.200: no version information available (required by ./wlarm_le)
root@raspberrypi:/home/pi# ./wlarm_le scanresults
./wlarm_le: /lib/arm-linux-gnueabihf/libnl-3.so.200: no version information available (required by ./wlarm_le)
./wlarm_le: /lib/arm-linux-gnueabihf/libnl-genl-3.so.200: no version information available (required by ./wlarm_le)
SSID: "AP_5G"
Mode: Managed RSSI: -14 dBm SNR: 0 dB noise: -93 dBm Flags: RSSI on-channel Channel: 44/80
BSSID: F4:28:53:86:44:8E Capability: ESS WEP
Supported Rates: [ 6(b) 9 12(b) 18 24(b) 36 48 54 ]
RSN:
multicast cipher: AES-CCMP
unicast ciphers(1): AES-CCMP
AKM Suites(1): WPA2-PSK
Capabilities(0x0000):
No Pre-Auth
Pairwise
MFP not Required
MFP not Capable
1 PTK Replay Ctr
1 GTK Replay Ctr
Extended Capabilities:
HT Capable:
Chanspec: 5GHz channel 42 80MHz (0xe22a)
Primary channel: 44
HT Capabilities: 40Mhz SGI20 SGI40
Supported HT MCS : 0-15 32
WPS: V1.0 Configured
VS_IE:dd180050f2020101800003a4000027a4000042435e0062322f00
VS_IE:dd9d0050f204104a0001101044000102103b00010310470010bc329e001dd811b28601f4285386448e1021001852616c696e6b20546563686e6f6c6f67792c20436f72702e1023001c52616c696e6b20576972656c6573732041636365737320506f696e74102400065254323836301042000831323334353637381054000800060050f20400011011000952616c696e6b41505310080002008c103c000102
VS_IE:dd07000c4307000000
VS_IE:dd07000ce700000000

SSID: "TOTOLINK_A3_5G"
Mode: Managed RSSI: -33 dBm SNR: 0 dB noise: 0 dBm Flags: RSSI on-channel Channel: 36/80
BSSID: F4:28:53:7D:E4:62 Capability: ESS WEP
Supported Rates: [ 6(b) 9 12(b) 18 24(b) 36 48 54 ]
RSN:
multicast cipher: AES-CCMP
unicast ciphers(1): AES-CCMP
AKM Suites(1): WPA2-PSK
Capabilities(0x0000):
No Pre-Auth
Pairwise
MFP not Required
MFP not Capable
1 PTK Replay Ctr
1 GTK Replay Ctr
Extended Capabilities:
HT Capable:
Chanspec: 5GHz channel 42 80MHz (0xe02a)
Primary channel: 36
HT Capabilities: 40Mhz SGI20 SGI40
Supported HT MCS : 0-15 32
WPS: V1.0 Configured
VS_IE:dd180050f2020101800003a4000027a4000042435e0062322f00
VS_IE:dd9d0050f204104a0001101044000102103b00010310470010bc329e001dd811b28601f428537de4621021001852616c696e6b20546563686e6f6c6f67792c20436f72702e1023001c52616c696e6b20576972656c6573732041636365737320506f696e74102400065254323836301042000831323334353637381054000800060050f20400011011000952616c696e6b41505310080002008c103c000102
VS_IE:dd07000c4307000000
VS_IE:dd07000ce700000000

SSID: "TOTOLINK_A3"
Mode: Managed RSSI: -28 dBm SNR: 0 dB noise: 0 dBm Flags: RSSI on-channel Channel: 2
BSSID: F4:28:53:7D:E4:60 Capability: ESS WEP ShortSlot
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
RSN:
multicast cipher: AES-CCMP
unicast ciphers(1): AES-CCMP
AKM Suites(1): WPA2-PSK
Capabilities(0x0000):
No Pre-Auth
Pairwise
MFP not Required
MFP not Capable
1 PTK Replay Ctr
1 GTK Replay Ctr
Extended Capabilities: 20/40_Bss_Coexist
HT Capable:
Chanspec: 2.4GHz channel 2 20MHz (0x1002)
Primary channel: 2
HT Capabilities: SGI20 SGI40
Supported HT MCS : 0-15 32
WPS: V1.0 Configured
VS_IE:dd180050f2020101800003a4000027a4000042435e0062322f00
VS_IE:dd9d0050f204104a0001101044000102103b000103104700102880288028801880a880f428537de4601021001852616c696e6b20546563686e6f6c6f67792c20436f72702e1023001c52616c696e6b20576972656c6573732041636365737320506f696e74102400065254323836301042000831323334353637381054000800060050f20400011011000952616c696e6b41505310080002008c103c000101
VS_IE:dd07000c4303000000

SSID: "AC300"
Mode: Managed RSSI: -43 dBm SNR: 0 dB noise: 0 dBm Flags: RSSI on-channel Channel: 1l
BSSID: 14:4D:67:C1:D5:5C Capability: ESS WEP ShortSlot
Supported Rates: [ 1(b) 2(b) 5.5(b) 6 9 11(b) 12 18 24 36 48 54 ]
RSN:
multicast cipher: AES-CCMP
unicast ciphers(1): AES-CCMP
AKM Suites(1): WPA2-PSK
Capabilities(0x0000):
No Pre-Auth
Pairwise
MFP not Required
MFP not Capable
1 PTK Replay Ctr
1 GTK Replay Ctr
Extended Capabilities:
HT Capable:
Chanspec: 2.4GHz channel 3 40MHz (0x1803)
Primary channel: 1
HT Capabilities: 40Mhz SGI20 SGI40
Supported HT MCS : 0-15
WPS: V2.0 Configured
VS_IE:dd180050f2020101000003a4000027a4000042435e0062322f00
VS_IE:dd0600e04c020160
VS_IE:dda20050f204104a0001101044000102103b00010310470010112233445566778899aa144d67c1d5581021001b5265616c74656b2053656d69636f6e647563746f7220436f72702e1023000752544c387878781024000d45562d323031302d30392d32301042000f3132333435363738393031323334371054000800060050f204000110110008544f544f4c494e4b100800022008103c0001031049000600372a000120

root@raspberrypi:/home/pi# file wlarm_le
wlarm_le: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=0a45b3777892a73a8b57fc93c820c9a35ae73db5, with debug_info, not stripped
root@raspberrypi:/home/pi#

adrix_m
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

Hi DS_Lin,

finally! this latest version prints correctly the version, and the scan operation returns the access point list in this environment.

I understand that a different firmware is not needed, correct?

thanks,

Adriano

 

0 Likes
DS_Lin
Level 5
Level 5
Distributor - Zenitron(GC)
First comment on blog 100 sign-ins 50 replies posted

Hi  Adriano,

You can simply type help in the WL command ==> ./wlarm_le help ,

Please visit Cypress Wi-Fi CLM Regulatory Manual site below.

https://www.cypress.com/file/453451/download

Br,
DS

0 Likes
maciex
Level 1
Level 1
5 replies posted First like received First reply posted

Hi Rakshith,
I have the same problem as DS_Lin described above with the lack of libnl version information. I have tried several wl binaries published within this thread but most of them behave erratically or simply does not run at all.
My platform is Raspberry Pi 4B with BCM43455 module, running 64-bit Ubuntu 20.04.2 LTS.
One of the 'wl' variants you published here is 64-bit and it appears to run but it complains about the unknown libnl version:

root@rpi:/usr/local/bin# ./wl ver
./wl: /lib/aarch64-linux-gnu/libnl-3.so.200: no version information available (required by ./wl)
./wl: /lib/aarch64-linux-gnu/libnl-genl-3.so.200: no version information available (required by ./wl)
1.28 RC0.0
wl0: Mar 12 2018 16:18:54 version 7.45.222 (RPI-PRKE) (r683458 CY WLTEST) FWID 01-35ee9694

Some 32-bit versions of wl also want to run and even do not complain about the libnl version, but after several cycles of tests (usually 'pkteng_start tx' sequence of commands) the wl tool refuses to work. Usually it reports that "wl driver adapter not found", regardless of the wl arguments. Even the simplest wl commands (like out or down) produce the same message, despite it worked many times before. It rather looks like a binaries or libraries mismatch, than a real radio problem.
Maybe my mfg firmware is too old? I only have a 32-bit version for Raspberry Pi 4:

root@rpi:/usr/local/bin# ls -l /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin
-rw-r--r-- 1 root root 566600 Dec 10 19:52 /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin

Would you be so kind and help me obtain a proper wl version for my platform?
The platform details follow:

root@rpi:/usr/local/bin# uname -a
Linux rpi 5.4.0-1030-raspi #33-Ubuntu SMP PREEMPT Wed Feb 24 11:20:11 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
root@rpi:/usr/local/bin# cat /proc/version
Linux version 5.4.0-1030-raspi (buildd@bos02-arm64-015) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #33-Ubuntu SMP PREEMPT Wed Feb 24 11:20:11 UTC 2021
root@rpi:/usr/local/bin# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

I will highly appreciate your help 🙂
Regards,
Maciej

0 Likes