i.MX SL with WL1273 chip, bluetooth over UART

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX SL with WL1273 chip, bluetooth over UART

1,562 Views
sumitsharma
Contributor II

Hi, I have been working with i.MX SL and using WL1273 chip with it in linux. Wifi is working fine, but issues are coming with the bluetooth.

The node is created as /dev/ttymxc1, but even the echo command is not working, the custom board hangs up.

The behaviour is same with flow control and without flow control as well.

I'm using UART1 for console, that is working fine and UART2 for bluetooth.

The configs are as:

static const struct imxuart_platform_data mx6sl_uart2_data __initconst = {

        .flags      = IMXUART_HAVE_RTSCTS ,

        .dma_req_rx = MX6Q_DMA_REQ_UART2_RX,

        .dma_req_tx = MX6Q_DMA_REQ_UART2_TX,

};

static void __init uart2_init(void)

{

        mxc_iomux_v3_setup_multiple_pads(mx6sl_bluetooth_pads, ARRAY_SIZE(mx6sl_bluetooth_pads));

        imx6q_add_imx_uart(1, &mx6sl_uart2_data);

        mxc_iomux_set_specialbits_register(GPIO_1_13, PAD_CTL_LVE, PAD_CTL_LVE_MASK);     /* All pins at 1.8V required */

        mxc_iomux_set_specialbits_register(GPIO_1_14, PAD_CTL_LVE, PAD_CTL_LVE_MASK);

        mxc_iomux_set_specialbits_register(UART2_RXD, PAD_CTL_LVE, PAD_CTL_LVE_MASK);

        mxc_iomux_set_specialbits_register(UART2_TXD, PAD_CTL_LVE, PAD_CTL_LVE_MASK);

        mxc_iomux_set_specialbits_register(UART2_RTS, PAD_CTL_LVE, PAD_CTL_LVE_MASK);

        mxc_iomux_set_specialbits_register(UART2_CTS, PAD_CTL_LVE, PAD_CTL_LVE_MASK);

}

static iomux_v3_cfg_t mx6sl_bluetooth_pads[] = {

        MX6SL_PAD_EPDC_D12__UART2_RXD,

        MX6SL_PAD_EPDC_D13__UART2_TXD,

        MX6SL_PAD_EPDC_D14__UART2_RTS,

        MX6SL_PAD_EPDC_D15__UART2_CTS,

        MX6SL_PAD_EPDC_D6__GPIO_1_13,

        MX6SL_PAD_EPDC_D7__GPIO_1_14,

};

Please help for proceeding further.

Labels (2)
8 Replies

979 Views
jimmychan
NXP TechSupport
NXP TechSupport

Please check the UART setting (e.g. DMA enable, flow control setting) in the linux/arch/arm/mach-mx6/serial.h

0 Kudos

979 Views
sumitsharma
Contributor II

Hi Jimmy,

Now we are able to scan the devices over bluetooth, but pairing is still not working.

Now I'm trying to cross-compile the bluez-4.98 package, but facing the issues cross-compiling glib-2.24.1. Before than this I have successfully cross-compiled the following packages: expat, dbus, libiconv, zlib and gettext.

For cross-compiling the glib package,  I'm getting the following error while configure:

No iconv() implementation found in C library or libiconv

In the configure command I'm specifying --with-libiconv=gnu

I'm also specifying the CFLAGS and LDFLAGS as the path to the headers and libs required, but still its same.

If I don't specify this option then it configures fine but creates problem in 'make' with some undefined refrences.

Our toolchain is arm-fsl-linux-gnueabi-gcc with kernel 3.0.35

0 Kudos

979 Views
jimmychan
NXP TechSupport
NXP TechSupport

I found this one:

https://mail.gnome.org/archives/gtk-list/2005-April/msg00179.html

Please try this:

--with-libiconv=gnu CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"

0 Kudos

979 Views
sumitsharma
Contributor II

Hi Jimmy,

This problem is also solved now, but we haven't got the required utilities of bluez for full functionality including the pairing and BLE with the L3 source package.

Can you please point me to the required bluez version for functionality with BLE, that is also compatible with the L3 source with kernel version 3.0.35

Thanks

Sumit

0 Kudos

979 Views
sumitsharma
Contributor II

Hi Jimmy,

That also I have tried, it's still the same error.

In that mail it also specifies to use -lintl with the LDFLAGS but with that the error comes up as "C compiler cannot produce executables"

I have also cross-compiled the libiconv, and installed it to my rootfs. So is the path that I'm using in the CFLAGS and the LDFLAGS

Thanks

Sumit

0 Kudos

979 Views
sumitsharma
Contributor II

Hi Jimmy,

I have tried the various combinations with

UART2_UCR4_CTSTL   

UART2_DMA_ENABLE

But still there are the issues. I have also tried with the userspace code using the termios structure but still not able to get any data on the Tx.

It hangs when it tries to open the ttymxc1 node for the uart. This is the main issue for now.

Can you please help us out....

0 Kudos

979 Views
sumitsharma
Contributor II

Hi Jimmy,

That UART problem is solved now, but BT is still not responding. It's not able to communicate to the chip. I've the UIM running, still not able to detect the chip.

0 Kudos

979 Views
billchen
Contributor III

hi, summit,

     can you tell us how did you fix this UART problem, I meet the same problem recently in our imx6dl board and using bcm43241

0 Kudos