This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

for a combination of BeagleBone Black + WL1835 , is there a ready image file to let it work on wlan via SDIO ?

Other Parts Discussed in Thread: WL1835, WL18XXCOM82SDMMC, TPS65217

where can find an image file to let  BeagleBone Black + WL1835 work on wlan via SDIO ?

  • Hi Allen,
    If you are still seeing the eMMC in your boot logs

    [ 3.971511] mmc1: MAN_BKOPS_EN bit is not set
    [ 3.980165] mmc1: new high speed MMC card at address 0001
    [ 3.986544] mmcblk1: mmc1:0001 MMC04G 3.65 GiB
    [ 3.991366] mmcblk1boot0: mmc1:0001 MMC04G partition 1 1.00 MiB
    [ 3.998022] mmcblk1boot1: mmc1:0001 MMC04G partition 2 1.00 MiB
    [ 4.017545] mmcblk1: p1 p2

    then you are not at the stage to download firmware.

    The operation should be:
    - start mmc1 (in linux terms, ie mmc2 in dts file) which drives WL_EN high.
    - mmc1 will try and communicate with WL18xx. Here you should see SD bus activity on SDMMC2COM8 board on both sides of the level shifter. On the SDMMC2COM8 board you also need to ensure that the 32kHz clock goes to the COM8 connector. The 32kHz is required to clock in the WL_EN signal to wake up WL18xx. Make sure at the COM8 connector that you see all the signals in section 5.20.4 WLAN Power-Up Sequence in the correct order.
    - once the device is seen on mmc1 and the correct wilink8 id is read then it will try and download the firmware.

    Please check these signals on your hardware.

    Iain
  • Hi  Iain:

    I can see the the SD_CMD and SD_CLK toggle, I assume the error caused by the different module.

    I assumed if module ID is wrong, then stop initialization process.

    I want to inspect the program about the module initialization process. and please show me how to make it.

    Best Regards;

    Allen;

  • Hi Allen,

    Are you still reading the eMMC on the mmc1 port in the dmesg log? Before we go down any debug routes you need to understand what is the current situation. So, what is it dmesg tells you the kernel sees on mmc1?

    Iain

  • Hi Iain:

    (A) I inspect the MMC bus, it start at 400 KHz.  

    the first 8 bits of every command sequence, the format is start bit, direction bit, command index(6 bits)

    (1) 01  110100  

    (2) 01   00100

    (3) 01  001010

    (4) 01  000101

    (5) 01  000101

    (6) 01 000101

    (7) 01 110111

    (8) 01 110111

    (9) 01  110111

      host seems do retry at last.

    some command index , I  do not find out it's meaning.

    (B) I do not see the toggle of data bus, the data bus always keep high. But the OE pin of  level shift is high.

    (C) the status seems the beaglebone black issue command but the module has no response. But I test the module by USB port , it is all right.

    (D) it seems the host can not get the response from module, so can not load firmware.

     

    Best Regards;

    Allen;

  • Allen,

    A) Is this on the 1.8V side of the level shifter to say that the command has reached WL8? I am still not clear if you have managed to disable the eMMC.

    B) Is that at the 1.8V side of the level shifter?

    C and D) Correct. It sounds like your software (ie the device tree) does not match your hardware or your hardware is missing a connection. As it is your hardware all I can suggest is that you make sure that all signals are connected and active. If you have activity on 1.8V side of SDIO bus then you will have a problem with WL_EN, 32kHz clock or Vbat/Vio.

    Iain
  • Hi Iain:
    Could you analyse the below message ?
    (1)
    [ 9.872987] ------------[ cut here ]------------
    [ 9.878008] WARNING: CPU: 0 PID: 114 at net/wireless/reg.c:524 regulatory_init+0x60/0xbc [cfg80211]()
    [ 9.887340] db.txt is empty, you should update it...
    [ 9.892154] Modules linked in: cfg80211(+) omap_aes omap_sham wlcore_sdio omap_rng rng_core uio_pdrv_genirq uio st_drv leds_gpio
    [ 9.904090] CPU: 0 PID: 114 Comm: systemd-udevd Not tainted 4.1.2-bone12 #1
    [ 9.911092] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 9.917285] [<c0012e81>] (unwind_backtrace) from [<c0011061>] (show_stack+0x11/0x14)
    [ 9.925115] [<c0011061>] (show_stack) from [<c002e3a9>] (warn_slowpath_common+0x69/0x8c)
    [ 9.933283] [<c002e3a9>] (warn_slowpath_common) from [<c002e3ef>] (warn_slowpath_fmt+0x23/0x2c)
    [ 9.942159] [<c002e3ef>] (warn_slowpath_fmt) from [<bf8d2109>] (regulatory_init+0x60/0xbc [cfg80211])
    [ 9.951627] [<bf8d2109>] (regulatory_init [cfg80211]) from [<bf8d2049>] (cfg80211_init+0x48/0xa8 [cfg80211])
    [ 9.961617] [<bf8d2049>] (cfg80211_init [cfg80211]) from [<c00094bd>] (do_one_initcall+0xa5/0x194)
    [ 9.970663] [<c00094bd>] (do_one_initcall) from [<c05e04a1>] (do_init_module+0x49/0x13c)
    [ 9.978844] [<c05e04a1>] (do_init_module) from [<c0072963>] (load_module+0x1397/0x18a0)
    [ 9.986926] [<c0072963>] (load_module) from [<c0072fb1>] (SyS_finit_module+0x51/0x74)
    [ 9.994833] [<c0072fb1>] (SyS_finit_module) from [<c000e501>] (ret_fast_syscall+0x1/0x4c)
    [ 10.003070] ---[ end trace b2fc97cb4eaef975 ]---

    (2)
    [ 10.010528] cfg80211: Calling CRDA to update world regulatory domain
    [ 10.103717] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
    [ 10.128526] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
    [ 10.139421] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
    [ 10.148311] wlcore: WARNING falling back to default config

    thanks;
    Allen;
  • Hi Allen,

    You appear to have solved the initial detection problem. For the benefit of future readers of this post can you please explain what the problem was that you had and that you solved.

    Iain

  • Hi Iain:

    (1) the first problem: can not detect module SDIO interfer,

    log is at below:

    [ 0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 capemgrc
    [ 3.758160] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 3.840421] mmc0: host does not support reading read-only switch, assuming we
    [ 3.860652] mmc0: new high speed SDHC card at address 59b4
    [ 3.872369] mmcblk0: mmc0:59b4 USD 7.51 GiB
    [ 3.891237] mmcblk0: p1
    [ 3.971582] mmc1: MAN_BKOPS_EN bit is not set
    [ 3.980202] mmc1: new high speed MMC card at address 0001

    root cause is the SDIO bus clock fail at 1.8v of leve shift.

    (2) fix problem of SD_CLK and SD_CMD level shift, but the SD_DATA has no response

    log show SDIO active

    [    3.969575] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)                   
    [    3.975729] mmc1: new high speed SDIO card at address 0001

    [ 9.872987] ------------[ cut here ]------------
    [ 9.878008] WARNING: CPU: 0 PID: 114 at net/wireless/reg.c:524 regulatory_init+0x60/0xbc [cfg80211]()
    [ 9.887340] db.txt is empty, you should update it...
    [ 9.892154] Modules linked in: cfg80211(+) omap_aes omap_sham wlcore_sdio omap_rng rng_core uio_pdrv_genirq uio st_drv leds_gpio
    [ 9.904090] CPU: 0 PID: 114 Comm: systemd-udevd Not tainted 4.1.2-bone12 #1
    [ 9.911092] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 9.917285] [<c0012e81>] (unwind_backtrace) from [<c0011061>] (show_stack+0x11/0x14)
    [ 9.925115] [<c0011061>] (show_stack) from [<c002e3a9>] (warn_slowpath_common+0x69/0x8c)
    [ 9.933283] [<c002e3a9>] (warn_slowpath_common) from [<c002e3ef>] (warn_slowpath_fmt+0x23/0x2c)
    [ 9.942159] [<c002e3ef>] (warn_slowpath_fmt) from [<bf8d2109>] (regulatory_init+0x60/0xbc [cfg80211])
    [ 9.951627] [<bf8d2109>] (regulatory_init [cfg80211]) from [<bf8d2049>] (cfg80211_init+0x48/0xa8 [cfg80211])
    [ 9.961617] [<bf8d2049>] (cfg80211_init [cfg80211]) from [<c00094bd>] (do_one_initcall+0xa5/0x194)
    [ 9.970663] [<c00094bd>] (do_one_initcall) from [<c05e04a1>] (do_init_module+0x49/0x13c)
    [ 9.978844] [<c05e04a1>] (do_init_module) from [<c0072963>] (load_module+0x1397/0x18a0)
    [ 9.986926] [<c0072963>] (load_module) from [<c0072fb1>] (SyS_finit_module+0x51/0x74)
    [ 9.994833] [<c0072fb1>] (SyS_finit_module) from [<c000e501>] (ret_fast_syscall+0x1/0x4c)
    [ 10.003070] ---[ end trace b2fc97cb4eaef975 ]---

    and driver begin work

    (3) the below has error message about firm load


    [ 10.010528] cfg80211: Calling CRDA to update world regulatory domain
    [ 10.103717] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
    [ 10.128526] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
    [ 10.139421] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
    [ 10.148311] wlcore: WARNING falling back to default config

    my problem:

    (a) where should put firmware ?

    (b) what the the exact firmware ?

    Best Regards;

    Allen;


     

  • Hi Allen,
    Ok so you have fixed the SDIO problem on the level shifter from AM335x at 3.3V to the 1.8V for WL1835.

    1) that is ok

    2) I've not seen that kind on problem before. Have you installed the linux user space software as described at processors.wiki.ti.com/.../WL1835_Cape_on_BeagleBone_with_MainLine_Kernel_Debian_Filesystem ?

    3) These are not a problem. They are files that are not mandatory.

    Iain
  • HI Iain:
    (1)
    the wl8_build script is use wl18xx-fw-4.bin,
    but from the log

    [ 10.103717] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
    [ 10.128526] wl18xx_driver wl18xx.2.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2

    wl1271-nvs.bin , wl18xx-conf.bin --- it use these firmware.

    (2) for SDIO bus , the mod ID response only appear at SD_CMD , so the SD_DATA has no toggle ?

    Best Regards;
    Allen;
  • Hi Iain:
    the initial routine is

    ./bb-kernel/KERNEL/drivers/net/wireless/ti/wlcore/sdio.c or /bb-kernel/KERNEL/drivers/net/wireless/ti/wlcore/sdio.c ?


    Best
    Regards;
  • Have you installed crda in user space?
  • hi Iain;
    (1) how to do it ?

    (2)
    sorry, for the previous reply:
    I ask the
    ./bb-kernel/KERNEL/drivers/mmc/core/sdio.c or /bb-kernel/KERNEL/drivers/net/wireless/ti/wlcore/sdio.c
  • Hi Allen,

    1) By using the instructions on the wiki processors.wiki.ti.com/.../WL1835_Cape_on_BeagleBone_with_MainLine_Kernel_Debian_Filesystem

    2) Both are used. The wlcore/sdio.c will call functions in mmc/core/sdio.c. However, you should not have to look at these files to get it working.

    Try step 1 and hopefully you will get wlan0 created.
    Iain
  • HI Iain:
    (1) I can not find SD_DATA toggle, so the loading firmware should be fail. DO you know which SDIO command begin to toggle SD_DATA? I can not conclude this module has problem, because it can work via usb.

    (2) I do not see capeManager find device on its slot. What is the function of capeManager ?




    Best Regards;
    Allen;
  • Allen,
    Have you installed crda? Once you have, what does kernel boot log look like?
    Iain
  • Hi Iain:

    we want to build a testing system, let tester control BBB board via telnet.

    what command can download firmware to wl18xx module or the firmware download  while kernel booting ?

    Best Regards;

    Allen;

     

  • Allen,
    As you are now asking more questions does this mean you have the drivers loaded now?
    If it does can you please share what you fixed so that other users on the forum can learn from your experience.

    There are two stages to driver loading
    - "insmod wlcore_sdio" this should be done automatically on boot (assuming depmod was run during build). This identifies the device on mmc bus as wl18xx and calls crda.
    - "ifconfig wlan0 up" this actually downloads the firmware and sets up the wlan0 interface. To get this done automatically you can enable it in an init script (depending upon filesystem type)

    Iain
  • Hi Iain:
    1. Sorry, I am aksed to stop this project, so I can not share more experience. but I am interested in this testing system.
    2. as your writing "ifconfig wlan0 up" can download firmware, but how to assign the firmware file ?

    Best Regartds;
    Allen;
  • Hi Allen,

    1. I can't see how stopping work on this project prevents you from writing down what you have done to get to this point.
    2. The driver does it automatically.

    Iain
  • Hi Iain:
    1. sorry, in fact , my BBB board was out of order, so I can not do anything.
    But, I have seen the capemanager can emulate slot. I think it is an important stage. but it also fail at loading firmware, and when login in, it suddenly update CRDA and lock whole system.
    This is all I have seen finally.
    2. for my thinking of the loading firmware problem , it is based on the RTTT (TI program using com port) . it's flow is (a) connection , (b) loading firmware , (3) run API. The RTTT can directly testing WL18xx moldule via com port. It does not need BBB support.
    so I assume the SDIO flow should be like the flow. if loading firmware by driver while booting, it is a problem for testing system hosted by tester. RTTT flow can be easily integrate into tester flow. But the SDIO flow seems does not like com port (RTTT) flow.

    Best Regards;
    Allen;
  • Hi Allen,

    So you have RTTT working directly on the USB connector of  the MMCSD2COM8 board ok but you cannot talk to the WL1835 via your own cape adapter on BBB.

    For you this is fine as you can test.

    As the problem appears to stem from your adapter board I will close this thread as you are not spending any more time on it.

    Iain 

  • Hi Iain:

    Testing WL18xx via usb is not the answer of  SDIO interface .

    compared with RTTT flow, the SDIO interface has something to do.   The benefit of SDIO testing is combining wifi with SDIO testing in one step.

    however, I am asked to stop the project, so please close this thread.

    Best Regards;

    Allen;