Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rtl_ir and infrared listening option to rtl_tcp #9

Merged
merged 21 commits into from Jul 22, 2016

Conversation

Projects
None yet
3 participants
@rxseger
Copy link

commented Jul 3, 2016

Based on the Linux dvb_usb_rtl28xxu driver, enhances librtlsdr to additionally allow receiving remote control (RC) infrared (IR) signals from the built-in IR LED on the RTL-SDR dongle (tested with a NooElec NESDR Mini 2+).

Adds a standalone rtl_ir utility program to dump IR signals only, and a new option for rtl_tcp (-I port) to listen to IR and RF simultaneously. Samples are returned as raw pulse data, leaving it up to the client software to decode the application remote control protocol (RC-5, RC-6, NEC, etc.).

Comments welcome, works in my initial testing but could use more testing and review if this is a good approach.

Example usage: https://gist.github.com/rxseger/b6ff37961f7fc80f421b5d30eb7147e1
Notes: https://medium.com/@rxseger/receiving-ir-signals-with-rtl-sdr-dongles-5a8658a44b90#.uoytoul3l

rxseger and others added some commits Jul 2, 2016

Fix clang warning about shifting a negative signed value
Fixes warning: shifting a negative signed value is undefined [-Wshift-negative-value]
return (cj > 0) ? 1<<13 : -1<<13;
Merge pull request #5 from rxseger/negativeshift
Fix clang warning about shifting a negative signed value
Add infrared block USB control message indexes
Most of the indexes are x<<8 for write, (x<<8)|0x10 for read, but not
IR. From https://github.com/torvalds/linux/blob/9256d5a308c95a50c6e85d682492ae1f86a70f9b/drivers/media/usb/dvb-usb-v2/rtl28xxu.h#L63-L66

 #define CMD_SYS_RD       0x0200
 #define CMD_IR_RD        0x0201
 #define CMD_IR_WR        0x0211
 #define CMD_SYS_WR       0x0210
Merge branch 'development' into ir
Change infrared wait time flag to -W to fix conflict with the
new development-branch -w flag for tuner bandwidth

Conflicts:
	src/rtl_tcp.c
@racerxdl

This comment has been minimized.

Copy link
Member

commented Jul 22, 2016

👍 - I will test this in a few minutes ^^

@racerxdl

This comment has been minimized.

Copy link
Member

commented Jul 22, 2016

Man, amazing. Works fine :D - Merged!

@racerxdl racerxdl merged commit 183245f into librtlsdr:development Jul 22, 2016

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.