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.

BLE advertising to Android 4 vs Android 5

Other Parts Discussed in Thread: CC2541, CC2540, OS4

cc2541, BLE stack v1.4.0  Hello.  We have an application running on a custom PCB.  The hardware around the MCU is based on the TI Postage Stamp reference design schematic.  We have no trouble connecting to devices running Android 5, but cannot connect at all to Android 4 devices.  When our software is loaded into the TI KeyFob, it does connect to Android 4 devices.  The problem appears to occur during the advertising phase.


I am attaching two psd files showing the connection success w/ And5, and the failure w/ And4.  Any assistance would be greatly appreciated.

Howardadvertising_our_board_android_4.4.psdadvertising_our_board_android_5.1.psd

  • Hello Howard,

    There is no connect request in the 4.4 sniffer log, but there are scan request/responses. Are these coming from your phone/app? Did you try connecting with a generic app, such as BLE Scanner?

    Best wishes
  • Hello JXS,

    Thank You for the prompt response. We can not connect since the device is not visible on BLE scanner. I work with Howard on same problem and I will try to describe issue a bit more: current CC2541 firmware works fine on TI keyfob device and its detectable by Android 4.4 device (using BLE nRF master application, connection works as expected) or even on ebay like CC2541 modules (HM-10).  However, on our board the issue is that the board is not detectable by Android 4.4 but it is with Android 5.1.  Using the CC2540 USB dongle and sniffer application we have confirmed that "problematic" board and the Keyfob device, with same firmware, act the same. But Android 4.4 do not detect those advertising packets from problematic board. There is difference in signal level around 10 - 15 dBm when compared to Keyfob device.  Any help You be greatly appreciated.

    Best regards

  • Hi Asmir,

    I'm really at a loss to explain why this phone doesn't work with your device. Have you tried another 4.4 device or monitoring the output? Also, maybe try using the same BT Addr (BD_ADDR) as the KeyFob to see if the address is a factor. Some Android phones would cache details from previous connections, so doing a factory reset of your phone may be an option.

    Best wishes
  • Hello JXS,


    Thank You for suggestion but we did tried on different Andorid TV dongles which have 4.4.4 and 4.4.2 on three different devices. Advertising access address is fixed and we can not change that. Are You referring to change the MAC address of CC2541 SoC? Clear cache is by default enabled on scan application. Only difference in in Andorid 5.1 and Android 4.4 is that ADC_SCAN_REQ's PDU_HEADER has random Tx address. But this is not an issue since it works with another two boards from different manufacturers.

    Regards

  • If this works on the default CC2541 keyfob but not on your custom hardware, I would recommend posting your schematic for review.
  • Here's the schematic.  The balun is the Johanson Tech 2450BM15A0002.  The antenna is the 2.4 GHz Inverted F Antenna as described in SWRU120B.  R2, to the SMA connector, is not stuffed.  Thanks for looking.  Howard

    Proto_MCU.pdf

  • Hello Howard,

    In addition, can you post your layout files (gerbers) or PDF of layout?
    Have you done any of the RF-PHY testing?

    Lastly, do you have a sniffer trace of it working successfully with TI Keyfob HW running your SW on Android 4.4.x?

    Best wishes
  • advertising_ok_board_android_os4.4.psd

    Here's a sniffer trace of our firmware running on the KeyFob, and connecting to Android 4.4.  We have brought in an RF engineer who is getting ready to look at the actual signal.  I'll post gerbers shortly.

  • Here are some views of the PCB in the area around the MCU.  For reasons of confidentiality, I'm not comfortable uploading the entire Gerber package.

    Untitled.pdf

  • The "advertising_ok_board_android_os4.4.psd" does not show a connection being formed. Can you re-run until the sniffer captures the connection?

    Best wishes
  • Hello,

    That is the case, we can not initiate connection since we do "not see" the device in the BLE scanner such as nRF master or any other BLE scanner on Androids 4.x. While on Android 5.1 This works. We can see device and connect without the problem.

    Regards
  • Hi,
    I have looked at your schematics, and have some comments. The I2C pins should have external pull-ups like our ref designs. Decoupling for pin 10,21, 24 and 31 should be 100nF. Pin 27,28 and 29 shares a 220 pF (present) and a 100 nF (missing) decoupling capacitors. The ferrite to the CC2541 power should be moved to include all the CC2541 power pins. You should add place holders for antenna tuning.

    for the layout, it is hard to tell from the pictures when not seeing the grounding of your. If you like, send me a friend request so that you can send me the gerbers in stead. Some points though. The balun should have better grounding. All RF comp, crystals and decoupling caps should have separate GND vias. The decoupling caps must be close to the pin they are to decouple and on the same layer. The large 32 kHz crystal placement and SMA connector are not optimal with respect to the antenna performance. Is it a 2 layer design? There should be no components or traces underneath the RF part in that case.
  • Hi CHS.  Thank you for your feedback.  See my comments below.


    H

    The I2C pins should have external pull-ups like our ref designs.

    There are 2700 ohm pull-ups on another sheet of the schematic.

    Decoupling for pin 10,21, 24 and 31 should be 100nF.

    100 nF = .1 uF, which is what I have.

    Pin 27,28 and 29 shares a 220 pF (present) and a 100 nF (missing) decoupling capacitors.

    These pins do have a .1 uF capacitor (C6) on the other side of the ferrite.

    The ferrite to the CC2541 power should be moved to include all the CC2541 power pins. You should add place holders for antenna tuning.

    Ok.

    for the layout, it is hard to tell from the pictures when not seeing the grounding of your. If you like, send me a friend request so that you can send me the gerbers in stead. Some points though. The balun should have better grounding. All RF comp, crystals and decoupling caps should have separate GND vias. The decoupling caps must be close to the pin they are to decouple and on the same layer. The large 32 kHz crystal placement and SMA connector are not optimal with respect to the antenna performance. Is it a 2 layer design? There should be no components or traces underneath the RF part in that case.

    The board is a four layer board, with a ground plane under everything, except the antenna.  Although they are on the bottom of the board, most of the bypass caps connect to ground with the same vias as the ground pad under the IC.

    Howard

  • Hello,

    Please check this log file for ok board (which is HM-10 module) where the advertising, connecting, data sending is logged.

    Regardsok_board_android4.4.psd

  • Hello,

    Thank You for the info but we have found the issue. The problem was stability of the external 32MHz crystal which directly influenced the central frequency of the advertising channel. After changing the crystal board works fine. Once more thank You all for constructive suggestions.

  • Well thank you for letting us know!

    Best wishes