Author Topic: Updated: Porting phidgets to become a DCE device?  (Read 3928 times)

rthorntn

  • Regular Poster
  • **
  • Posts: 25
    • View Profile
Updated: Porting phidgets to become a DCE device?
« on: February 25, 2008, 11:30:32 am »
Hi,

I have the PhidgetWebservice21 from phidgets.com running and I have connected to it using telnet on port 5001 but I can't figure out the commands to control the socket.

Can somebody have a look at the source and help figure out how to control the socket?

http://www.phidgets.com/downloads.php?os_id=3&fw_id=3&fw_file_id=3

As a start I just want to read the value from a temperature sensor connected to the PhidgetInterfaceKit 8/8/8.

Thanks for taking the time.

Cheers
Rich
« Last Edit: February 26, 2008, 04:42:53 am by rthorntn »

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Reading analogue values through a socket
« Reply #1 on: February 26, 2008, 04:18:14 am »
Rich,

After further reading, the Phidget devices seem to communicate through a web SERVICE.

This webSERVICE has a complete API.  Libs are available for VB, C++, java, etc, but nothing yet for Ruby.

It's a bit more complex than (what I had originally thought) a simple http scrape, or a socket connection.

To write it in Ruby (ie a gsd/ruby implementation) would require to rewrite the associated API in Ruby.

although this is not IMPOSSIBLE, it is very much a ton of work.  Keep in mind, that an API for C++ exists, so it would be a LOT easier to simply create a device in C++ which uses the already existing API.

Now, the kicker:

I'm just starting to learn C++.

Maybe one of the other guys that hang around here could chime in here..

HTH

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

rthorntn

  • Regular Poster
  • **
  • Posts: 25
    • View Profile
Re: Updated: Porting phidgets to become a DCE device?
« Reply #2 on: February 26, 2008, 04:46:54 am »
Hi Dan

Thanks for your help.

http://www.phidgets.com/downloads.php?os_id=3&fw_id=3&fw_file_id=3

So the C++ API source above could be ported used to create a DCE device?

Is this possible, phidgets.com can be used to monitor and control a heap of stuff, sensors, relays, and servos for instance.

Thanks for taking the time to read this.

Cheers
Richard

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Updated: Porting phidgets to become a DCE device?
« Reply #3 on: February 26, 2008, 05:11:11 am »
Rich,

There site has a C Client API guide which sets out the basics pretty well.

Creating a C++ device in linuxMCE is not very difficult. You basically go through the wizard, tell it what commands and events you are interested in, the device parameters and then the code will be generated for you.

You can then plug in similar code to the examples given, compile and create a device that uses your template.

I am willing to give you a hand as I am interested in doing the same thing.

Regards
Darren

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Updated: Porting phidgets to become a DCE device?
« Reply #4 on: February 26, 2008, 05:37:06 am »
Darren,

Richard is VERY new to linuxmce, so getting a development environment may take a bit.  I don't want to scare him off by exposing him to the hassles of setting it up..

(he poked his head into the forum last night before he started downloading the DVD)

It might be possible for him to expose the device to the web, for someone else to try..

HTH

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

rthorntn

  • Regular Poster
  • **
  • Posts: 25
    • View Profile
Re: Updated: Porting phidgets to become a DCE device?
« Reply #5 on: February 26, 2008, 07:37:36 am »
Hi Darren/Dan,

I am very new to LMCE :-)

Basically, I love the direction that LMCE is going, and am trying to get the ideas floating round my head in to some sort of system.

I was thinking the phidgets would be good for a form of remote telemetry, also they have rfid and other cool stuff.  I was going to leave the device control to PLCBUS but phidgets can be used for this as well.

I do have fairly good linux knowledge including installing packages, building kernels and compiling applications.

I do not have any programming experience, I am not sure how successful I would be here.

I will be around for the long term, I have a list of things todo, I will build a core as soon as I get it downloaded.

Its all great stuff and I am stoked by how helpful everyone is.

A big thanks to everyone.

Cheers
Rich