Skip to content

Add initial version of BT OBEX transfer test

Mikhail Vanyulin requested to merge kirkstone-bt-obex-transfer-test into kirkstone

A new version of Bluetooth test ([746-001603] EMV Bluetooth test)

  1. Main ideas and changes:
  • still use obex to establish connection and to transfer files;
  • integrated test into EMC test suite and added support of "looping" each second;
  • adjusted the default size of transfer to complete in less then 1 second;
  • in case if some transfer iteration in loop will fail, an error is reported but the BT connection is not reinitialized - the test will just fail;
  • validated work of test using Tanaro is DUT and Santoka is a counterpart.
  1. Following logic is implemented:
  • It's assumed that on DUT and Counterpart only one instance of the test is launched. I.e. parallel execution on the same device is not possible;
  • The test scripts are launched on DUT itself;
  • The test configures Counterpart after launch. It takes reasonable time. If Counterpart will be preconfigured in advance by analogy with other tests (RS485, CAN), the execution time for the test can be optimized significantly;
  • As serial console connection is not used, DUT should be able to connect to Counterpart via Ethernet and to establish an ssh connection as root;
  • bt_setup.sh: is used for setting up a BlueTooth connection between Counterpart and DUT via obex. The first argument is mandatory and is the IP of Counterpart. The second argument is optional - the size of file transfer in bytes (by default 10);
  • bt_test.sh: performs a file transfer and checks md5sum hash afterwards. The first argument is mandatory and is the IP of Counterpart;
  • bt_cleanup.sh - performs cleanup after test. The first argument is mandatory and is the IP of Counterpart;
  • bt_setup_obex.sh: is an auxiliary script which is used to configure obex. Is called from bt_setup.sh;
  1. The test produces following output:
  1. Herewith following limitations are known at the moment:
  • routine to recover connection after failure is not implemented yet;
  • it takes about 30 seconds to establish a Bluetooth connection via obex. And it seems that the only solution for further optimization is to switch to different implementation;
  • after integrating obex and dependencies to rootfs of Tanaro, there was no free space: /dev/root 1.1G 1.1G 0 100% /
  • there are no sanity checks before test is launched (e.g. whether hci0 device is present, bluetooth service is running).
  1. This MR depends on following MRs:
Edited by Mikhail Vanyulin

Merge request reports