General Troubleshooting: Difference between revisions

From Phidgets Support
No edit summary
 
(167 intermediate revisions by 6 users not shown)
Line 1: Line 1:
__TOC__
[[Category:Troubleshooting]]
__NOTOC__


Although Phidgets are designed to be easy to use, they are actually 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 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.
The easiest way to find the problem in your system is to run through some simple tests to rule out certain parts of the 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 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.


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]]


==Quick Links==
==== Step 1: Test in Phidget Control Panel ====
[[Image:TMP1000_Panel.jpg|link=|right|300px]]


The sections linked from the image above are:


* [[#Code Troubleshooting | <span style="color:#006600">Code Troubleshooting</span>]]
* [[#Operating System Troubleshooting | <span style="color:#006600">Operating System Troubleshooting</span>]]
* [[#Communications Troubleshooting | <span style="color:#006600">Communications Troubleshooting</span>]]
* [[#Webservice Troubleshooting | <span style="color:#006600">Webservice Troubleshooting</span>]]
* [[#Device Troubleshooting | <span style="color:#006600">Device Troubleshooting</span>]]


==Code Troubleshooting==
Plug your Phidget into the computer test it using the [[Phidget Control Panel]] as outlined in the [[User Guides|User Guide]] for your device (For Linux users, just proceed to the step 2 instead). Choose the section that best matches the result you get and click on '''"Expand"''' to the right:
<br clear="all">
----
{{Collapse
|The Phidget doesn't show up in the control panel
|This often indicates an issue with your computer's operating system or the Phidget's hardware. First, go to the [[OS Troubleshooting]] page to make sure the Phidget can be seen on the USB, and then visit the [[Hardware Troubleshooting]] page.
}}
----
{{Collapse
|The Phidget shows up but the text or row is coloured red
|
[[File:Controlpanel_mac_firmwareupgrade.png|link=|300px|right]]


;Quick Fixes...
On MacOS, the red text means that a firmware update is available for your device. In older versions of the Windows control panel, the row may be red for the same reason (newer versions show a blue arrow instead). Double-clicking on the red bar or text will download and install the update, which should take less than a minute. If the firmware update fails, you may need to download the latest version of the Phidget drivers and try again. Once the device is updated and working, you can proceed to [[#Step 2: Test with our Sample Code|step 2]].
:Syntax help can be found in the API 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]]
:Help with individual compilers (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


If you are not sure 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. Read on to the [[#Operating System Troubleshooting|operating system troubleshooting]] section below.
----
{{Collapse
|When I open a channel on the device it says "Attached: Nothing" or "Resource Busy"
|A Phidget can only be opened in one program at a time, including the Phidget control panel. This behaviour usually means another program or process already has that channel open. Try closing all other programs, and if that doesn't work, go into the task manager and shut down any processes by other programs that use Phidgets. Rebooting may also work if the other program using the Phidget doesn't launch on startup.  


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.
If the problem persists, try testing the Phidget on a different computer if possible. If it still has the same problem on multiple computers, {{ContactUs|contact support}} .
}}
----
{{Collapse
|I can't find the Control Panel [[File:Ph.jpg|link=]] icon in my system tray
|For Windows users, navigate to <code>C:\Program Files\Phidgets\Phidget22</code> and run <code>Phidget22Manager.exe</code>. For MacOS users, you can run the Phidget Control Panel from the Applications list.  


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.
If you find that you need to manually open the Control Panel like this every time you start up your computer, you should open the options and make sure the setting for automatic startup is checked.


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 can't find the control panel in the places listed above, your Phidgets drivers may not have installed correctly. Go to the [[Operating_System_Support|page for your OS]] and follow the instructions to install the drivers.
}}
----


'''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!


==Operating System Troubleshooting==
Once you've successfully tested with the Control Panel, you can rule out most hardware and operating system issues. Next we'll try some sample code.


;Quick Fixes...
:Make sure '''no other programs''' are accessing the Phidget USB port at the same time as your code.  This includes the [[Phidget Control Panel]]!
:Make sure your [[Software Overview#Operating System Support | operating system version is supported]]
: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


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 (Windows), <span style='color:red;'>???</span> (Mac OS X) or the kernel logs (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:
* It does not appear, or
* It does not disconnect, or
* 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 and work your way down.


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]].
====Step 2: Test with our Sample Code====


==Communications Troubleshooting==
You can find our sample code downloads on [{{SERVER}}/?view=code_samples this page]. Select your desired programming language from the drop-down menu and select the object type that matches one used by your Phidget. Then go to the [[Programming_Resources|language page]] for your programming language and run through the instructions for running code in your chosen development environment.


;Quick Fixes...
----
:Make sure the Phidget is plugged in, and that your [[Communication Protocols#USB|cables are short]] (&lt;5 m)... long wires = poor data and low power
{{Collapse
|The Phidget channel fails to open / I get a timeout error
|Make sure you're setting all of the matching parameters correctly. You can learn more by reading our page on [[Addressing Phidgets]]. Also make sure that the channels you're trying to open aren't already opened in another program (including the Phidget Control Panel).
}}
----
{{Collapse
|I get a compiler error when I try to run the code
|If the code sample doesn't compile, there's probably something wrong in the build settings or a certain file may be in the wrong location. Double check the instructions on the language page to ensure that you've set everything up properly. If you still get compiler errors, {{ContactUs|contact us}} with a screenshot or copy+paste of your error and tell us what operating system, code sample, and Phidget you're using.
}}
----
{{Collapse
|I get a runtime error when I try to run the code
|If the error is reported by the Phidget library, you can find it on the {{Phidget22API}}. If it's being reported from basic functions in your language, try searching the exact text of the error on google to see if other users have had the same one. If that doesn't work, {{ContactUs|contact us}} with a screenshot or copy+paste of your error and tell us what operating system and Phidget you're using.
}}
----


==Webservice Troubleshooting==


==Device Troubleshooting==


;Quick Fixes...


Once you get our sample code working, you can be assured that your drivers and development environment are set up properly and your Phidget working as intended. If you're still having problems, have a look at our other troubleshooting topics:


 
* [[OS Troubleshooting]]
==Old Content==
* [[Code Troubleshooting]]
 
* [[Hardware Troubleshooting]]
 
* [[Network Server Troubleshooting]]
Phidgets are designed to be easy to use, but problems can pop up. Sometimes, it is difficult to determine if the problem is a hardware or software related issue. This document will help you narrow down your issue.
* [[Troubleshooting Common Issues]]
 
<br/>If you are having trouble connecting the hardware or know it is a hardware issue, please refer to the hardware section or your [[Device List|device page]]
<br/>Please also ensure that you have the latest libraries installed. A system restart may be needed.
 
It can also help to turn on Phidget logging. For instructions, please see your [[Software Overview#Language Support| programming language]].
<br/>
If you are receiving an error message via [[General Phidget Programming#Two: An error generated by an event|error events]], or [[General Phidget Programming#One: An error generated by a function call|exceptions]], please see here for a list of [[Error Codes|error codes]].
<br/>
Also, ensure that you have the enough user privileges to control Phidgets. This is particularly important in Linux environments.
<br/>
!!!!Goal should be to help users think about how to troubleshoot. Common problems should be directly explained, and we will link to less common problems.!!!!Give them link to pages that they can look at, instead of providing all possible solutions to problems.
 
<br/>
Please select the section that most closely relates to your issue.
 
==Configuring your system for Phidgets==
 
===Installing the Phidgets libraries===
If you are updating the libraries, please ensure that all Phidgets applications have been stopped. Please check the following for your operating system.
<br/><b>Windows</b><br/>
*Make sure your system is Windows 2000 or newer and has .NET Framework 2.0.
*If your system is 32 bit, please ensure the x86 installer is used. If your system is 64 bit,  please ensure the x64 installer is used.
*[[OS - Windows#Common Problems and Solutions|Common Fixes for Windows]]
<b>Mac OSX<br/></b>
*Make sure your system is OS X 10.4 or newer. Power PC, Intel 32bit and Intel 64bit are supported.
*[[OS - Mac OSX#Common Problems and Solutions|Common Fixes for Mac OSX]]
<b>Linux<br/></b>
*Make sure your system has kernel version 2.6 or newer.
*[[OS - Linux#Common Problems and Solutions|Common Fixes for Linux]]
<b>Android<br/></b>
*Make sure your system has Android 3.1 for USB support. Otherwise, you can use the WebService for any version.
*[[OS - Android#Common Problems and Solutions|Common Fixes for Android]]
<b>iOS<br/></b>
*Make sure your system is 3.0 or higher.
*[[OS - iOS#Common Problems and Solutions|Common Fixes for iOS]]
<b>WinCE<br/></b>
*Make sure your system is version 5.0 or higher.
*[[OS - WinCE#Common Problems and Solutions|Common Fixes for WinCE]]
 
===IDE/Compiler Set up===
Please refer to your[[Software Overview#Language Support| programming language]] for instructions on how to set up the environment.
 
==Connecting to the Phidget==
The easiest way to check if your issue is a hardware or software related issue is to [[Communication Protocols#How do I know my Device is Connected to the computer?|verify that your computer detects Phidgets USB devices]]. If your computer has detected the Phidget, then it is probably a software issue.  Please check that:
*[[General Phidget Programming#Details for Open()|no other applications are using the Phidget]] if you are not using the WebService. This also means closing down the Phidget Control Panel(Windows)/Phidget Preference Pane(Mac OSX) example application before your application runs.
*your [[Software Overview#Language Support|compiler/IDE of your language]] is set up properly
 
If the device is not detected by the computer, then it is probably a hardware issue. Please check:
*that the [[Device List|hardware is properly connected ]]
*[[Communication Protocols#USB|USB section]]
*the [[#Hardware|hardware section of this document]]
 
If you are connecting to Phidgets through the WebService, please see the [[#WebService|WebService]].
 
==Phidget Programming==
If you are unsure of what a specific method does, please see the API documentation of [[Software Overview|your language]] and the [[General Phidget Programming|general programming guide]]
 
If the Phidget is not responding as expected when you call a method, please see the [[Device List|product page]] for information on the specific method and the [[#Hardware|hardware]] section.
 
If you are trying to retrieve a property immediately after setting the same property and it returns the old value. You could be calling [get] before the Phidget has a chance to [set] the property. Please allow some more time to pass before calling [get].
 
If the events are triggering too slow, fast or not triggering at all, please check the [[General Phidget Programming#Sensitivity and Filtering|sensitivity]] and [[General Phidget Programming#Data Rate|data rate]] to see if they are causing the issue(if your device supports it).
 
==WebService==
It is very useful to turn on logging to troubleshoot WebService problems. Also, please ensure that you are connected to the network.
 
===Installing and configuring the WebService===
The WebService is automatically installed if you are using the Windows or Mac OSX installer. On Linux, instructions on installation is here. On Android and iOS, the WebService is part of the libraries.
 
If you are having issues configuring the WebService, please ensure that the parameters are valid.
 
===Cannot Connect to Phidget over the WebService===
Please ensure that the correect type of open is used. Please see your language page for information on how to connect to Phidgets over the WebService. It will take a short while before the WebService is able to completely connect to the Phidget.
If you are using [openRemote], please ensure that you have the latest version of Bonjour installed(Windows, Mac OSX).
 
===Connected to the Phidget, but having programming issues===
If you are receiving a version mismatch error, it means that the version of Phidget libraries are different on the client and server. Please ensure that the same version of the Phidget libraries are installed on both client and server.
 
<br/>Please also see the product page
 
===Lost connection to WebService===
Please ensure that you are still connected to the network.
 
*If the problem is related to the PhidgetSBC, please see [[#PhidgetSBC|SBC section]]
Please see the [[Phidget Webservice|WebService]] for more help.
 
==PhidgetSBC==
please see the sbc product page
*how to install latest libraries
*cant connect to sbc
*set up issues
*how to enable other sbc specific logs(kernel ring buffer)
 
==Hardware==
 
power issues, unfixable hardware, mosly refer to product page

Latest revision as of 17:08, 20 January 2022


Although Phidgets are designed to be easy to use, they are actually 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.

The easiest way to find the problem in your system is to run through some simple tests to rule out certain parts of the system.



Step 1: Test in Phidget Control Panel

TMP1000 Panel.jpg


Plug your Phidget into the computer test it using the Phidget Control Panel as outlined in the User Guide for your device (For Linux users, just proceed to the step 2 instead). Choose the section that best matches the result you get and click on "Expand" to the right:


The Phidget doesn't show up in the control panel

This often indicates an issue with your computer's operating system or the Phidget's hardware. First, go to the OS Troubleshooting page to make sure the Phidget can be seen on the USB, and then visit the Hardware Troubleshooting page.


The Phidget shows up but the text or row is coloured red
Controlpanel mac firmwareupgrade.png

On MacOS, the red text means that a firmware update is available for your device. In older versions of the Windows control panel, the row may be red for the same reason (newer versions show a blue arrow instead). Double-clicking on the red bar or text will download and install the update, which should take less than a minute. If the firmware update fails, you may need to download the latest version of the Phidget drivers and try again. Once the device is updated and working, you can proceed to step 2.



When I open a channel on the device it says "Attached: Nothing" or "Resource Busy"

A Phidget can only be opened in one program at a time, including the Phidget control panel. This behaviour usually means another program or process already has that channel open. Try closing all other programs, and if that doesn't work, go into the task manager and shut down any processes by other programs that use Phidgets. Rebooting may also work if the other program using the Phidget doesn't launch on startup.

If the problem persists, try testing the Phidget on a different computer if possible. If it still has the same problem on multiple computers, contact support .


I can't find the Control Panel Ph.jpg icon in my system tray

For Windows users, navigate to C:\Program Files\Phidgets\Phidget22 and run Phidget22Manager.exe. For MacOS users, you can run the Phidget Control Panel from the Applications list.

If you find that you need to manually open the Control Panel like this every time you start up your computer, you should open the options and make sure the setting for automatic startup is checked.

If you can't find the control panel in the places listed above, your Phidgets drivers may not have installed correctly. Go to the page for your OS and follow the instructions to install the drivers.



Once you've successfully tested with the Control Panel, you can rule out most hardware and operating system issues. Next we'll try some sample code.



Step 2: Test with our Sample Code

You can find our sample code downloads on this page. Select your desired programming language from the drop-down menu and select the object type that matches one used by your Phidget. Then go to the language page for your programming language and run through the instructions for running code in your chosen development environment.


The Phidget channel fails to open / I get a timeout error

Make sure you're setting all of the matching parameters correctly. You can learn more by reading our page on Addressing Phidgets. Also make sure that the channels you're trying to open aren't already opened in another program (including the Phidget Control Panel).


I get a compiler error when I try to run the code

If the code sample doesn't compile, there's probably something wrong in the build settings or a certain file may be in the wrong location. Double check the instructions on the language page to ensure that you've set everything up properly. If you still get compiler errors, contact us with a screenshot or copy+paste of your error and tell us what operating system, code sample, and Phidget you're using.


I get a runtime error when I try to run the code

If the error is reported by the Phidget library, you can find it on the Phidget22 API. If it's being reported from basic functions in your language, try searching the exact text of the error on google to see if other users have had the same one. If that doesn't work, contact us with a screenshot or copy+paste of your error and tell us what operating system and Phidget you're using.




Once you get our sample code working, you can be assured that your drivers and development environment are set up properly and your Phidget working as intended. If you're still having problems, have a look at our other troubleshooting topics: