Setting up the smartphone app

A project log for Learning IR codes

Building a reusable IR remote code learner and replayer on STM32

benedekkupperbenedekkupper 11/27/2021 at 20:380 Comments

Finally I have stumbled upon Advanced settings on my Samsung Galaxy S5 mini (LineageOS), where one entry is for USB-OTG mode, where the powered option is not default as it defeats the phone's supposed waterproof capability. Once I flipped that switch from Unpowered to Powered, the connected ST board's LEDs lit up. Now I could open Serial USB Terminal (in CDC mode), and receive the serial data from my MCU. (This Nucleo board's programming chip has a CDC interface that connects to a UART of the target MCU.)

The next step is to press the interesting keys on the TV's and soundbar's remotess and copy the received text into the Universal TV Remote app (see photo). The app is fully functional, and nicely customizable. I do need to scroll the page to get access to all the keys, but I can arrange the keys in a way that I have all keys on the same area that I use in a given situation.

One thing I was curious about, how the app handles repetitions, so when the user is long pressing the key. The Pronto raw format allows specifying the repeating part of the IR code, so I modified the original captured code to include the repeating part in a single code, and added it to the app that way. The app however only emits the once and repeat parts one time, and then repeats this whole signal again, with a repeat delay that is configurable in settings.