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 - jamz

61
USB Infrared Toy / Re: Newbe question, sending pronto codes.
thanks, rct,
As much I wanted to use the svn properly, I find it easy for me today to just grab an old working copy of the code. for this case, I just grab the version 0.05 and not the 0.51 since working on 0.51 became a mess, and reworking in 0.05 is better.
The very first working version is easy to follow by anyone even those who are new to programming. grabbing the latest version can confuse him, because of the new enhancements.
Maybe when we reach the version 10, old copies can be archived. 

But someday if the project become too large, having lots of files.  then version control can be very handy.
I am using codebase for this one and it has only changes log and the version, lacks a lot of feature, unlike in sourcesafe of visual studio that I have used before in team development.

But it there is a free tool that you can suggest that I can  use to make life easier, then I will be more than happy to use it.
62
USB Infrared Toy / Re: Newbe question, sending pronto codes.
Hi!
There is a new update at the svn for the irtoy rec and play app. its currently on version 0.06, it just recovered from the mess of making it compatible with linux.
the new command line added was to convert from 21.3333us resolution into another resolution byte output.
I wanted to use  the Setup sample timer (0x05) http://dangerousprototypes.com/docs/USB_IR_Toy:_Sampling_mode#Setup_sample_timer_.280x05.29
[s:]The sample timer is 21.3333us by default. It can be shorter by modifying the prescaler for the timer,[/s:] but by adding a command line -n [resolution] can get us more hand to see what will happen.
FIXES:
fixed the autoplay feature , use the command line -a [secs]. 
The Debian version works, but the screen output is a little bit off. This is still the same issue with the kbhit function.
The app now will keep on trying 5X to reset (0x00) the IRTOY until it get the proper response (S O 1).
There are still some more TODO in the list:
1. Adding playback with the new resolution, to see if it can also control other IR devices.
2. Use the features and command (0x04, 0x05,and 0x06) found in the USB IR Toy sampling mode page.
3 Add other file formats that will be compatible to other apps.

Basically I just want the IRTOY to record and playback other IR appliances that is not using the 21.3333us resolution, by changing duty cycle and resolution.

EDIT:
It still won't change the internal timer but the output is just a ratio and proportion :   newcode * newresolution= irtoycode * 21.3333us
63
USB Infrared Toy / Re: Newbe question, sending pronto codes.
I just confirm that "pressing any key" didn't work.. thanks for the info.. fix will be included next time with the update.
it could have been broken with the linux compatibility.

Your output should begin with a "00"  followed by another byte???? but I am not so sure about this. Mine always start with "00" and tested with several remotes.

thanks
64
USB Infrared Toy / Re: Newbe question, sending pronto codes.
Try to press the same button several times and allow the irtoy to record it several times and replay it back.

use the command -d com5 -f test  -r  -t  - v 1       <---- record
use the command -d com5 -f test  -p  -t  - v 1      <---- Play

use the command -d com5 -f test  -r  -p -t  - v 1  <--- record and play

and aim it on your TV (a little nearer to the IR sensor) ,  try to operate a remote button several times, then pressing any key at the keyboard will replay it back.  the -t creates a text file that you can cut and paste to other apps, and this is also replayed as well. I am having several different output on the same remote button.

Be sure to delete the test_xxx.bin and the test_xxx.txt files before you start.

The irtoy is still untested on the pronto codes which will use the -t (create text) . Since this is continuously evolving, any feedback is highly appreciated.
 
I have tested this on my sony tv and it played back succesfully.
66
USB Infrared Toy / Re: Record and playback under Linux
I've been stuck with the  curses library :) so its best to dump it and look for a workaround solution.

  ch=getc(stdin); 
 so you need to press the enter key :-(
anyway if somebody can make a better solution, I'll be happy to post it in.
I just hope that fix didn't affect the other function.. or didn't I?

posted on the svn as v051.

[quote author="rct"]
I tried V.04, I haven't looked at  V0.5 yet.   The short answer is I think you could probably simplify things greatly by changing the "Press any key logic" to be "Hit enter" when you need the user controlled pauses, and let CTRL-C interrupt processing break out as needed.  This would let you avoid all of the complexity of terminal mode handling under *nix.   Keep the simple record/playback utility as simple as possible.
[/quote]

Yep! That's what I did. and CTRL-C is an option.. The autoplay -v 1 helps a lot.

[quote author="yaywoop"]
Thanks Rct, that definitely sheds some light.
and I was thinking the same thing, we should find another way to get user input for ending the program. the canonical mode is much neater to deal with
so we want to read the input buffer, and continue if there is nothing. i just did a search but didnt find much. any ideas?
[/quote]
I haven't find a kbhit()  that behaves exactly like ms or borlands kbhit() .  curses library need a series of initialization (initscr(),raw(),noecho() and endwin()) and should have been coded in the first place, and they conflict  with printf so it needs to use the printw, and code needs to be re-written.
Now I am wondering why it is call "curses" :-)

Jamz

 

 
67
USB Infrared Toy / Re: Record and playback under Linux
I am having the same problem as your with the kbhit function.  the kbhit must emulate the windows kbhit function. 
It needs to detect keypress, and a character value should be in a buffer to retrieve.
if there is no keypress, kbhit line should be ignored.
The getchar function waits for a keypress, the kbhit does not.

I tried and look at the net substitute or better code, but the behavior is just the same.
So I am still stuck here :-(
68
USB Infrared Toy / Re: Record and playback under Linux
By the way, it was compiled in code::base 10.05 for both linux and windows, and hopefully for mac too. :-)
If anything you need to know, don't hesitate to ask.

Cheers
Jamz
69
USB Infrared Toy / Re: Record and playback under Linux
Hi,

I am currently compiling the v05 on my debian. That modification is that thing I am doing today. The previous version succesfully compile under debian 5 build but due to some updates it was broken, and  separating the functions in individual c files need to changes some includes or typedefs

I am doing some fixes, but its still a long way through.

BUT if you can compile it in your system  and test it with the hardware, then I would be happy to post it.
Other things to consider is the sleep.. and the kbhit. the behaviour is not same with windows.

I must admit,  i am not a linux user so I must relay on them to make better bug free apps for linux.

Cheers
70
USB Infrared Toy / Re: Newbe question, sending pronto codes.
there is a new update to the irtoy record and playback utility currently on V.05.
The utility is now able to record and play text files by adding the -t command along with -f filename and -r  .
You can then edit the filename_000.txt , or copy and paste the codes taken from the ccf extractor, and don't forget to add 'FFFF'  at the end of the file.
The  IRtoy will be able to play by using the command :
           
            irtoy.exe -d com3 -f filename -p -t

Please note that this is still untested :-) and may not work on every remote control that is not RC5 compatible.


Any feedback will be appreciated.

download here:  http://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/USBIRtoy/software/IRToyRecPlayV0.5/IRToyRecPlayV0.5.zip
71
USB Infrared Toy / Re: irtoy2ols
Hi Siklosi,

    There is a new version of this irtoy at the svn (v0.4).
    It should be able to receive continous stream of data from the IRToy
    and by adding -o at the command line, it will create OLS format file similar to your autoit app.

   Thanks!
75
Project development, ideas, and suggestions / Re: New host? Please help!
One good feature of a host to look at is that it allows you to host  several add-on domains  without additional cost, and has a complete reporting ability. And it should be just a few hops from where you are.

I never been satisfied with my current hosting (1uhost.com- hosted my other 3 domains without additional cost) but it has the features I wanted (softwares. reporting etc) , even my client that currently hosting at ipage.com complain for the absence of phpmyadmin, even though it has several ready to install software package and can host several domains too.  

Shared hosting is the cheapest, but its not the best. Other domains hosted on that server may be resource intensive and thus put your site unresponsive.
VPS is somewhere between a shared and a dedicated server - And its best for most resource intensive requirements.
And nothing beats the dedicated hosting which is costly, mostly used for gaming, download sites, and graphics intensive site and reseller hosting.

I've seen hostgator was good at this but I haven't proven it.

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