Giter Site home page Giter Site logo

stepper_ble_meshprfnode's Introduction

/**
  @page BLE_p2pServer Application

  @verbatim
  ******************************************************************************
  * @file    BLE/BLE_p2pServer/readme.txt
  * @author  MCD Application Team
  * @brief   Description of the BLE_p2pServer application
  ******************************************************************************
  *
  * Copyright (c) 2019-2022 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  @endverbatim

@par Application Description

How to demonstrate Point-to-Point communication using BLE (as GATT server).

Two STM32WB55xx boards are used, one acting as GATT client, and one as GATT server.
For example, BLE_P2PClient application is downloaded in a USB DONGLE board (MB1293C) and BLE_p2pServer application in a Nucleo board (MB1355C).
The client could be located in a smartphone also, using the ST BLE Sensor application instead of the MB1293C board.

@par Keywords

Connectivity, BLE, IPCC, HSEM, RTC, UART, PWR, BLE protocol, BLE pairing, BLE profile, Dual core

@par Directory contents

  - BLE/BLE_p2pServer/Core/Inc/stm32wbxx_hal_conf.h        HAL configuration file
  - BLE/BLE_p2pServer/Core/Inc/stm32wbxx_it.h              Interrupt handlers header file
  - BLE/BLE_p2pServer/Core/Inc/main.h                      Header for main.c module
  - BLE/BLE_p2pServer/Core/Inc/app_common.h                Header for all modules with common definition
  - BLE/BLE_p2pServer/Core/Inc/app_conf.h                  Parameters configuration file of the application
  - BLE/BLE_p2pServer/Core/Inc/app_entry.h                 Parameters configuration file of the application
  - BLE/BLE_p2pServer/Core/Inc/hw_conf.h                   Configuration file of the HW
  - BLE/BLE_p2pServer/Core/Inc/utilities_conf.h            Configuration file of the utilities
  - BLE/BLE_p2pServer/Core/Src/stm32wbxx_it.c              Interrupt handlers
  - BLE/BLE_p2pServer/Core/Src/main.c                      Main program
  - BLE/BLE_p2pServer/Core/Src/system_stm32wbxx.c          stm32wbxx system source file
  - BLE/BLE_p2pServer/Core/Src/app_entry.c                 Initialization of the application
  - BLE/BLE_p2pServer/Core/Src/stm32_lpm_if.c              Low Power Manager Interface
  - BLE/BLE_p2pServer/Core/Src/hw_timerserver.c            Timer Server based on RTC
  - BLE/BLE_p2pServer/Core/Src/hw_uart.c                   UART Driver
  - BLE/BLE_p2pServer/STM32_WPAN/Target/hw_ipcc.c          IPCC Driver
  - BLE/BLE_p2pServer/STM32_WPAN/App/ble_conf.h            BLE Services configuration
  - BLE/BLE_p2pServer/STM32_WPAN/App/ble_dbg_conf.h        BLE Traces configuration of the BLE services
  - BLE/BLE_p2pServer/STM32_WPAN/App/app_ble.c             BLE Profile implementation
  - BLE/BLE_p2pServer/STM32_WPAN/App/app_ble.h             Header for app_ble.c module
  - BLE/BLE_p2pServer/STM32_WPAN/App/p2p_server_app.c      P2P Server application
  - BLE/BLE_p2pServer/STM32_WPAN/App/p2p_server_app.h      Header for p2p_server_app.c module

@par Hardware and Software environment

    - This application runs on STM32WB55xx devices, USB DONGLE board (MB1293C) & Nucleo board (MB1355C)

    - USB DONGLE board (MB1293C) Set-up
       - Connect the USB DONGLE boards to your PC
       - Connect external ST-LINK to dedicated ST LINK Pin

    - Nucleo board (MB1355C) Set-up
       - Connect the Nucleo Board to your PC with a USB cable type A to mini-B to ST-LINK connector (USB_STLINK).
       - Please ensure that the ST-LINK connectors and jumpers are fitted.

@par How to use it ?

This application requires having the stm32wb5x_BLE_Stack_full_fw.bin binary flashed on the Wireless Coprocessor.
If it is not the case, you need to use STM32CubeProgrammer to load the appropriate binary.
All available binaries are located under /Projects/STM32_Copro_Wireless_Binaries directory.
Refer to /Projects/STM32_Copro_Wireless_Binaries/ReleaseNote.html for the detailed procedure to change the
Wireless Coprocessor binary.

In order to make the program work, you must do the following :
 - Open your preferred toolchain
 - Rebuild all files and load the image into target memory
 - OR use the BLE_p2pServer_reference.hex from Binary directory
 - This must be done for BLE_p2pServer (MB1355C & MB1293C)

First demonstration
On the android/ios device, enable the Bluetooth communications, and if not done before,
 - Install the ST BLE Sensor application on the ios/android device
    https://wiki.st.com/stm32mcu/wiki/Connectivity:BLE_smartphone_applications#ST_BLE_Sensor
 - Power on the Nucleo board with the BLE_P2P_Server application
 - Then, click on the App icon, ST BLE Sensor (smartphone)
 - connect to the device
 - select the P2PSRVx in the device list and play with the Light and the SW1 button of the board


Second demonstration
 - BLE_p2pServer may be connected by BLE_p2pClient.
 - Once the code (BLE_p2pServer & BLE_p2pClient) is downloaded into the two STM32WB55xx boards and executed, the modules are initialized.

 - The Peripheral device (BLE_p2pServer) starts advertising (during 1 minute), the green led blinks for each advertising event.
 - The Central device (BLE_p2pClient) starts scanning when pressing the User button (SW1) on the USB Dongle board.
   - BLE_p2pClient blue led becomes on.
   - Scan req takes about 5 seconds.
   - Make sure BLE_p2pServer advertises, if not press reset button or switch off/on to restart advertising.
 - Then, it automatically connects to the BLE_p2pServer.
   - Blue led turns off and green led starts blinking as on the MB1355C. Connection is done.
 - When pressing SW1 on a board, the blue led toggles on the other one.
   - The SW1 button can be pressed independently on the GATT Client or on the GATT Server.
 - When the server is located on a MB1355C, the connection interval can be modified from 50ms to 1s and vice-versa using SW2.
 - The green led on the 2 boards blinks for each advertising event, it means quickly when 50ms and slowly when 1s.
 - Passing from 50ms to 1s is instantaneous, but from 1s to 50ms takes around 10 seconds.
 - The SW1 event, switch on/off blue led, depends on the connection Interval event.
   - So the delay from SW1 action and blue led change is more or less fast.

Available Wiki pages:
  - https://wiki.st.com/stm32mcu/wiki/Connectivity:BLE_overview

For more details refer to the Application Note:
  AN5289 - Building a Wireless application

 * <h3><center>&copy; COPYRIGHT STMicroelectronics</center></h3>
 */

stepper_ble_meshprfnode's People

Contributors

chinnnathan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.