Snapstream Firefly

From MythTV Official Wiki
Jump to: navigation, search

Snapstream Firefly Remote (RF, USB, full size)

Snapstreamfirefly.jpg

This unit is no longer available.

Vendors Support Website: http://www.snapstream.com/support/firefly/default.asp

Support Status: USB RF Receiver Supported

There are two version of this remote. The original full size rf firefly remote and the new Snapstream firefly mini remote that is IR based. This guide is for the rf version.

Description

USB Remote intended for Media Center PCs

On a personal note I was very impressed with this remote. Line of sight is a non-issue. I did some testing and the remote can control my frontend through 3 walls and a ceiling with no problem. Instant responsiveness without any missed button presses and the layout/feel of the remote is excellent. Plenty of extra buttons to go around is also a plus.

Issues and Problems

It is increasingly difficult to interface this class of device with the LIRC module, probably because the package is not being well maintained and does not work well with the later kernels and SELinux configurations. It now probably makes better sense to let the system configure the unit as a keyboard and set the keybindings in MythTV to suit the button codes. Only about half of the buttons are implemented in the current kernel driver but this is enough to make it work in a useful fashion. This has the problem that MythTV must have the window focus to receive the keyboard input which can be inconvenient on a dual monitor system where other applications may be used at the same time as MythTV.

Note: Effective Kernel 2.6.27 and higher - The module lirc_atiusb has been deprecated in Fedora and other distributions. You must use the userspace driver atilibusb instead. Ubuntu 9.10 apparently still uses the lirc_atiusb driver.

RFI: Some computers produce large amounts of radio frequency interference (RFI) which can interfere with the operation of these remotes as well as other wireless equipment. Try to mount the receiver as far from the computer as the wire can reach. If the operation of the remote is erratic, try holding the remote right next to the receiver antenna. If this works better, there is probably an RFI problem. Installing clip-on ferrite chokes on all of the wires coming out of the computer which do not already have them (those cylindrical lumps in the wires) can fix the problem or make a significant improvement. Search Amazon under "electronics" for "ferrite choke" and there should be many available. It is usually possible to buy bags of 10 for a few dollars. Use 9mm for 3/8" wires, 7mm for 1/4" wires. These devices open up so that the wire can be laid through the center. They are sometimes shipped in a closed position so that the two small latches must be released with fingernails or a small screwdriver to open them up for installation.

Associated Software

Lirc: http://www.lirc.org/

Installation guide for Ubuntu 9.10

Here are the directions for setting up the Snapstream Firefly Remote with lirc using lirc_atiusb driver in Ubuntu 9.10.

1. Install the lirc package (using Synaptic, Aptitude, or just "sudo apt-get install lirc"). When the configuration screen comes up, select "ATI/NVidia/X10 I & II RF Remote" as the receiver driver and none as the transmitter driver.
2. Edit /etc/lirc/lircd.conf to remove the auto-configured "include" line and add the contents of the lircd.conf file for lirc_atiusb driver.
3. Restart the lircd daemon (or just reboot the computer). Run "irw" and press buttons on your remote. You should see output for each button. Press <ctrl>-c to exit.
4. For MythTV users, create the /home/username/.mythtv/lircrc file shown above.

Installation guides for Fedora Core(using atilibusb driver)

With the recent kernels, the Human Interface Device (HID) system spots USB remote controls and tries to make keyboards out of them. This is probably a good idea but at present, only about half of the keys are implemented. There is also the more fundamental problem that the application must have the desktop focus to receive keyboard input and that might not always be the case for MythTV running on a multipurpose system. It is generally better to “blacklist” the “ati_remote” module, which prevents the keyboard implementation from running, and let LIRC handle the remote using the “atilibusb” driver. It is also possible to use the HID device with LIRC using the “devinput” driver but this is more involved to set up. If getting LIRC set up proves to be difficult, remove the "blacklist" of the ATI_remote module and let the system set it up as a keyboard. MythTV can then be configured to work with the available buttons using the "Setup/Edit Keys" function.

The following description no longer works as written on the later releases but can be a basis for setting up the LIRC interface.If you are not up to working with the system configuration, let it run as a keyboard.

As of Fedora 22, the installation procedure is as follows:

Run the "Software" utility from the "System Tools" menu and search for "lirc". Install the "lirc" package. If you want to work with source code that uses the package, install "lirc-devel".

Open a command terminal and get a root log-in shell with the command “su -l” (“su -” is actually sufficient). Enter the root password when requested. Execute the command “gedit” to open the graphic text editor with root privileges. Open the file “/etc/lirc/lirc_options.conf”. Change:

driver   =  default

to

driver   =  atilibusb

Save the file.

Open the file “/etc/modprobe.d/blacklist.conf”. Add a line at the bottom of the file:

blacklist ati_remote

Save the file.

If this file does not exist, create a new file with only the one line of text and save it under the above name.

Open the file “/etc/lirc/lircd.conf”, delete all of its contents and then paste in the contents of the 'lircd.conf” file specified below. Save the file. Note that if you replace this file with a new one, you will probably run afoul of SELinux but the fix is described below. You are really supposed to put this file in "/etc/lirc/lirc.conf.d" and let it be included but this will cause further problems with SELinux.

Close the text editor. Enter the command;

systemctl enable lircd.socket

This sets the LIRC “daemon” up to start during the boot process.

Execute the command “exit” to log out of the root shell and close the terminal window. Now restart the system.

Log into the account where you will run the MythTV front end and run it if you have not done so previously to initialize the configuration, then close it. Run the text editor from the “Accessories” menu and paste the contents of the “lircrc” file below into the editor. Save it as “.mythtv/lircrc”. Note the period in front of “mythtv” (This is a “hidden” directory). Close the editor.

Open a command terminal, execute the command “irw” and press keys on the remote. The key codes should appear on the terminal display. If it responds to the arrow keys with odd symbols but ignores the other keys, check your setup of the "/etc/modprobe.d/blacklist.conf" file. Press “Ctrl-C” to terminate the program. Close the command terminal. Now run “mythfrontend” again and verify that it responds to the remote control.

If you have a problem, open a root shell in a terminal as above and run:

journalctl --no-pager | grep lircd | less

Press the "End" key to go to the end of the file and the "B" key to back up through the most recent messages.

If you see stuff about SELinux blocking access to the "lircd.conf" configuration file, run (as root):

/sbin/restorecon -v /etc/lirc/lircd.conf

If you see SELinux blocking the "unix_stream_socket", execute the two commands:

grep lircd /var/log/audit/audit.log | audit2allow -M mypol
semodule -i mypol.pp

If it says that it can't access "/dev/lirc0", check the driver configuration in "/etc/lirc/lirc_options.conf".

lircd.conf (atilibusb driver(current standard in Fedora)


# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.4a(atilibusb) on Mon Nov 24 14:58:45 2008
#
# contributed by 
#
# brand:                       lircd.conf
# model no. of remote control: 
# devices being controlled by this remote:
#

begin remote

  name  lircd.conf
  bits           16
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   8
  pre_data       0x14
  post_data_bits  16
  post_data      0x0
  gap          147992
  min_repeat      5
  toggle_bit_mask 0x80800000

      begin codes
          MAXI                     0x812C
          MAXI                     0x01AC
          CLOSE                    0x5702
          CLOSE                    0xD782
          1                        0x620D
          1                        0xE28D
          2                        0x630E
          2                        0xE38E
          3                        0x640F
          3                        0xE48F
          4                        0x6510
          4                        0xE590
          5                        0x6611
          5                        0xE691
          6                        0x6712
          6                        0xE792
          7                        0x6813
          7                        0xE893
          8                        0x6914
          8                        0xE994
          9                        0x6A15
          9                        0xEA95
          0                        0x6C17
          0                        0xEC97
          BACK                     0x6B16
          BACK                     0xEB96
          ENT                      0x6D18
          ENT                      0xED98
          VOL+                     0x5E09
          VOL+                     0xDE89
          VOL-                     0x5D08
          VOL-                     0xDD88
          MUTE                     0x5F0A
          MUTE                     0xDF8A
          FIREFLY                  0x5500
          FIREFLY                  0xD580
          CH+                      0x600B
         CH+                      0xE08B
          CH-                      0x610C
          CH-                      0xE18C
          INFO                     0x832E
          INFO                     0x03AE
          OPTION                   0x842F
          OPTION                   0x04AF
          UP                       0x6F1A
          UP                       0xEF9A
          LEFT                     0x721D
          LEFT                     0xF29D
          DOWN                     0x7722
          DOWN                     0xF7A2
          RIGHT                    0x741F
          RIGHT                    0xF49F
          OK                       0x731E
          OK                       0xF39E
          MENU                     0x711C
          MENU                     0xF19C
          EXIT                     0x7520
          EXIT                     0xF5A0
          REC                      0x7C27
          REC                      0xFCA7
          PLAY                     0x7A25
          PLAY                     0xFAA5
          STOP                     0x7D28
          STOP                     0xFDA8
          REW                      0x7924
          REW                      0xF9A4
          FWD                      0x7B26
          FWD                      0xFBA6
          PREV                     0x802B
          PREV                     0x00AB
          PAUSE                    0x7E29
          PAUSE                    0xFEA9
          NEXT                     0x7F2A
          NEXT                     0xFFAA
          MUSIC                    0x5B06
          MUSIC                    0xDB86
          PHOTOS                   0x5A05
          PHOTOS                   0xDA85
          DVD                      0x5904
          DVD                      0xD984
          TV                       0x5803
          TV                       0xD883
          VIDEO                    0x5C07
          VIDEO                    0xDC87
          HELP                     0x5601
          HELP                     0xD681
          MOUSE                    0x822D
          MOUSE                    0x02AD
          A                        0x6E19
          A                        0xEE99
          B                        0x701B
          B                        0xF09B
          C                        0x7621
          C                        0xF6A1
          D                        0x7823
          D                        0xF8A3
      end codes

end remote


Lirc_Atiusb Driver(Ubuntu(as of 9.10), deprecated in Fedora)

Credit for firefly installation goes to FedoraFitz in this thread: http://www.fedoraforum.org/forum/showthread.php?p=443661

Here are the directions for setting up the Snapstream Firefly Remote with lirc using Fedora Core using lirc_atiusb driver

1. Plug in the USB reciever
2. Type in "lsmod"
3. You should see a module called "lirc_atiusb" this actually the module for the ATI USB Wonder remote, but we'll use it anyway
4. Please look below and copy the contents of the lircd.conf config file to /etc/lircd.conf
5. You will notice that each button has two entries, this is because the firefly remote alternates between key codes everytime you press a button, so when I first used irrecord to record the buttons and had my lircd.conf file set up it would only work every other time I pushed a button. So I re-ran irrecord for my remote and made two entries for each button.
6. start the lircd daemon
7. Run "irw" and press buttons on your remote you should see output for each button.
8. For MythTV users Make your /home/username/.mythtv/lircrc file (listed below)
9. If this does not work for you I suggest using irrecord and create your own lircd.conf file. Remember to program each button twice to get the alternating key codes


lircd.conf (lirc_atiusb driver, works for Ubuntu 9.10)

# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.7.0(lirc_atiusb) on Fri Mar 11 08:51:45 2005
#
# contributed by
#
# brand: Snapstream Firefly Remote
# model no. of remote control:
# devices being controlled by this remote:
#

begin remote

name Snapstream Firefly
bits 40
eps 30
aeps 100
one 0 0
zero 0 0
gap 219964
toggle_bit 0


begin codes
MAXI 0x0000001481AC0000
MAXI 0x00000014012C0000
CLOSE 0x00000014D7020000
CLOSE 0x0000001457820000
1 0x00000014628D0000
1 0x00000014E20D0000
2 0x00000014E30E0000
2 0x00000014638E0000
3 0x00000014648F0000
3 0x00000014E40F0000
4 0x00000014E5100000
4 0x0000001465900000
5 0x0000001466910000
5 0x00000014E6110000
6 0x00000014E7120000
6 0x0000001467920000
7 0x0000001468930000
7 0x00000014E8130000
8 0x00000014E9140000
8 0x0000001469940000
9 0x000000146A950000
9 0x00000014EA150000
0 0x00000014EC170000
0 0x000000146C970000
BACK 0x000000146B960000
BACK 0x00000014EB160000
ENT 0x00000014ED180000
ENT 0x000000146D980000
VOL+ 0x000000145E890000
VOL+ 0x00000014DE090000
VOL- 0x000000145D880000
VOL- 0x00000014DD080000
MUTE 0x000000145F8A0000
MUTE 0x00000014DF0A0000
FIREFLY 0x0000001455800000
FIREFLY 0x00000014D5000000
CH+ 0x00000014608B0000
CH+ 0x00000014E00B0000
CH- 0x00000014618C0000
CH- 0x00000014E10C0000
INFO 0x0000001483AE0000
INFO 0x00000014032E0000
OPTION 0x0000001484AF0000
OPTION 0x00000014042F0000
UP 0x000000146F9A0000
UP 0x00000014EF1A0000
LEFT 0x00000014729D0000
LEFT 0x00000014F21D0000
DOWN 0x0000001477A20000
DOWN 0x00000014F7220000
RIGHT 0x00000014749F0000
RIGHT 0x00000014F41F0000
OK 0x00000014739E0000
OK 0x00000014F31E0000
MENU 0x00000014719C0000
MENU 0x00000014F11C0000
EXIT 0x0000001475A00000
EXIT 0x00000014F5200000
REC 0x00000014FC270000
REC 0x000000147CA70000
PLAY 0x00000014FA250000
PLAY 0x000000147AA50000
STOP 0x00000014FD280000
STOP 0x000000147DA80000
REW 0x00000014F9240000
REW 0x0000001479A40000
FWD 0x00000014FB260000
FWD 0x000000147BA60000
PREV 0x00000014002B0000
PREV 0x0000001480AB0000
PAUSE 0x00000014FE290000
PAUSE 0x000000147EA90000
NEXT 0x00000014FF2A0000
NEXT 0x000000147FAA0000
MUSIC 0x00000014DB060000
MUSIC 0x000000145B860000
PHOTOS 0x00000014DA050000
PHOTOS 0x000000145A850000
DVD 0x00000014D9040000
DVD 0x0000001459840000
TV 0x00000014D8030000
TV 0x0000001458830000
VIDEO 0x00000014DC070000
VIDEO 0x000000145C870000
HELP 0x00000014D6010000
HELP 0x0000001456810000
MOUSE 0x00000014022D0000
MOUSE 0x0000001482AD0000
A 0x00000014EE190000
A 0x000000146E990000
B 0x00000014F01B0000
B 0x00000014709B0000
C 0x00000014F6210000
C 0x0000001476A10000
D 0x00000014F8230000
D 0x0000001478A30000

end codes

end remote

lircrc for the Firefly

You may want to adjust the repeat to 5 for the atilibusb, as it is more sensitive.

# ~/.mythtv/lircrc
#
# MythTV native LIRC config file for
# the new grey Hauppauge remote
#
# Modified from Jarod Wilson's which came from Jeff Campbell's
# By Brad Templeton
#
# Modified again to use the Firefly remotes unique buttons by Ryan Schmitz
#
#
# Here we have the jump point commands.  They only work if you have
# defined function keys for these jump points.
#
# You can set the jump point commands in Mythweb under Settings > Key Bindings as follows:
# F8 Main Menu
# F3 Program Guide
# F5 TV Recording Playback
# F7 Play DVD
# F6 MythGallary
# F4 Play Music
# F2 MythVideo


begin
prog = mythtv
button = FIREFLY
repeat = 3
config = F8
end

begin
prog = mythtv
button = TV
repeat = 3
config = F5
end

begin
prog = mythtv
button = VIDEO
repeat = 3
config = F2
end

begin
prog = mythtv
button = MUSIC
repeat = 3
config = F4
end

begin
prog = mythtv
button = PHOTOS
repeat = 3
config = F
end

begin
prog = mythtv
button = DVD
repeat = 3
config = F7
end

begin
prog = mythtv
button = HELP
repeat = 3
config = F1
end

begin
prog = mythtv
button = UP
repeat = 3
config = Up
end

begin
prog = mythtv
button = DOWN
repeat = 3
config = Down
end

begin
prog = mythtv
button = LEFT
repeat = 3
config = Left
end

begin
prog = mythtv
button = RIGHT
repeat = 3
config = Right
end

# Channel Up
begin
prog = mythtv
button = CH+
repeat = 3
config = Up
end

# Channel Down
begin
prog = mythtv
button = CH-
repeat = 3
config = Down
end

# OK/Select
begin
prog = mythtv
button = OK
config = Space
end

# OK/Select
begin
prog = mythtv
button = ENT
config = Space
end

# Play
begin
prog = mythtv
button = Play
config = Return
end

# Stop
begin
prog = mythtv
button = Stop
config = I
end

# Escape/Exit/Back
begin
prog = mythtv
button = BACK
config = Esc
end

# Power Off/Exit
begin
prog = mythtv
button = CLOSE
config = Esc
end

# Escape/Exit/Back
begin
prog = mythtv
button = EXIT
config = Esc
end

# Pause
begin
prog = mythtv
button = Pause
repeat = 3
config = P
end

# Mute
begin
prog = mythtv
button = Mute
repeat = 3
config = |
end

# Fast forward (30 sec default)
begin
prog = mythtv
button = REW
repeat = 3
config = PgUp
end

# Rewind (10 sec default)
begin
prog = mythtv
button = FWD
repeat = 3
config = PgDown
end

# Skip forward (10 min default)
begin
prog = mythtv
button = NEXT
repeat = 3
config = End
end

# Skip backward (10 min default)
begin
prog = mythtv
button = PREV
repeat = 3
config = Home
end

# Record
begin
prog = mythtv
button = REC
repeat = 3
config = R
end

# Delete
begin
prog = mythtv
button = A
repeat = 3
config = D
end

# Decrease play speed
begin
prog = mythtv
button = B
repeat = 3
config = J
end

# double speed watch
begin
prog = mythtv
button = C
repeat = 3
config = J
end

# Bring up Time stretch
begin
prog = mythtv
button = D
repeat = 3
config = Y
end

change tuners
begin
prog = mythtv
button = OPTION
repeat = 3
config = Y
end

# Display EPG while in live TV,
# View selected show while in EPG
begin
prog = mythtv
button = MENU
repeat = 3
config = M
end

# Scroll up
begin
prog = mythtv
button = VOL+
repeat = 3
config = F11
end

# Scroll down
begin
prog = mythtv
button = VOL-
repeat = 3
config = F10
end

# Bring up OSD info
begin
prog = mythtv
button = INFO
repeat = 3
config = I
end

# Change display aspect ratio
begin
prog = mythtv
button = CH-
repeat = 3
config = W
end

# Numbers 0-9

begin
prog = mythtv
button = 0
repeat = 3
config = 0
end

begin
prog = mythtv
button = 1
repeat = 3
config = 1
end

begin
prog = mythtv
button = 2
repeat = 3
config = 2
end

begin
prog = mythtv
button = 3
repeat = 3
config = 3
end

begin
prog = mythtv
button = 4
repeat = 3
config = 4
end

begin
prog = mythtv
button = 5
repeat = 3
config = 5
end

begin
prog = mythtv
button = 6
repeat = 3
config = 6
end

begin
prog = mythtv
button = 7
repeat = 3
config = 7
end

begin
prog = mythtv
button = 8
repeat = 3
config = 8
end

begin
prog = mythtv
button = 9
repeat = 3
config = 9
end
### MPlayer lirc setup

# Show OSD
begin
prog = mplayer
button = MENU
repeat = 3
config = osd
end

# Pause playback
begin
prog = mplayer
button = PAUSE
repeat = 3
config = pause
end

# Skip ahead a minute if playing
# If paused, resume playing
begin
prog = mplayer
button = PLAY
repeat = 3
config = seek +1
end

# Stop playback and exit
begin
prog = mplayer
button = Back
repeat = 3
config = quit
end

# Stop playback and exit
begin
prog = mplayer
button = EXIT
repeat = 3
config = quit
end

# Stop playback and exit
begin
prog = mplayer
button = CLOSE
repeat = 3
config = quit
end

# Mute
begin
prog = mplayer
button = MUTE
repeat = 3
config = mute
end

# Seek back 10 seconds
begin
prog = mplayer
button = LEFT
repeat = 3
config = seek -7
end

# Seek forward 30 seconds
begin
prog = mplayer
button = RIGHT
repeat = 3
config = seek +30
end

# Seek forward 10 minutes
begin
prog = mplayer
button = NEXT
repeat = 3
config = seek +600
end

# Seek backward 10 minutes
begin
prog = mplayer
button = PREV
repeat = 3
config = seek -600
end

# Toggle full-screen
begin
prog = mplayer
button = OPTION
repeat = 3
config = vo_fullscreen
end

# Toggle full-screen
begin
prog = mplayer
button = MAXI
repeat = 3
config = vo_fullscreen
end

### Xine lirc setup

begin
prog = xine
button = PLAY
repeat = 3
config = Play
end

begin
prog = xine
button = STOP
repeat = 3
config = Stop
end

begin
prog = xine
button = BACK
repeat = 3
config = Quit
end

begin
prog = xine
button = EXIT
repeat = 3
config = Quit
end

begin
prog = xine
button = CLOSE
repeat = 3
config = Quit
end

begin
prog = xine
button = PAUSE
repeat = 3
config = Pause
end

begin
prog = xine
button = UP
repeat = 3
config = EventUp
end

begin
prog = xine
button = DOWN
repeat = 3
config = EventDown
end

begin
prog = xine
button = LEFT
repeat = 3
config = EventLeft
end

begin
prog = xine
button = RIGHT
repeat = 3
config = EventRight
end

begin
prog = xine
button = OK
repeat = 3
config = EventSelect
end

begin
prog = xine
button = ENT
repeat = 3
config = EventSelect
end

begin
prog = xine
button = OPTION
repeat = 3
config = Menu
end

begin
prog = xine
button = FFW
repeat = 3
#config = SpeedFaster
config = SeekRelative+60
end

begin
prog = xine
button = REW
repeat = 3
#config = SpeedSlower
config = SeekRelative-60
end

begin
prog = xine
button = VOL+
repeat = 3
config = Volume+
end

begin
prog = xine
button = VOL-
repeat = 3
config = Volume-
end

begin
prog = xine
button = MUTE
repeat = 3
config = Mute
end

begin
prog = xine
button = MENU
repeat = 3
config = RootMenu
end

begin
prog = xine
button = NEXT
repeat = 3
config = EventNext
end

begin
prog = xine
button = PREV
repeat = 3
config = EventPrior
end

begin
prog = xine
button = INFO
repeat = 3
config = OSDStreamInfos
end