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

1
USB Infrared Toy / Re: [Not Possible] Send and Receive IR signal over TX RX
thanks, Barf.

I tried them as well, tried to cross them as well. 4 combinations. no result.
one thing that I think signifies that it will not work is that the orange "I" (usually signifying bootloader) led is always on. When using USB however the led is off and blinks a little bit when it receives/catches some IR data.
2
USB Infrared Toy / Re: Send and Receive IR signal over TX RX
Well, well.

I have been looking around, writing emails, asking people for help, and it seems like the Toy's firmware does not support the communication via Serial in the same way as USB does.

So, case closed.

Got to look for other solutions.
3
USB Infrared Toy / Re: Send and Receive IR signal over TX RX
Ok, lets simplify the task.
I have 2 ways to connect the IR Toy, USB and Serial (via USB-to-Serial adapter).
I have written the unit tests that uses one COM port or another to get the version from the IR Toy. Basically by sending 'v' command to serial port, it should return 'v222'.

- USB works as expected
- Serial never returns a version (Times out after 5 seconds)

I can see the adapter blinking, signifying that the data was sent to the Toy but the Toy never sets the version number to be read. It's either I wire it incorrectly or I am missing something. Here is how it is connected via Serial:

[attachment=1]

and unit tests code (the same test is executed for both tests, just different ports:

Code: [Select]
using System;
using System.IO.Ports;
using System.Threading;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace IrToyLibrary.UnitTests
{
    [TestClass]
    public class GettingVersionTests
    {
        private const string USB_COM_PORT = "COM3";
        private const string SERIAL_COM_PORT = "COM4";

        [TestMethod]
        public void CanGetViaUSB()
        {
            var version = GetVersionFromComPort(USB_COM_PORT);
            Assert.AreEqual(expected: "V222", actual: version);
        }

        [TestMethod]
        public void CanGetViaSerial()
        {
            var version = GetVersionFromComPort(SERIAL_COM_PORT);
            Assert.AreEqual(expected: "V222", actual: version);
        }

        private string GetVersionFromComPort(string comPort)
        {
            var serialPort = new SerialPort
            {
                PortName = comPort,
                BaudRate = 115200,
                ReadTimeout = 3000
            };

            serialPort.Open();

            byte[] CMD_VERSION = { Convert.ToByte(Convert.ToInt32('v')) };
            serialPort.Write(CMD_VERSION, 0, CMD_VERSION.Length);

            int secondsWaiting = 0;
            while (serialPort.BytesToRead < 1)
            {
                if (secondsWaiting++ > 5)
                {
                    throw new TimeoutException("Timeout waiting for version string.");
                }

                Thread.Sleep(TimeSpan.FromSeconds(1));
            }

            string version = serialPort.ReadExisting();

            serialPort.Close();

            return version;
        }
    }
}

Has anyone made it work via Serial?

Thanks!
4
USB Infrared Toy / [Not Possible] Send and Receive IR signal over TX RX
Hello.

When I connect USB-to-Serial cable to IRTX, IRRX, +5v, and GND, I am able to see that the signal is coming through via terminal.

[attachment=1]

[attachment=0]


So, as soon as I connect it, the "I" led stays always on, like it's in bootloader mode. (it's off when using the USB connection and blinks on data getting received). Does it have to be on or is there something wrong? It would be nice to have the same blinking led functionality when using serial and the IR signal is received. When I disconnect it and go back to USB cable, the led works as expected.

thanks!
5
USB Infrared Toy / Re: UIB IR Toy 2 on Win 8.1
I tried windows 8.1 and Windows 10 Preview, both 64 bit editions, and it does not work to recognize the device to flash it. The safest way is doing it from a 32 bit Windows XP operating system. 32 bit Windows 8.x might work but I did not try that (has anyone tried that?).

I played a bit with Oracle VirtualBox but was not able to forward a non-recognized HID to the guest OS (windows xp), so I looked for something else.

I don't have any machines running Windows XP at home but what I did was creating a bootable USB stick from a 'Windows XP based Live CD' using Rufus (http://rufus.akeo.ie/). You will need to find an disc image with Live CD obviously. I also have copied the folder with the tools and firmware on the same on the same USB stick.

Then it worked okay to flash it:

[attachment=0]

the console is in Russian but you get the "picture." When it's loaded, it is slow to recognize the devices in device manager and there many that would be "not recognized" but it should do ok with COM ports and HIDs. For me it worked just to plug the USB IR Toy 2 to USB and use 1 as COM parameter.

Hope this will help.
6
USB Infrared Toy / Adding EventGhost Action
Hello.
I am trying to send an IR signal for the TV to turn on/off via EventGhost (with 08.03 Plugin).

I used IRToyRecPlay to capture the data from the remote control into a BIN file.
I tried to play it and it works as expected = turns on/off the TV.

Now, I capture the event in EventGhost.

EventGhost event value:
DDDD5DDD7FDF7FDF05DDD5DDD7FDF7FDF05DDD5DDD7FDF7FDF0

Then I try to paste this value into the event code to be sent.
Trying to run/test the event will not even trigger the IRToy (led does not flash) (I have added the 03 and FFFF transmit codes).

So, there is probably not enough data in the code (compared to the size of the IRToyRecPlay's capture) to be sent as Code in EventGhost. I tried to copy all the HEX values from the BIN file and paste them, with and without transmit codes but no luck even activating the IR Toy from Test button in Action Item Settings of Event Ghost (see the attachment).

I looked at Timing Information Format on the website but I am not sure how to go from the BIN data that I have captured to configuring an event in EventGhost. Could someone give me a clue, please.

Thanks

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