After cywdhd & firmware loaded, Bluetooth mac address resets to default value

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

cross mob
ChLo_2214516
Level 1
Level 1
10 sign-ins 5 sign-ins First solution authored

Bluetooth MAC address read from OTP has a programmed address. (This is expected, for each device to be identified by different mac address)

But after insmod cywdhd.so with cyfmac-sdio and clm_blob... xx.txt

Bluetooth MAC address reset to another value with is chip product id.

Any suggested method or direction to debug this issue?

0 Likes
1 Solution

There is new firmware release received that can resolve this issue.

Will cypress provide issue analysis report?

View solution in original post

0 Likes
9 Replies
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Which WLAN chip is being used here? What is the full insmod command used for loading the driver? Is this Linux or Android OS? Is the file name cywdhd.ko or cywdhd.so? What is the DHD driver version? What is the WLAN firmware version?

It's Android OS, the module is cywdhd.ko for CYW4354, command:

insmod /vendor/lib/modules/cywdhd.ko \
firmware_path=/system/vendor/firmware/cyw/cyfmac4354-sdio.bin \
nvram_path=/system/vendor/firmware/cyw/bcmdhd.cal \
clm_path=/system/etc/wifi/cyfmac4354-sdio.clm_blob

Before this command, BT can get correct OTP MAC address.

After this command, BT get OTP MAC address but the result is "43:50:c0:00:1f:ac"

 

DHD version 1.363.125.19

FW version 7.36.205.3

0 Likes
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

Thank you for the details. I'm checking the driver implementation of dhdsdio_probe() which is invoked after the insmod command. I do see random MAC address assignment in this code as shown below:

#ifdef CUSTOMER_HW4
else {
/* Set ramdom MAC address during boot time */
get_random_bytes(&bus->dhd->mac.octet[3], 3);
/* Adding BRCM OUI */
bus->dhd->mac.octet[0] = 0;
bus->dhd->mac.octet[1] = 0x90;
bus->dhd->mac.octet[2] = 0x4C;
}
#endif /* CUSTOMER_HW4 */

But it does not match the BT MAC address shared by you. Do you always see the same BT MAC address "43:50:c0:00:1f:ac" after insmod? Which command did you use to read the BT OTP MAC address? Can you please share the dmesg logs after the insmod command?

0 Likes

WIFI MAC address is not random,  no problem.

Log :

[ 5.180170] dhd_module_init in
[ 5.195984] no wifi platform data, skipz
[ 5.199860] DHD wifi platform data is required for Android build
[ 5.205886] DHD registeing bus directly
[ 5.213100] F1 signature read @0x18000000=0x17214354
[ 5.221214] F1 signature OK, socitype:0x1 chip:0x4354 rev:0x1 pkg:0x2
[ 5.228391] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[ 5.235544] CFG80211-ERROR) wl_setup_wiphy :
[ 5.235549] Registering Vendor80211
[ 5.245744] wl_create_event_handler(): thread:wl_event_handler:bb8 started
[ 5.245747] CFG80211-ERROR) wl_event_handler :
[ 5.245755] tsk Enter, tsk = 0xffff800042741bb8
[ 5.253640] dhd_attach(): thread:dhd_watchdog_thread:bba started
[ 5.267903] dhd_attach(): thread:dhd_dpc:bbb started
[ 5.273205] dhd_attach(): thread:dhd_rxf:bbc started
[ 5.278224] dhd_deferred_work_init: work queue initialized
[ 5.359928] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 5.430110] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 5.437819] Disable tdls_auto_op failed. -1
[ 5.443414] Firmware up: op_mode=0x0005, MAC=d8:c0:a6:68:76:c9
[ 5.452801] clm path from module param:/system/etc/wifi/bcmdhd.clm_blob
[ 5.460777] clm file download from /system/etc/wifi/bcmdhd.clm_blob
[ 5.471644] dhd_preinit_ioctls pspretend_threshold for HostAPD failed -23
[ 5.482340] Firmware version = wl0: Jun 11 2020 10:07:38 version 7.35.349.92 (r726098 CY) FWID 01-41dfccda
[ 5.492772] dhd_wlfc_hostreorder_init(): successful bdcv2 tlv signaling, 64
[ 5.501608] dhd_pno_init: Support Android Location Service
[ 5.520061] MACEVENT: WLC_E_IF 54, MAC d8:c0:a6:68:76:c9, status 0, reason 0, auth 0
[ 5.528023] rtt_do_get_ioctl: failed to send getbuf proxd iovar (CMD ID : 1), status=-23
[ 5.536733] dhd_rtt_init : FTM is not supported
[ 5.542049] dhd_interworking_enable: failed to set WNM info, ret=-23
[ 5.548466] Dongle Host Driver, version 1.363.125.19 (r)
[ 5.548466] Compiled in drivers/net/wireless/broadcom/dhd-android-1.363.125.19 on Mar 31 2021 at 17:17:53
[ 5.565704] Register interface [wlan0] MAC: d8:c0:a6:68:76:c9
[ 5.565704]
[ 5.573804] dhd_module_init out

Get BT MAC address command:

bt_tool_arm64 /dev/ttyUSB0 115200 hcicmd 03 03

 

* If we rollback wifi firmware to original version (FW ver : 7.36.205.3), this issue never occur.

Is the brcmfmac wifi firmware compatible with cywdhd wifi driver firmware?

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

Hi Chlo,


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-1619139091698.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-1619139091728.png

 

0 Likes

There is new firmware release received that can resolve this issue.

Will cypress provide issue analysis report?

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

Hi Chlo,


Please contact your infineon Sales/Field representative if you have any questions or if there is anything else we can help you with. TKS!

Br,
DS

0 Likes

Hi DS_Lin, 

Please help to check it internally.

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

Hi Chlo,

Sorry...please contact your infineon Sales/Field representative if you have any questions or if there is anything else we can help you with,TKS!

Br,
DS

0 Likes