0

Hardware

  • The Bluetooth device is powered by a chip called atmega32 and uses a bm78 Bluetooth chip.
  • The clock frequency of the MCU chip is 14.7456 MHz.
  • The baud rate of Bluetooth device is 115200.
  • The Bluetooth device transmits data in BR/EDR mode.
  • The Bluetooth device sends 8 signals sampled at 250Hz in a packet.
  • The packet format is the Cyton of OpenBCI.

Software

  • My app use Rfcomm to connect Bluetooth and receive data.
  • Importing data from the thread through bluetoothSocket.getInputStream(), the priority of the thread is Thread.MAX_PRIORITY(10). And the priority of the process in which that thread operates is Process.THREAD_PRIORITY_URGENT_AUDIO.
  • My app draws a graph by obtaining an interval for each data reception.
  • Since the signal is sampled at 250Hz, the average of the packet interval should be similar to 4ms.

Problem

  • But the average of the packet interval is 8ms.
  • How can I speed up my Android Bluetooth reception?

What I want to know is how to increase the Bluetooth data reception speed in an Android app using Java. The data needs to be received every 4ms through the InputStream, but currently, my app is reading the data every 8ms. Considering that I cannot modify the BM78 module, how can I improve the reception speed in my Android app?

1 Answer 1

0

Before setting yourself unrealistic goals, you should familiarise yourself with the basics and check whether the chosen technology is at all suitable for achieving the desired goal.

As you are not providing us with the necessary information, you will have to do this yourself. The manufacturer of the module (BM78) you are using does a very good job of this by providing you with the basic information. You then have to do the rest of the maths yourself ;-)

2
  • What I want to know is how to increase the Bluetooth data reception speed in an Android app using Java. The data needs to be received every 4ms through the InputStream, but currently, my app is reading the data every 8ms. Considering that I cannot modify the BM78 module mentioned in my question, how can I improve the reception speed in my Android app?
    – HanGoil
    Commented Jun 19 at 9:50
  • @HanGoil You might want to take a closer look at the baseband specification
    – Risto
    Commented Jun 19 at 11:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.