MPSL timslot sample: sender and receiver

Can some one describe how this is supposed to work:

https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/mpsl/timeslot/README.html

I would have expected to see some sender and receiver code.

Can I run this on 2 different boards? and exchange data?

  • Hello,

    The sample you're referring to is the MPSL (Multiprotocol Service Layer) Timeslot sample, which demonstrates how to use basic MPSL Timeslot functionality. This sample is not designed for sending and receiving data between two boards. Instead, it focuses on illustrating how to request and use timeslots within a single device.

    It demonstrates how to open a timeslot session and request timeslots using the MPSL Timeslot API [MPSL timeslot](docs.nordicsemi.com/.../README.html).

    As explained in the documentation overview, the application does the following:
    - It opens a timeslot session when a key is pressed in the terminal.
    - Pressing 'a' requests a new timeslot.
    - Pressing 'b' ends the current timeslot.
    - Upon receiving timeslot start signal, the sample configures a timer to trigger before the timeslot ends.
    - prints the timeslot signal type.

    To exchange data between two boards, you would need to use different samples that implements a communication protocol. You can read more about MPSL here: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/mpsl/README.html#mpsl 

    Regards,

    Swathy


  • Two further questions:

    1: on the receiver side, how do I get the received bytes in the time slot?

    static struct bt_data_cb eeg_cb = {
    .received = bt_receive_cb,
    .send_enabled = bt_send_enabled_cb,
    };
    in .received call back?
    2. in case I have a BLE connection and I reserve the earliest timeslot(MPSL),
    will this be at the begining of the next connection interval?
    Or is the whole connection interval thing bypassed, and it will be the next available
    time slot, regarding what BLE is doing?
    Thanks
  • Hi Klaus,

    The MPSL (Multi-Protocol Service Layer) timeslot functionality is different from a typical sender/receiver communication example. The timeslot API allows developers to implement their own 2.4 GHz proprietary protocol that can run concurrently with other protocols using MPSL. It essentially gives your application access to the radio and other restricted peripherals during defined time intervals (timeslots).
    I suggest that you refer the timeslot documentation here: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/mpsl/doc/timeslot.html 

    1. The code snippet you shared with bt_data_cb is from Bluetooth API and not the Timeslot API. These are different mechanisms. When using MPSL timeslots, you need to implement your own radio protocol handling (configure, receive, etc.) within the timeslot callback. 

    2. The timeslot will be scheduled at the next available time that doesn't conflict with higher-priority activities. If there's a conflict with a higher-priority event (like critical BLE packets), your request might be canceled. See here: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/softdevice_controller/doc/scheduling.html#timeslot_api_timing 

    Best Regards,

    Swathy

Related