0
\$\begingroup\$

I am trying to sniff the UART communication line of a commercial BLDC controller. The UART port connects to the Bluetooth module and the Bluetooth module connects to an Android App. I am able to get the baud rate right with some hacking, but it seems that after the successful connection of the Bluetooth module to the app, the app sends some characters to the Bluetooth module, and expects some characters in return because the Bluetooth module is connected to my PC via FTDI converter and not the controller.

It does not get the desired reply hence, the Android application shows "Open Flash Error." Now I do not exactly know what the error is but, in the Arduino serial monitor I see four characters (when the Bluetooth module is connected to app) represented by blocks as the serial monitor does not have the right font I guess.

What should I do in order to decipher what are those characters or how should I get the ASCII values of the characters received?

\$\endgroup\$
2
  • 4
    \$\begingroup\$ What makes you think they're printable ASCII characters? It could be a binary protocol. \$\endgroup\$
    – Finbarr
    Jan 15 '20 at 11:59
  • 4
    \$\begingroup\$ Use a serial monitor app that can display the data in Hex. Try Hercules. \$\endgroup\$
    – Steve G
    Jan 15 '20 at 12:11
3
\$\begingroup\$

You are probably looking at a binary transmission protocol, rather than the ASCII protocol you were expecting. You might want to investigate further with the module in circuit to capture successful transactions. These transactions could be generated using the app. Since the protocol seems to be binary, be sure to use a serial monitor that can yield the data in hexadecimal or bin format.

BLDC controllers I know of use simple ttl-level binary serial communication, with a start-checksum, databyte and stop bit. Many of their protocols have already been reverse-engineered and can be found online. You may want to look up for yours.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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