Webservice : trying to understand...and make it works

Supporting Visual Studio on Windows
greenbox
Phidgetsian
Posts: 5
Joined: Wed Apr 18, 2012 8:31 am
Contact:

Webservice : trying to understand...and make it works

Postby greenbox » Wed Apr 18, 2012 8:58 am

Hi !

i am trying to deal with webservices (for 8/8/8), but i don't understand how it works.
My environment is Linux for webservice server and Windows with .NET for client side.
192.168.0.32 is my linux server (where webservice is running)
192.168.0.60 is my Windows client

on the client side, i run :
CSharp_2.1.8.20120216\CSharp\InterfaceKitExamples\InterfaceKit-full\InterfaceKit-full\bin\Debug>InterfaceKit-full.exe -n 124417 -i 192.168.0.32:5001
I get this :
print_screen_ws_client.PNG
print_screen_ws_client.PNG (15.15 KiB) Viewed 3498 times


On the server side, in verbode mode, i get this :
print_screen_ws_server.PNG
print_screen_ws_server.PNG (13.89 KiB) Viewed 3498 times


Communication between client and server seems ok, but the window is empty on the client side...normal ? am i doing something wrong ?

ps : port 5001 is open on the server side: telnet 192.168.0.32 5001 = OK

I have read all docs regarding webservices on Phidgets web site, but i cannot find simple and ready to go exemples...
I mean, for instance, how to retrieve my Phidget device serial number using webservices ?

Best regards

erik
King of the Lab
Posts: 476
Joined: Fri Mar 06, 2009 12:42 pm
Location: Calgary, Canada
Contact:

Re: Webservice : trying to understand...and make it works

Postby erik » Wed Apr 18, 2012 9:14 am

What are the versions on each computer? There may be a version mismatch between them. In this case, you will need to update both versions to the same one.

Additionally, on Windows if you have the Phidget Control Panel and Bonjour installed, check under the Webservice Tab --> Bonjour Tab and see if you can open the 8/8/8 there.

To determine serial numbers of attached Phidgets using the webservice, take a look at the Phidget Manager class. This will allow you to see all the attached devices to the server, and all the associated serial numbers. This is what the Phidget Control Panel uses to see both locally and remotely attached devices.

greenbox
Phidgetsian
Posts: 5
Joined: Wed Apr 18, 2012 8:31 am
Contact:

Re: Webservice : trying to understand...and make it works

Postby greenbox » Wed Apr 18, 2012 9:32 am

Version is 2.1.8 (from 16 Frebruary 2012) on both side.

On Windows side i have Bonjour installed but i cannot see my 8/8/8 in Bonjour tab from Phidget Control Panel.

I cannot find the PhidgetManager class (PhidgetManager.cs ?)

greenbox
Phidgetsian
Posts: 5
Joined: Wed Apr 18, 2012 8:31 am
Contact:

Re: Webservice : trying to understand...and make it works

Postby greenbox » Fri May 18, 2012 5:59 pm

Hi !

Now i can see my remote ifkit 8/8/8 in the Bonjour tab. It was an avahi-daemon issue.

But i still cannot connect remotly through web service.

i am thinking about a serial number issue, because when i plug my ifkit into the computer i get this :

Code: Select all

[10055.509490] usb 1-2.4: New USB device found, idVendor=06c2, idProduct=0045
[10055.517150] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[10055.525329] usb 1-2.4: Product: Phidget
[10055.529632] usb 1-2.4: Manufacturer: Phidgets Inc.
[10055.534973] usb 1-2.4: SerialNumber: 124417

and when i start the webservice i get this :

Code: Select all

INFO: Enabling logging
INFO: InitializeZeroconf Seems good...
INFO: Found 2 interfaces to Bind to.
INFO: Setting up interface 0: Family:2, Socktype:1, Protocol:6
INFO: Setting up interface 1: Family:10, Socktype:1, Protocol:6
INFO: New device in CUSBBuildList: 001009
INFO: Service 'omap' successfully established.
INFO: Service 'Phidget InterfaceKit 8/8/8 (126696)' successfully established.

Serial numbers mismatch.
Note that 2 interfaces are found to bind to...in my opinion, here is the problem...
I have only 1 ifkit connected, and this is the only usb device i have...
Here is lsusb output :

Code: Select all

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 009: ID 06c2:0045 Phidgets Inc. (formerly GLAB) PhidgetInterface Kit 8-8-8

When i force usage of serial 124417 on the client side (-n 124417), the web service crashes with the following :

Code: Select all

INFO: Phidget Open: (Client: 192.168.0.60:049166), (Device: PhidgetInterfaceKit, Serial Number: 124417, Any Label)
INFO: Open Phidget
WARN: usb_get_driver_np failed with error code: -61 "No data available"
INFO: Using Control Endpoint for Host->Device communication.
*** glibc detected *** ./phidgetwebservice21: munmap_chunk(): invalid pointer: 0x400f86a9 ***
Aborted

Finally, i've done the following test :
- plug my 8/8/8 into a Windows server and start the web service
- then, go to my client computer and launch the Phidget Control Panel to access the web service : this way it works.

So, by now, i can conclude :
- my 8/8/8 serial is 124417 (and not 126696)
- this is an issue with my Linux server and usb (note that i have no problem to access my 8/8/8 from the Linux server when direclty attached)

I will appreciate any ideas...

Edit : as it seems it is not a programming issue, i moved this thread to the appropriate forum :
http://www.phidgets.com/phorum/viewtopic.php?f=2&t=5543

Edit 2 : [SOLVED] : follow the above link for details

regards


Return to “C#.NET”

Who is online

Users browsing this forum: No registered users and 1 guest