Alert.png

Notice: This page contains information for the legacy Phidget21 Library.

Phidget21 is out of support. Bugfixes may be considered on a case by case basis.

Phidget21 does not support VINT Phidgets, or new USB Phidgets released after 2020. We maintain a selection of legacy devices for sale that are supported in Phidget21.

We recommend that new projects be developed against the Phidget22 Library.


Click on the 2phidget22.jpg button in the menu bar to go to the Phidget22 version of this page.

Alert.png

General Troubleshooting: Difference between revisions

From Phidgets Legacy Support
No edit summary
 
(77 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Troubleshooting]]
__TOC__
__TOC__




To troubleshoot a Phidget problem, we strongly recommend a logical approach to pin down the source.  Although Phidgets are designed to be easy to use, they actually are a complex system with many levels of interfacing between the Phidget, cables, possible networking, operating systems, USB ports, the Phidget Libraries, and ultimately your code.
To troubleshoot a problem with a Phidget device or program, we strongly recommend using a logical approach to pin down the source.  Although Phidgets are designed to be easy to use, they actually are a complex system with many levels of interfacing between the Phidget, cables, possible networking, operating systems, USB ports, the Phidget Libraries, and ultimately your code.


To help you narrow down the source of the problem into a specific part of the overall system, we provide an overview of the entire system below.  In each <span style="background:#EDEDED;padding:5px;border:1px dashed;">grey box</span> we have the affected parts of the system (computer, the Phidget, your code, etc) and a simple step or two you can take to see if the problem is within that part of the overall system.
To help you narrow down the source of the problem into a specific part of the overall system, we provide an overview of the entire system below.  In each <span style="background:#EDEDED;padding:5px;border:1px dashed;">grey box</span> we show the affected parts of the system (computer platform, the Phidget, your code, etc) and a simple step or two you can take to see if the problem is within that part of the overall system.


Once you have found the <span style="background:#EDEDED;padding:5px;border:1px dashed;">part of your system</span> with the problem, click on the <font size="+1">'''<span style="color:#006600">green link</span>'''</font> within the box to learn more about how to troubleshoot that portion.
Once you have found the <span style="background:#EDEDED;padding:5px;border:1px dashed;">part of your system</span> with the problem, click on the <font size="+1">'''<span style="color:#006600">green link</span>'''</font> within the box to learn more about how to troubleshoot that portion.


[[Image:troubleshooting.png|1200px]]
[[Image:troubleshooting.png|link=]]
 
The content that you need to solve your problem probably exists somewhere within our documentation.  We cover everything from compiling the Phidget Libraries for embedded systems, to using our example on Visual Studio 6, to how Solid State Relays actually work.  The purpose of this page, then, is to distill the problem you have enough that you can get to the documentation you need.


==Quick Links==
==Quick Links==
Line 22: Line 25:
==Code Troubleshooting==
==Code Troubleshooting==


;Quick Fixes...
To determine whether the problem is in your code, '''you should run the provided examples''' for [[Software Overview#Language Support|your programming language]].
:Syntax help can be found in the API download and code snippets for [[Software Overview#Language Support|your programming language]]
:High-level concept help (logging, catching errors, using the API) is on the [[General Phidget Programming]] page
:Generic API help (error types and codes, information about each function) is on the [[General API]] page.
:Hardware help (number of ports returned in code, maximum software sampling speed) can be found in the ''API'' section on the [[Device List|page for your device]]
:Compiler help (linking libraries, running code) can be found on the [[Software Overview#Language Support | page for your language]]  
:Ensure you wait enough time for the Phidget to respond to your requests, such as when switching between ratiometric and non-ratiometric sensing, or to get and set device data.


To determine whether the problem is within the code you're writing, '''you should run the provided examples''' for [[Software Overview#Language Support|your programming language]]To download and run the examples, visit the page about [[Software Overview#Language Support | your programming language]]. The examples are designed to test and flex most of the Phidget API, including your device API.  This holds true for the majority of devices and languages, but we also provide a '''<code>HelloWorld</code>''' example for each language that you can use with any device to test part of the API. 
* If the examples run, the problem is within your code.
* If the examples do not run, the problem is at a lower level in the systemRead on to the [[#Operating System Troubleshooting|operating system troubleshooting]] section below.


* If the examples run, the problem is within your code.
'''If the problem is in your code:'''
* If the examples do not run, the problem is at a lower level.  Read on to the [[#Operating System Troubleshooting|operating system troubleshooting]] section below.
:*Syntax help can be found in the API download and code snippets for [[Software Overview#Language Support|your programming language]]
:*High-level concept help (logging, catching errors, using the API) is on the [[General Phidget Programming]] page
:*Help using hardware in code (number of ports returned in code, maximum software sampling speed) can be found in the ''Software/API'' section on the page for your device on our [{{SERVER}} main website]
:*Compiler help (linking libraries, running code) can be found on the [[Software Overview#Language Support | page for your language]]  
:*Ensure you wait enough time for the Phidget to respond to your requests, such as when switching between ratiometric and non-ratiometric sensing, or to get and set device data.


If an example specific to your device exists, the source code file will be named similarly to the hardware. If you are still not sure which source code file or project to use, check the API section within the [[Device List|page for your device]] which will tell you the software object -- and thus example file name -- for your Phidget.  Make sure to use either that device-specific example, or the '''<code>HelloWorld</code>''' example.
To download and run the examples, visit the page about [[Software Overview#Language Support | your programming language]]. The ''Software/API'' section within the Getting Started page for your device [{{SERVER}} on our main website] will tell you the software object -- and thus example file name -- for your Phidget.  Make sure to use either that device-specific example, or the '''<code>HelloWorld</code>''' example if there is not an example specifically for your device.


When debugging code, it helps to extract what is known as a '''Minimum Reproducible Unit''' (MRU), which is the minimum lines of code that can reproduce the issue.  This will allow you to find what part of your use of Phidgets in code is causing the problem. We can help with this.  Extracting an MRU is a powerful process which can not only isolate the problem, but also allow you to examine and organize your code.  Also, it helps us debug your problem faster if you can show exactly what the problem is in your Phidget API code.
When debugging, it helps to extract from your code what is known as a '''Minimum Reproducible Unit''' (MRU).  This is the minimum lines of code that can reproduce the issue.  We can help with this.  An MRU will allow you to find what part of your use of Phidgets in code is causing the problem.   Extracting an MRU is a powerful process which can not only isolate the problem, but also allow you to examine and organize your code.  Also, it helps us debug your problem faster if you can show exactly what the problem is in your Phidget API code.


If you have found the problematic lines and want to see what is wrong, you can try turning on '''Phidget logging'''.  Logging can save and display many different levels of messages (errors, debugging, or even individual Phidget library actions) to either a file or the program console.  You can find help to turn logging on and off in the [[General Phidget Programming#Logging | logging section]] of our General Phidget Programming guide.
If you have found problematic lines and want to see what is wrong, you can turn on '''Phidget logging'''.  Logging can save and display many different levels of messages (errors, debugging, or even individual Phidget library actions) to either a file or the program console.  You can find help to turn logging on and off in the [[General Phidget Programming#Logging | logging section]] of our General Phidget Programming guide.


'''Note:''' We do not offer services to debug general programming projects, or to develop code from scratch.  We do, however, support any and all questions about the Phidgets and their use.  So, if you have ideas for helpful examples, more documentation, or other useful material we could provide, we welcome your suggestions!
'''Note:''' We do not offer services to debug general programming projects, or to develop code from scratch.  We do, however, support any and all questions and suggestions about Phidgets and their use.  So, if you have ideas for helpful examples, more documentation, or other useful material we could provide, we welcome them!


==Operating System Troubleshooting==
==Operating System Troubleshooting==


;Quick Fixes...
To determine whether the problem is in your operating system, you should '''check whether your system detects the Phidget''' by following the ''Troubleshooting'' section on the page for [[Software Overview#Operating System Support|your operating system]].  Commonly, this is done with:
:Make sure '''no other programs''' are accessing the Phidget USB port at the same time as your code.  This '''includes''' the [[Phidget Control Panel]] on Windows and the [[Phidget Preference Pane]] on Mac OS X.
*The Device Manager in [[OS - Windows#Troubleshooting|Windows]]
:Make sure your [[Software Overview#Operating System Support | operating system version is supported]]
*The "About This Mac" menu in [[OS - OS X#Troubleshooting|OS X]]
:Ensure the Phidget libraries and drivers [[Software Overview#Operating System Support | for your operating system]] are the '''most recent''' version
*The kernel logs via '''<code>dmesg | tail</code>''' in [[OS - Linux#Troubleshooting|Linux]]
:Check the ''Limitations'' section [[Software Overview#Operating System Support | for your operating system]] as some problems arise from special combinations
 
To determine whether the problem is with your operating system, or at a lower level, you should '''check your operating system logs''' for the appearance of the Phidget as a hardware device.  The process to check these logs varies by platform - whether by the Device Manager ([[OS - Windows|Windows]]), <span style='color:red;'>???</span> ([[OS - Mac OSX|Mac OS X]]) or the kernel logs ([[OS - Linux|Linux]]) - and is described [[Software Overview#Operating System Support | on the page for your operating system]].


If you plug in the Phidget and the system logs show:  
If you plug in the Phidget and the system shows:  
* It does not appear, or  
* It does not appear, or  
* It does not disconnect, or
* It does not disconnect, or
* It only appears sometimes  
* It only appears sometimes  
The problem may be in the communication portion of the system, or lower.  Start with the [[#Communications Troubleshooting | Communications Troubleshooting]] section below and work your way down.
The problem is probably in the communication portion of the system, or at a lower level.   
Start with the [[#Communications Troubleshooting | Communications Troubleshooting]] section below and work your way down. However...
 
'''If the problem is with your operating system:'''
:*Make sure '''no other programs''' are accessing the Phidget USB port at the same time as your code.  This '''includes''' the [[Phidget Control Panel]] on Windows and the [[Phidget Control Panel#OS X|Phidget Preference Pane]] on OS X.
:*Make sure your [[Software Overview#Operating System Support | operating system version is supported]]; this includes virtual machine versions (check the page for both the host and emulated machines)
:*Ensure the Phidget libraries and drivers [[Software Overview#Operating System Support | for your operating system]] are the '''most recent''' version
:*Check the ''Limitations'' section [[Software Overview#Operating System Support | for your operating system]] as some problems arise from special combinations


If, on the other hand, your computer ''consistently detects'' the Phidget on the USB port ''but the libraries fail to communicate with it'' (i.e. the provided examples do not run, as [[#Code Troubleshooting | described above]]), the problem is probably (a) your Phidget library versions, (b) other, third-party drivers causing a conflict, or (c) your operating system.  Details about these problems for each platform can be found in the ''Troubleshooting'' section on the page [[Software Overview#Operating System Support | for your operating system]].
If, on the other hand, your computer ''consistently detects'' the Phidget on the USB port ''but the libraries fail to communicate with it'' (i.e. the provided examples do not run, as [[#Code Troubleshooting | described above]]), the problem is probably (a) your Phidget library versions, (b) other, third-party drivers causing a conflict, or (c) your operating system.  Details about these problems for each platform can be found in the ''Troubleshooting'' section on the page [[Software Overview#Operating System Support | for your operating system]].
Line 63: Line 69:
==Communications Troubleshooting==
==Communications Troubleshooting==


;Quick Fixes...
To determine whether the problem is a communications problem, '''check operation using the shortest, most direct connection you can''', including both:
:Make sure the Phidget is plugged in to the computer (always good to check)
*Data connections, and
:Use [[Communication Protocols#USB|short USB cables]] (&lt;5 m)... long wires lead to poor sensor data and/or inadequate power
*Power connections
:If you are using an unpowered USB hub, try connecting directly to a computer
 
:Make sure any cables between multiple Phidgets (such as sensors and an Interface Kit, for example) are correctly connected. Helpful pictures can be found on the ''Getting Started'' [[Device List|page for your device]]
'''If you believe a connection may be at fault:'''
:*Use [[Electricity Primer#USB Cables|short USB cables]] (&lt;5 m)... long wires lead to poor sensor data and/or inadequate power
:*Use powered USB hubs or direct connections to a computer. 
:*Try unplugging everything on the hub except the Phidget.
:*Try plugging the Phidget directly into the computer instead of using a hub. If this solves the problem, either the hub is at fault, or the added length of cable from the hub to the computer may have caused instability.
:*Make sure any cables between Phidgets are correctly connected. Helpful pictures can be found on the ''Getting Started'' page for your device [{{SERVER}} on our main website]
:*If your Phidget needs external power, such as the motors and relays, the proper way to provide it can be found on the product page for your device [{{SERVER}} on our main website]


Communication problems come from either (a) power issues, or (b) connection issues.  Once everything is plugged in and powered properly, there is not a whole lot that can go wrong with cables.  The proper way to hook up your device can be found on the ''Getting Started'' page [[Device List | for your device]].  The proper way to provide additional power (only needed for some devices such as motors and relays, most Phidgets get power directly from USB) can be found on the product specification page [[Device List | for your device]].
Communication problems come from either (a) power issues, or (b) connection issues.  Once everything is plugged in and powered properly, there is not a whole lot that can go wrong with cables.


The one exception to communications problems being only from power or connections is if you're using a wireless internet connection to the [[SBC|Single Board Computer]].  Setting up and troubleshooting that Wifi connection can be found on its [[SBC|product page]].
The one exception to communications problems being only from power or connections is if you're using a wireless internet connection to the [{{SERVER}}/products.php?product_id=1073 Single Board Computer].  Help for setting up and troubleshooting that Wifi connection can be found on the [[OS - Phidget SBC|SBC operating system page]].


==Webservice Troubleshooting==
==Webservice Troubleshooting==


;Quick Fixes...
To determine whether the problem is with the webservice, '''check whether the Phidget can run without the webservice''' by directly connecting it to one of the computers and running Phidget code locally on that system.
:Make sure the Phidget library versions are the '''same''' on both computers.  The Webservice and libraries are on the [[Software Overview#Operating System Support | page for your operating system]]
 
:Wait a little time before trying to do things with the Phidget upon first connecting remotely, sometimes delay occurs over a network
* This will be possible at least for the computer hosting the direct connection to the Phidget
:Check the network setup on both sides (IP address and port correct?  Server name spelling?  User name and password?)
* You can use a local version of the open() function, or use our examples as described in the [[#Code Troubleshooting|Code Troubleshooting]] section above
* For the platform remotely controlling the Phidget, this direct test may not be possible (such as for [[OS - iOS|iOS]] or some [[OS - Android|Android]] devices)


To narrow down the problem to the Webservice, try using the Phidget only on the ''directly'' connected systemThen, if possible, also try using the Phidget on the ''remotely'' controlling system.  (Some platforms only allow remote use, so this may not be possible.)
If the Phidget works locally but not over the network, the problem is with the webserviceIf the Phidget does not work locally either, it is probably not the webservice, and is instead your code, your operating system, your connections, or the device itselfUse this Troubleshooting guide on the local system to diagnose the problem.


If the Phidget works locally on both ends but not remotely, the problem is with the Webservice.  First, try slowing your program down.  Sometimes a network will introduce a bit of delay.  This will primarily affect how quickly you can use the Phidget after opening and attaching it, as well as the speed of reading continuous data from the device.  Using a '''<code>sleep</code>''' or '''<code>wait</code>''' function for short periods at these points will slow down your programIf the program works when slowed, network lag is probably at fault.
'''If the problem is within the webservice:'''
:*Make sure the Phidget library and webservice versions are the '''same''' on both computers.  Different webservice versions do not work together.  Find the webservice download on the [[Software Overview#Operating System Support | page for your operating system]]
:*Wait some time (a few seconds, to start) before trying to do things with the Phidget upon first connecting remotely, sometimes delay occurs over a network
:*Check the network setup on both sidesTypos can occur in the IP address, port number, server name, and password.


Another problem might be an error in the numerous details that need to match on each computer.  You either need an IP address and port, or the server name (when using mDNS from '''<code>Bonjour</code>''' on Windows and Mac OS X or '''<code>avahi</code>''' on Linux).  The server name is set at the Webservice start up, or it will default to the name of the computer with the direct connection.
Slowing your program down by using a '''<code>sleep</code>''' or '''<code>wait</code>''' function will allow you to test whether network lag is at fault. Network delay will primarily affect (a) how quickly you can use the Phidget after opening and attaching it, and (b) the speed of reading continuous data from the device.  Putting wait delays in your code especially in data-reading loops will prevent the network from being totally overloaded, and let you see whether you can get 'any' data through.
 
Another problem might be an error in the details that need to match on each computer.  You either need an IP address and port, or the server name (when using muticast DNS from '''<code>Bonjour</code>''' on Windows and OS X or '''<code>avahi</code>''' on Linux).  The server name is set at the Webservice start up, or it will default to the name of the computer with the direct connection.  Double-checking all of these details may uncover the problem.
 
Finally, if you suspect multicast DNS may be the problem, use the IP address and port form of the '''<code>open()</code>''' function to directly connect to the computer controlling the Phidget.  On [[OS - Linux|Linux]], the use of mDNS can be compiled out of the webservice, and the webservice can be tested without it.
 
===Version Mismatch===
If you are experiencing a "Version Mismatch" error this is due to either end of the connection having an out of date version of the WebService.  To fix this make sure that both ends are fully updated and try again.  Note that on the SBC this means you will need to go to the System->Packages tab and upgrade all of the systems packages.  For more information on upgrading the SBC refer to the [[1073 User Guide#Recovery / Upgrade System|SBC's User Guide]].


==Device Troubleshooting==
==Device Troubleshooting==


;Quick Fixes...
To determine whether the problem is with the Phidget itself, '''check whether the Phidget works on a different computer'''.
:What your device can and can't do (power, functionality, etc) will be found on [[Device List|its product page]].
 
:Make sure all the pieces are hooked up correctly.  Helpful photos can be found on the ''Getting Started'' page [[Device List|for your device]].
'''If you suspect the problem is with the hardware:'''
:If you're trying to do something especially involved, become well-versed in your hardware.  We provide lots of education on our [[Primers| primer pages]].
:*Move the setup to a different operating system. If it appears on another system, you'll want to debug your original system starting with [[#Operating System Troubleshooting|Operating System Troubleshooting]]
:*Check what your device can and can't do (power, functionality, etc) - this will be found on its product page [{{SERVER}} on our main website].
:*Make sure all the pieces are hooked up correctly.  Helpful photos can be found on the ''Getting Started'' page for your device in its [[:Category:UserGuide|user guide]].
:*If you're trying to do something especially involved, become well-versed in your hardware.  We provide lots of information on our [[:Category:Primer| primer pages]].
 
It may be tempting to assume that a device "not working" indicates a problem with the hardware.  But this troubleshooting page itself shows that even something as simple as a device "not working" could be due to a problem at several different points.  The best place to start if you haven't worked through our documentation yet would be the ''Getting Started'' guide for your device, found in its [[:Category:UserGuide|user guide]].
 
===Diagnosing Hardware Problems===
An easy way to tell you have a '''new''' problem with your device is that it suddenly stops working.  If you run the same code, on the same system, with the same libraries, and the same Phidget and suddenly it doesn't do the same thing anymore, you almost certainly have a hardware problem.  This can happen especially on boards and/or components that handle some form of external power (motors, relays, etc).  It is important to make sure you don't overload the board, or you could do some serious damage.  Check the specs for your device and remember, be conservative.
 
====Heat====
One of the surest ways to discover a problem is as simple as touching the board.  When current flows through electronics it will generate heat, this is a fundamental fact with all electronics.  The more current that you are pushing, the more heat that will be generated.  As a result of this the instance where you have the most current possible flowing (a short circuit) will also generate the most heat.  So much heat that it will likely be painful to the touch so be careful when poking and prodding the various parts of the board.  Keep in mind that some heat build up is to be expected, but if you can find a part of the board that is unusually hot then there is a strong possibility that there is a short circuit somewhere in that section and the board has been damaged.  You should [[Contact Us]] if this is the case.
 
====Checking Voltages====
If you have a multimeter at your disposal another good way of checking your board is to check that all of the ICs on the board are getting the power they should.  If you look at the labelling on the top of the ICs you should be able to get the part number of the chip.  If it is too small or hard to read you can always look at the high resolution product images on our website to get a better look.  Failing that, [[Contact Us]] and we can give you the part number.  Once you have it search the internet for a data sheet for the part.  The data sheet will have a pin diagram from which you can determine which pins are V<sub>cc</sub> and Gnd.  Take your multimeter and measure the voltage between those pins.  Does the chip appear to be getting the voltage it should be?  If not then it is possible there is a short somewhere in the power line.


An easy way to tell you have a '''new''' problem with your device is that it suddenly stops working.  If you run the same code, on the same system, with the same libraries, and the same Phidget and suddenly it doesn't do the same thing anymore, you almost certainly have a hardware problem.
====EMI====
One of the most difficult hardware related problems to diagnose and debug is electromagnetic interference or EMI.  In fact, it is such a complex topic that we have a guide devoted entirely to it.  If you think you may be having EMI difficulties or if you don't know what kind of difficulties you might be having (an apparent lack of other explanation is a good sign your problems might be EMI related) you should read our guide for [[Addressing Electromagnetic Interference with Phidgets|addressing EMI issues]].


This can happen especially on boards and/or components that handle some form of external power (motors, relays, etc).  It is important to make sure you don't overload the board, or you could do some serious damage.  Check the [[Device List|specs for your device]] and remember, be conservative!
==Contact Us==


However, sometimes you get a board right out of the box and it doesn't seem to work.  Some Phidgets, being flexible to many tasks, have their own connections between sensors, batteries, power, intermediate boards (like temperature), and so on.  Although usually this is an intuitive hookup process, take another look at the photos in the ''Getting Started Guide'' for [[Device List |your device]] and make sure all the wires are in their proper place.
If you are still having trouble after working through this guide, please [[Contact Us|contact us]].


Once you have confirmed this, slow down and (if you haven't already) work carefully through the setup process. starting with that same ''Getting Started Guide'' for your device - to make sure it is indeed a problem with the hardware.  This troubleshooting page itself shows that even something as simple as a device "not working" could be due to a problem at several different points.
It helps if you can you can give us precise information about your issue, such as:
*Minimal code to reproduce the problem
*What part of the system you think the issue might be in, and why
*And, of course, photos or even videos (we love these)

Latest revision as of 19:53, 4 February 2013


To troubleshoot a problem with a Phidget device or program, we strongly recommend using a logical approach to pin down the source. Although Phidgets are designed to be easy to use, they actually are a complex system with many levels of interfacing between the Phidget, cables, possible networking, operating systems, USB ports, the Phidget Libraries, and ultimately your code.

To help you narrow down the source of the problem into a specific part of the overall system, we provide an overview of the entire system below. In each grey box we show the affected parts of the system (computer platform, the Phidget, your code, etc) and a simple step or two you can take to see if the problem is within that part of the overall system.

Once you have found the part of your system with the problem, click on the green link within the box to learn more about how to troubleshoot that portion.

Troubleshooting.png

The content that you need to solve your problem probably exists somewhere within our documentation. We cover everything from compiling the Phidget Libraries for embedded systems, to using our example on Visual Studio 6, to how Solid State Relays actually work. The purpose of this page, then, is to distill the problem you have enough that you can get to the documentation you need.

Quick Links

The sections linked from the image above are:

Code Troubleshooting

To determine whether the problem is in your code, you should run the provided examples for your programming language.

  • If the examples run, the problem is within your code.
  • If the examples do not run, the problem is at a lower level in the system. Read on to the operating system troubleshooting section below.

If the problem is in your code:

  • Syntax help can be found in the API download and code snippets for your programming language
  • High-level concept help (logging, catching errors, using the API) is on the General Phidget Programming page
  • Help using hardware in code (number of ports returned in code, maximum software sampling speed) can be found in the Software/API section on the page for your device on our main website
  • Compiler help (linking libraries, running code) can be found on the page for your language
  • Ensure you wait enough time for the Phidget to respond to your requests, such as when switching between ratiometric and non-ratiometric sensing, or to get and set device data.

To download and run the examples, visit the page about your programming language. The Software/API section within the Getting Started page for your device on our main website will tell you the software object -- and thus example file name -- for your Phidget. Make sure to use either that device-specific example, or the HelloWorld example if there is not an example specifically for your device.

When debugging, it helps to extract from your code what is known as a Minimum Reproducible Unit (MRU). This is the minimum lines of code that can reproduce the issue. We can help with this. An MRU will allow you to find what part of your use of Phidgets in code is causing the problem. Extracting an MRU is a powerful process which can not only isolate the problem, but also allow you to examine and organize your code. Also, it helps us debug your problem faster if you can show exactly what the problem is in your Phidget API code.

If you have found problematic lines and want to see what is wrong, you can turn on Phidget logging. Logging can save and display many different levels of messages (errors, debugging, or even individual Phidget library actions) to either a file or the program console. You can find help to turn logging on and off in the logging section of our General Phidget Programming guide.

Note: We do not offer services to debug general programming projects, or to develop code from scratch. We do, however, support any and all questions and suggestions about Phidgets and their use. So, if you have ideas for helpful examples, more documentation, or other useful material we could provide, we welcome them!

Operating System Troubleshooting

To determine whether the problem is in your operating system, you should check whether your system detects the Phidget by following the Troubleshooting section on the page for your operating system. Commonly, this is done with:

  • The Device Manager in Windows
  • The "About This Mac" menu in OS X
  • The kernel logs via dmesg | tail in Linux

If you plug in the Phidget and the system shows:

  • It does not appear, or
  • It does not disconnect, or
  • It only appears sometimes

The problem is probably in the communication portion of the system, or at a lower level. Start with the Communications Troubleshooting section below and work your way down. However...

If the problem is with your operating system:

If, on the other hand, your computer consistently detects the Phidget on the USB port but the libraries fail to communicate with it (i.e. the provided examples do not run, as described above), the problem is probably (a) your Phidget library versions, (b) other, third-party drivers causing a conflict, or (c) your operating system. Details about these problems for each platform can be found in the Troubleshooting section on the page for your operating system.

Communications Troubleshooting

To determine whether the problem is a communications problem, check operation using the shortest, most direct connection you can, including both:

  • Data connections, and
  • Power connections

If you believe a connection may be at fault:

  • Use short USB cables (<5 m)... long wires lead to poor sensor data and/or inadequate power
  • Use powered USB hubs or direct connections to a computer.
  • Try unplugging everything on the hub except the Phidget.
  • Try plugging the Phidget directly into the computer instead of using a hub. If this solves the problem, either the hub is at fault, or the added length of cable from the hub to the computer may have caused instability.
  • Make sure any cables between Phidgets are correctly connected. Helpful pictures can be found on the Getting Started page for your device on our main website
  • If your Phidget needs external power, such as the motors and relays, the proper way to provide it can be found on the product page for your device on our main website

Communication problems come from either (a) power issues, or (b) connection issues. Once everything is plugged in and powered properly, there is not a whole lot that can go wrong with cables.

The one exception to communications problems being only from power or connections is if you're using a wireless internet connection to the Single Board Computer. Help for setting up and troubleshooting that Wifi connection can be found on the SBC operating system page.

Webservice Troubleshooting

To determine whether the problem is with the webservice, check whether the Phidget can run without the webservice by directly connecting it to one of the computers and running Phidget code locally on that system.

  • This will be possible at least for the computer hosting the direct connection to the Phidget
  • You can use a local version of the open() function, or use our examples as described in the Code Troubleshooting section above
  • For the platform remotely controlling the Phidget, this direct test may not be possible (such as for iOS or some Android devices)

If the Phidget works locally but not over the network, the problem is with the webservice. If the Phidget does not work locally either, it is probably not the webservice, and is instead your code, your operating system, your connections, or the device itself. Use this Troubleshooting guide on the local system to diagnose the problem.

If the problem is within the webservice:

  • Make sure the Phidget library and webservice versions are the same on both computers. Different webservice versions do not work together. Find the webservice download on the page for your operating system
  • Wait some time (a few seconds, to start) before trying to do things with the Phidget upon first connecting remotely, sometimes delay occurs over a network
  • Check the network setup on both sides. Typos can occur in the IP address, port number, server name, and password.

Slowing your program down by using a sleep or wait function will allow you to test whether network lag is at fault. Network delay will primarily affect (a) how quickly you can use the Phidget after opening and attaching it, and (b) the speed of reading continuous data from the device. Putting wait delays in your code especially in data-reading loops will prevent the network from being totally overloaded, and let you see whether you can get 'any' data through.

Another problem might be an error in the details that need to match on each computer. You either need an IP address and port, or the server name (when using muticast DNS from Bonjour on Windows and OS X or avahi on Linux). The server name is set at the Webservice start up, or it will default to the name of the computer with the direct connection. Double-checking all of these details may uncover the problem.

Finally, if you suspect multicast DNS may be the problem, use the IP address and port form of the open() function to directly connect to the computer controlling the Phidget. On Linux, the use of mDNS can be compiled out of the webservice, and the webservice can be tested without it.

Version Mismatch

If you are experiencing a "Version Mismatch" error this is due to either end of the connection having an out of date version of the WebService. To fix this make sure that both ends are fully updated and try again. Note that on the SBC this means you will need to go to the System->Packages tab and upgrade all of the systems packages. For more information on upgrading the SBC refer to the SBC's User Guide.

Device Troubleshooting

To determine whether the problem is with the Phidget itself, check whether the Phidget works on a different computer.

If you suspect the problem is with the hardware:

  • Move the setup to a different operating system. If it appears on another system, you'll want to debug your original system starting with Operating System Troubleshooting
  • Check what your device can and can't do (power, functionality, etc) - this will be found on its product page on our main website.
  • Make sure all the pieces are hooked up correctly. Helpful photos can be found on the Getting Started page for your device in its user guide.
  • If you're trying to do something especially involved, become well-versed in your hardware. We provide lots of information on our primer pages.

It may be tempting to assume that a device "not working" indicates a problem with the hardware. But this troubleshooting page itself shows that even something as simple as a device "not working" could be due to a problem at several different points. The best place to start if you haven't worked through our documentation yet would be the Getting Started guide for your device, found in its user guide.

Diagnosing Hardware Problems

An easy way to tell you have a new problem with your device is that it suddenly stops working. If you run the same code, on the same system, with the same libraries, and the same Phidget and suddenly it doesn't do the same thing anymore, you almost certainly have a hardware problem. This can happen especially on boards and/or components that handle some form of external power (motors, relays, etc). It is important to make sure you don't overload the board, or you could do some serious damage. Check the specs for your device and remember, be conservative.

Heat

One of the surest ways to discover a problem is as simple as touching the board. When current flows through electronics it will generate heat, this is a fundamental fact with all electronics. The more current that you are pushing, the more heat that will be generated. As a result of this the instance where you have the most current possible flowing (a short circuit) will also generate the most heat. So much heat that it will likely be painful to the touch so be careful when poking and prodding the various parts of the board. Keep in mind that some heat build up is to be expected, but if you can find a part of the board that is unusually hot then there is a strong possibility that there is a short circuit somewhere in that section and the board has been damaged. You should Contact Us if this is the case.

Checking Voltages

If you have a multimeter at your disposal another good way of checking your board is to check that all of the ICs on the board are getting the power they should. If you look at the labelling on the top of the ICs you should be able to get the part number of the chip. If it is too small or hard to read you can always look at the high resolution product images on our website to get a better look. Failing that, Contact Us and we can give you the part number. Once you have it search the internet for a data sheet for the part. The data sheet will have a pin diagram from which you can determine which pins are Vcc and Gnd. Take your multimeter and measure the voltage between those pins. Does the chip appear to be getting the voltage it should be? If not then it is possible there is a short somewhere in the power line.

EMI

One of the most difficult hardware related problems to diagnose and debug is electromagnetic interference or EMI. In fact, it is such a complex topic that we have a guide devoted entirely to it. If you think you may be having EMI difficulties or if you don't know what kind of difficulties you might be having (an apparent lack of other explanation is a good sign your problems might be EMI related) you should read our guide for addressing EMI issues.

Contact Us

If you are still having trouble after working through this guide, please contact us.

It helps if you can you can give us precise information about your issue, such as:

  • Minimal code to reproduce the problem
  • What part of the system you think the issue might be in, and why
  • And, of course, photos or even videos (we love these)