JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

CaptureIR: how to use data from digitrace
Goto page 1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Hardware
View previous topic :: View next topic  
Author Message
ryanmc



Joined: 28 Apr 2005
Posts: 39

                    
PostPosted: Sat Jul 02, 2005 4:14 pm    Post subject: CaptureIR: how to use data from digitrace Reply with quote

i'm having trouble finding how to use the data from digitrace to program my jp1 remote
Back to top
View user's profile Send private message
mtakahar
Expert


Joined: 03 Aug 2003
Posts: 281

                    
PostPosted: Mon Jul 18, 2005 1:57 am    Post subject: Reply with quote

I didn't recognize "digitrac" until yesterday when I actually used "digitrace" myself. You are talking about the program discussed in this thread: http://www.hifi-remote.com/forums/viewtopic.php?t=3569, right?

It's not going to be easy to explain in a few sentences (or even several paragraphs.) You would have to wait for someone writing a program that either bridges the output from digitrace or reads the data directly from the device through the parallel port and pass down the data to the decoding dll.

Hal
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21238
Location: Chicago, IL

                    
PostPosted: Mon Jul 18, 2005 11:51 am    Post subject: Reply with quote

Ryan,
I take it that this means you have created a working device then, and if so, did you make the RF, IR or IR&RF version. Also, which OS are you using?

Btw, I edited the thread to say "digitrace".
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
ryanmc



Joined: 28 Apr 2005
Posts: 39

                    
PostPosted: Thu Jul 28, 2005 5:48 am    Post subject: Reply with quote

mtakahar wrote:
I didn't recognize "digitrac" until yesterday when I actually used "digitrace" myself. You are talking about the program discussed in this thread: http://www.hifi-remote.com/forums/viewtopic.php?t=3569, right?

Hal

that is the program im talking about.

The Robman wrote:
Ryan,
I take it that this means you have created a working device then, and if so, did you make the RF, IR or IR&RF version. Also, which OS are you using?

Btw, I edited the thread to say "digitrace".

Actually when i first made the thread i used digitrace but then noticed the file was named digitrac so i edit it. I ordered the parts on the list for both the rf and ir. the ir portion couldnt have been any easier so i did that first. it worked with digitrace but when it started to look like it wasnt going to work to learn with it I stopped putting together the rf portion but i still have everything for it.
My OS is xp.
Back to top
View user's profile Send private message
mtakahar
Expert


Joined: 03 Aug 2003
Posts: 281

                    
PostPosted: Thu Jul 28, 2005 8:44 pm    Post subject: Reply with quote

mtakahar wrote:
You would have to wait for someone writing a program that either bridges the output from digitrace or reads the data directly from the device through the parallel port and pass down the data to the decoding dll.

Actually, I ended up writing one myself and now adding some GUI stuff to it. I can post a portotype if you are interested.

Hal
Back to top
View user's profile Send private message
ryanmc



Joined: 28 Apr 2005
Posts: 39

                    
PostPosted: Thu Jul 28, 2005 9:21 pm    Post subject: Reply with quote

That would be great
Back to top
View user's profile Send private message
mtakahar
Expert


Joined: 03 Aug 2003
Posts: 281

                    
PostPosted: Fri Jul 29, 2005 11:51 am    Post subject: Reply with quote

I've uploaded it here.

This is working on my 1.3GHz Celeron laptop running XP SP2, so it probably works for you, too. (Not sure if this works on 98/Me.)

You need the porttalk driver (perhaps you've already had it for the digitrace program) and JRE or JDK 5.0 (1.5.0) installed.

Anything other than the "Start Capture" button haven't been implemented yet.

Hal
Back to top
View user's profile Send private message
johnsfine
Site Admin


Joined: 10 Aug 2003
Posts: 4766
Location: Bedford, MA

                    
PostPosted: Fri Jul 29, 2005 12:37 pm    Post subject: Reply with quote

Thanks. I've been meaning to try building something like that myself. I really need some sort of tool on a PC that calls DecodeIr for directly received IR signals.
Hopefully I can find the time very soon to use what you did (I assume much less time than inventing it myself).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mtakahar
Expert


Joined: 03 Aug 2003
Posts: 281

                    
PostPosted: Sat Jul 30, 2005 12:19 am    Post subject: Reply with quote

Yeah, I figured you didn't have time, and it's way too bad if this Tommy's great creation had to go waste because of lack of a software.

I forgot to mention about the I/O port setting. It'll use whatever you set up for IR.exe. I'll add explicit port settings along with other tweaking options, though.

Hal
Back to top
View user's profile Send private message
mtakahar
Expert


Joined: 03 Aug 2003
Posts: 281

                    
PostPosted: Sat Jul 30, 2005 2:49 am    Post subject: Reply with quote

mtakahar wrote:
It'll use whatever you set up for IR.exe.

Looks like IR.exe doesn't store the I/O port address in the registry if you never had to touch the setting, and CaptureIR will crash if there's' no entry.

I've updated the archive with a fix so it defaults to 0x378 if it doesn't find the setting. Please download it again if it was throwing an exception. I also included the source code.

It would be very cool if it become possible to import the decoded signals automatically either as external functions or device upgrades in RM some day.

Hal
Back to top
View user's profile Send private message
johnsfine
Site Admin


Joined: 10 Aug 2003
Posts: 4766
Location: Bedford, MA

                    
PostPosted: Sat Jul 30, 2005 8:19 am    Post subject: Reply with quote

I'm crawling toward being able to try this.

1) I tried http://java.com (as directed by Hal's directions) and it locked up my internet access, hung part way through loading that page and both before and after I tried closing that browser instance I had no internet access even through other programs. Rebooted and tried a different browser, same results. It was starting some sort of Java applet that did something seriously wrong with my older version of Java.

2) Tried Hal's program with my existing older Sun Java. It failed.

3) I went instead to java.sun.com (where I got the Java SDK long ago). After a few wrong clicks from their confusing top level page, I found the link to get the newest Windows Java SDK. I installed that.

4) Hal's program now starts.

Following Tom's instructions I measured some printer port pin voltages with and without a 1K load.
Control pins 1 and 14 both went from 3.37 down to 3.20
Data pin 5 went from 3.32 down to 3.15
Data pin 8 went from 3.32 down to 3.16

That makes pin 8 the lowest resistence by Tom's formula and his instructions taken literally would say to pick that one. But I'm sure I'm better off with the slightly higher voltage rather than slightly lower resistence.

Next I need to solder three wires to connect the IR sensor to a DB25 connector. I think it's easiest to add it to my JP1 cable's DB25 connector so I don't need to plug and unplug things. (I never got around to soldering the whole RF sensor kit and at this point I'm more interested in IR than RF). Given my lack of soldering skills, who knows what will happen.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mtakahar
Expert


Joined: 03 Aug 2003
Posts: 281

                    
PostPosted: Sat Jul 30, 2005 9:10 am    Post subject: Reply with quote

johnsfine wrote:
1) I tried http://java.com (as directed by Hal's directions) and it locked up my internet access, hung part way through loading that page and both before and after I tried closing that browser instance I had no internet access even through other programs. Rebooted and tried a different browser, same results. It was starting some sort of Java applet that did something seriously wrong with my older version of Java.

2) Tried Hal's program with my existing older Sun Java. It failed.

3) I went instead to java.sun.com (where I got the Java SDK long ago). After a few wrong clicks from their confusing top level page, I found the link to get the newest Windows Java SDK. I installed that.

I've just changed the reference to http://java.com/ to http://java.sun.com/j2se/1.5.0/download.jsp in the file description. I hope this makes downloading slightly easier for others...

Hal
Back to top
View user's profile Send private message
johnsfine
Site Admin


Joined: 10 Aug 2003
Posts: 4766
Location: Bedford, MA

                    
PostPosted: Sat Jul 30, 2005 9:53 am    Post subject: Reply with quote

I hope I didn't confuse anyone by saying "Java SDK". Most people will only need the smaller JRE.

I got the larger JDK because I occasionally do RemoteMaster development and I hope to understand and tweak Hal's code in this project.

If you only want to run it, not modify it, you only need the JRE.

Also, I'm on a different computer now than the one I had that problem on and I just tried java.com and it went right through that applet, no problem, played some annoying music and gave me access to the download buttons. I hate web pages with sound when I just want information or a download. But anyway it worked (despite the same obsolete Sun Java previously installed on this machine as the other). So the problem might have been very specific to that machine.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
johnsfine
Site Admin


Joined: 10 Aug 2003
Posts: 4766
Location: Bedford, MA

                    
PostPosted: Mon Aug 01, 2005 8:00 am    Post subject: Reply with quote

I wasted money on one of those "cold heat" soldering tools. I couldn't get it to melt more than a spec of solder, and none at all when in contact with the wires I wanted to solder. There were no instructions, so maybe I was using it entirely wrong.

I then switched to my old soldering iron and did a really sloppy job of soldering the 6 connections (both ends of three wires). But somehow it works.

Then I had lots of confusion over how to get PortTalk installed in a way that Hal's program could use it.

Then it all worked.

I misunderstood the UI and thought I needed to start and stop capture for each signal, but soon discovered otherwise.

It's pretty inconvenient as it stands now because it's too slow and it doesn't seem to deal with macros.

After you press and release the remote key, there is a long pause before the result appears. I need to dig through Hal's code and figure out how to tighten that.

I was really hoping PC decoding would show me whole macros, even when they're too long for an OFA remote to learn, maybe even if the frequency shifts within the macro. I'd also like to see how many frames there were of each signal. A big part of my purpose for direct PC capture and decode is to find out exactly what a remote is sending when a tricky macro doesn't perform as expected and/or I'm debugging some tricky protocol executor.

IIUC, Hal's program detects and reduces the first clear repeat pattern and then loses the rest.

I realize other people may just want to know what some original remote is sending, so they will prefer it the way it is (detect and reduce a repeat pattern just as a learning remote would).

Hopefully I can customize my copy, now that Hal has gotten me started.

I also have a bunch more soldering to do. My JP1 cable was too messy (from past inept kludging) to add 3 wires to, and I didn't want to risk it. So I started with another DB25 connector. But plugging and unplugging it will be too much trouble. I have resistors and diodes and a 10 pin header (that I think I can cut to JP1 size) so I'm going to try to solder JP1 components onto the DB25 I used for this.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mtakahar
Expert


Joined: 03 Aug 2003
Posts: 281

                    
PostPosted: Mon Aug 01, 2005 12:14 pm    Post subject: Reply with quote

johnsfine wrote:
Then I had lots of confusion over how to get PortTalk installed in a way that Hal's program could use it.
...

I misunderstood the UI and thought I needed to start and stop capture for each signal, but soon discovered otherwise.

I'll add some notes on these points by the time of official release.

Quote:
It's pretty inconvenient as it stands now because it's too slow and it doesn't seem to deal with macros. After you press and release the remote key, there is a long pause before the result appears. I need to dig through Hal's code and figure out how to tighten that.

In the first prototype I posted, I tried not to add any extra code within the parallel port monitoring loop. Capturing, demodulation and decoding are done each step at a time. In this model, the capturing part has to wait until it sees many enough sample (raw on/off cycles) or timeout occurs (I set it to 3 sec for now). So, it takes longer if the signal has relatively long gaps. It's probablly better setting the timeout for off time that is long enough to catch button release but not too long.

Another thing is the way I'm setting the thread priorities. I gave 7 (on the scale of 1 - 10 with the default 5) to the capturing thread and 3 to the thread that monitors the capturing thread. It looks that lowering the monitor thread wasn't necessary (at least on my PC) and running it on the default priority seems to give better response time.

Quote:
I was really hoping PC decoding would show me whole macros, even when they're too long for an OFA remote to learn, maybe even if the frequency shifts within the macro. I'd also like to see how many frames there were of each signal. A big part of my purpose for direct PC capture and decode is to find out exactly what a remote is sending when a tricky macro doesn't perform as expected and/or I'm debugging some tricky protocol executor.

I haven't looked into DecodeIR much enough to understand what the "context" array is exactly for, but my guess is that I can call it repeatedly with the same contents of the array and it'll decode each detected subsequence continuously?

Quote:
IIUC, Hal's program detects and reduces the first clear repeat pattern and then loses the rest.

No, it doesn't detect repeating patterns, at least yet. Perhaps it makes sense to have a checkbox for specifying whether you want to keep the duplicates or not.

Quote:
Hopefully I can customize my copy, now that Hal has gotten me started.

There are some additional stuff you may need to get to rebuild the program yourself. Please let me know if you find something still missing.

- Java JDK 5.0 (1.5.0) or higher.

- GNU Make. There are various kinds of ports that work on the
Windows platforms. Perhaps most of them work just fine.
I used the standalone Mingw version (as opposed to cygwin mingw.)

You can download it from here: http://mingw.sourceforge.net/

- GNU C compiler (gcc) if you want to rebuild the JNI (Java Native
Interface) program files written in C. You can download this from
the Mingw site mentioned above. Cygwin version may work, but not
tested. It should not be hard to make it work with MSVC, however,
again, it is untested and you may need to make some minor changes.

- The following source files are included in porttalk22.zip
mentioned earlier in this document:

PortTalk_IOCTL.h
pt_ioctl.c

- Java utility classes from the Java Tutorials:

TableSorter.java:
version 2.0 02/27/04 by Philip Milne, Brendon McLean,
Dan van Enckevort, Parwinder Sekhon

http://java.sun.com/docs/books/tutorial/uiswing/components/example-1dot4/TableSorter.java


Hal
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Hardware All times are GMT - 5 Hours
Goto page 1, 2, 3, 4, 5, 6, 7  Next
Page 1 of 7

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control