GlobalCache GC-100

From LinuxMCE
Revision as of 18:34, 25 November 2007 by Zaerc (Talk | contribs) (Serial Port: explained the fix)

Jump to: navigation, search
GC100.jpg

GC100 is a device which allows you to have remote connection almost anywhere. It's a network device which will forward all your data to :

  • couple of serial ports
  • IR senders and/or sensors
  • several relays

For more details about the product check manufacturer web site.

Send IR codes

LinuxMCE implementation of GC100 assumes that in device tree we'll have children and the messages are actually addressed to them instead of GC100 itself.

So when you are sending "ON" to TV controlled by GC100, the message is routed to the GC100, it finds infrared code for "ON" for that specific TV, sends a command to gc100 to send a specific infrared sequence, which will blink IR sender connected to specific port, and the TV will turn on.

The only two commands that GC100 implements itself are : CMD_Send_Code used to test which IR is suitable for your equipment and CMD_Learn_IR used to learn new IR codes.

Learn IR codes

The learning device is actually unrelated to GC100. It may be plugged into one of GC100's serial ports (don't forget to set them to 9600 bps), or in regular serial port, just be sure you specified right port in GC100 device data.

There are several other devices that support learning of infrared codes : IRTrans, Tira, USB_UIRT.

Learning is done from web page. When clicking "Learn" gc100 will start a thread that will try to get data from the port. If nothing is received in 30 seconds the thread will die. The page will continue to refresh trying to see if anything was added, but after 30 seconds it's useless.

How to

Install

The device is not quite plug&play. You have to perform a factory reset and to add it from orbiter ("Add GC100" button).

A script will do some tricks with IP, will submit some pages on GC100's interface and so on. It will install needed software and after that it should say that device is ready to use (don't forget to quickreload)

Before the first use

  • Insert proper wires in relays, devices in serial ports, IR LEDs and/or sensors.
  • Go to device's webpage and set proper inputs/outputs, baud rates and so on.
  • Add child devices in LinuxMCE-admin webpage and set proper device data to match the wiring.

This should do it.

Known Problems

MAC detection

Currently the support for the gc100 in LinuxMCE is broken, at least for some models or firmware versions. The /usr/pluto/bin/gc100-conf.pl script is for some reason unable to determine the gc100's MAC Adress after it has been reset to factory defaults. As a result it is only half configured and not added to the system properly.

The only known workaround [1] [2] at this time is to manually edit the perl script, and hardcode the MAC address of your gc100. In short, find this line in the script:

sub get_gc100mac {

Then insert this line immediately following it (replace 00:00:00:00:00:00 with the adress of your gc100):

return "00:00:00:00:00:00";

As a result it should look something like this now:

        exit(4);
  }
} 
    
sub get_gc100mac {
  
  return "00:00:00:00:00:00";
  
  `curl http://192.168.1.70/Commands.cgi -o gc100mac1 --silent`;
  `curl http://192.168.1.101/Commands.cgi -o gc100mac2 --silent`;
  open(FILE,"gc100mac1");
  @data1 = <FILE>;
  close(FILE);

Reset the gc100 to factory defaults if necessary and you should be able to add it from an orbiter as described above.

Another possible workaround might be described on the Plutohome wiki for the gc100, under Complete Manual Install.

Firmware versions known to be affected:

  • 2.4-06 (GC100-06)

Serial Port

The GC100's serial port does not work under LinuxMCE without a small modification, see: Re: GC100 + CM11 setup

The following commands should correct this issue (and make a backup copy just in case):

mv /usr/pluto/bin/gc100-serial-bridge.sh /usr/pluto/bin/gc100-serial-bridge.sh.backup
sed -e 's/false/0/g' /usr/pluto/bin/gc100-serial-bridge.sh.backup >/usr/pluto/bin/gc100-serial-bridge.sh

It basicly replaces false with 0 in the /usr/pluto/bin/gc100-serial-bridge.sh file. Afterwards a reboot may be in order.

Implementation details

In gc100.cpp there is a lot of code for format conversion and other stuff. Practically it's not a big deal it receives a command, find a proper IR sequence and sends it to gc100.