Author Topic: LinuxMCE with C#  (Read 2291 times)

lomeshp

  • Newbie
  • *
  • Posts: 14
    • View Profile
LinuxMCE with C#
« on: January 11, 2012, 08:36:24 pm »
I am interested in creating C# app that would send commands to LinuxMCE, any suggestions?

JoakimL

  • Veteran
  • ***
  • Posts: 149
    • View Profile
Re: LinuxMCE with C#
« Reply #1 on: January 11, 2012, 08:55:19 pm »
Mono as platform and then you'd need to port parts of the DCE implementation (the part responsible for sending and receiving from DCE as a client).

/Joakim

lomeshp

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: LinuxMCE with C#
« Reply #2 on: January 11, 2012, 10:08:34 pm »
Thanks.  I've been trying to find a good tutorial on how to write apps that can communicate with LinuxMCE, does anyone of a good tutorial?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5505
  • DOES work for LinuxMCE.
    • View Profile
Re: LinuxMCE with C#
« Reply #3 on: January 11, 2012, 11:43:47 pm »
Read both the Developers guide, and Developing a DCE Device, on the wiki.

-Thom

Kezza

  • Veteran
  • ***
  • Posts: 146
    • View Profile
Re: LinuxMCE with C#
« Reply #4 on: January 12, 2012, 10:46:25 am »
If you do get anything built in C#(going or not) please post info on here/wiki as it's something I've been thinking of looking into and have read a fair chunk of the wiki so very slowly kinda getting an idea of how things work  :-\


tschak909

  • LinuxMCE God
  • ****
  • Posts: 5505
  • DOES work for LinuxMCE.
    • View Profile
Re: LinuxMCE with C#
« Reply #5 on: January 12, 2012, 03:24:32 pm »
Please ask questions. Some of us in here know the stack incredibly well, and can speed up the process of understanding.

-Thom

lomeshp

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: LinuxMCE with C#
« Reply #6 on: January 13, 2012, 06:47:11 pm »
I built a C# orbiter for testing purposes.  It works but there are issues and maybe someone can help.  The way I am sending messages to DCERouter is through a socked.  I am sending the command as "TOUCH 100x100"  (100x100 is just an example).  This only works if the screen on the weborbiter is same as the command I am calling.

Where can I find list of commands so that I can direclty call DCERouter using C# socket?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5505
  • DOES work for LinuxMCE.
    • View Profile
Re: LinuxMCE with C#
« Reply #7 on: January 13, 2012, 07:00:21 pm »
You need to read the Developers Guide first. It explains DCE. The list of commands themselves can be found in the Advanced > DCE > Commands / Events / Device Data menu in the web admin.

Also, you need to look at the C++ code in src/DCE to get an idea of how DCE is structured, and what is possible from the header files.

-Thom

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3062
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: LinuxMCE with C#
« Reply #8 on: January 19, 2012, 12:32:15 pm »
The socket you are sending stuff to is using the so called Proxy Orbiter. It is a kludge that was created for the web orbiter in the first place. A "real" orbiter doesn't talk to the socket of Proxy Orbiter, but sends and receives messages to dcerouter. As TSCHAK pointed out there is a nice wiki page about it. For sending stuff, you can use the MessageSend binary. Or create a small library in c# to do the same thing. in my peoples dir in svn there is a PHP lib that supports message sending in native PHP. svn/peoples/posde/iOrbiter/libMessageSend.php iirc.

buckle

  • Veteran
  • ***
  • Posts: 68
    • View Profile
Re: LinuxMCE with C#
« Reply #9 on: March 11, 2012, 06:13:15 pm »
The socket you are sending stuff to is using the so called Proxy Orbiter. It is a kludge that was created for the web orbiter in the first place. A "real" orbiter doesn't talk to the socket of Proxy Orbiter, but sends and receives messages to dcerouter.

There is already a .NET implementation of touch orbiter, UnOrbiter.NET.  http://svn.linuxmce.org/trac.cgi/ticket/795  It is part of the kludge, though, so it probably doesn't help get you towards your goal.

You might be able to import the DCE libs into you C# project and go that route.

ajward

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: LinuxMCE with C#
« Reply #10 on: March 22, 2012, 12:29:34 pm »
Is there any mileage in compiling the C++ DCE library under managed C++ in .Net?

It would then be straightforward for C# to call managed C++.

Andy.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5505
  • DOES work for LinuxMCE.
    • View Profile
Re: LinuxMCE with C#
« Reply #11 on: March 22, 2012, 05:01:25 pm »
Dude, don't ask, just do it. ;)

-Thom