I have a Roku ultra and a regular sharp smart tv, not a Roku tv. My Roku remote was dead for months. When I finally decided to put new batteries in it, I couldn’t get it to program to control my tv....
I made it up to about 40 before I gave up on the codes, it use to connect between 1 and 2. Factory remote still works and it is a clear line of sight. I even verified with the phone camera that the ir works