Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - Joker

2
USB Infrared Toy / Ubuntu 17.04 behaviour and possible warning
I've upgraded from Ubuntu 16.10 to 17.04, which is the first Ubuntu version including LIRC 0.9.4c-9,
that includes support for IRToy out of the box.

After booting, the LED was always ON and a quick check revealed, that the device was put in flash
mode having USB ID 04D8:FD0B instead of the normal operation mode 04D8:FD08.

Power cycling / re-pluging did not reactivate the device and i had to use the fw_update tool to perform
a reset. The first time i reflashed the firmware because i thought it was broken but the 2nd time i only
did a read:

./fw_update -r -v -m flash -vid 0x04d8 -pid 0xfd0b -ix USBIRToy.v24.hex

The suggested command from the website "fw_update -reset -vid 0x04D8 -pid 0xFD0B" did not work
and just gives "At least one command must be specified" as an error, so i though a simple read operation
would be the least intrusive way, because all i needed was the reset function.

Now here's the nasty part. After disabling every LIRC service (about 3-4) within systemd other than the main
lircd.service this behaviour went away and the device wasn't semi-bricked on every reboot. Also, just manually
starting the LIRC daemon with the right option would also work fine. So it must be some additional LIRC related
service or socket activation or whatever.

This behaviour was reproduceable with 2 different otherwise fully working IRToy devices. I highly doubt this
is the fault of the hardware.

Since the Ubuntu LIRC packages are probably just imported from Debian, it could affect other systems too.
4
USB Infrared Toy / Re: Linux Lirc (usb_irtoy driver) device stops responding
While the error remains the same with firmware 21 22 and 23, at least with
firmware 23 i notice a werid state when it locks

~# lsusb -v -d 04d8:fd08
[...]
Device Status:    0xffff
  Self Powered
  Remote Wakeup Enabled
  Test Mode
  Debug Mode

While its working it's always this:
Device Status:    0x0000
  (Bus Powered)

I notice others had this issue too but i think i've only noticed the Status change.
It locks with all firmwares i've tried (21,22,23) but this could be the case only with 23.
recently.
6
USB Infrared Toy / Re: IR Toy V2 not working on Ubuntu 13.04 amd64
I could not use the lirc irman driver either. All i've got was that no gap found error.

However what worked (at least initialy, see this forum) was using the usb_irtoy driver
 which requires a patched lirc though. For example this one here:
https://github.com/OpenELEC/OpenELEC.tv ... rtoy.patch

Some distros seem to patch it in already others don't. If you're good at building sources yourself, give
it a try.
7
USB Infrared Toy / Re: Linux Lirc (usb_irtoy driver) device stops responding
Virtually replugging the USB device using "ioctl(fd, USBDEVFS_RESET, 0)" on the device also works.

While this is easier than hardware based re-plugging, it's not suitable for automated use, because
lircd dies and requires restarting too. This would result in nasty hacks unless it's called from within
the usb_irtoy driver itself.
8
USB Infrared Toy / Linux Lirc (usb_irtoy driver) device stops responding
The device stops responding after a certain amount of successful operations.
When reaching that state only a replug will fix it. Restarting the lirc daemon is not enough.

I first suspected some usb suspend but i noticed it was set off for that
device. To be sure i booted with "usbcore.autosuspend=-1" kernel parameters.
Also the amount of irsend requests seem more related to the problem than
idle time.

Flashing firmware (v22), learning from a remote and similar operations worked
just fine. After 6-15 times calling irsend it locks up and lircd dies off.

I suspeced some bad code in lircd at first, but the fact that a device replug
is required, tells me that it's not  in the daemon (it's just handling the event
not gracefully enough).

lirc test client (executed with 1-2s pauses):
~ # irsend SEND_ONCE PHILIPS_26PFL5604H Power
~ # irsend SEND_ONCE PHILIPS_26PFL5604H Power
~ # irsend SEND_ONCE PHILIPS_26PFL5604H Power
~ # irsend SEND_ONCE PHILIPS_26PFL5604H Power
~ # irsend SEND_ONCE PHILIPS_26PFL5604H Power
~ # irsend SEND_ONCE PHILIPS_26PFL5604H Power
~ # irsend SEND_ONCE PHILIPS_26PFL5604H Power
(exit code 1 here)

lircd server daemon output:
---------------------------------
 # /usr/sbin/lircd -n -P /var/run/lirc/lircd.pid
lircd-0.9.0[9471]: lircd(usb_irtoy) ready, using /var/run/lirc/lircd
lircd-0.9.0[9471]: accepted new client on /var/run/lirc/lircd
lircd-0.9.0[9471]: removed client
lircd-0.9.0[9471]: accepted new client on /var/run/lirc/lircd
lircd-0.9.0[9471]: removed client
lircd-0.9.0[9471]: accepted new client on /var/run/lirc/lircd
lircd-0.9.0[9471]: removed client
lircd-0.9.0[9471]: accepted new client on /var/run/lirc/lircd
lircd-0.9.0[9471]: removed client
lircd-0.9.0[9471]: accepted new client on /var/run/lirc/lircd
lircd-0.9.0[9471]: removed client
lircd-0.9.0[9471]: accepted new client on /var/run/lirc/lircd
lircd-0.9.0[9471]: removed client
lircd-0.9.0[9471]: accepted new client on /var/run/lirc/lircd
lircd-0.9.0[9471]: irtoy_getversion: couldn't read version
lircd-0.9.0[9471]: please make sure you are using firmware v20 or higher
lircd-0.9.0[9471]: usb_irtoy: No USB Irtoy device found at /dev/ttyACM0
lircd-0.9.0[9471]: Failed to initialize hardware
lircd-0.9.0[9471]: select() failed
lircd-0.9.0[9471]: Bad file descriptor
Segmentation fault

GDB Output of lircd:
------------------------
Program received signal SIGTERM, Terminated.
0x00007ffff7a69235 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7a69235 in raise () from /lib64/libc.so.6
#1  0x0000000000406eed in waitfordata (maxusec=maxusec@entry=0) at lircd.c:1938
#2  0x000000000040761f in loop () at lircd.c:2022
#3  0x0000000000402839 in main (argc=<optimized out>, argv=0x7fffffffdd08) at lircd.c:2299

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01462353704session_write_close ( )...(null):0
20.01502485280ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01502486056Database_MySQL->query( ).../DatabaseHandler.php:119
40.05712624776Database_MySQL->error( ).../Db-mysql.class.php:273