How do I send an array over endpoint 2 and receive an array over endpoint 1?

Background:
I'm a device developer.  I have an HID device that interrupt transfers over endpoint 1 and endpoint 2.  The device enumerates successfully as an HID on mac, windows, and linux.  I've use a couple different .dll files to communicate with the device using visual studio and python with some success and now I'd like to get it to work in labview.
Status to date:
1.  Successfully installed device hijacker driver so NI MAX can see the device as USB::0x####::0x####:erialNumber::RAW (# inserted to protect the innocent and SerialNumber is an actual number)
2.  I can see the device in MAX.  Tried to send a line of numbers and something is sent back, but it isn't useful yet.
3.  Tried interruptusb.vi and it doesn't do anything but timeout.
4.  Tried Read USB Descriptor Snippet1.vi and an 18 byte array shows up and the VID and PID are parsed out correctly if the bRequest is Get Descriptor and the Descriptor Type is Device.  None of the endpoint descriptor types return anything.  A bRequest won't trigger a device function.  It needs an array over the out endpoint.
The problem:
Intuitively I'm at a loss of what to do next.  The device needs to receive a command from a 16 byte array gets passed through the out endpoint (2).  Then it will respond with a 16 byte array through the IN endpoint(1).  It seems as though the interruptusb.vi should work, but the interrupt transfer is a receive only demonstration.  How should I format a 16 byte array to go through the out endpoint? Does it need to be flattened?  

Thanks for the tip.
The nuggets were great for getting started and helped with installing the labview hijack driver for the HID device.  Closer examination may lead to the conclusion that the code I'm using is very very similar to the nugget with minor changes to the output.  Definitely the nuggets are useful, but for my device, there is more to it. 
It is not USBTMC compliant.  It requires an array of bytes be sent and received.  The problem may have to do with timing and ensuring that the byte transfer is correct.  When communicating from visual studio, a declared array of characters works fine.  I tried that with this setup and it doesn't work consistently.  Of particular concern is why with this setup the device shows up, doesn't work properly until stopped, then works fine, but when the labview VI is stopped, the device disappears and no longer available in the VISA combobox.  The Device Manager still shows the device, but Labview must have an open handle to it. 
I'd really like to be able to call the dll used in Visual Studio, so the user can choose to use the included software or a Labview VI without having to reinstall a driver.  Afterall, HID is great because the driver is under the hood.  Having to load one for Labview defeats the purpose of developing an HID device.  If I wanted to load a driver, I'd program the device to be a USB-Serial device and use the labview VISA serial vi's. 
For now I'll be happy to get a stable version in Labview that will communicate consistently even if it is the hijacked driver.

Similar Messages

  • How do I send just a song to someone and not the entire album?

    How do I send just a song to someone and not the entire album??

    If you are using an iOS device then no, I don't think that you can gift a song, it will need to be the whole album. If you are using your computer's iTunes, and it's not an album-only track, then you should be able to gift individual songs via the downward pointing arrow next to the song's price.

  • So, I am travelling to Italy next week.  I am from the US.  VW's "Trip Planner" suggests my iPhone 5s will not work there.  Then, they suggest (via options below) that I can send Txt for $0.050/txt and Receive for $0.05/txt.  How can I confirm which is tr

    So, I am travelling to Italy next week.  I am from the US.  VW's "Trip Planner" suggests my iPhone 5s will not work there.  Then, they suggest (via options below) that I can send Txt for $0.050/txt and Receive for $0.05/txt.  How can I confirm which is true?

    We are here to help! Where are you traveling to? How long will you be there for? What kind of services are you looking to use?
    KarenC_VZW
    Follow us on Twitter @VZWSupport

  • TS3276 how do you send file attachments (Particularly jpegs) so that receiver gets as a file not as an open embedded photograph

    how do you send file attachments (Particularly jpegs) so that receiver gets as a file not as an open embedded photograph?

    This sends the attachment as an icon, not embedded inline. Copy/Paste into Terminal in Utilities and hit return.
    defaults write com.apple.mail DisableInlineAttachmentViewing 1
    To reverse the setting, change the 1 to a 0.
    But how it will be viewed  will all depend on the e-mail client and settings of the recipient. Not under your control.

  • How can I keep the history of my dialed and received calls for one or two weeks on my iPhone 5?

    How can I keep my history for my dialed and received calls on my iPhone 5?

    The only thing is, I have read where it will only keep 100 entries at tops. I'm not sure as I have never let it get that high, however many business users have reported this.
    OP, how much history are you talking about keeping? Also, there is no method to archive this in any fashion to be looked at or searched at a later date.

  • Sending Bids from SRM to suppliers and receiving responses

    Hi Experts,
    Help me with a suggestion for sending Bids from SRM to suppliers and receiving responses - preferably through email adapter.
    Regards,
    Hemanthika
    Edited by: hemanthika patnaik on Apr 28, 2008 2:24 PM

    Sorry for the delay,
    I have worked in a similar integration with SRM - XI, but the only difference is that we used Proxy -- HTTPS for Purchase Order Request.
    In your case it would be:
    1. Create custom IDOC and Message type.
    2. Find the triggering process from the SRM side, trigger the IDOC from SRM.
    3. Generate the partner profile and ALE config.
    4. Import the custom IDOC in XI.
    5. Use a map in XI to convert the IDOC data to customer format.
    6. Use  HTTP adapter to connect.
    7. In the HTTP adapter you can use url method or the RFC destination to do the connectivity. ( I would recommend using the RFC destination to do it.)
    8. You should be receiving an acknowledgment from the customer when the document is posted at their end.
    9. The response is either 200 for successful transmission. It would be 400 or 500  for errors.
    10. Use the response message to do a message map with the mail adapter.
    11. Generate the content of the mail adapter using the message map.
    12. In the message map ideally you should use Value mapping to generate the   TO and FROM data. (This enables you to change the receipients while in development and production without changing the message mappinng program.)
    13. Use mail package in the Mail adapter to send the mail content to the business users.
    Hope this helps.
    Indranil.
    Award points if this helps

  • HT1476 Can I send in my Iphone 5 charger and receive a replacement?

    Can I send in my Iphone 5 charger and receive a replacement?

    If you contact Apple and arrange the replacement and the existing charger is not damaged due to something you have done.

  • How do i send an array of clusters with variable size over TCP/IP?

    Hi,
            I'm trying to send an array of clusters with varible size over TCP/IP,. But I'm facing the following problems:
    1) I need to accept the size of array data from the user and increase the size dynamically.
    I'm doing this using the property node but how do I convey the new size to my TCP read?
    2) I need to wire an input to my 'bytes to read' of the TCP read.
    But the number of bytes to read changes dynamically
    How do I ensure  the correct number of bytes are read and reflected on the client side?
    3) Is there anyway I can use global varibles over a network such that their values are updated just as if they would on one computer?
     Will be a great help if someone posts a solution!
    Thank you...

    twilightfan wrote:
    Altenbach,
     ... xml string. ...number of columns that I'm varying using property node s... I solved these problems by using a local variable as the type input ...o TCP read is creating a problem.... second TCP read gets truncated data because
    its no longer just the first four bytes that specify the length of the data, it could be more as my array of cluster can be pretty huge.
    Instead of writing long and complicated sentences that make little sense, why don't you simply show us your code? 
    What does any of this have to do with xml strings???? I don't see how using a local variable as type input changes anything. The user cannot interact with "property nodes", just with controls. Please clarify. Once the array of clusters is flattened to a string you only have one size that describes the size of the data, no matter how huge it is (as long as it is within the limits of I32). Similarly, you read the string of that same defined length and form the array of clusters from it. How big are the strings? What is your definition of "huge"?
    Here's is my earlier code, but now dealing with an array of clusters. Not much of a change. Since you have columns, you want 2D. Add as many diensions you want, but make sure that the control, diagram constant, and indicator all match.
    The snipped shows for a 1D array, while the attached VI shows the same for a 2D array. Same difference.  
    Message Edited by altenbach on 01-31-2010 01:13 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FlattenArrayOfClusters.vi ‏12 KB
    ioclusters3MOD.png ‏25 KB

  • How do I send an Image over a socket ?

    I'm trying to get the output from my webcam and send that data out to a socket. Now the output from the webcam is running I'm just not sure how to send it out over the socket.
    Server.java
    import java.io.*;
    import java.net.*;
    public class Server {
       public static void main(String args[]) {
         ServerSocket serverSocket = null;
         boolean listening = true;
         try {
         serverSocket = new ServerSocket(1354);
         System.out.println("Listening for Connections...");
         } catch (IOException drr) {
         System.out.println("Error Listening :" + drr);
         System.exit(-1);
         try {
         while(listening)
         new ServerThread(serverSocket.accept()).start();
         } catch (IOException er) {
         System.out.println("Error Creating connection:" + er);
         try {
           serverSocket.close();
         } catch (IOException err) {
         System.out.println("Error Closing:" + err);
    }When a connection is made it will start the webcam and send the image.
    ServerThread.java
    import java.net.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import javax.media.*;
    import javax.media.format.*;
    import javax.media.util.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import com.sun.image.codec.jpeg.*;
    public class ServerThread extends Thread {
        public static Player player = null;
        public CaptureDeviceInfo di = null;
        public MediaLocator ml = null;
        public JButton capture = null;
        public Buffer buf = null;
        public Image img = null;
        public VideoFormat vf = null;
        public BufferToImage btoi = null;
        public ImagePanel imgpanel = null;
        private Socket socket = null;
        Image blah;
        PrintWriter out = null;
        public ServerThread(Socket socket) {
         super("ServerThread");
         this.socket = socket;
        public void run() {
         try {
             out = new PrintWriter(socket.getOutputStream(), true);        
             imgpanel = new ImagePanel();
                 String str1 = "vfw:CompUSA PC Camera:0";
                 String str2 = "vfw:Microsoft WDM Image Capture (Win32):0";
                 di = CaptureDeviceManager.getDevice(str2);
             ml = new MediaLocator("vfw://0");
                try {
               player = Manager.createRealizedPlayer(ml);
                 } catch (Exception npe) {
               System.out.println("Player Exception:" + npe);
                player.start();
             Component comp;
             if ((comp = player.getVisualComponent()) != null) {
               // Grab a frame
               FrameGrabbingControl fgc = (FrameGrabbingControl) player.getControl("javax.media.control.FrameGrabbingControl");
               buf = fgc.grabFrame();
               btoi = new BufferToImage((VideoFormat) buf.getFormat());
               //Send the image over the socket
               out.println(btoi);
         } catch (IOException e) {
             System.out.println("It bombed:" + e);
        public static void playerclose() {
           player.close();
           player.deallocate();
      class ImagePanel extends Panel {
        public Image myimg = null;
        public ImagePanel() {
        public void setImage(Image img) {
          this.myimg = img;
          repaint();
        public void paint(Graphics g) {
          if (myimg != null) {
            g.drawImage(myimg, 0, 0, this);
      }The output I get from running the server is this:
    BufferedImage@c9131c: type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 320 height = 240 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0
    Now how can I turn this into an image If this output is correct?

    HUH?
    I got the one to send the images over the network. I'm now trying to get the exact feed of the webcam and sending that over the network. This is alot more difficult to accomplish but I did see where I messed up my process of sending the images was just having to save the file then open it up put it in a byte array then send that over the network to the client. Once it was at the client i was able to re-construct it and throw it up in the frame. The only problem was lag. So this tells me it would be much more faster if instead of saving the file to send the client and having to reconstruct the image I should just send the webcam feed i used to make the image.
    eh, I guess I didn't need any help.
    Hey no offense or anything but you really have to learn how to spell better.

  • How Do I Send A File Over An Air-Port Network

    I have a good knowledge of mac but ive only just set upa network, weve got three new iMacs with airport networks, i know the networks work because we can chat over iChat but how do i send a file from one computer to another.
    Also one of the computers is getting the internet from the school network via Ethernet cable, can te other macs share the internet from this computer over the Airport network.
    (we do not have a base station)
    please help

    ]but how do i send a file from one computer to another.
    You can do that over iChat if you want.
    To share files between the computers you need to network them.
    For networking (ie sharing files), System Preferences -> Sharing -> File Sharing
    Then in Finder ⌘ K and type in the name of the other computer.
    ]Also one of the computers is getting the internet from the school network via Ethernet cable, can te other macs share the internet from this computer over the Airport network.
    System Preferences -> Sharing -> Internet Tab
    Share your connection from built-in-ethernet
    To computers using Airport
    Airport Options button will allow you to add a WEP password.
    I would check with your school network administrator that you are allowed to do this.

  • In the new Pages, how does one send an image to the background (and make it selectable)?

    How does one send an image to the background in the new Pages and how does one make it selectable?

    Also why don't TEXT to Speech short cuts established in system preferences work in the new Pages?
    I am confused (and not completely happy)

  • How do I send/email Documents with high security and password protected

    I want to send Documents securely to my clients. What product do I need and how do I send/email with password protection? I recently purchased Adobe Send but not sure this was the right product needed to send my documents securely?

    In Acrobat you can create a Portfolio in which your documents (any types) will be placed as attachments and encrypt the whole portfolio. You can also create a small PDF, possibly with explanation what is in it, attach your files to it, and encrypt this PDF. In this case you can encrypt attachments only, so that the user can open the shell PDF but to extract the files would need to know the password.

  • How do you send a fillable pdf for completion and signature? Thanks!

    Goodmorning, I just saw that you can send a fillable pdf for signature and this will allow the person to fill out the contract, sign and email back. The one time I tried that it did not work. What are the steps, or a link to the directions, to do this?
    Thanks so much,
    Carolyn

    Hi,
    Please visit the support website:-
    https://www.echosign.adobe.com/en/support.html
    Check out the how-to links.
    Thanks

  • HT1688 HOW DO I SEND IN MY BROKEN IPHONE 5 AND USE THE WARRENTY

    my iphone five is broken how do i send it in and use the warrenty

    Call Apple Care:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Apple - Support - Contact Apple Support.
    For Mac App Store: Apple - Support - Mac App Store.
    For iTunes: Apple - Support - iTunes.

  • How to send IP Addr in an alert and receive the same?

    1. I have an 'alert handler' process that's sending an alert using 'Create Alert' activity.
    2. I have a listening/receiving process that get's triggered by this alert from the 'alert handler' process.
    3. The listening/receving process telnet's to a router. I want the listening/receiving process to extract the IP Address of the router from the alert that triggered this listening proecess.
    4. I tried sending the IP address of the router as 'Parameter 1' using the 'Create Alert' activity in the 'alert handler' process.
    5. In the receiving process, in order to telnet to the router, I chose 'Execute on this target reference' option for the 'Open Terminal' acitivity, but was unable to access 'Paramter 1' of the alert. It shows greyed out.
    Question:
    What is the best way to send the IP address of the router in the alert and receive the same in the listening process such that I can telnet to that router in the listening process?
    Please note: tried creating a 'terminal target'...there is no way for me to supply IP address info from outside into terminal target...looks like terminal target only takes a hard coded IP address or host name.
    Will appreciate your prompt response please.
    thanks,
    Jamal

    We discussed this, but just to post here. To view alert or other tasks parameters via the reference variable fields you have to select the show advanced checkbox.

Maybe you are looking for

  • Help installn the 10.5.8 Update Mac OS X Leopard from 10.5.7 (Power PC G5)

    I am concerned about installing the +10.5.8 Update Mac OS X Leopard+ from +10.5.7 (Power PC G5)+. It does not say anything about users who aren't on the intel chip systems so I'm worried if I really need to upgrade, any advice? This also comes to min

  • Enlarging Photo Viewer In iWeb

    The current max size is 600x800. Does anyone know how to make it larger, like 1024x768 etc.. Not using .mac to publish. I can see the code, but it won't allow changes (or will it ??) Thanks, Paul

  • Value Mapping Question

    Based on the source filename I need to determine Customer and distribution channel value using value mapping: Source FileName: FileName1 FileName2 Target CustomerValue: 300 300 Target Distribution Channel: ABC XYZ I am unable to achieve the above usi

  • Making a link clickable

    Here's a complicated problem. I work for an educational institution, and after a user enters their credentials there may or may not be a link to display. Look below for what currently displays: P01111111 Welcome, <name> ADMISSION REQUIREMENTS Require

  • Determining duration of sequence of clips

    Hi, In FCP 4.5 - I know how to measure a single clip's duration on the timeline, but is there an easy method to measure the time duration of a larger sequence of clips? I realize I can look at the start timeline timecode and the ending one and comput