Android Bluetooth joystick

Hello Kas,

kas:
Sorry, this is a free robust multipurpose k.i.s.s App, I won't add additional features

Ok that makes sense, I guess I will have to write an app myself, if I find the time for it :confused:

kas:
The code is not public, as it is the base of a paid App

What additional features does the paid app provide?
I have not found the app in the play store so far.

kas:
Joystick BT has no known bugs AFAIK
Please let me have additional info, you may use the debug code
also make sure your communication is set at 57600 bps

I use the hc05 bluetooth module and set the baud rate to 57600 via AT commands, then I connect the android application to the module and hook up my salea logic analyzer.
There I find out that indeed some "erronous" packets (with contents 200200) are sent over the bluetooth link.

App configuration:

  • return to center: off
  • two buttons displayed (not used)
  • 3 data fields (not used)
  • refresh interval: 25 milli
  • timeout count: every 100 intervals
  • no baud rate setting in the app (why?)

Here are the screenshots:
Overview of the saved transmissions:

Correct transmission:

Incorrect transmission:

This is the output from the logic analyzer async serial decoder.

Time [s],Value,Parity Error,Framing Error
0.000351500000000,'2' (0x02),,
0.000525125000000,2 (0x32),,
0.000698750000000,7 (0x37),,
0.000872375000000,1 (0x31),,
0.001046000000000,2 (0x32),,
0.001219625000000,8 (0x38),,
0.001393250000000,8 (0x38),,
0.001566875000000,'3' (0x03),,
0.026932958333333,'2' (0x02),,
0.027106583333333,2 (0x32),,
0.027280166666667,6 (0x36),,
0.027453833333333,7 (0x37),,
0.027627458333333,2 (0x32),,
0.027801083333333,9 (0x39),,
0.027974666666667,1 (0x31),,
0.028148291666667,'3' (0x03),,
0.050441291666667,'2' (0x02),,
0.050614916666667,2 (0x32),,
0.050788500000000,6 (0x36),,
0.050962166666667,6 (0x36),,
0.051135791666667,2 (0x32),,
0.051309375000000,9 (0x39),,
0.051483000000000,3 (0x33),,
0.051656625000000,'3' (0x03),,
0.076988000000000,'2' (0x02),,
0.077161625000000,2 (0x32),,
0.077335250000000,6 (0x36),,
0.077508875000000,4 (0x34),,
0.077682500000000,2 (0x32),,
0.077856125000000,9 (0x39),,
0.078029708333333,4 (0x34),,
0.078203333333333,'3' (0x03),,
0.100392166666667,'2' (0x02),,
0.100565750000000,2 (0x32),,
0.100739375000000,6 (0x36),,
0.100913000000000,0 (0x30),,
0.101086625000000,2 (0x32),,
0.101260250000000,9 (0x39),,
0.101433875000000,6 (0x36),,
0.101607500000000,'3' (0x03),,
0.125688791666667,'2' (0x02),,
0.125862416666667,2 (0x32),,
0.126036041666667,5 (0x35),,
0.126209666666667,9 (0x39),,
0.126383291666667,2 (0x32),,
0.126556916666667,9 (0x39),,
0.126730541666667,6 (0x36),,
0.126904125000000,'3' (0x03),,
0.150707583333333,'2' (0x02),,
0.150881208333333,2 (0x32),,
0.151054833333333,5 (0x35),,
0.151228458333333,8 (0x38),,
0.151402083333333,2 (0x32),,
0.151575708333333,9 (0x39),,
0.151749333333333,7 (0x37),,
0.151922958333333,'3' (0x03),,
0.179407208333333,'2' (0x02),,
0.179580833333333,2 (0x32),,
0.179754458333333,5 (0x35),,
0.179928083333333,7 (0x37),,
0.180101708333333,2 (0x32),,
0.180275333333333,9 (0x39),,
0.180448958333333,7 (0x37),,
0.180622583333333,'3' (0x03),,
0.180796208333333,'2' (0x02),,
0.180969833333333,2 (0x32),,
0.181143458333333,0 (0x30),,
0.181317083333333,0 (0x30),,
0.181490625000000,2 (0x32),,
0.181664291666667,0 (0x30),,
0.181837875000000,0 (0x30),,
0.182011500000000,'3' (0x03),,
0.182185125000000,'2' (0x02),,
0.182358750000000,2 (0x32),,
0.182532375000000,4 (0x34),,
0.182706000000000,3 (0x33),,
0.182879625000000,2 (0x32),,
0.183053250000000,6 (0x36),,
0.183226875000000,0 (0x30),,
0.183400500000000,'3' (0x03),,
0.204183000000000,'2' (0x02),,
0.204356625000000,2 (0x32),,
0.204530250000000,5 (0x35),,
0.204703875000000,5 (0x35),,
0.204877500000000,2 (0x32),,
0.205051041666667,9 (0x39),,
0.205224666666667,6 (0x36),,
0.205398291666667,'3' (0x03),,
0.227969125000000,'2' (0x02),,
0.228142750000000,2 (0x32),,
0.228316375000000,5 (0x35),,
0.228490000000000,4 (0x34),,
0.228663625000000,2 (0x32),,
0.228837166666667,9 (0x39),,
0.229010791666667,5 (0x35),,
0.229184416666667,'3' (0x03),,
0.252970541666667,'2' (0x02),,
0.253144166666667,2 (0x32),,
0.253317791666667,5 (0x35),,
0.253491416666667,1 (0x31),,
0.253665041666667,2 (0x32),,
0.253838666666667,9 (0x39),,
0.254012291666667,4 (0x34),,
0.254185916666667,'3' (0x03),,
0.276982375000000,'2' (0x02),,
0.277156000000000,2 (0x32),,
0.277329625000000,5 (0x35),,
0.277503250000000,0 (0x30),,
0.277676875000000,2 (0x32),,
0.277850500000000,9 (0x39),,
0.278024125000000,3 (0x33),,
0.278197750000000,'3' (0x03),,
0.328374291666667,'2' (0x02),,
0.328547916666667,2 (0x32),,
0.328721541666667,5 (0x35),,
0.328895166666667,0 (0x30),,
0.329068791666667,2 (0x32),,
0.329242416666667,9 (0x39),,
0.329416041666667,2 (0x32),,
0.329589666666667,'3' (0x03),,
0.378325208333333,'2' (0x02),,
0.378498833333333,2 (0x32),,
0.378672458333333,5 (0x35),,
0.378846083333333,1 (0x31),,
0.379019708333333,2 (0x32),,
0.379193250000000,9 (0x39),,
0.379366875000000,1 (0x31),,
0.379540500000000,'3' (0x03),,
0.404316291666667,'2' (0x02),,
0.404489916666667,2 (0x32),,
0.404663541666667,5 (0x35),,
0.404837166666667,2 (0x32),,
0.405010791666667,2 (0x32),,
0.405184416666667,9 (0x39),,
0.405358041666667,1 (0x31),,
0.405531666666667,'3' (0x03),,
0.429248333333333,'2' (0x02),,
0.429421958333333,2 (0x32),,
0.429595583333333,5 (0x35),,
0.429769208333333,5 (0x35),,
0.429942833333333,2 (0x32),,
0.430116458333333,8 (0x38),,
0.430290083333333,9 (0x39),,
0.430463708333333,'3' (0x03),,
0.456732583333333,'2' (0x02),,
0.456906208333333,2 (0x32),,
0.457079833333333,5 (0x35),,
0.457253458333333,7 (0x37),,
0.457427083333333,2 (0x32),,
0.457600708333333,8 (0x38),,
0.457774333333333,8 (0x38),,
0.457947958333333,'3' (0x03),,
0.480553416666667,'2' (0x02),,
0.480727041666667,2 (0x32),,
0.480900666666667,5 (0x35),,
0.481074291666667,9 (0x39),,
0.481247916666667,2 (0x32),,
0.481421541666667,8 (0x38),,
0.481595166666667,7 (0x37),,
0.481768791666667,'3' (0x03),,


https://ibb.co/cpNuCG
https://ibb.co/bJjkKw
https://ibb.co/fRBAmb

I hope I can help you in finding the issue with this information.
Please tell me when you need further data, I will be happy to provide.