Uncategorized

lirc chat

Feeds
Feeds
yst 22:05
2Raspberry Pi
Q: Problem with LIRC on Raspberry Pi 3
Teofil SanduI installed the lirc library and I tried to use it, I need this for a project sudo mode2 -d/dev/lirc0 Using driver default on device /dev/lirc0 Trying device: /dev/lirc0 Please use the –raw option to access the device directly instead through the abstraction layer If I use with –raw Using r…

raspbian pi-3 lirc

joan
joan
Given that we have no information about the receiver, the circuit, or the pins how are we meant to help? Some context about what you are doing and how is needed.

user58972
user58972
I’ll edit in the question

tlfong01
tlfong01
1920
@Teofil Sandu, I skimmed through the tutorial hackster.io/austin-stanton/… to see if you missed anything in your installation procedure. Now I am scribbling something and hopefully can make an answer. I am going very slow because I am also a lirc newbie and have not tried this lirc thing before.
@Teofil Sandu, Now I have summarized the installation and testing procedure in Appendix A of my answer. The tutorial is a bit out of date. I worried that the driver or kernel is not compatible with your Rpi3B+ raspbian 9 stretch (let me know if my guess of your config is correct). The tutorial also suggests to read the LIRC user guide. I have never read this guide. So I need to first skim through it, to understand what the hell is “Mode 2”, and should I indeed to use Mode2.
@Teofil Sandu, Now I have googled the LIRC wikipedia but found it too brief. But at least now know what does “LIRC” stands for (See Appendix B). I need to google further to learn more.
I remember some weeks ago I was playing with a HDMI switcher which uses infra red control. So I bought some IR toys to DIT remotes. I was thinking of remotes by hand. But now on second though perhaps I should consider using Rpi LIRC to control those remotes instead by my stupid human hand. So I am visiting the post to refresh my memory. raspberrypi.stackexchange.com/questions/99823/…
@Teofil Sandu, my old answer to the HDMI switcher question includes some references of IR emitter and detector. I found one instructable very good. I have included it in my answer – Reference 4. There is a detailed description on how to install and test LIRC (Steps 23~25). Now I am taking a break and carry on tomorrow. You might like to comment on my progress so far.
@Teofil Sandu, This PiHut tutorial is also very good. thepihut.com/blogs/raspberry-pi-tutorials/…

user58972
user58972
Okay I will try it, thanks a lot !

tlfong01
tlfong01
1920
@Teofil Sandu, Good, so you can read my testing notes and point out if I make any mistakes, miss anything, or you would like to make counter suggestions. Now I have google around and concluded that almost everybody is using the same IR receiver chip call XX838 (Reference 7). So I will search my junk box for this little guy. I found that the PiHut tutorial is also using this thing. So I now go look for this 838 guy. See you later.
@Teofil Sandu, I luckily found a 838 toy kit in my junk box. So I will start testing it. See Appendix (D) for more details.
@Teofil Sandu, I just finished a couple of quick and dirty IR receiver tests, just to make sure I more or less understanding correctly how the NEC encoding protocol works and that my IR remote and receiver kit are working OK. I will now take a break and see you tomorrow.

user58972
user58972
yst 22:05
Thank you , I will check it out.
By the way have you tried sending any signals? @tlfong01

tlfong01
tlfong01
1920
Well, I tried to install LIRC, following two tutorials (Ref 4 and another). I found one tutorial not too update, and Ref 4 too tedious to remember the steps. I also have no confidence that the lirc driver I successfully installed can run smoothly in my Rpi4B buster. I think I will google further to learn how other Rpi4 users play with lirc. I am also trying using python UART to do further testing.
@Teofil Sandu, I googled again and found one more updated tutorial – Ref 26. Perhaps you can try it. I am not sure if it works for Rpi4B. So I will try the UART module first to get more experience, then come back to try LIRC. PS – More updated lirc info.

user58972
user58972
So great news, the receiving part works. Do you know if I can see the codes received by the sensor in a raw format?
Maybe something regarding the mode2 command and parameters @tlfong01

tlfong01
tlfong01
1920
@Teofil Sandu, Ah, for now I can only display the wave form in a scope. I am thinking of (1) Use a python program to read the IR signals, (2) Use LIRC to read the IR signals.
I still have not tried the most up to date procedure to install and test LIRC. As I said, the two tutorials I already tried are not working, because they are out of date. BTW, which tutorial you were following? Give me the link and perhaps I can try it later, and see what is the meaning of mode 2 as described in your tutorial. I am going very slowly. I still don’t know what is a config file for lirc.

user58972
user58972
1
stackoverflow.com/questions/57437261/…
I used the link above and it worked! The only difference is that I had to set lirc1 instead of lirc0, I am thinking maybe because I also added a IR led because I want to try to send them as well after. @tlfong01
The only thing is that mode2 shows in hex format. I would like to try to see them in RAW format. More study I guess

tlfong01
tlfong01
@Teofil Sandu, Ah, the post you just gave me is more up to date than mine. Yours mentions buster, but mine only Rpi3. Now I have more motivation to try it on my Rpi4B buster. I will stall my python method for a while, and try your suggested procedure first.

user58972
user58972
yst 22:05
Yeah, it’s more updated. I hope it will work for you too 🙂 @tlfong01

tlfong01
tlfong01
1920
@Teofil Sandu, I have not read the lirc user guide carefully, so I don’t know what is “mode 2”. By the way, if you get the data in hex format, then it is easy to convert them in RAW format. Usually people want to convert RAW to hex, then to text, such as “button 1 pressed”, etc. It if laughable that you are walking in the opposite direction. But I am indeed using the scope to display is the raw mark/space signals. I actually downloaded the raw mark/space signals for button 1, but have not displayed here, because I thought nobody is interested to read the boring raw signals. 🙂

user58972
user58972
Oh got it. The mode2 is a command to capture the signals from the LIRC library. If you will open the link, you’ll see @tlfong01

tlfong01
tlfong01
Thanks a lot. I will try it later. But it is now jogging time for me. So see you late this evening or tomorrow. Cheers.

user58972
user58972
Hah, have fun. @tlfong01

The last message was posted 17 hours ago.

https://www.sbprojects.net/knowledge/ir/nec.php

https://techdocs.altium.com/display/FPGA/NEC+Infrared+Transmission+Protocol

https://www.ad-notam.com/download/RS232/ad_notam_IR_protocol_DFU.pdf
Digit1 = 0x21 = dec33

UART, USB/UART send byte, loop back, blink LED RealTerm terminal emulator, logical level converter
https://raspberrypi.stackexchange.com/questions/96184/serial-to-arduino-totally-non-responsive

—————–

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s