<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/5730" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2012-01-02T09:09:17+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/5730</id>

		<entry>
		<author><name><![CDATA[schwa226]]></name></author>
		<updated>2012-01-02T09:09:17+02:00</updated>

		<published>2012-01-02T09:09:17+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5730&amp;p=20582#p20582</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=20582#p20582"/>
		<title type="html"><![CDATA[Re: Is it possible to detect whether the PC is running?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=20582#p20582"><![CDATA[
<blockquote><div><cite>Daid wrote:</cite>I think &quot;USB_RX_USER_HOOK&quot; is what you are looking for. Once the device has been found by the PC the PC will keep communicating with it, so if you put a timeout after the USB_RX_USER_HOOK you can detect if the PC is running and knows the device is there.</div></blockquote><br /><br />I am also looking to detect if the PC is running or not.<br />As I was testing the hook with USB_RX_USER_HOOK it only change the status when data transfer is done between my application and the device.<br />But it doesn't work if no data transfer is happening.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=3520">schwa226</a> — Mon Jan 02, 2012 9:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Daid]]></name></author>
		<updated>2011-06-10T10:58:14+02:00</updated>

		<published>2011-06-10T10:58:14+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18701#p18701</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18701#p18701"/>
		<title type="html"><![CDATA[Re: Is it possible to detect whether the PC is running?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18701#p18701"><![CDATA[
I think &quot;USB_RX_USER_HOOK&quot; is what you are looking for. Once the device has been found by the PC the PC will keep communicating with it, so if you put a timeout after the USB_RX_USER_HOOK you can detect if the PC is running and knows the device is there.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=5154">Daid</a> — Fri Jun 10, 2011 10:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2011-06-09T14:29:32+02:00</updated>

		<published>2011-06-09T14:29:32+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18694#p18694</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18694#p18694"/>
		<title type="html"><![CDATA[Re: Is it possible to detect whether the PC is running?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18694#p18694"><![CDATA[
I dont think much goes on during boot. possible some driver talk as the usb device initialize but then the talk with silence I would guess.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Thu Jun 09, 2011 2:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2011-06-09T09:18:35+02:00</updated>

		<published>2011-06-09T09:18:35+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18689#p18689</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18689#p18689"/>
		<title type="html"><![CDATA[Re: Is it possible to detect whether the PC is running?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18689#p18689"><![CDATA[
Do you know what happens when the PC is booting (especially XP)? Is there periodic communication? If not one would detect that the PC is turned off although it is booting at that time.<p>Statistics: Posted by Guest — Thu Jun 09, 2011 9:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2011-06-08T14:30:51+02:00</updated>

		<published>2011-06-08T14:30:51+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18684#p18684</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18684#p18684"/>
		<title type="html"><![CDATA[Re: Is it possible to detect whether the PC is running?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18684#p18684"><![CDATA[
Well I have found its ok to use a loop count of 5 but be sure to kill the interrupts.  Since the pin (-) of the usb has a pullup it should normally be hi. I found xp can take a max loop of 20, but vista needs 5 or less. <br /><br /><div class="codebox"><p>Code: </p><pre><code>checkAlive()<br />{<br />cli();<br />   DDRD &amp;= ~0x02;<br />   for( ; i &lt; 5 ; i++)<br />   {<br />      //make your test...<br />   }<br />   DDRD |= 0x02;<br />sei();<br />}</code></pre></div><br /><br />A more elegant way could be to  use a pin Change interrupt.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Wed Jun 08, 2011 2:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2011-06-08T07:30:54+02:00</updated>

		<published>2011-06-08T07:30:54+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18678#p18678</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18678#p18678"/>
		<title type="html"><![CDATA[Re: Is it possible to detect whether the PC is running?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18678#p18678"><![CDATA[
How long must I monitor USB- to be sure that there's no communication? Is there any time constant?<p>Statistics: Posted by Guest — Wed Jun 08, 2011 7:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ulao]]></name></author>
		<updated>2011-06-08T04:00:00+02:00</updated>

		<published>2011-06-08T04:00:00+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18673#p18673</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18673#p18673"/>
		<title type="html"><![CDATA[Re: Is it possible to detect whether the PC is running?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18673#p18673"><![CDATA[
Well if the voltage is applied just look at the usb (-) pin. If its constant then no data is present.<br /><br />just use a function i.e. checkAlive<br />while (!usbInterruptIsReady()){checkAlive(); usbPoll(); }<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1281">ulao</a> — Wed Jun 08, 2011 4:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2011-06-07T22:56:58+02:00</updated>

		<published>2011-06-07T22:56:58+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18672#p18672</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18672#p18672"/>
		<title type="html"><![CDATA[Is it possible to detect whether the PC is running?]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=5730&amp;p=18672#p18672"><![CDATA[
Hi everybody,<br /><br />as written above I'd like to know whether it's possible to detect whether the PC, to which V-USB is connected, is running or turned off? In my application USB voltage is supplied all the time but the PC is not running all the time and I'd like to detect when it's running and when it isn't. A software solution for V-USB would be preferred.<br /><br />Best regards,<br />Michael<p>Statistics: Posted by Guest — Tue Jun 07, 2011 10:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
