cancel
Showing results for 
Search instead for 
Did you mean: 

Wireless

Fininho
New Contributor

I'm working with an IMX6UL board running and arm32 Debian 9 with U-Boot.
This board has a CYW43353 and we are using the firmware on brcmfmac4339-sdio.bin.

For one of the projects, I need to assign a customized MAC address to the wireless interface.
I know we can set the Ethernet MAC address on the U-Boot, but I am failing to do something similar with the wifi interface.
Is there a way to set a customized MAD address used when the drivers are loaded?

Thank you for your help.

0 Likes
5 Replies
raks_99
Moderator
Moderator

HI @Fininho ,

Welcome to the community.

Let me see how custom MAC could be set. I will check and get back to you.

Thanks and Best Regards,

Rakshith

0 Likes
raks_99
Moderator
Moderator

Hi @Fininho ,

In the nvram text file, you can set custom MAC to be used by changing the value  "macaddr=aa:bb:cc:dd:ee:ff" where  aa:bb:cc:dd:ee:ff is the MAC address you need to use 

Best Regards

Raks

 

0 Likes
Fininho
New Contributor

Thank you for you quick reply.

 

I think the nvram text file on my system is: /lib/firmware/brcm/brcmfmac4339-sdio.txt

Using dmesg I can see this to be drivers load:

"brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac4339-sdio.bin for chip 0x0043
39(17209) rev 0x000002"

 

Now, if that is right, my /lib/firmware/brcm/brcmfmac4339-sdio.txt looks like this:

NVRAMRev=$Rev: 410316 $
sromrev=11
boardrev=0x1203
boardtype=0x06c5
boardflags=0x00000c01
boardflags2=0x00002000
boardflags3=0x8101188
macaddr=00:09:14:c5:12:38
cctl=0
ccode=US
regrev=911
antswitch=0
pdgain5g=7
pdgain2g=7
tworangetssi2g=0
tworangetssi5g=0
femctrl=7
vendid=0x14e4
devid=0x43ae
manfid=0x2d0
nocrc=1
otpimagesize=502
xtalfreq=37400
extpagain2g=2
pdetrange2g=2
extpagain5g=2
pdetrange5g=2
rxgains2gelnagaina0=0
rxgains2gtrisoa0=7
rxgains2gtrelnabypa0=0
rxgains5gelnagaina0=0
rxgains5gtrisoa0=11
rxgains5gtrelnabypa0=0
rxchain=1
txchain=1
aa2g=1
aa5g=1
tssipos5g=0
tssipos2g=0
pa2ga0=-159,5841,-699
pa2gccka0=-162,6244,-755
pa5ga0=-185,5721,-690,-185,5693,-688,-193,5445,-670,-194,5352,-661
pa5gbw40a0=-188,5836,-710,-187,5839,-708,-173,5956,-714,-159,6022,-712
pa5gbw80a0=-184,5789,-700,-185,5784,-700,-175,5797,-699,-172,5749,-692
pdoffset40ma0=0
pdoffset80ma0=0
pdoffsetcckma0=0
maxp2ga0=0x4A
maxp5ga0=0x4A,0x4A,0x4A,0x4A
cckbw202gpo=0x0000
cckbw20ul2gpo=0x0000
mcsbw202gpo=0x66666666
mcsbw402gpo=0x66666666
dot11agofdmhrbw202gpo=0x4444
ofdmlrbw202gpo=0x4444
tssifloor2g=500
mcsbw205glpo=0x22222222
mcsbw405glpo=0x55555555
mcsbw805glpo=0xaaaaaaaa
mcsbw1605glpo=0xffffffff
mcsbw205gmpo=0x22222222
mcsbw405gmpo=0x55555555
mcsbw805gmpo=0xaaaaaaaa
mcsbw1605gmpo=0xffffffff
mcsbw205ghpo=0x22222222
mcsbw405ghpo=0x55555555
mcsbw805ghpo=0xaaaaaaaa
mcsbw1605ghpo=0xffffffff
mcslr5glpo=0x0000
mcslr5gmpo=0x0000
mcslr5ghpo=0x0000
sb20in40hrpo=0x0
sb20in80and160hr5glpo=0x0
sb40and80hr5glpo=0x0
sb20in80and160hr5gmpo=0x0
sb40and80hr5gmpo=0x0
sb20in80and160hr5ghpo=0x0
sb40and80hr5ghpo=0x0
sb20in40lrpo=0x0
sb20in80and160lr5glpo=0x0
sb40and80lr5glpo=0x0
sb20in80and160lr5gmpo=0x0
sb40and80lr5gmpo=0x0
sb20in80and160lr5ghpo=0x0
sb40and80lr5ghpo=0x0
dot11agduphrpo=0x0
dot11agduplrpo=0x0
phycal_tempdelta=25
cckdigfilttype=2
swctrlmap_5g=0x00000008,0x00000010,0x00000008,0x000000,0x038
swctrlmap_2g=0x00000001,0x00000002,0x00000001,0x040002,0x0ff
swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000
swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000
muxenab=0x11
rssicorrnorm_c0=3,3
rssicorrnorm5g_c0=2,3,4,2,3,3,0,1,2,0,1,2
paparambwver=1
AvVmid_c0=2,155,2,146,2,150,2,154,2,152
ed_thresh2g=-70
ed_thresh5g=-73
txidxcap2g=0
txidxcap5g=0

 

The MAC address variable is set but is not doing anything. Is it possible I am missing some other parameter to enable the use of the custom MAC address?

Thank you and Best Regards

 

 

0 Likes
raks_99
Moderator
Moderator

Hi Fininho,

Yes, the NVRAM file is the .txt file. I don't think you are missing any parameters here. The file looks fine.

One more to do would be to write the required mac to the OTP(One time programmable) memory of the radio. Note that these 502 bytes of the radio is OTP and cannot be reprogrammed. 

In the OTP programming guide here https://www.cypress.com/file/298011/download

In table 7 of section 7 (page 15), the mac address programming is explained. 

I have attached a .bin file. You can edit the bin file using a hex file editor to input your custom mac and then use the wl commands provided in the guide to program the binary map. Let me know if it worked or you faced any issues.

BR,

Raks

 

0 Likes
raks_99
Moderator
Moderator

Added attachment

0 Likes