Coder Social home page Coder Social logo

ble_auto_testing's Introduction

ble_auto_testing

This project is used to automatically run BLE applications remotely, at the same time sniff the BLE packets, then save to a file, and finally parse the file to verify TIFS and other parameters in the future.

The related project is pcapng_parser.

Usage

Hardware setup

In this test, two MAX32655 DevKit boards are used.

Following the instructions in the README of project VSCode-Maxim, program the BLE5_ctr project into the two DevKit boards.

Then set up the test as the following figure shows.

Hardware setup

Find the devices on a Ubuntu machine

NOTE
The sequence of powering up the board and plug in the USB cables will effect the ttyUSB*.
Suggest sequence:
Power up DevKit 0 -> /dev/ttyUSB0
Plug in DevKit 0 UART3 cable -> /dev/ttyUSB1
Power up DevKit 1 -> /dev/ttyUSB2
Plug in DevKit 1 UART3 cable -> /dev/ttyUSB3

It is helpful to use "ll /dev/serial/by-id" to check the serial ports.

Local test

Windows

In a Windows terminal, cd the source code folder.

.\venv\Scripts\activate
python -m ble-auto-testing -h

In the virtual environment, run the test.

python -m ble-auto-testing --interface COM4-None --device "" --brd0-addr 00:11:22:33:44:11 --brd1-addr 00:11:22:33:44:12 --sp0 COM9 --sp1 COM10 --time 30 --tshark "C:\Program Files\Wireshark\tshark.exe" 

Linux

export SNIFFER=/dev/ttyACM1-None
export BD0_UART3=/dev/ttyUSB0
export BD1_UART3=/dev/ttyUSB1
/home/ying-cai/Workspace/ble_auto_testing/venv/bin/python /home/ying-cai/Workspace/ble_auto_testing/ble_test.py --interface $SNIFFER --device "" --brd0-addr 00:11:22:33:44:11 --brd1-addr 00:11:22:33:44:12 --sp0 $BD0_UART3 --sp1 $BD1_UART3 --time 30 --tshark /usr/bin/tshark

Or:

/home/ying-cai/Workspace/ble_auto_testing/venv/bin/python /home/ying-cai/Workspace/ble_auto_testing/ble_test.py --interface /dev/ttyACM0-None --device "" --brd0-addr 00:11:22:33:44:11 --brd1-addr 00:11:22:33:44:12 --sp0 /dev/ttyUSB0 --sp1 /dev/ttyUSB1 --time 30 --tshark /usr/bin/tshark 

ble_auto_testing's People

Contributors

yc-adi avatar kevin-gillespie avatar

Watchers

 avatar

Forkers

ericb-adi

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.