USB Nugget 3 of n: Unifying the multitude of USB driver Subsystems

So here we are for another little USB Nugget.
A lot of time has passed since the last one and also a lot of work has gone into this post (or the VIs being attached).
During my other Nuggets I have become less than enamoured with the VISA interface to the USB bus.  I find some of the terminology rather confusing and the lack of examples doesn't help either.  There have also been an increase in questions in the forum regarding HID USB communication and the like.
Having recently (timeframe 2 years ago) goten "into" LVOOP, I thought developing a LVOOP framework for USB communications would be a beneficial thing to do.  The ability to have different classes of devices (or device requeasts) inherit from one another coupled with the ability to have "hot-swappable" USB subsystems drivers via object componsition made me want to write such a software.  Well I did, and here it is in it's completely unfinished glory.  This software has become a bit of a nightmare for me.  I see that it could very well have a use for the community but I've invested a lot into it to make it work so I'm a bit hesitant just giving it away for free (I earned my money with LV software consultancy for a few years).  But it being Christmas and all I'm showing me good will to all men (and women) by just releasing it and hoping for the best.
The software has some different layers to it.
1) USB subsystem: I have a series of VIs written to do the actual communication with the USB driver of your choice. VISA is currently implemented, others should follow.  This presents the LV programmer with a more simplified interface for USB communications.  One calling convention for a given USB request regardless of the USB subsystem involved.  All parsing of USB data is performed in LabVIEW so that the base class of this layer gets re-used for each and every driver subsystem.  The onle functionality required from a new subsystem is the ability to open a certain device, close it again and in between to read and write Control, Interrupt, Bulk and Isochronous requests (whichever are supported by the driver).  This should make the work required in writing a custom driver for say LibUSB, WinUSB, HID or whatever much easier.
2) USB Request: Each usb request can be encapsulated in it's own object.  The classes involved can inherit from each other and each one is completely independent of the driver subsystem.  I have included all standard USB commands (according to teh USB spec) and have also implemented others which don't show up here.  The idea of having this layer is to allow users to generate libraries of useful requests for whatever hardware they are using.  By making the complete set of device requests polymorphic (with drop-down selector) you have an entire device library in a single easy-to-use VI.
Without further ado, I'll attach the base class software here.  I'll follow up with some example software with the VISA subsystem later.
Say hello to my little friend.
RFC 2323 FHE-Compliant

So what are we to do with this?
Here's an example I have personally developed and implemented.  As it turns out I had the great benefit of being able to switch from VISA functions to LibUSB functions within about 20 seconds (as designed) because I was getting a wierd error with VISA after 20 odd minutes of operation.  Yes, I have filed a CAR.  The program ran flawlessly with LibUSB for more than a week.
I had access to the device development specs of course which helped tremendously.  I implemented essentially every command possible for the device as it's own control communications package class.  Any inputs for the packet could thus be accessed via an enum input on the packet creator.  Any outputs were handled similarly with range checks being pefrormed.
By grouping all of these individual classes together into one big polymorphic VI I essentially had the entire library for the instrument present in a single VI with a drop-down menu allowing me to choose the command I wanted to use at the time.
While I can't post the code (past employer) I will post a wuick picture of the intended end usage of this toolkit.  At the end of the day this driver allowed me to implement my own control scheme for a brand new instrument (Sodium analyser) while the firmware for the device was not yet developed.  It went significantly further than any other firmware (At that time) and implemented a lot of never-before-used functions but having an up-and-running LabVIEW software as reference helped tremendously.
Given the new "Accessor" VIs for classes in LV 2011, even the VIs to access the returned data become polymorphic (pre 2011 this wasn't the case).  Of course this software will then run on any platform you happen to have a USB Comms class for (I currently only have LibUSB for Windows and VISA implemented although I HAVE run my software on Linux and Mac using LibUSB).  As such with no extra effort I have written an instrument driver which is cross-platform for Windows, Linux, Mac and probably RT as well if the VISA bug has been sorted....
Shane
Say hello to my little friend.
RFC 2323 FHE-Compliant

Similar Messages

  • USB 3.0 device no longer recognized after USB driver update

    Hello,
    I was setting up a Windows 7 Pro x64 machine. This PC had 2 USB external hard drives plugged into the USB 3.0 ports in the back. These drives were working fine after Windows installation using (I guess) the Windows default driver.
    However, after I installed the USB 3.0 driver downloaded from the motherboard vendor, one of the drives wasn't recognized anymore. In fact, Windows told me the device had malfunctioned. I tried reinstalling the USB 3.0 driver and plugging the troubled device
    into different ports but these measures didn't help.
    That hard drive still works when I plug it in a different machine and this allows me to get the data off it. However, I would like to fix the problem described above and to resume using this hard drive with its original machine.
    Any help please? Thanks!
    OS: Windows 8 x64 Pro with Media Center. All drivers up-to-date.

    Make sure it's the right series usb 3 driver, series 7 or series 8.  Series 7 drivers are version 1.x and series 8 are version 2.x.  They use the same device id's.

  • Can you connect a usb SuperDrive if you use a lightning to usb camera adapter and a usb hub?

    I was just wondering if ypu could connect a usb SuperDrive if you use the lightning to usb camera adapter, a usb hub, and then plug the SuperDrive into the hub. Will it work to play disks, or movies, or something?

    No, drive consume too much power.
    Try using a wireless flash drive.

  • I have a time machine backup file on a USB hard drive.  I bought a time capsule / airport extreme, flat 3TB.  I wish to transfer the backup file from the usb hard drive to the time capsule hard drive.  10.6.8

    I have a time machine backup file on a USB hard drive.  I bought a time capsule / airport extreme, flat 3TB.  I wish to transfer the backup file from the usb hard drive to the time capsule hard drive.  10.6.8

    Unfortunately, Time Machine backups that are stored on a drive that has been connected directly to a Mac are completely different than Time Machine backups that are stored on a Time Capsule.
    Frankly, it is not worth the effort and trouble to try to transfer the old backups to the new Time Capsule.....my opinion....having done this in the past.
    It is possible though, but I would not recommend it due to the complexity and downsides involved with this. To give you an idea of how to do this, check out this support article.
    http://pondini.org/TM/18.html
    Even if you transfer the "old" backups over to the Time Capsule successfully, Time Machine will not simply "add on" to the old backups.
    Time Machine will make a new complete backup of your Mac and then add incremental backups from that point.
    My advice.....start a new backup on the Time Capsule and move forward. Keep the USB hard drive around for a month, maybe 2 or 3 in case you need to go back to an old backup for some reason.  At that time, you will not likely need the old backups at all since you will have a current 2-3 month history of new backups.  At that point, you can erase the USB drive and use it for another purpose.

  • HT4101 The Lightning to USB Camera Adapter doesn't work

    I just bought the Lightning to USB Camera Adapter but it doesn't work and show the message: it is not an authorised accessories..may not work reliabily

    the adapter doesnt work with ios 7 on a lot of new devices, so untill apple fixes the issue, here is a workaround http://www.youtube.com/watch?v=pE28JwxQ3Zc

  • I am trying to connect a Windows 7 / 64 bit to an Epson printer on my Mac.  The printer is hooked into the Mac via USB; the Mac is networked to a Linksys wireless router with an ethernet cable, as is the Windows box. Any tips on how to do this?

    I am trying to connect a Windows 7 / 64 bit to an Epson printer on my Mac.  The printer is hooked into the Mac via USB; the Mac is networked to a Linksys wireless router with an ethernet cable, as is the Windows box. I installed the current Bonjour printer services software on the Windows machine, and separately installed the driver software for the Epson printer on the WIndows machine.  Running the bonjour wizard, I get an alert saying 'I don't have sufficient access to my computer to connect to the selected printer'.
    The printer has 'sharing' turned on from the Mac end; this works with a Powerbook via the wireless connection.  Sharing is also turned on in the Windows printer control panel for this printer (under properties).  The Mac is a G5 running 10.5.8.  When I try to print a page from the Windows machine it gets hung in the print queue.
    Any advice how to proceed would be appreciated!
    thx,

    I am trying to connect a Windows 7 / 64 bit to an Epson printer on my Mac.  The printer is hooked into the Mac via USB; the Mac is networked to a Linksys wireless router with an ethernet cable, as is the Windows box. I installed the current Bonjour printer services software on the Windows machine, and separately installed the driver software for the Epson printer on the WIndows machine.  Running the bonjour wizard, I get an alert saying 'I don't have sufficient access to my computer to connect to the selected printer'.
    The printer has 'sharing' turned on from the Mac end; this works with a Powerbook via the wireless connection.  Sharing is also turned on in the Windows printer control panel for this printer (under properties).  The Mac is a G5 running 10.5.8.  When I try to print a page from the Windows machine it gets hung in the print queue.
    Any advice how to proceed would be appreciated!
    thx,

  • I can't open pages files from USB and iCloud due to : "The necessary file index.xml is missing".

    I can't open pages files from USB and iCloud due to : "The necessary file index.xml is missing". Original file is written on iMac (2014) and saved to an USB stick and then transferred till macBook Pro (2009, Yosemite) for editing. Then I shared the files by iCloud but I am not able to open them on iMac again. Niether can I use the USB stick to transfer the edited files back. I'm running Pages '09 4,1 (923) on the macBook and Pges 5.5.2 (2120) on the iMac.
    Håkan

    Pages 5.5.2 is extremely incompatible with even other Macs let alone the vast majority of PC and MsWord users out there, so not a good idea to leap into the fire with both eyes shut.
    After having done that to the first Pages 5 files, Apple has repeatedly done it to even the most minor point updates. Apple can't even anticipate its own erratic changes let alone what everyone else needs doing.
    Peter

  • I need to know the multitude of reason why my iPhone 5s would prompt me for my Apple ID password. Please help.

    I need to know the multitude of reason why my iPhone 5s would prompt me for my Apple ID password.
    All I did was place my phone on the charger, I then walked away for 10-15mins and when I came back it was asking me to enter my Apple ID password.
    I never gave my password out to anyone ever and hardly anyone knows my email address.
    I haven't recently downloaded anything either and I only have one apple device which is my iPhone 5s.
    I just want to know really if it could have been because someone was trying to log into my Apple ID?
    Please help with multiple reasons why this could have happened. I just want to know the options. Thank you

    My iPhone 5s did the same thing yesterday. I have iCloud backup turned on in Settings > iCloud > Storage & Backup and that means it will automatically do a backup when the phone is plugged in, locked and connected to wi-fi. I had it charging and when I returned it was asking for the password and the prompt did identify that it was requesting it for the iCloud backup (something you may not have noticed if you didn't look closely).
    It has never done that before and 2 iPads in my household have not yet done it. All are on iOS 7.1
    I have found a report of the same issue by a user of the 7.1 beta and in that case it was happening every day. In my case I entered the password then went to the same area in Settings as above and used the "Backup Now" button to do a backup. I will see tonight when I charge again whether this is going to be an every day problem.

  • Im having problems with my iPod Touch 2nd gen. It's disabled and tells me to connect to iTunes. But when I do that, iTunes wont detect the iPod.I have put the iPod in USB- mode, and by that I mean I have tried connecting with holding the home button Help?

    It's disabled and tells me to connect to iTunes. But when I do that, iTunes wont detect the iPod.I have put the iPod in USB- mode, and by that I mean I have tried connecting with holding the home button when connecting the USB. Help?

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • I was updated my Iphone 4s from computer(ITunes).ITunes get error and update failed.(When Iphone is preparing.).And now ı can't use my IPhone.At the screen there is a USB cable and up of the screen there is ITunes' logo.PLEASE HELP!

    I was updated my Iphone 4s from computer(ITunes).ITunes get error and update failed.(When Iphone is preparing.).And now ı can't use my IPhone.At the screen there is a USB cable and up of the screen there is ITunes' logo.PLEASE HELP!

    Read what i say. Put iPhone in DFU mode. Connect with USB cable and restore.
    Read:
    http://www.apple.com/support/iphone/assistant/restore/

  • In iTunes the iPhone device icon will not show up whenever I plug in a USB into my PC but the iPhone icon will show up in 'This PC'  so if anyone who knows a resolution to my problem with my iTunes or PC,it would really help me.I need at least Help or Tip

    In iTunes the iPhone device icon will not show up whenever I plug in a USB into my PC but the iPhone icon will show up in 'This PC'  so if anyone who knows a resolution to my problem with my iTunes or PC,it would really help me.I need at least Help or some Tips.I have already tried many things to iTunes and my PC like trying to restore my PC but that do anything.Also,would it be fine if i contacted (call) Apple Support? Please,I need help because what I think is wrong is my PC,iPhone,or USB might be messed up so if anyone could help me with this,it would be really helpful and for anyone to be nice enough to help me.

    I think this article will help you.

  • My 3rd generation ipod touch will not connect to itunes. i plug it up to the computer by USB and it makes a jingle and my computer recognizes it in the my computer screen, but it will not connect to itunes. what should i do?

    my 3rd generation will not connect to itunes when i plug it up to the computer by USB. i have tried to do it with itunes open and closed. it wont recognize it but it is recognizes in the my computer screen. it even makes a jingle when plugged up. on my ipod i can download music wirelessly from my itunes. other than this issue my ipod works just fine. what should i do?

    Try
    iOS: Device not recognized in iTunes for Windows
    I would start with              
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    Before you reinstall the Apple software, also remove iCloud vi Control Panel Remove programs. The reinstall the Apple programs
    New cable and different USB port?
    Runs this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Try on another computer to help determine if computer or iPod problem

  • I upgraded Windows 7 to Windows 8 with iTunes installed. Now my iPhone 4S is no longer recognized in iTunes. Connecting with USB sends me directly to the MS app that downloads pictures from the iPhone. Suggest this is a question of missing Apple driver.

    I upgraded Windows 7 to Windows 8 with iTunes installed. Now my iPhone 4S is no longer recognized in iTunes. Connecting the iPhone with USB sends me directly to the MS app that downloads pictures from the iPhone. Suggest this is a question of missing Apple driver for Windows 8, iTunes and iPhone. MS does not care! This seems to be a general problem with Windows 8 that a number of drivers that used to work with Windows 7 now do not work, ie. iPhone to iTunes, HTC to HTCSync, Samsung to Kies etc. I need this connection to work in order to syncronize with Outlook and my iTunes library.

    diesel vdub wrote:
    Maybe it would have been a better idea to confirm that iTunes is supported in Windows 8 before buying a computer with that Operating System.
    There will be a new version of iTunes released this month... no one forced you to upgrade prior to a supported version of iTunes being released.
    Like the fact that you just called most of us stupid there

  • My iPod will not connect to the iMac via USB.

    I can no longer charge nor sync my ipod because it will not connect via USB.  What can I do to fix this?

    What have you tried so far in terms of troubleshooting this issue?  Are you plugging the iPod into a high powered USB 2.0 port on the back of your PC? Have you tried a different USB cable?
    What happens if you try to reset the device with it still connected to the PC?
    How to reset iPod
    Has this iPod ever worked on this PC or is this the first time you have time you have tried connecting it?
    Have you carefully worked through each and every single suggestion in this Apple support document?
    iPod not recognized in 'My Computer' and in iTunes for Windows
    B-rock

  • I installed iousb family log release osx 10.5.6 and installed on my mac osx 10.5.8. I am trying to log and rfid reader on the usb. Sadly on restart the usb is no longer working. Happily Windows is still running OK. Is there a way 2 get my usb back?

    I installed IOUSB family log release osx 10.5.6 on my mac osx 10.5.8. I am trying to log an rfid reader on the usb. Sadly on restart the usb is no longer working. Happily Windows is still running OK. Is there a way to get my usb back working? And is there a way to navigate in Windows to the file I installed and remove it? Any help appreciated.

    BDAqua wrote: Does OSX boot at all, or not?
    Yes, it does. Right to where I am supposed to log in, but since the USB is not working (either mouse or keyboard), I'm stuck. I have to shut down and restart and boot into windows.

Maybe you are looking for

  • Axis2 Cient works as standalone but not as part of webapp

    I have a client code generated using Axiscode generator in eclipse. If I make a call to the service when client is running as a standalone main method it works fine but when the same code is called while running in web app it gets fault Faultcode = {

  • Update Slow performance

    Hi Can you pls. help in tuning this update stmt.currently this query runs almost 5 - 10 mins to run.Pls.. also find the explain attached for this. Tried adding Hints as well.It still doesnt work. UPDATE EH_AF_CONTROL_MARKUP MKP SET (STATUS,BOOKING_FR

  • Flash9.ocx add-on errors

    I've been getting alot of these add-on errors lately and it crashes IE. I've tried reinstalling flash but it hasn't helped. Is there anything I can do other than disabling the add-on? I would really appreciate any advice.

  • Merging 2 volumes into 1

    Ok now I am running out of space on my Mac OSX Volume but there is a Macintosh HD Volume. The issue I'm running into is that when I went to the Disk Utility to try and remove the partition it tells me that the Mac OS X partition is the start up volum

  • 10.4.4 crashes regularly, even when idling

    After installing the 10.4.4 update (from 10.4.3) OSX has become COMPLETELY UNRELIABLE. It crashes (shows the "reboot needed screen) on average about every 20 minutes. Each time this happens, I check my drives with Disk Utility after rebooting and it