USB Port Error Handling

Merhaba,
USB Seri çevirici bir cihazım var. Cihaz ile bilgisayar bağlantısı koptuğunda programımın bu durumu telafi edebilir olmasını istiyorum.
Örneğin hatayı algılayıp beklemeye geçebilir, bir mesaj gösterebilir, cihaz tekrar bağlandığında da kaldığı yerden başlayabilir olması gerekiyor.
Önerilerinizi bekliyorum.
Solved!
Go to Solution.

Merhaba Azmi Bey,
Bence bunu başarmanın en kestirme yolu yine haberleşme kanalının kullanılmasıyla olabilir.
Eğer bilgisayara usb-seri kanalından bağlı olan cihazınız sürekli olarak (belirli aralıklarla, her saniye mesela) canli olduğuna dair bir bilgi gönderiyorsa (buna heartbeat - kalp atışı ya da alive mesajı da deniyor) bu bilgiyi kullanabilirsiniz.
Eğer böyle bir özelliği yoksa, periyodik olarak kimlik bilgisini sorgulayabilirsiniz. Ancak bunu ana programınız içinde farklı bir "thread" içinde asıl işinize (örneğin ölçüm alması için cihaza komut göndermek veya ölçüm sonuçlarını okumak gibi) paralel olarak yürütmeniz gerekir.
Ortak bir donanım kaynağını farklı kod parçalarından paralel olarak kullanabilmek için de kilitleme (thread-locking) mekanizmaları kullanmanızı öneririm. Böylece iki iş aynı anda erişmeye çalışarak birbirinin çalışmasına engel olmaz.
Cihaz kapatılır ya da kablo sökülürse bu iki yöntemle de haberiniz olur.
Eğer usb-seri kanalınıza bir cihaz bağlı değilken de söküldüğünden haberdar olmak istiyorsanız o zaman yine ana kodunuza paralel bir döngü halinde çalışmak üzere şu linkte olduğu gibi sisteminizdeki mevcut tüm arayüzleri sorgulayabilir, içinde aradığınız donanımın olup olmadığını anlayabilrsiniz.
Umarım yardımcı olur.
İyi çalışmalar,
S. Eren BALCI
www.aselsan.com.tr

Similar Messages

  • USB Port error on start up

    Last night suddenly i plug a mouse on usb port. Then something show on leftbelow on the screen, something that show error on USB  port. Then i try to restart my laptop. Is Presario C300EA. After the first screen bios it shows all boot working normal but show error like this :
    Error 0701: USB Over Current On HC/Port - Bus:00H Dev :1DH Fun:01H / Port:00H
    Error 0701: USB Over Current On HC/Port - Bus:00H Dev :1DH Fun:02H / Port:00H
    Is anything i can do to fix it myself ???
    Thank you before.

    No, it is integrated into the system board, to replace it you would need to replace the whole board.  Have you tested it with a different USB mouse?
    ________________________________________________________________________________________________________ I Love Kudos! If you feel my post has helped you please click the White Kudos! Star just below my name
    If you feel my answer has fixed your problem please click 'Mark As Solution' and make it easier for others to find help quickly

  • When I connect to USB port error message appears on computer screen and i tunes software shuts down. This is a brand new ipod shuffle.

    When I connect my brand new ipod shuffle to the USB port I get an error message on the computer screen and the i-tunes software shuts down.

    URGENT help please!!! I have looked everywhere on the internet and theres no information on anything

  • USB port error message

    Why do I get an error message that says USB Devices are Disabled when I attach my iPhone?

    Try a different USB cable.
    If that doesn't help, restart your Mac.
    If that doesn't help, reset the PRAM  >  About NVRAM and PRAM
    If that doesn't help, reset the SMC >  Intel-based Macs: Resetting the System Management Controller (SMC)

  • How do I get rid of error code 2001/2006? My phone is in recovery mode. I have tried several different cords, all USB ports, my macbook, and a friends PC. This is the second time my phone has done this, the first time it was an easy fix.

    I have an iPhone 4. It is in great condition, always protected. A couple months ago, it randomly went black and wouldn't turn on. I put it in recovery mode, plugged it in to my MacBook Pro and would get error code 2001 then I'd get error code 2006. I read some different forums and many people said to try using a different USB port and different cords. The last cord I tried, worked and my phone was back. Last night, my phone did the same exact thing. So I used the same method I used last time, however nothing has worked. I tried plugging it in to a PC and that didn't work either. This seems like a hopeless problem that's going to continue to happen. Any advice?

    Soooooooo.... You obviously need to restore the device
    It seems that you have tried several options to restore it. What I would do is leave it plugged it and hold down the Home button AND the Power button together till you see the white apple appears. Then let go of the Power button but continue to hold the home button. You should get the message in iTunes again saying that the iPhone needs to be restored. Hit OK then RESTORE.
    Hope this helps!!

  • I plugged in my ipod and now i get the error message: Because a USB device was drawing too much power from your computer, one or more of your USB devices have been disabled" - i have a MAcBook pro and now my USB ports do not work - can anyone help me ???

    i plugged in my ipod and now i get the error message: Because a USB device was drawing too much power from your computer, one or more of your USB devices have been disabled" - i have a MAcBook pro and now my USB ports do not work - can anyone help me ???

    Sometimes you have to reset the SMC two or three times for it to work, don't know why. I've seen that error message before and 100% of the time it was fixed with an SMC reset. I suppose it's possible that your keyboard or mouse IS drawing too much power, do you have access to another you could try?

  • Synching error with different USB port

    I set up my iPhone and had no problems synching with iTunes. I then changed to a different USB port than the one I had originally used. I began to recieve the following error when I tryed to synch "0xE800001". I then switched to a different usb port and everything worked fine.
    Is there any way to get iPhone to work with the new usb port because that is the only port that charges when my computer is off.

    Check out article below for tips and suggestions
    iPhone: Troubleshooting USB connections
    http://support.apple.com/kb/TS1286
    Make sure you perform all Vista Software updates, also visit your PC manufacture website and download and install latest drivers for your PC hardware.
    Also ensure you are not connecting via a USB Hub or using a USB extension cable.
    If it only gives that error message in 1 USB port and not others. Try disconnecting any un-needed USB devices. Then connect back to that port and try syncing again.

  • Ipad is not being recognized by Windows..I get a Code 43 error on any USB port I try. I have rebooted, restarted, blah blah til I am blue in the face.

    Ipad is not being recognized by Windows..I get a Code 43 error on any USB port I try. I have rebooted, restarted, blah blah til I am blue in the face. This is an Ipad not an Ipad2...I can't get this thing recognized by either my desktop or laptop. It used to work...not now.
    Any ideas?

    Did you already have a look at this article?
    iOS: Device recognized in iTunes for Mac OS X

  • HT1476 when i plug my phone into the usb port with the apple charger that came with my phone i get an error msg say charging not supported by this device.   But when i use a gigaware (radioshack brand) usb charger, no error msg.  Why?

    when i plug my phone into the usb port with the apple charger that came with my phone i get an error msg say charging not supported by this device.   But when i use a gigaware (radioshack brand) usb charger, no error msg.  Why?

    - Try restoring the iPod, first from backup and then try to factory settings/new iPod to rule out a software problem.
    - Look at the dock connector on the iPod. Look for abnormalities like bent or corroded contacts, foreign material and broken or cracked plastic.
    - Could you have damaged something when you took the iPod apart and replaced the Home button?

  • TS2634 My problem - when syncing and error messages  comes up:  iTunes could not sync calendars to the iPhone because an error occurred while margin data."  I've tried turning the phone off and back on, & tried both USB ports but get the same thing.  What

    My problem - when syncing and error messages  comes up:  iTunes could not sync calendars to the iPhone because an error occurred while margin data."  I've tried turning the phone off and back on, & tried both USB ports but get the same thing.  What can I do next since it doesn't give me even one clue as to what the error would be?

    Before I started to resync calendars one by one as suggested in the troubleshooting article, I remembered something that came up in a sync when I first attempted :  a 'which one do you want to keep' message about a repeating calendar event, which came up with three options, one from Calendar, and two from iCal on the phone.  I deleted that event, then went through the calendar resync one by one, and all seems OK now.
    In Music there is a way to find 'ghost' items that show up as grayed-out on the menus, so that you can try to reassociate or delete them.  It would be nice to have a similar way to work with Calendar!
    Thanks for pointing me to the right article.

  • My iPhone 4s acts like I need to plug in to iTunes and I got an error message saying it failed to download update and now the screen won't go away. USB port end on phone with arrow pointing to iTunes...

    My iPhone 4s acts like I need to plug in to iTunes and I got an error message saying it failed to download update and now the screen won't go away. USB port end on phone with arrow pointing to iTunes...

    Now iTunes will not recognize my phone as a device...

  • When I plug in my iPhone to a USB port on the back of my computer I get the error "MTP USB Device driver was not successfully installed"   and of course there is no device that shows up either.  It would be great to download my photos!  I'm using Windows

    When I plug in my iPhone to a USB port on the back of my computer I get the error "MTP USB Device driver was not successfully installed"   and of course there is no device that shows up either.  It would be great to download my photos!  I'm using Windows

    Go through this support doc:
    OS: Device not recognised in iTunes
    Windows: http://support.apple.com/kb/TS1538

  • After downloading itunes, I hooked my iphone up to my computer and told it to restore.  Got an error message, 1015, and it wouldn't restore my phone so now all I get on the screen is a pic of a usb port and an image of itunes.  Anyone know what I can do??

    can anyone tell me how to restore my iphone?  Itunes will not let me and now my screen just has a usb port and itunes on it?

    Error 1015: This error is caused by attempts to downgrade the iPhone, iPad, or iPod touch's software. This can occur when you attempt to restore using an older .ipsw file. Downgrading to a previous version is not supported. To resolve this issue, attempt to restore with the latest iPhone, iPad, or iPod touch software available from Apple.
    What this means is you have to delete your .ipsw file (it may be corrupted or old) and attempt to restore your iPhone again.
    Where the .ipsw file is found:
    Mac                         - ~/Library/iTunes/iPhone Software Updates
    Windows XP           - C:\Documents and Settings\[username]\Application Data\Apple Computer\iTunes\iPhone Software Updates
    Windows Vista/7     - C:\Users\[username]\AppData\Roaming\Apple Computer\iTunes\iPhone Software Updates

  • USB port driving too much power.....error

    hi there i m proud owner of this computer:
    Model Name: MacBook Pro
    Model Identifier: MacBookPro1,2
    Processor Name: Intel Core Duo
    Processor Speed: 2,16 GHz
    Number Of Processors: 1
    Total Number Of Cores: 2
    L2 Cache: 2 MB
    Memory: 2 GB
    Bus Speed: 667 MHz
    Boot ROM Version: MBP12.0061.B03
    SMC Version (system): 1.5f10
    Serial Number (system): W863607ETJ1
    Hardware UUID: 00000000-0000-1000-8000-0016CB98D696
    Sudden Motion Sensor:
    State: Enabled
    I ve upgraded my MBP to SL and since 3/4 days ago i ve been experiencing problems whit the USB port. A nice "error window" pop up saying that one or few USB port is driving too energy and therefor will be shut down. The error continued to pop again many times, sometimes 5 of this windows pops up simultaneously. Yesterday i took a decision (a big step) and reset my mac (after trying other solutions and check ups such as reset the parameter random access memory (PRAM) and nonvolatile RAM (NVRAM) and hardware check ups). Been there done that. I ve decided to install first tiger and no error was shown, then i ve upgraded to leopard and again no error was shown... At last when i ve finally installed SL and reboot the system the first thing that showed up was was that nice error...At least this time it shouws up only at start up... I must conclude that there is a kind of bug in the SL system is there anyone that has an alternative solution to this annoying problem, apart from changing mac ....=D....?

    Marco,
    Just to let you know you are not alone. I have a similar problem with my MacBook but the message does not seem to affect operation. It occurs when I plug in my USB speakers, but the speakers work just fine and the message does not reappear unless I unplug them and plug them in again. I chatted with a specialist at an Apple store and it was suggested that I make an appointment with a "genius". Because it does not appear to affect operation, I am inclined to wait and see if 10.6.2 changes this behavior.
    bd

  • I keep getting error 3004 when i try restoring and updateing my iphone 4 to iOS 7 i did everything 1. flushed dns 2. edited hosts 3. updated itunes and downloaded new one 4. switched usb ports 5. disabled antivirus 6. enabled ports 80 and 443 7. disabled

    I keep getting error 3004 when i try restoring and updateing my iphone 4 to iOS 7 i did everything 1. flushed dns 2. edited hosts 3. updated itunes and downloaded new one 4. switched usb ports 5. disabled antivirus 6. enabled ports 80 and 443 7. disabled firewall 8. even tryed putting mobile in DFU mode to restore it not of this worked so please help me

    please replyyy i'm stuck on this like whole week

Maybe you are looking for

  • INVALID COULMN NAME EXCEPTION

    hi! again got struck with small thing.i am inserting record in a table using prepare statement. exception it shows is: exceptionjava.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-00904: invalid column name have look at the followin

  • Problem accessing ECC 6.0 with Crystal

    Hi, I installed SAP INtegration Kit for BO and the transports etc., Then i tried to access ECC via Crystal 2008. I choose the new connection for 'Sap table, cluster or function" which when connected showing me three groups CL,DD,FN which donot have t

  • Forms-launched Reports - General Concept Question

    With client/server forms and reports in 6i I launched reports by selecting them directly off a menu (mmx). This brought up the report's (attached) parameter and then the user ran the report. I'm re-engineering the application in 10gR2 and the documen

  • Why can't i use trial version to convert files to word?

    Why can't i use trial version to convert files to word?

  • Time Machine and 10.6

    If I activate FileVault, can I continue to back up with TimeMachine?