This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Connection problem

Currently using nordic52832 to develop products that use batteries.

We found that the problem is that when the BLE module is connected successfully, it takes 200ms to send the message.

How can I improve this problem?

We need a very short grip time and turn off the power.

  • I have same question as endnode, what trigger the toggle on the 3 lines ?

    I suspect the first 272ms was the time it take to do service discovery. It would be clearer if you can provide a sniffer trace.

  • Hi endnode & Hung Bui, thanks for the reply

    1.The yellow line is the central UART receiving the TX signal from the external MCU. 2.The blue line is Central from the peripheral BLE radio to receive the UART TX signal. 3. Pink is the peripheral UART receives the TX signal from the external MCU.

    I would like to use the central and peripheral BLE modules as UART to BLE radio bridges, Yes, as described by endnode, I hope that GAP Central will connect and communicate with peripherals immediately after booting and starting scanning. My goal is to turn Central power on -> to exchange messages -> to turn off Central power.

    The current difficulty is that the central power supply can really send the message too long, resulting in power consumption too high, thanks to the flood reminders, I think 272ms should be found when the service, there is no way to shorten this time?

  • No no no, we don't understand each other;) These levels on oscilloscope are some wires so the question is how you generate that signal. Is it debug UART or just some GPIO high/low signalling? How you detect radio events and transfer it to these levels (interrupt, PPI, some mixed method e.g. with scheduler...)? That can make single digit up to several dozens of millisecond itself as systematic error. Yes, it doesn't explain full 200-300 delay but it's important to understand what are we looking at. Now if really GAP Central devices starts with Power On Reset event then obviously it needs to boot (so start-up itself and enabling of all modules including Soft Device costs you some time) and HF + LF clock start can take 200~300ms on nRF52 (read the spec!) but... (1/2)

  • ...(2/2) if your problem is really between BLE_GAP_EVT_CONNECTED event and some subsequent application data exchange over GATT then you probably have too long connection interval and/or do unnecessary long GATT Service Discovery from GATT Client side (I suppose that runs on GAP Central side). Doing simple BLE radio trace would tell you all the details and you would have clarity in few minutes. Just for your information you don't need to settle down with ~250ms for GATT Service discovery, if you use short interval (which is recommended if you want to save power and both sides support it!) and do it properly (= look only for service(es) you need instead of full enumeration) then you can easily discover your custom service + characteristic + enable notifications through CCCD in less then 70ms (with 7.5ms connection interval), maybe even less.

  • I'm also confused. You need to find a better way to describe what you are asking about. It's UART signal or it's BLE packet. Please don't mix them up.

Related