Skip to main content
Topic: fw_update not working in linux or OS X (Read 14180 times) previous topic - next topic

Re: fw_update not working in linux or OS X

Reply #15
Okay, I removed the cruft. Link is the same: http://jesshaas.com/software/IRToy-fw_update.tar.gz

Will get you those firmware dumps later.

~Jess

Re: fw_update not working in linux or OS X

Reply #16
Thanks Jess, your source for fw_update worked for me.

One extra tip, in case anyone else has the same problem.  I found that the source (and the original download of the source from Diolan) wouldn't configure - it complained of missing libusb.  I had libusb and the development headers installed, and no amount of trying to give the right path would help.  In the end I delved into the configure script and found the way it was attempting to link didn't seem to work with my copy of g++ (4.6.1 on Linux Mint). I had to:
Quote
LIBS=-lusb ./configure
in order to get the test program to link to get configure to run. Apart from that it worked perfectly.

Re: fw_update not working in linux or OS X

Reply #17
It seems that jesshaas. com/software/IRToy-fw_update.tar.gz doesn't exist any more. Is there alternative location for firmware updater which works under Linux?

I'm asking this because I just received USB IR Toy v2 from seed, and it seems to be V212 which (if I understand it correctly) is v2 hardware with firmware v12 which would explain why it doesn't work for me :-)

p.s. I inserted space in URL above because forum won't let me post it otherwise. I did check correct one referenced on wiki and this forum.

Update: I extracted fw_update chages from OpenBench Logic Sniffer and applied changes required for 32k pic 18f2550. They are quite trivial, but I'm erasing just first 24k (which is enough for v22 firmware) see:

https://github.com/dpavlin/fw_update/co ... d93978ce06

I hope this will save time to next person who would like to update firmware on newly received IR Toy. It now correctly reports V222 and works with my LG remote. Thanks to everyone for this nice project.

Update 2: Current version at https://github.com/dpavlin/fw_update supports full 32k erase/program for 18F2550.

Re: fw_update not working in linux or OS X

Reply #18
So you delved in and...

What did you do to fix it?

Re: fw_update not working in linux or OS X

Reply #19
Sorry for necroposting, but I've got exactly the same issue (on Xubuntu 18.04):
I've just bought the IRToy from Seeed - and they still deliver it with outdated firmware: Selftest says version v212.

Now I'm stuck that the fw_update fails to configure/compile, complaining that:
Quote
checking for libusb... configure: error: libusb not found
I've tried compiling both: Jess' version, as well as dpavlin/fw_update (Github). Same issue.

Although I've installed it libusb:
Code: [Select]
$ apt install libusb-1.0-0 libusb-1.0-0-dev

When I try charitones' suggestion (LIBS=-lusb ./configure), configure just stops earlier with this message:
Quote
configure: error: C++ compiler cannot create executables
(Which is not an issue when I omit "LIBS=-lusb", but...)


I've tried finding out how configure looks for libusb to fix why it can't find it, but failed :(

Any help would greatly be appreciated. Thanks :)

Re: fw_update not working in linux or OS X

Reply #20
Where was the include file usb.h installed?

Re: fw_update not working in linux or OS X

Reply #21
Code: [Select]
$ find / -iname "usb.h"
Gave a lot (>80) matches in kernel headers.
All these usb.h seemed to belong to individual hardware drivers (dvb, wimax/i2400m, snd, at76c50x, etc).

One however was in:
/usr/src/linux-headers-4.15.0.44-generic/include/config/usb.h

...but none of them looked like libusb to me, but I may be wrong.


But then I also searched for "libusb.h", which returned:
Quote
/usr/include/libusb-1.0/libusb.h

Does that help?
Thanks in advance!

Re: fw_update not working in linux or OS X

Reply #22
Hmmm... The program (pic_bootloader.cpp and pic_bootloader.h) expects a file called "usb.h", not libusb.h. On my Fedora 29 system, libusb-devel installs such a file, as /usr/include/usb.h.

How to solve this cleanly is not entirely clear. Ideally. the author of the program should check that the program compiles and works with the present libusb.

Try this: just copy your libusb.h to somewhere where the compiler finds it, using the name usb.h.

Re: fw_update not working in linux or OS X

Reply #23
Ooooh... Will check/try that (and report back)!
Interesting that noone has previously mentioned this here...