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.

wl1835mod bluetooth driver kernel 3.2

Other Parts Discussed in Thread: WL1271, DA8XX

Hello,

While in my last post I had problems with my wlan connection(what now great works), now my question about bluetooth driver.

I'm using a kernel version 3.2.21 with a custom made board, based on the AM335_evm board, but with his own board file.

After following the guide: WL18xx_Platform_Integration_guide(section Platform Data for Bluetooth) and compiling the kernel I get errors about the 'struct ti_st_plat_data wilink_pdata', the erros are that none of the members are avalaible. On searching I saw I did not include the: ti_wilink_st.h.

After this including the compiling works perfectly, but when I run hciattach /dev/ttyO1 texas 3000000 I get the error: Initialization timed out.

Also it looks like btwilink or kim is not available, what can be wrong?

Regards

Patrick

  • Hi Patrick,
    Have you included the appropriate CONFIGs?

    #enable bluetooth support
    CONFIG_BT=y
    CONFIG_TI_ST=y
    CONFIG_BT_HCIUART=y
    CONFIG_BT_HCIUART_LL=y
    CONFIG_BT_WILINK=y

    Iain
  • Hello Ian,

    There are off, that is what is in the guide: CONFIG_BT=N. I will change that.

    I have a look, but I cannot find the CONFIG_TI_ST or WILINK, how is that possible, also after I set the CONFIG_BT

    Patrick
  • I took that example from a 3.10 build I had handy, so they may not be in 3.2. I'd diff with a TI SDK6.0 which is 3.2 based and supports wl18xx.
    Iain
  • Hello Ian,

    I did have a look at the sdk6.0, but when I run menuconfig, I see:

    -Bluetooth subsystem support ---> Bluetooth device drivers ---> HCI Uart driver, but no wilink support, only:

    UART (h4) protocol support

    BCSP protocol support

    ATheros AR300x serial support

    HCILL protocol support.

    Regards

    Patrick

  • I'd compare your config to arch/arm/configs/tisdk_am335x-evm_defconfig in SDK6
    It ran bluetooth out of the box.
    Iain

  • Hello Iain,

    Thanks for the information, I did what you said and changes also my board file part like the one of am335x_evm:

    /* Module pinmux for bluetooth on uart1 */
    static struct pinmux_config uart1_wl18xx_pin_mux[] = {
    {"uart1_ctsn.uart1_ctsn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT},
    {"uart1_rtsn.uart1_rtsn", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},
    {"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
    {"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL},
    {NULL, 0},
    };

    static struct pinmux_config wl18xx_pin_mux[] = {
    {"mii1_rxd0.gpio2_21", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},
    {"mii1_txd0.gpio0_28", OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},
    {"spi0_sclk.gpio0_2", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT_PULLUP}, /*BT_EN */
    {NULL, 0},
    };

    static void wl18xx_bluetooth_enable(void)
    {
    int status = gpio_request(am335xevm_wlan_data.bt_enable_gpio,
    "bt_en\n");
    if (status < 0)
    pr_err("Failed to request gpio for bt_enable");

    pr_info("Configure Bluetooth Enable pin...\n");
    gpio_direction_output(am335xevm_wlan_data.bt_enable_gpio, 0);
    }

    /* wl18xx init */
    static void wl18xx_init(void)
    {
    struct device *dev;
    struct omap_mmc_platform_data *pdata;
    int ret;

    /* Register WLAN and BT enable pins based on the ispeak board(cip30x) */
    am335xevm_wlan_data.wlan_enable_gpio = GPIO_TO_PIN(2, 21);
    am335xevm_wlan_data.bt_enable_gpio = GPIO_TO_PIN(0, 2);

    wl18xx_bluetooth_enable();

    setup_pin_mux(wl18xx_pin_mux);

    if (wl12xx_set_platform_data(&am335xevm_wlan_data))
    pr_err("error setting wl12xx data\n");

    dev = am335x_mmc[1].dev;
    if (!dev) {
    pr_err("wl12xx mmc device initialization failed\n");
    goto out;
    }

    pdata = dev->platform_data;
    if (!pdata) {
    pr_err("Platfrom data of wl12xx device not set\n");
    goto out;
    }

    ret = gpio_request_one(am335xevm_wlan_data.wlan_enable_gpio,
    GPIOF_OUT_INIT_LOW, "wlan_en");
    if (ret) {
    pr_err("Error requesting wlan enable gpio: %d\n", ret);
    goto out;
    }

    pdata->slots[0].set_power = wl18xx_set_power;
    out:
    return;
    }

    I followed the guide Smart_Home_and_Energy_Gateway_Software_Manual where at the chapter: Bluetooth

    When I at Running Bluetooth section and follow these steps, I get the following:
    ./SS1BTPM &
    ./LinuxGATM_CLT
    GATM>Initialize 1
    BTPM_Initialize() Succes: 0
    DEVM_RegisterEventCallback() Succes: 5
    GATM>SetDevicePower 1
    DEVM_PowerOnDevice() Failure: -14, Unkown Error.
    Function Error.

    What does this mean?
  • Hi Patrick,

    DEVM_PowerOnDevice() Failure: -14, Unkown Error. basically means that the stack was unable to power on bluetooth device and download the firmware. It is the equivalent step to "hciattach ttyO4 texas 3000000" if you are familiar with Bluez.

    Possible failure mechanisms are:
    1. BT_EN is not being driven correctly. Check with a scope.
    2. There is no or an incorrect firmware file in /lib/firmware. Download the current one (v3.6.1) from git.ti.com/.../TIInit_11.8.32.bts . This is documented at processors.wiki.ti.com/.../WL18xx_Bluetopia_Platform_Manager_Demo_Guide
    3 there is no flow control on the UART. Should be able to identify if this is problem with a scope.

    Iain
  • Hello Iain,

    It was correctly that the BT_EN not was driven corretly, this comes because the module gpio_en.ko was not loaded correctly. I used the module from the SDK 6.0, but this has a kernel 3.2, while I have a kernel 3.2.21, so after recompiling with the correct link to my kernel, the module loads okay.

    I did used the script what is avaliable in rootfs: BT_Init.sh, now I see a correct BT_EN response. The firmware I all ready have placed at /lib/firmware. How ever I get know the following error:

    # BT_Init.sh
    GPio valie is :2
    WL1271: BT Enable
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Can't set line discipline: Invalid argument
    Can't initialize device: Invalid argumnt
    #

    What does this means? All look okay, but I get this errors.

    Thanks for the help so far.

    Regards
    Patrick
  • Patrick,
    I don't have a 6.0 build around to test with. I googled and found this www.linuxforums.org/.../183146-bluez-rn42-bluetooth-module-hciattach-fails.html.
    It suggests a missing driver. Can you check your dmesg to see which drivers are getting loaded?
    Iain
  • Hello,

    I made some changes to the kernel and now I get new errors:
    # BT_Init.sh
    GPio valie is :2
    WL1271: BT Enable
    Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Can't set device: Protocol not supported
    Can't initialize device: Protocol not supported
    #

    What protocol is meant here?

    Regards
    Patrick
  • Here is my startup:
    Starting kernel ...

    [ 0.000000] Linux version 3.2.21 (patrick@patrick-VirtualBox) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #53 Thu Mar 12 16:53:47 CET 2015
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine: cip30x
    [ 0.000000] Memory policy: ECC disabled, Data cache writeback
    [ 0.000000] AM335X ES1.0 (sgx neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 ethaddr=78:a5:04:fc:04:0a root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait ip=none
    [ 0.000000] Exporting MAC from environment: 78:a5:04:fc:04:0a
    [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Memory: 512MB = 512MB total
    [ 0.000000] Memory: 512028k/512028k available, 12260k reserved, 0K highmem
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
    [ 0.000000] vmalloc : 0xe0800000 - 0xff000000 ( 488 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
    [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc067c000 (6608 kB)
    [ 0.000000] .init : 0xc067c000 - 0xc06c5000 ( 292 kB)
    [ 0.000000] .data : 0xc06c6000 - 0xc072c8f8 ( 411 kB)
    [ 0.000000] .bss : 0xc072c91c - 0xc078a25c ( 375 kB)
    [ 0.000000] NR_IRQS:396
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] Total of 128 interrupts on 1 active controller
    [ 0.000000] OMAP clockevent source: GPTIMER2 at 24000000 Hz
    [ 0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz
    [ 0.000000] I-pipe, 24.000 MHz clocksource
    [ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
    [ 0.000000] Interrupt pipeline (release #4)
    [ 0.000000] Console: colour dummy device 80x30
    [ 0.000500] Calibrating delay loop... 718.02 BogoMIPS (lpj=3590144)
    [ 0.119051] pid_max: default: 32768 minimum: 301
    [ 0.119183] Security Framework initialized
    [ 0.119280] Mount-cache hash table entries: 512
    [ 0.119681] CPU: Testing write buffer coherency: ok
    [ 0.120507] devtmpfs: initialized
    [ 0.140126] omap_hwmod: gfx: failed to hardreset
    [ 0.156421] omap_hwmod: pruss: failed to hardreset
    [ 0.157622] print_constraints: dummy:
    [ 0.158005] NET: Registered protocol family 16
    [ 0.160398] OMAP GPIO hardware version 0.1
    [ 0.163315] omap_mux_init: Add partition: #1: core, flags: 0
    [ 0.165654] omap_i2c.1: alias fck already exists
    [ 0.166023] da8xx_lcdc.0: alias fck already exists
    [ 0.166418] omap_hsmmc.0: alias fck already exists
    [ 0.166685] omap_hsmmc.1: alias fck already exists
    [ 0.168109] davinci-mcasp.1: alias fck already exists
    [ 0.269715] Configure Bluetooth Enable pin...
    [ 0.270080] omap2_mcspi.1: alias fck already exists
    [ 0.270339] omap2_mcspi.2: alias fck already exists
    [ 0.270623] edma.0: alias fck already exists
    [ 0.270644] edma.0: alias fck already exists
    [ 0.270662] edma.0: alias fck already exists
    [ 0.270875] cape: pcm register
    [ 0.308328] bio: create slab <bio-0> at 0
    [ 0.310886] SCSI subsystem initialized
    [ 0.312716] usbcore: registered new interface driver usbfs
    [ 0.313074] usbcore: registered new interface driver hub
    [ 0.313299] usbcore: registered new device driver usb
    [ 0.313611] registerd cppi-dma Intr @ IRQ 17
    [ 0.313626] Cppi41 Init Done Qmgr-base(e083a000) dma-base(e0838000)
    [ 0.313636] Cppi41 Init Done
    [ 0.313664] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
    [ 0.313971] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
    [ 0.315243] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
    [ 0.316688] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [ 0.317463] Bluetooth: Core ver 2.16
    [ 0.317658] NET: Registered protocol family 31
    [ 0.317670] Bluetooth: HCI device and connection manager initialized
    [ 0.317686] Bluetooth: HCI socket layer initialized
    [ 0.317697] Bluetooth: L2CAP socket layer initialized
    [ 0.317726] Bluetooth: SCO socket layer initialized
    [ 0.318232] Switching to clocksource ipipe_tsc
    [ 0.337912] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
    [ 0.338108] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    [ 0.338556] MUSB0 controller's USBSS revision = 4ea20800
    [ 0.339494] musb-hdrc musb-hdrc.0: USB OTG mode controller at e081c000 using DMA, IRQ 18
    [ 0.339670] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
    [ 0.340009] MUSB1 controller's USBSS revision = 4ea20800
    [ 0.340400] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [ 0.340495] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
    [ 0.340632] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 0.340648] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 0.340662] usb usb1: Product: MUSB HDRC host driver
    [ 0.340673] usb usb1: Manufacturer: Linux 3.2.21 musb-hcd
    [ 0.340684] usb usb1: SerialNumber: musb-hdrc.1
    [ 0.341693] hub 1-0:1.0: USB hub found
    [ 0.341727] hub 1-0:1.0: 1 port detected
    [ 0.342341] musb-hdrc musb-hdrc.1: USB Host mode controller at e081e800 using DMA, IRQ 19
    [ 0.342833] NET: Registered protocol family 2
    [ 0.343029] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.343346] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
    [ 0.343642] TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
    [ 0.343819] TCP: Hash tables configured (established 16384 bind 16384)
    [ 0.343831] TCP reno registered
    [ 0.343844] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.343867] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.344070] NET: Registered protocol family 1
    [ 0.344352] RPC: Registered named UNIX socket transport module.
    [ 0.344365] RPC: Registered udp transport module.
    [ 0.344375] RPC: Registered tcp transport module.
    [ 0.344384] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.344621] NetWinder Floating Point Emulator V0.97 (double precision)
    [ 0.344837] omap-gpmc omap-gpmc: GPMC revision 6.0
    [ 0.344856] Registering NAND on CS0
    [ 0.348038] I-pipe: head domain Xenomai registered.
    [ 0.348070] Xenomai: hal/arm started.
    [ 0.349524] Xenomai: scheduling class idle registered.
    [ 0.349548] Xenomai: scheduling class rt registered.
    [ 0.358054] Xenomai: real-time nucleus v2.6.2.1 (Day At The Beach) loaded.
    [ 0.358067] Xenomai: debug mode enabled.
    [ 0.358595] Xenomai: starting native API services.
    [ 0.358609] Xenomai: starting POSIX services.
    [ 0.358762] Xenomai: starting RTDM services.
    [ 0.375955] VFS: Disk quotas dquot_6.5.2
    [ 0.376021] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 0.376636] msgmni has been set to 1000
    [ 0.377493] io scheduler noop registered
    [ 0.377506] io scheduler deadline registered
    [ 0.377564] io scheduler cfq registered (default)
    [ 0.379310] da8xx_lcdc da8xx_lcdc.0: GLCD: Found LW500AC9001 panel
    [ 0.394964] Console: switching to colour frame buffer device 100x30
    [ 0.405693] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
    [ 1.113592] console [ttyO0] enabled
    [ 1.118060] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [ 1.126038] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [ 1.133951] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [ 1.141847] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [ 1.149744] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [ 1.168360] brd: module loaded
    [ 1.177148] loop: module loaded
    [ 1.180713] i2c-core: driver [tsl2550] using legacy suspend method
    [ 1.187172] i2c-core: driver [tsl2550] using legacy resume method
    [ 1.195717] mtdoops: mtd device (mtddev=name/number) must be supplied
    [ 1.203107] omap2-nand driver initializing
    [ 1.207709] ONFI flash detected
    [ 1.211151] ONFI param page 0 valid
    [ 1.214799] NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix H27U4G8F2DTR-BC)
    [ 1.223243] Creating 8 MTD partitions on "omap2-nand.0":
    [ 1.228823] 0x000000000000-0x000000020000 : "SPL"
    [ 1.235515] 0x000000020000-0x000000040000 : "SPL.backup1"
    [ 1.242776] 0x000000040000-0x000000060000 : "SPL.backup2"
    [ 1.249886] 0x000000060000-0x000000080000 : "SPL.backup3"
    [ 1.256952] 0x000000080000-0x000000260000 : "U-Boot"
    [ 1.264433] 0x000000260000-0x000000280000 : "U-Boot Env"
    [ 1.271529] 0x000000280000-0x000000780000 : "Kernel"
    [ 1.280312] 0x000000780000-0x000020000000 : "File System"
    [ 1.498846] smsc911x: Driver version 2008-10-21
    [ 1.505372] smsc911x-mdio: probed
    [ 1.509063] smsc911x smsc911x.0: eth0: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=0:01, irq=-1)
    [ 1.519300] smsc911x smsc911x.0: eth0: MAC Address: 78:a5:04:fc:04:0a
    [ 1.526468] PPP generic driver version 2.4.2
    [ 1.531506] NET: Registered protocol family 24
    [ 1.536430] usbcore: registered new interface driver zd1201
    [ 1.542503] usbcore: registered new interface driver rtl8188eu
    [ 1.548835] usbcore: registered new interface driver cdc_ether
    [ 1.555099] usbcore: registered new interface driver cdc_eem
    [ 1.561223] usbcore: registered new interface driver dm9601
    [ 1.567081] cdc_ncm: 04-Aug-2011
    [ 1.570664] usbcore: registered new interface driver cdc_ncm
    [ 1.576592] Initializing USB Mass Storage driver...
    [ 1.581956] usbcore: registered new interface driver usb-storage
    [ 1.588225] USB Mass Storage support registered.
    [ 1.593502] usbcore: registered new interface driver usbserial
    [ 1.599774] USB Serial support registered for generic
    [ 1.605234] usbcore: registered new interface driver usbserial_generic
    [ 1.612072] usbserial: USB Serial Driver core
    [ 1.616778] USB Serial support registered for GSM modem (1-port)
    [ 1.623352] usbcore: registered new interface driver option
    [ 1.629193] option: v0.7.2:USB Driver for GSM modems
    [ 1.635055] mousedev: PS/2 mouse device common for all mice
    [ 1.641634] input: matrix-keypad as /devices/platform/matrix-keypad/input/input0
    [ 1.650134] dev addr = df874c08
    [ 1.653415] pdev addr = df874c00
    [ 1.657370] input: ti-tsc-adcc as /devices/platform/omap/tsc/input/input1
    [ 1.665813] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
    [ 1.672517] omap_rtc: already running
    [ 1.676535] i2c /dev entries driver
    [ 1.680689] Linux video capture interface: v2.00
    [ 1.685876] usbcore: registered new interface driver uvcvideo
    [ 1.691911] USB Video Class driver (1.1.1)
    [ 1.698456] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 1.704927] Bluetooth: HCI UART driver ver 2.2
    [ 1.709603] Bluetooth: HCI H4 protocol initialized
    [ 1.714602] Bluetooth: HCI BCSP protocol initialized
    [ 1.719798] Bluetooth: Bluetooth Driver for TI WiLink - Version 1.0
    [ 1.726664] _regulator_get: deviceless supply vdd_mpu not found, using dummy regulator
    [ 1.735440] cpuidle: using governor ladder
    [ 1.740318] cpuidle: using governor menu
    [ 1.747138] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [ 1.758137] usbcore: registered new interface driver usbhid
    [ 1.764015] usbhid: USB HID core driver
    [ 1.769176] usbcore: registered new interface driver snd-usb-audio
    [ 1.872419] mmc0: host does not support reading read-only switch. assuming write-enable.
    [ 1.884758] mmc0: new high speed SDHC card at address e624
    [ 1.891157] mmcblk0: mmc0:e624 SS08G 7.40 GiB
    [ 1.897854] mmcblk0: p1 p2
    [ 1.902177] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
    [ 2.023210] mmc1: card claims to support voltages below the defined range. These will be ignored.
    [ 2.047864] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
    [ 2.057078] mmc1: new high speed SDIO card at address 0001
    [ 2.063319] mmc1: mmc_power_save_host: powering down
    [ 2.793394] asoc: wm8750-hifi <-> davinci-mcasp.1 mapping ok
    [ 2.801053] ALSA device list:
    [ 2.804156] #0: CIP30x
    [ 2.806797] oprofile: hardware counters not available
    [ 2.812110] oprofile: using timer interrupt.
    [ 2.816683] NET: Registered protocol family 26
    [ 2.821362] nf_conntrack version 0.5.0 (8000 buckets, 32000 max)
    [ 2.828186] ip_tables: (C) 2000-2006 Netfilter Core Team
    [ 2.833897] TCP cubic registered
    [ 2.837268] NET: Registered protocol family 17
    [ 2.842061] Bridge firewalling registered
    [ 2.846296] Registering the dns_resolver key type
    [ 2.851286] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 2.859313] ThumbEE CPU extension supported.
    [ 2.863831] mux: Failed to setup hwmod io irq -2
    [ 2.869338] Power Management for AM33XX family
    [ 2.874195] Trying to load am335x-pm-firmware.bin (60 secs timeout)
    [ 2.880898] Copied the M3 firmware to UMEM
    [ 2.890680] clock: disabling unused clocks to save power
    [ 2.899102] omap_rtc omap_rtc: setting system clock to 2013-06-26 08:48:05 UTC (1372236485)
    [ 4.071921] kjournald starting. Commit interval 5 seconds
    [ 4.079989] EXT3-fs (mmcblk0p2): using internal journal
    [ 4.085443] EXT3-fs (mmcblk0p2): recovery complete
    [ 4.092725] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
    [ 4.099993] VFS: Mounted root (ext3 filesystem) on device 179:2.
    [ 4.109275] devtmpfs: mounted
    [ 4.112895] Freeing init memory: 292K
    INIT: version 2.88 booting
    Starting udev
    [ 4.673127] udev[761]: starting version 164
    <7>[ 4.930033] omap_hsmmc omap_hsmmc.0: IRQ Status is 1
    [ 5.492979] compat-drivers backport release: ol_r8.a8.04_32
    [ 5.498910] Backport based on wl18xx.git ol_r8.a8.10_32
    [ 5.504369] compat.git: wl18xx.git
    [ 5.530973] mmc1: mmc_power_restore_host: powering up
    [ 7.482925] mmc1: mmc_power_save_host: powering down
    [ 7.750536] cfg80211: Calling CRDA to update world regulatory domain
    [ 8.128162] wlcore: wl18xx driver version: ol_r8.a8.04_32
    [ 8.168455] mmc1: mmc_power_restore_host: powering up
    Starting Bootlog daemon: bootlogd: cannot allocate pseudo tty: No such file or directory
    bootlogd.
    [ 8.570767] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    [ 8.579881] mmc1: mmc_power_save_host: powering down
    [ 8.586126] mmc1: mmc_power_save_host: powering down
    [ 8.599187] wlcore: loaded
    [ 8.602064] wlcore: driver version: ol_r8.a8.04_32
    [ 8.607073] wlcore: compilation time: Mon Mar 9 17:19:45 2015
    ALSA: Restoring mixer settings...
    No state is present for card CIP30x
    Found hardware: "CIP30x" "" "" "" ""
    Hardware is initialized using a generic method
    No state is present for card CIP30x
    Configuring network interfaces... [ 10.178300] smsc911x smsc911x.0: eth0: SMSC911x/921x identified at 0xe085a000, IRQ: 269
    udhcpc (v1.20.2) started
    Sending discover...
  • Hi Patrick,
    Looks like all the key drivers are there. This is now outside my expertise so I'll ask someone else to comment.
    Iain
  • Hi,

    From the logs it looks like you are missing something in the config file, see the E2E post (both the pages) e2e.ti.com/.../1146768 where the customer was facing similar issue.

    also make sure that you are having the below in you code
    struct ti_st_plat_data wilink_pdata = {
    .nshutdown_gpio = GPIO_TO_PIN(3, 21),
    .dev_name = "/dev/ttyO1",
    .flow_cntrl = 1,
    .baud_rate = 3000000,
    .suspend = plat_kim_suspend,
    .resume = plat_kim_resume,
    .chip_enable = plat_kim_chip_enable,
    .chip_disable = plat_kim_chip_disable,
    };

    static struct platform_device wl12xx_device = {
    .name = "kim",
    .id = -1,
    .dev.platform_data = &wilink_pdata,
    };

    static struct platform_device btwilink_device = {
    .name = "btwilink",
    .id = -1,
    };
  • Hello,

    Thanks for all the and information, it now works.
    Also it did look like I missed some protocols. I rebuild the kernel again with:
    L2CAP, SCO, RFCOMM, RFCOMM TTY, BNEP, HIDP protocols support.

    Then I ran the BT_Init.sh script and the device setup is complete. I did a scan and did found some bluetooth devices.

    Thanks & regards
    Patrick
  • Hello,

    After trying with some software like bt-device, I can pair with my phone. But looking at the Bluetopia stack, I thought I would that give a try, because this look at my a nicer stack.

    But there is a problem, after a reboot of my device and I start :
    ./SS1BTPM &
    ./LinuxDEVM
    DEVM>Initialize 1
    BTPM_Initialize() Succes:0
    DEVM_RegisterEventCallBack() Succes: 5
    DEVM>SetDevicePower 1

    DEVM_PowerOnDevice() Failure: -14, Unknow Error.
    Function Error.
    DEVM>

    I followed the guide for the libBTPSVEND and rebuild SS1BTPM. In BTPSVEND.c I have the following(I leaved the comment):
    static Boolean_t VendorCommandsIssued;

    Boolean_t BTPSAPI HCI_VS_InitializeBeforeHCIOpen(HCI_DriverInformation_t *HCI_DriverInformation)
    {
    VendorCommandsIssued = FALSE;

    HCI_DRIVER_SET_COMM_INFORMATION(HCI_DriverInformation, 0, 0, cpHCILL_RTS_CTS);

    HCI_DriverInformation->DriverInformation.COMMDriverInformation.COMDeviceName = "/dev/ttyO1";

    HCI_DriverInformation->DriverInformation.COMMDriverInformation.COMPortNumber = 1;

    return(TRUE);
    }

    Boolean_t BTPSAPI HCI_VS_InitializeAfterHCIOpen(unsigned int HCIDriverID)
    {
    return(TRUE);
    }

    Boolean_t BTPSAPI HCI_VS_InitializeBeforeHCIReset(unsigned int HCIDriverID, unsigned int BluetoothStackID)
    {
    if(!VendorCommandsIssued)
    {
    VendorCommandsIssued = TRUE;
    }

    return(TRUE);
    }

    Boolean_t BTPSAPI HCI_VS_InitializeAfterHCIReset(unsigned int HCIDriverID, unsigned int BluetoothStackID)
    {
    return(TRUE);
    }

    Boolean_t BTPSAPI HCI_VS_InitializeBeforeHCIClose(unsigned int HCIDriverID, unsigned int BluetoothStackID)
    {
    return(TRUE);
    }

    Boolean_t BTPSAPI HCI_VS_InitializeAfterHCIClose(void)
    {
    return(TRUE);
    }

    Boolean_t BTPSAPI HCI_VS_EnableFeature(unsigned int BluetoothStackID, unsigned long Feature)
    {
    return(FALSE);
    }

    Boolean_t BTPSAPI HCI_VS_DisableFeature(unsigned int BluetoothStackID, unsigned long Feature)
    {
    return(FALSE);
    }


    What is wrong, because the bluez tools looks to work, but the bluetopia tools not

    Thanks in advanced
  • Hi,

    Is the gpio_en.ko module running, you should find at location /lib/modules/3.2.0/kernel/drivers/bt_enable/gpio_en.ko.

    Make sure that "bt_enable_gpio" is configured correctly and build it under board-support/extra-drivers/bt-enable-1.0/ (in am335x case it is gpio_en_am335x.c) and place it at the above mentioned location and try.
  • Hello,

    If it is correct the module is working, here is example when I use hcitools etc.

    root@ispeak:~# insmod /lib/modules/3.2.21/kernel/drivers/bt_enable/gpio_en.ko

    [ 48.374812] Gpio value is :2
    [ 48.389835] WL1271: BT Enable

    root@ispeak:~# hciattach /dev/ttyO1 texas 3000000 &
    [1] 1351

    root@ispeak:~# Found a Texas Instruments' chip!
    Firmware file : /lib/firmware/TIInit_11.8.32.bts
    Loaded BTS script version 1
    texas: changing baud rate to 3000000, flow control to 1
    Device setup complete
    Settings scripts ss1
    [1]+ Done hciattach /dev/ttyO1 texas 3000000

    root@ispeak:~# hciconfig hci0 up
    root@ispeak:~# hcitool -i hci0 scan
    Scanning ...
    D0:51:62:98:33:34 XPERIA T

    root@ispeak:~# hciconfig hci0
    hci0: Type: BR/EDR Bus: UART
    BD Address: 84:DD:20:92:A1:3C ACL MTU: 1021:6 SCO MTU: 180:4
    UP RUNNING
    RX bytes:1298 acl:0 sco:0 events:43 errors:0
    TX bytes:241 acl:0 sco:0 commands:41 errors:0

    So I know the module is function, but when I know run the Bluetopia stack 

    root@ispeak:~/ss1# ./SS1BTPM &
    [1] 1346
    root@ispeak:~/ss1# ./LinuxSPPM

    .......

    SPPM>Initialize 1

    BTPM_Initialize() Success: 0.
    DEVM_RegisterEventCallback() Success: 5.
    SPPM>SetDevicePower 1

    DEVM_PowerOnDevice() Failure: -14, Unknown Error.
    Function Error.

    Kind regards

    Patrick

  • Hi,

    What is the Bluetopia SDK version you are using? where did you get the Bluetopia SDK for SDK 6?
  • Hello,

    The version number is 4.0.1.4.2, I did downloaded the AM335xBluetopiaLinuxProduction-4.0.1.4.2U-Linux-installer.tar.gz from the website.

    Is this not compatible with SDK 6.0? Or is het better to use the bluez stack?

    Regards,
    Patrick
  • Hi,

    No, this version is not compatible with SDK 6.0. It works with SDK 7.0 (Shared transport (ST), No more GPIO)
  • Hello,

    Okay thanks for you help.

    Then I will goto the Bluez tools and look if I can setup and audio connection to my phone.

    Kind regards

    Patrick