Its pretty clear we are not speaking the same language, which is my fault. I over-estimated my ability to translate. However, I have decided to recruit a translator from RentACoder because it is worth it to me. So in your example, what language were you using to control the Toy?
Until I hear that someone else has actually done it (controlled a device by transmitting captured remote codes from their PC using the USB IR Toy), I am also abandoning this effort.
Thanks, guys, (especially Ian) for all your help and patience.
I contacted rsdio privately, but his Mac program only captures and displays the data. As far as I can tell now, no one has used the USB IR Toy to actually transmit the captured codes from their PC to control a device.
has anyone succeeded in doing what I am attempting using the USB IR Toy? That is, use a PC (or even a Mac) to transmit a remote control code through it that affects a target device? If so, would you mind sharing your code with me? I may not understand the language per se, but I may be able to get the gist of it.
Hey Ian, what I am trying to do is what I think you thought you were telling me to do. prt is the port (sorry, should have made that clear) Goal is to use the received data to affect the target device from the PC.
"The default mode is 7bit transmit. You send a byte with bits 1xxxxxxx where 1 tells the IR toy to transmit, and xxxx are the bits. The reived data is 8bits xxxxxxxx where all 8 xs are data bits. To retransmit from default mode, you;ll need to break the xxxxxxxx into 1xxxxxxx and 1xyyyyyy where x are the a data bits, and y is the next byte or 0's if it's teh last byte. "
"what is ConvertBytetoBits(b) supposed to do? If you received serial port data it should already be held as a byte"
Yes, it is held as a byte array as it was received. But to transmit the code to the port so it affects the target device, I have to transmit it as bits. So each byte has to be turned into bits before being sent to the port.
Your post seemed to indicate that sending a "1" was necessary to tell the IR toy to transmit, so that is the reason for the prt.Write("1"). But now I see that may have just been your shorthand for a bit, so that just sending a bit may be enough to tell the IR toy to transmit.
I checked the output in my software debugger and I am sending a stream of 1's and 0's.
The 0's were supposed to indicate to the IR Toy that it had received the last bit.....the spaces were just wrong.
Sorry if I seem a bit dense. Have I mentioned I am outta my league? I've never worked with bitstreams before and I am learning as I go. I appreciate your help and your patience.
If I understood the last post correctly, the following code SHOULD play back the code to the toy and allow it to control the device. Where port is the Com port, and codes is the byte array where the received bytes were stored.
dim b as byte dim sbitval as string
prt.Write("1")
For Each b In codes sbitval = Me.ConvertBytetoBits(b) prt.Write(sbitval) Next
prt.Write("0 0 0 0 0")
Regardless of the programming language, any one of you guys who can code at all can hopefully figure out what I am doing wrong and help me out.
Thanks again for all the help guys. With the hints you gave me, I was able to adjust my program so the codes received match the RealTerm codes...all of them. (Although they seem to break differently when copied into NotePad, I hope that is just the effect of a terminal display vs a textbox display.)
So I THINK I have receiving working. Transmitting, however, is another matter. I've tried just sending the same codes I received back to the Toy, but it has no effect on the target machine. Some one said I needed to re-format the transmission to the 7-bit protocol. rsdio, is that what you do for a transmission from your Mac? Or do you just send out the codes exactly as you received them from the remote?
As always, any and all help is appreciated. Thanks in advance.
Comparing the remote codes I receive in my program with the ones displayed by the same remote signal from RealTerm has shown me my byte array is too short. IOW, my program stops receiving/listening before IR Toy has finished sending. Is there any kind of end-of_stream character I should be searching for, or a way to query the IR Toy to see if the signal has completed?
(I know, RTFM, and I am trying to understand it but its a little over my head.)
Thanks in advance for any and all assistance you guys are willing to provide.
Ok, I was able to install it with the inf file and as far as I can tell, it's getting along fine with Windows XP. I also downloaded RealTerm. When I shoot my remote beams at the connected USB Toy, it lights up, but on RealTerm, no matter what settings I try, nothing happens. I do not see any data coming in.
"You don’t need a driver to use the USB IR Toy, but you will need a .inf file to tell Windows how to use the device. A suitable .inf is included in the project archive."
I am completely outta my league here, so if you guys think I should look elsewhere, I don't mind if you say so.
I'm just a simple vb.net programmer who was looking for a less expensive alternative to the expensive USB-IRT, or TIRA currently on the market. In my mind I picture plugging the toy into a USB port on my computer, shooting beams from my remote control at it, using my own program to store those codes in a database, and playing them back from the toy later from my PC to control various equipment.
I thought I had what I needed with the Toy, but now I am not so sure. Do I need additional equipment for the scenario I described? (I know the thing needs a case -- even that is more complicated than I ever imagined.)
Also, somehow I will have to integrate the code supplied into a vb.net class. Has anyone already done this?
I appreciate any feedback you guys can provide. Thanks in advance for your help.