Skip to main content

Messages

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

Messages - Simpkins

16
USB Infrared Toy / Re: IRToy crashing after a few send attempts
It has nothing to do with the double buffering. The double buffering works regardless of whether the artificial handshake is enabled or not. The strange handshaking just should not be required because USB has it own handshaking built in.

Anyway, no point in arguing when results speak for themselves.

I went into my copy of irtoy.exe and changed a single value from 64 (62 in older revisions?) to 512.  I ran the new irtoy.exe with the 512 byte packets and it worked with the bog standard irtoy firmware V22.

Code: [Select]
c:simmosoftwareIRToyRecPlaybinwindowsDebug>irtoy.exe -d COM
4 -p -v -f rec.bin_000.bin  -c -h off
-------------------------------------------------------------------------

 IR TOY Recorder/Player utility v21 (CC-0)

-------------------------------------------------------------------------
 Opening IR Toy on COM4 at 115200bps...
 IR Toy Firmware version: V222
 Entering IR sample mode ....  Done.
 IR Toy Protocol version: S01
 Current sample timer Resolution: 21.3333us
 Entering Player Mode
Playing single file rec.bin_000.bin
 Press a key to start playing rec.bin_000.bin or X to exit
 Handshake mode OFF. IR Toy ready for packet of 512 bytes
 Sending 144 Bytes to IRToy...

01A6  -00D6  001A  -001C  0019  -001C  0019  -001B
001B  -001B  0019  -001D  0018  -001C  001A  -001B
001A  -001C  0019  -0050  001A  -0050  001A  -0051
0019  -0050  001A  -0050  001B  -0050  0019  -001C
001A  -0050  001A  -001B  001A  -0051  0019  -0050
001A  -001C  0019  -0051  0019  -001D  0018  -001B
001B  -001B  001A  -004F  001B  -001B  001A  -001D
0018  -0051  0019  -001D  0018  -0050  001A  -0050
001A  -0052  0018  -0793  01A5  -006E  0018  -FFFF

 Checking # of bytes sent.... 144 bytes....ok.
 End of file reached: rec.bin_000.bin

Firmware reported 144 bytes received, file was 144 bytes Ok - Proceding!
 Transmit was successful and glitch free!

 Thank you for playing with the IR Toy! Utility version: v21.

Okay, it is clear that my copy of irtoy.exe has been somewhat reworked but most of that is cosmetic and it is the same protocol under the hood and there is no reason I can see why changing the non handshake chuck size  to 512 or larger will not work on the official irtoy source code that is in the irtoy package.
17
USB Infrared Toy / Re: IRToy crashing after a few send attempts
I'm pretty sure, in fact very sure, that irrefect.c was dropped ages ago and is not a required file. Looks like you have an out of date project file. You can try deleting that file from the project. Getting the source to compile should not be a major problem, what to do next,  hmm...

Edit! Doh, done in the meantime!


I really wonder if we may find that a more workable solution to fix this issue is to actually modify irtoy.exe to send the entire chunk in one big hit. I just don't know what the rational was with the handshake system and whether or not it should be used depends on who you listen to. The wiki says one thing but I have seen others here say it works better without it. I must say that I have no problems using irtoy.exe with or without the handshake but I am only now setting up with a RPi so I will see if that changes.
18
USB Infrared Toy / Re: convert LIRC file to IRToy raw commands
It would seem at the same time you found this I too was running the  same experiments and came up with exactly the same conclusions (almost!). The demod receiver does not like to be saturated and there is a happy medium for both IR chips to receive a nice signal to. However there was a slight difference in that in my tests I found the distance for my NEC IR remote to be more in the range of 6-9cm not inches. This distance probably changes a lot depending on the power of the IR LED. This is something that people can experiment with now that they know.

Nice work with all the images and details. Where's the forums thumbs-up thingy?
19
USB Infrared Toy / Re: convert LIRC file to IRToy raw commands
[quote author="zoulou"]

Btw. I noticed the bugfixed irtoy.exe records only 144 bytes, where the original recorded 152 bytes. But remember, the recorded NEXT key with 144 bytes works. I just wanted to mention this.
[/quote]

NEC protocol should return 136 bytes but as there is a repeat sequence 0.1 seconds after the button press it is more often the case that 144 bytes are returned. If you are tardy on the button then you get two repeats and therefore 152 bytes.  Get really slack and then it is 160, 168 etc.
20
USB Infrared Toy / Re: convert LIRC file to IRToy raw commands
Have a look at the very bottom of main.c.

This is what I have:

    #ifdef _WIN32
    Sleep(50);    // windows: Sleep for 2000 milliseconds
    #else
    sleep(2);    // linux: sleep for 2 secs
    #endif

I may have already shortened the windows delay, can't remember but I hope that is what you are looking for.
22
USB Infrared Toy / Re: convert LIRC file to IRToy raw commands
Remember, there are bugged versions of irtoy.exe out there that do not return the correct MSB value, it only sends back 0. There is a thread on this forum about it somewhere but I could not find it yet.
23
USB Infrared Toy / Re: Extra burst sent after IR
Yeah I agree that that has to be it. A 109ms delay is coded in the firmware to replace the 0XFFFF but it is meant to occur on the space not the mark part. If it happens on the mark then the PWM is enabled for the delay period as it is simply toggled between mark and space in the firmware after each 16-bit word. The .bin file should always be a multiple of 4 in length, including the terminator.
24
USB Infrared Toy / Re: What chip is can I use on v3?
Glad you edited. I was getting ready for a fight. :)

13052 out of 33048 program addresses used, program memory utilization is 39%  + 2KB worth of bootloader.

The firmware hex file I have here, which I believe is the official supplied V22 firmware, is 15.9K long (based on the last used rom address) already so you would want to be betting on any new firmware getting smaller, not larger.

Then there is the problem that the last page of the j-series cannot be used "in practice" because the config words are stored there and cannot be "safely" erased by the bootloader. That is a whole 1KB gone.

You could rearrange the code so the bootloader is loaded high and save (gain) 1KB but it is really getting much harder.

For a few penny more the 18F25J50 is looking gooder. :)
25
USB Infrared Toy / Re: What chip is can I use on v3?
Any of these are better though as the 24J50 may not have enough memory for the full firmware.

18F25J50
18F26J50
18F26J53
18F27J53

In any case  you will have to modify the firmware and that is not easy if you do not understand USB and maybe the PPS as well.

( ! ) 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.01362374000session_write_close ( )...(null):0
20.01392505624ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01392506400Database_MySQL->query( ).../DatabaseHandler.php:119
40.05942645160Database_MySQL->error( ).../Db-mysql.class.php:273