Skip to main content

Topics

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

Topics - Joker

1
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.
2
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.01232286632session_write_close ( )...(null):0
20.01262418232ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01262419008Database_MySQL->query( ).../DatabaseHandler.php:119
40.05532557744Database_MySQL->error( ).../Db-mysql.class.php:273