Pandora as infrared universal remote control?


There are a lot of IrDA products available, but they're not what we need here. These projects are about CIR.
 
Last edited by a moderator:
With every IrDA Device can you recive IR Signals too,even from Remote Controls.

Only the sending Range is very short.
 
Have you done this? Got a link to any instructions?

Somebody has done the audio input one with LIRC before:

http://people.inf.ethz.ch/mringwal/lirc/

And the LIRC website has a list of off-the-shelf hardware that works with it. So that's a question of whether any of them work on Pandora.
 
I had done this on my old Palm M100(over buildin IRDA),on some PocketPCs(over buildin IRDA)

and my Samsung Galaxy T699 Phone(Sending as Remote Control via App and Audio Port)

On many Windows PCs and WinLIRC with USB IRDA Adapters....

...but never on Linux itself.

On Windows its Easy:

-plug the USB IRDA Dongle

-wait for Windows to install the Drivers

-start and configure WinLIRC with your Remote Controll for MediaPortal,XBMC or others

But on Linux?

I never used LIRC under Linux,sorry

What can be a Problem too is that the Mini USB Port give not enough Power for remoting via IRDA

and nearly all IRDA USB Adapters are USB 1.1 and then will you need an extra USB Hub on the Pandora for using USB 2.0.

Sorry that i cannot help under Linux,my knowledge with it is not big.
 
Last edited by a moderator:
What's the safe voltage range for line-in, and how are you doing that?


It only just occurred me now that putting my transmitter on the line-out might be a useful idea. The signal would be much cleaner than headphone and not affected by the volume setting. And it could use EXT power switched with a transistor.
Line-in is protected by a decoupling capacitor. I have put anything between 0 - 2.8V on it and it's still alive. It is super-sensitive though - I put a signal from my IR receiver through 1:20 divider, and it still saturates:


I'm not into CIR transmitters (yet), but it seems problematic to generate a proper 38kHz-modulated signal using a 44kHz sound card. A 22kHz signal will still work, albeit with range penalty. This applies to both the jack and the line-out.


Concerning the noise, I discovered that at least line-in signals are prone to the noise generated by keyboard polling signal (extra noise appears when I press certain keys). It might be the same for line-out, although I'd expect the noise to be much smaller due to lower impedance. This doesn't bother me while I'm working on a receiver, but transmitter should work well alongside with key presses.


Last but not least, EXT connector is nicely positioned at the back of the unit - that's the side which will face your TV when you'll be using your pandora as a remote. It's less of a sweet spot for a receiver. Luckily, mine is embedded in the tip of a 15 cm cable.

I had done this on my old Palm M100(over buildin IRDA),on some PocketPCs(over buildin IRDA)


and my Samsung Galaxy T699 Phone(Sending as Remote Control via App and Audio Port)


On many Windows PCs and WinLIRC with USB IRDA Adapters....
I believe you could send/receive CIR signals with palm or phone, such devices often have SIR+CIR decoders. As for the IrDA USB adaptes, LIRC FAQ (http://www.lirc.org/faq.html) disproves your statement in the first lines:


Is my USB IrDA dongle supported by LIRC?


No, it's technically not possible to use USB IrDA dongles (as specified by the Infrared Data Association) with LIRC. This does not apply to USB receivers in general.


So you should be very lucky to have an IrDA dongle that implements CIR as well. Can you tell us which model you have?
 
Last edited by a moderator:
It was this one:

t6MFi.jpg


But maybe another IR Software than WinLirc,cant renember right,was 5-6 Years ago :unsure:
 
I'm not into CIR transmitters (yet), but it seems problematic to generate a proper 38kHz-modulated signal using a 44kHz sound card. A 22kHz signal will still work, albeit with range penalty. This applies to both the jack and the line-out.
Indeed, that's a problem. I just looked around to see how people did the headphone jack ones. This one puts one LED on the left channel and one LED on the right channel, and I think it relies on the fact that an LED will be lit less than 50% of the time with a 50% input wave.

http://www.instructables.com/id/DIY-Infrared-transmitter-for-iPhone-iPod/

As far as I've heard, the headphone jack ones are not very good. This might be due to frequency problems as well as low current. Using EXT power with line-out signal would allow more current, but any frequency problems would be the same.

I was looking into doing it with GPIO or UART before, but there are similar issues. Well, the UART can make the 38kHz just fine, but then there are problems with getting the bursts right. The GPIO isn't accurate enough for either. The line-out is accurate enough for the bursts but not for the 38kHz.

Modulate UART with line-out? But then the circuit is getting bigger, and making the two things happen at the same time in software would be annoying.

Last but not least, EXT connector is nicely positioned at the back of the unit - that's the side which will face your TV when you'll be using your pandora as a remote. It's less of a sweet spot for a receiver. Luckily, mine is embedded in the tip of a 15 cm cable.
Yes, the ideal transmitter would be a tiny one which fits closely against the back of the unit. It's very hard to make anything small enough using DIY construction techniques.

For the USB transmitters I was working on so far, I was just trying to get them small enough to float on the end of a very short length of USB cable. (Looping a longer cable around and running it along the side of the unit.)
 
Last edited by a moderator:
With UART alone, we can't make the gaps between the bursts using gaps in the data, because the timing is not accurate enough. If we send a continuous stream of data during the gaps, at best the LED will blink at the frequency of the bytes. Looking at the OMAP35x TRM, I can see 4 ways to get a 38kHz signal from the UART. The one with the longest byte time is 115200 baud rate with even parity and two stop bits. A byte within a burst is then

_^^_^^
giving 38400Hz modulation,and a gap between bursts blinks the LED at 9600Hz, like this (go for minimum lit time; UART is active low)

Code:
__^^^^^^^^^^
This might be worth testing. Maybe the TVs etc would let me get away with that.
 
Last edited by a moderator:
Why not something like this? http://www.instructables.com/id/DIY-Infrared-transmitter-for-iPhone-iPod/ Apart from the inconvenience of having it block the port, it seems like an easy enough way of handling things. Personally, I rarely use the headphone jack anyways, so it wouldn't be that big of a deal.
I built something similar (and much smaller). The IR signals are sent through .wav files. I spent quite a while with irscrutinizer and the lirc database making those.


Range is about what a standard TV remote is, and obviously no receive.

Edit: here is the one I made:

http://i.imgur.com/pDWqNm1.jpg
 
Last edited by a moderator:
On the receiving side, I bought a USB receiver and accompanying remote control, branded as "Sapphire". My Fedora 22 desktop recognises it as a HID. Some buttons do the obvious thing, e.g. the number keys, arrow keys, and "OK" is the enter key. But according to xev, some of the buttons on the remote don't do anything.

The Pandora doesn't support it - does this mean a missing driver?

Desktop:

Code:
[81521.128021] usb 1-2.1.1: new low-speed USB device number 8 using ehci-pci
[81521.211718] usb 1-2.1.1: New USB device found, idVendor=0766, idProduct=0204
[81521.211726] usb 1-2.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[81521.211730] usb 1-2.1.1: Product: USB IR Combo Device 
[81521.211734] usb 1-2.1.1: Manufacturer: TopSeed Tech Corp.
[81521.221928] input: TopSeed Tech Corp. USB IR Combo Device  as /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0/0003:0766:0204.0004/input/input6
[81521.272520] topseed 0003:0766:0204.0004: input,hidraw1: USB HID v1.00 Keyboard [TopSeed Tech Corp. USB IR Combo Device ] on usb-0000:00:1d.7-2.1.1/input0
[81521.283134] input: TopSeed Tech Corp. USB IR Combo Device  as /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.1/0003:0766:0204.0005/input/input7
[81521.336952] topseed 0003:0766:0204.0005: input,hiddev0,hidraw2: USB HID v1.00 Mouse [TopSeed Tech Corp. USB IR Combo Device ] on usb-0000:00:1d.7-2.1.1/input1
Pandora:
Code:
[  230.669586] usb 2-1: new low-speed USB device number 2 using musb-hdrc
[  230.828277] usb 2-1: device v0766 p0204 is not supported
[  230.828399] usb 2-1: New USB device found, idVendor=0766, idProduct=0204
[  230.828399] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  230.828399] usb 2-1: Product: USB IR Combo Device 
[  230.828430] usb 2-1: Manufacturer: TopSeed Tech Corp.
 
The above was using the OTG port. With a hub, it doesn't say the "not supported" thing, but still doesn't work.
 

Code:
[12680.817718] usb 2-2: new high-speed USB device number 4 using ehci-omap
[12680.975708] usb 2-2: New USB device found, idVendor=14cd, idProduct=8601
[12680.975738] usb 2-2: New USB device strings: Mfr=1, Product=3, SerialNumber=0
[12680.975738] usb 2-2: Product: USB 2.0 Hub            
[12680.975738] usb 2-2: Manufacturer: USB Device  
[12680.977569] hub 2-2:1.0: USB hub found
[12680.977813] hub 2-2:1.0: 4 ports detected
[12681.263427] usb 2-2.2: new low-speed USB device number 5 using ehci-omap
[12681.388824] usb 2-2.2: New USB device found, idVendor=0766, idProduct=0204
[12681.388824] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[12681.388824] usb 2-2.2: Product: USB IR Combo Device 
[12681.388824] usb 2-2.2: Manufacturer: TopSeed Tech Corp.
 
dmesg is actually saying the "not supported" thing when I plug other devices into the OTG port, including ones which work perfectly well. So that was probably a red herring. I've not managed to find out what it means.

Back on small transmitters: The idea I posted previously "with UART alone ... a gap between bursts blinks the LED at 9600Hz" does not work - 38kHz IR demodulators pick up too much of the 9600Hz too. That'll be why audio-based solutions can work then...
 
It looks like it might be a missing driver to me.  On your desktop, with the USB device plugged in, run 'lsusb -t' (lsusb comes from usbutils on my system, and was default installed).  Then, identifying the driver names there you can find out what .ko file that comes from using modinfo, which may also help in identifying the source for the driver.
 
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M(they are both for the IR thing)

"modinfo usbhid" says it's not found, though searching for that it seems other people get results from it...
 
Last edited by a moderator:
Probably because it's uchi_hid you need to look for.  I'm not sure why it refers to usb_hid on the second and third line to be honest - it seems to be one of the USB device types, and perhaps it's something the uchi_hid driver fulfils, but why it's listed like that I couldn't say.
 
uhci_hcd is the driver for the root_hub.

My mouse is listed as "Driver=usbhid" too. And "modinfo usbhid" is a reasonable command, e.g. here:
https://www.quora.com/What-happens-when-a-USB-device-is-connected-to-a-computer-running-Linux?share=1

This page has some suggestions but doesn't seem to be the whole story. The wifi dongle on my desktop behaves as described, but generic devices such as HID, CDC or mass storage seem to have various oddities.
http://unix.stackexchange.com/questions/60078/find-out-which-modules-are-associated-with-a-usb-device

Wifi dongle on desktop:

$ dmesg
...
[15508.605025] usb 1-2.4: new high-speed USB device number 14 using ehci-pci
[15508.707533] usb 1-2.4: New USB device found, idVendor=2001, idProduct=3c15
[15508.707540] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15508.707544] usb 1-2.4: Product: 11n Adapter
[15508.707548] usb 1-2.4: Manufacturer: D-Link
[15508.707551] usb 1-2.4: SerialNumber: 1.0
[15508.785039] usb 1-2.4: reset high-speed USB device number 14 using ehci-pci
[15508.881249] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5392, rev 0222 detected
[15508.909996] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5372 detected
[15508.910848] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[15510.035515] rt2800usb 1-2.4:1.0 wlp0s29f7u2u4: renamed from wlan0

$ readlink /sys/bus/usb/devices/1-2.4:1.0/driver
../../../../../../../bus/usb/drivers/rt2800usb

$ cat /sys/bus/usb/devices/1-2.4:1.0/modalias
usb:v2001p3C15d0101dc00dsc00dp00icFFiscFFipFFin00

$ modinfo rt2800usb
filename: /lib/modules/4.1.10-200.fc22.i686/kernel/drivers/net/wireless/rt2x00/rt2800usb.ko.xz
license: GPL
firmware: rt2870.bin
description: Ralink RT2800 USB Wireless LAN driver.
version: 2.3.0
author: http://rt2x00.serialmonkey.com
srcversion: 5400F26AA696F553BD61975
...
alias: usb:v2001p3C15d*dc*dsc*dp*ic*isc*ip*in*
...

$ modinfo usb:v2001p3C15d0101dc00dsc00dp00icFFiscFFipFFin00
(same thing)
Regular mouse on desktop:

Code:
$ dmesg
...
[16660.056030] usb 1-2.2: new low-speed USB device number 15 using ehci-pci
[16660.134811] usb 1-2.2: New USB device found, idVendor=413c, idProduct=3010
[16660.134818] usb 1-2.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[16660.141640] input: HID 413c:3010 as /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2.2/1-2.2:1.0/0003:413C:3010.0009/input/input11
[16660.143645] hid-generic 0003:413C:3010.0009: input,hidraw0: USB HID v1.00 Mouse [HID 413c:3010] on usb-0000:00:1d.7-2.2/input0

$ readlink /sys/bus/usb/devices/1-2.2:1.0/driver
../../../../../../../bus/usb/drivers/usbhid

$ cat /sys/bus/usb/devices/1-2.2:1.0/modalias
usb:v413Cp3010d0220dc00dsc00dp00ic03isc01ip02in00

$ modinfo usbhid
modinfo: ERROR: Module usbhid not found.

$ modinfo usb:v413Cp3010d0220dc00dsc00dp00ic03isc01ip02in00
modinfo: ERROR: Module usb:v413Cp3010d0220dc00dsc00dp00ic03isc01ip02in00 not found.
 
Last edited by a moderator:
OK, browsing through lsmod, it mentions one called hid_topseed which seems to be the one for the IR. There should have been some way to query for that...


And indeed it's not on the Pandora.

Code:
$ modinfo hid_topseed
filename:       /lib/modules/4.1.10-200.fc22.i686/kernel/drivers/hid/hid-topseed.ko.xz
license:        GPL
alias:          hid:b0003g*v000004F2p00000618
alias:          hid:b0003g*v00001784p00000004
alias:          hid:b0003g*v0000046Ep00005577
alias:          hid:b0003g*v0000046Ep00005578
alias:          hid:b0003g*v00000766p00000204
depends:        
intree:         Y
vermagic:       4.1.10-200.fc22.i686 SMP mod_unload 686 
signer:         Fedora kernel signing key
sig_key:        E1:AF:04:A0:D0:3C:20:D9:B5:E1:12:42:A2:7F:F0:45:02:55:58:7A
sig_hashalgo:   sha256
 
Last edited by a moderator:
Back
Top