Android => BlueTooth => Serial
  • Hi,

    I have been looking for an example on how to create an Android app for real time control of gimbal.
    But i can't seem to find one.
    I can connect to the board via Bluetooth, but sending serial commands is very complicated.
    I have been reading about it for quite a while... but documentations are unclear.

    I know there is Android app for Basecam in PlayStore, maybe someone has a part of source code where you are sending Serial Commands via Bluetooth in JAVA.

    The help would be very appreciated.
  • Hi,

    I tried to solve this issue for 4 days, but couldn't.
    What i want to do:
    I want to control SimpleBGC gimbal via Bluetooth with Android application.
    Where i stuck on:
    RC > RC_ROLL pin mode: > SBGC Serial API 2nd UART
    RC > Input Mapping > CMD > RC_YAW-PWM
    I am sending Serial commands to RC_YAW pin, but i cannot get it working. I think my connections are good, but my commands are incorrect.
    For Example i want to turn on Motors: CMD_MOTORS_ON 77
    What i tried sending is:
    M (It is working when using Debug > Serial command )

    None of these seem to work.
    Could you advise me on this? What i am doing wrong?
  • I don't know anything about Android and Java, but I can give you a command example that I know works. To toggle the motor on/off, send the following to the controller board:

    62, 69, 1, 70, 10, 10

    You'll have to change my answer to Hex if you want it in Hex.

    BTW, I don't think you are being consistent on your use of Hex/Decimal above. The 77 you are using is a decimal value, while the 3E is a Hex value.
  • Yeah, i managed to do it in other way.
    I put Arduino board between Android and SimpleBGC and everything is working fine.
    And you were right HEX for motors on is 3E 4D 00 4D 00 31 0D 0A
    For motors off its 3E 6D 00 D 00 30 0D 0A

    But for anyone else who will try to do something like this I still recommend you to use Arduino board in between because SimpleBGC command libraries are not yet converted into JAVA. I found few examples, but I don't recommend using them, they are poorly written.
  • I'm late to the party, but you can look at the source code of the SimpleBGC32 app by decompiling the APK. I had a look at the current version (3.01b2) and it is not obfuscated. You can download the APK from: https://apkpure.com/de/simplebgc32/ru.smartsoft.simplebgc32/download
    Then you can open it using JADX GUI. If you don't want to install JADX, you can use an online service like: http://www.javadecompilers.com