Enumerating available comm ports with friendly names

Hello
I 'm using a Virtual com port.
In order to simplify the setting of the COM port I would like to get back the associated name of the COM port, to set automatically the right COM port.
for the moment I use this piece of code
public void listePortsDispo()
     Win32Driver w32Driver= new Win32Driver();
     w32Driver.initialize();
Enumeration portList=CommPortIdentifier.getPortIdentifiers();
CommPortIdentifier portId;
if (portList==null)
System.err.println("No COM port detected");
javax.swing.JOptionPane.showMessageDialog(null,"No COM port detected");
return;
while (portList.hasMoreElements()){
     portId=(CommPortIdentifier)portList.nextElement();
     System.out.println("* "+portId.getName());
} // while
} But it returns something like that:
* COM1
* COM5
* COM6
* COM7
and I don't really know which is the right COM port I have to use.
I would like to have something like that:
COM1: = Communications Port (COM1)
COM5: = NI Serial Port (Com5)
COM6: = NI Serial Port (Com6)
COM7: = USB Serial Port (COM7)
Like this I can identify clearly which PORT I have to use for my application.
If someone can help me it would be great.
Many thanks by advance
Best Regards

Perhaps my own lack of understanding. I was under the impression that RXTX was an implementation of the sun API; and that since I'm writing my own implementation, all I needed was the sun framework.
Perhaps I need to look at RXTX more closely.

Similar Messages

  • Associating a comm port with a TS test socket

    Hello,
    In order to run several test platforms on one machine (parallel model), I must be able to associate each test socket with a unique serial port. Each hardware platform has it's own serial connection which is built in Labview. So my question is, "how can I use a single test sequence calling LV VIs where each test socket must use a different comm port?"
    Thank you for helping,
    Adam

    How dynamic is the com port configurations? Will some testers only differ in the number of ports? If that's the case, then you'll also need to dynamically change how many sockets you're testing. This could be done, probably in a sequence file load callback and with the LabVIEW function VISA Find Resource. Searching for all ASRL resources will return a count and their names. You could populate a station global string array with the names. Right now, I have a fixed count of resources so I just populate a main sequence local variable with all of the possible names. I assign the resource name for the VI as Locals.VISAResource and in a pre-expression for the VI, Locals.VISAResource = Locals.AllVISAResources[RunState.TestSockets.MyIndex]

  • Attach Forms With Comm Port in Oracle Forms

    I am trying to make connection of Oracle forms Builder with my device using comm port but i dnt know the complete procedure to attach the comm with oracle forms also i have no idea to convert asquii data to normal form.Please any one help me to attach comm port with my oracle forms and also convert asqui code which is showing on hyper terminal into normal data.Also I am using oracle forms 6i

    Make a java component (PJC) and use a rxtx library (http://rxtx.qbang.org/wiki/index.php/Examples) ...
    I have made a PJC to use a RS232 port from oracle forms for Hypercom POS terminal..
    Here is my code (in short i will post a component on PJC site (here I can't post a complete code because of 30000 char limit ;) )..
    If you look in method "public void init(IHandler handler) " I make a download of rxtxSerial.dll from my forms server and then I call System.loadLibrary("rxtxSerial");"
    In other way you must put the dll in windows/system32 path.. This dll is native library for rs232 communication.
    If you look at the method "public void doTransaction" you can see the initialization of comm port...
    With inputStream and OutputStream you read and write datas to/from your rs232 port..
    p.s: the code is not complete but you can see how I made the rs232 communication (also the code is not final ;) )
    ====================================================
    public class PosTerminalPjc extends VBean {
         private static final long serialVersionUID = -8814623494538014849L;
         Properties res = new Properties();
         SerialPort serialPort;
         OutputStream os;
         InputStream is;
         CommPortIdentifier portId;
         Enumeration portList;
         IHandler mHandler;
      Random randomGenerator = new Random();
            char STX = 2;
         char ETX = 3;
         char EOT = 4;
         char ACK = 6;
         char NAK = 15;
         char FS = 28;
         private static final ID COMPORT         = ID.registerProperty("COMPORT"); // serial port (COM1,COM2,COM3,...)
         private static final ID AMOUNT          = ID.registerProperty("AMOUNT"); // amount of the transaction (12)
         private static final ID TRANSACTIONTYPE = ID.registerProperty("TRANSACTIONTYPE"); // SALE, REFUND
      private static final ID EXECUTE         = ID.registerProperty("EXECUTE"); // invoke doTransaction();
      //Output parameters to form
      private static final ID TRANSACTIONPROCESSED  = ID.registerProperty("TRANSACTIONPROCESSED");
      private static final ID TRANSACTIONFLAG       = ID.registerProperty("TRANSACTIONFLAG");
      private static final ID TRANSACTIONNUMBER     = ID.registerProperty("TRANSACTIONNUMBER");
      private static final ID BATCHNUMBER           = ID.registerProperty("BATCHNUMBER");
      private static final ID TRANSACTIONDATE       = ID.registerProperty("TRANSACTIONDATE");
      private static final ID TRANSACTIONTIME       = ID.registerProperty("TRANSACTIONTIME");
      private static final ID TRANSACTIONAMOUNT     = ID.registerProperty("TRANSACTIONAMOUNT");
      private static final ID CARDDATASOURCE        = ID.registerProperty("CARDDATASOURCE");
      private static final ID NUMBERCUSTOMERCARD    = ID.registerProperty("NUMBERCUSTOMERCARD");
      private static final ID EXPIRATIONDATE        = ID.registerProperty("EXPIRATIONDATE");
      private static final ID TERMINALID            = ID.registerProperty("TERMINALID");
      private static final ID MERCHANTID            = ID.registerProperty("MERCHANTID");
      private static final ID COMPANYNAME           = ID.registerProperty("COMPANYNAME");
      private static final ID SEQUENTIALNUMBER      = ID.registerProperty("SEQUENTIALNUMBER");
      private static final ID ERRORDESC             = ID.registerProperty("ERRORDESC");
         //Events
      private static final ID EVT_OK  = ID.registerProperty("EVT_OK"); //custom event if all ok
      private static final ID EVT_ERR = ID.registerProperty("EVT_ERR"); //custom event if error occured
      // state machine variables
         long l_timeout;
         long l_wait_for = 5000; // pos terminal wait for command (5 seconds)
         long l_wait_for_transaction = 62000 * 2; // pos terminal timeout
         long l_second = 1000; // one second
         byte b_retry = 0;
         String dataValue = "";
      byte[] readBuffer = new byte[2000]; //2000 bytes buffer to read rs232 stream
         String comPort = ""; // local variable to store com port name
                                       // (COM1,COM2,...)
         String transactionType = "SALE"; // type of transaction to be executed (SALE
                                                      // or REFUND) default SALE
         String amount = "0"; // default amount value is set to 0
         //output paramerers
      String transactionProcessed = "";
      String transactionFlag = "";
      String transactionNumber = "";
      String batchNumber = "";
      String transactionDate = "";
      String transactionTime = "";
      String transactionAmount = "";
      String cardDataSource = "";
      String numberCustomerCard = "";
      String expirationDate = "";
      String terminalId = "";
      String merchandId = "";
      String companyName = "";
      String sequentialNumber ="";
      String errorDescription;
        public PosTerminalPjc() {
              super();
              System.out.println("============================");
              System.out.println("== State machine POS v1.0 ==");
              System.out.println("== Peter Valencic (c)     ==");
              System.out.println("== 03.04.2012             ==");
              System.out.println("============================");
        System.out.println("java.library.path: "+System.getProperty("java.library.path"));
              try {
                   res.load(this.getClass().getResourceAsStream("/res/language.properties")); // load language file
              } catch (Exception ex) {
                   System.err.println("Err loading language.properties file: "
                             + ex.toString());
      public void init(IHandler handler)
        super.init(handler);
        this.mHandler = handler;
        System.out.println("init handler ok");
        System.out.println("code base: "+handler.getCodeBase());
        //load dll from codeBase URL
        try
          String mylibName = "rxtxSerial.dll";
          String URLpath = "http://dekani:7777/forms/java/";
          System.out.println("URL: "+ URLpath + mylibName);
          URL libUrl = new URL(URLpath+mylibName);
          System.out.println("libUrlgetFile: " + libUrl.getFile());
          File file = new File(mylibName);
          System.out.println(file);
          if (!file.exists())
          file.createNewFile();
          URLConnection urlc = libUrl.openConnection();
          InputStream in = urlc.getInputStream();
          FileOutputStream out = new FileOutputStream(file);
          byte[] buffer = new byte[1048];
          int read;
          while ((read = in.read(buffer)) != -1){
             out.write(buffer, 0, read); // write
            out.close();
            in.close();
            System.loadLibrary("rxtxSerial");
        catch(Exception exc)
          System.err.println("Exception SystemLoadLibrary: " + exc.toString());
          this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_lib"));
      private void doTransaction() throws Exception {
        String sequentialNumber = ""+getRandomInteger(1000,9000,randomGenerator);
              String phase = null; // initial null value for state machine phase
              long l_ack_timeout = 0; //initial value for acknowledge timeout
              // com port check
              if (getComPort().trim().equalsIgnoreCase("")) {
                   this.showError(res.getProperty("s_dlg_err_title"),
                             res.getProperty("s_com_invalid"));
              if (this.mHandler != null)
                                CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
                                this.setErrorDescription(res.getProperty("s_com_invalid"));
                                dispatchCustomEvent(ce);
                   return;
              // transaction type chek
              System.out.println(this.getTransactionType());
              if (!getTransactionType().equalsIgnoreCase("REFUND")
                        & !getTransactionType().equalsIgnoreCase("SALE")
            & !getTransactionType().equalsIgnoreCase("TICKET")
            & !getTransactionType().equalsIgnoreCase("VOID")
                   this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_tran_invalid_type"));
          if (this.mHandler != null)
                                CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
                                this.setErrorDescription(res.getProperty("s_tran_invalid_type"));
                                dispatchCustomEvent(ce);
                   return;
              portList = portId.getPortIdentifiers();
              while (portList.hasMoreElements()) {
                   portId = (CommPortIdentifier) portList.nextElement();
          System.out.println(portId.getName());
                   if (portId.getName().equalsIgnoreCase(this.getComPort())) {
                        System.out.println("Port is used : "
                                  + portId.isCurrentlyOwned());
                        serialPort = (SerialPort) portId.open("ComDriver", 2000);
                        serialPort.setSerialPortParams(9600, SerialPort.DATABITS_7,
                                  SerialPort.STOPBITS_1, SerialPort.PARITY_EVEN);
                        serialPort.notifyOnDataAvailable(true);
                        serialPort.notifyOnOutputEmpty(true);
                        os = serialPort.getOutputStream();
                        is = serialPort.getInputStream();
                        break;
              if (portId == null) {
              this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_com_not_found"));
          if (this.mHandler != null)
                                CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
                                this.setErrorDescription(res.getProperty("s_com_not_found"));
                                dispatchCustomEvent(ce);
                   return;
        else if (portId.getName().equalsIgnoreCase(this.getComPort()) == false)
                  this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_com_not_found"));
          if (this.mHandler != null)
                                CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
                                this.setErrorDescription(res.getProperty("s_com_not_found"));
                                dispatchCustomEvent(ce);
          return;
              // state machine infinite loop
              while (true)
                   // SEND DATA TO POS TERMINAL
                   if (phase == null)
                        System.out.println("start phase");
                        byte[] req = null;
                        //verify transaction type to be SALE or REFUND
                        //if REFUND then transaction number must be specified
                        if (getTransactionType().equalsIgnoreCase("SALE")) {
                             System.out.println("--> SALE send message to the pos terminal");
                             System.out.println("--> amount: " + amount);
                             req = protocolStream("000000"+sequentialNumber+"01100" + FS + amount + FS
                                       + FS + "+0" + FS + "978" + FS + FS + FS + FS + FS
                                       + FS + FS + ETX);
                        else if (getTransactionType().equalsIgnoreCase("REFUND")) {
                             System.out.println("--> REFUND send message to the pos terminal");
                             System.out.println("--> amount: " + amount);
                             System.out.println("--> transaction number: " + getTransactionNumber());
                             req = protocolStream("000000123405100" + getTransactionNumber() + FS + amount
                                       + FS + FS + "+0" + FS + "978" + FS + FS + FS + FS
                                       + FS + FS + FS + ETX);
            else if (getTransactionType().equalsIgnoreCase("VOID")) {
                             System.out.println("--> VOID transaction");
                             System.out.println("--> amount: " + amount);
                             System.out.println("--> transaction number: " + getTransactionNumber());
                             req = protocolStream("000000123410100" + getTransactionNumber() + FS      + FS + FS + "+0" + FS + "978" + FS + FS + FS + FS
                                       + FS + FS + FS + ETX);
            else if (getTransactionType().equalsIgnoreCase("TICKET")) {
                             System.out.println("--> TICKET duplicate");
                               req = protocolStream("000000123413100" + getTransactionNumber() + FS      + FS + FS + "+0" + FS + "978" + FS + FS + FS + FS
                                       + FS + FS + FS + ETX);
            else {
                             //nothing ;)
                        os.write(req);
                        os.flush();
                        l_ack_timeout = System.currentTimeMillis() + 1500;
                        //wait for half second
                        Thread.sleep(500);
                        l_timeout = System.currentTimeMillis() + l_wait_for; //add some time for timeout
                        phase = "TO_POS_ACK";
                        System.out.println("phase: " + phase);
                   }//phase null
                   //CHECK IF THE TIMEOUT OCCURED
                if (phase.equalsIgnoreCase("TO_POS_ACK") & (l_timeout < System.currentTimeMillis()) & (b_retry < 4))
                    b_retry += 1;
                    System.out.println("TIMEOUT: " + b_retry);
                    l_timeout = System.currentTimeMillis() + l_wait_for;
                    if (b_retry >= 4) {
                        System.out.println("Timeout occured");
                        closePort();
                        this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_timeout"));
                        break;
              //CHECK FOR THE ACKNOWLEDGE (FIRST RESPONSE FROM POS TERMINAL)
                if (phase.equalsIgnoreCase("TO_POS_ACK") &
                        (l_ack_timeout < System.currentTimeMillis())) {
                    try {
                        int numBytes = 0;
                        dataValue = "";
                        while ((numBytes = is.read(readBuffer)) > 0) {
                            dataValue += new String(readBuffer, 0, numBytes, "ASCII");
                        if (dataValue.getBytes().length > 0) {
                            System.out.println("->first byte: " +
                                dataValue.getBytes()[0]);
                            System.out.println("total length: " +
                                dataValue.getBytes().length);
                            //check for ack byte
                            if (dataValue.getBytes()[0] == 6) {
                                System.out.println(
                                    "<--ACKNOWLEDGE received from pos terminal");
                                phase = "WAIT_FOR_TRANSACTION";
                                l_timeout = System.currentTimeMillis() + l_wait_for_transaction;
                                System.out.println("-> wait for transaction response");
                    } catch (IOException ev) {
              //WAIT FOR TIMEOUT ON MESSAGE (watch dog timer)
                if (phase.equalsIgnoreCase("WAIT_FOR_TRANSACTION") &
                        (l_timeout < System.currentTimeMillis())) {
                    System.out.println(
                        "Error receiving response from pos terminal!!!");
                    closePort();
                    this.showError(res.getProperty("s_dlg_err_title"),
                                 res.getProperty("s_response_error"));
                  if (this.mHandler != null)
                    CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
                    this.setErrorDescription(res.getProperty("s_response_error"));
                    dispatchCustomEvent(ce);
                    break;
              //WAIT FOR SOME DATA TO COME FROM POS TERMINAL OVER RS232
                if (phase.equalsIgnoreCase("WAIT_FOR_TRANSACTION")) {
                    try {
                        int numBytes = 0;
                        dataValue = "";
                        Thread.sleep(500);
                        while ((numBytes = is.read(readBuffer)) > 0) {
                            dataValue += new String(readBuffer, 0, numBytes, "ASCII");
                        if (dataValue.getBytes().length > 0) {
                            System.out.println("->first byte: " +
                                dataValue.getBytes()[0] + "|" +
                                dataValue.getBytes()[1]);
                            System.out.println("->ascii: " + dataValue);
                            System.out.println("total length: " +
                                dataValue.getBytes().length);
                            if (dataValue.indexOf("PREKINIL UPORABNIK") != -1) {
                                System.out.println(
                                    "Uporabnik je prekinil povezavo!");
                                  closePort();
                                //transaction cancelled by user s_user_cancel
                                this.showError(res.getProperty("s_dlg_err_title"),
                                             res.getProperty("s_user_cancel"));
                              if (this.mHandler != null)
                                CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
                                this.setErrorDescription(res.getProperty("s_user_cancel"));
                                dispatchCustomEvent(ce);
                                break;
                            if (dataValue.indexOf("NAPACEN VNOS") != -1) {
                                System.out.println("Napačen vnos");
                                closePort();
                                //invalid user entry
                                this.showError(res.getProperty("s_dlg_err_title"),
                                             res.getProperty("s_user_invalid_entry"));
                               if (this.mHandler != null)
                                CustomEvent ce = new CustomEvent(this.mHandler, EVT_ERR);
                                this.setErrorDescription(res.getProperty("s_user_invalid_entry"));
                                dispatchCustomEvent(ce);
                                break;
                            if (dataValue.indexOf("PROSIM POCAKAJ") != -1) {
                                System.out.println("<-- PROSIM POCAKAJ");
                                continue;
                            //preberemo podatke iz stringe terminala
                            if (dataValue.indexOf("SPREJETO") != -1) {
                                closePort();
                                System.out.println("<-- TRANSAKCIJA SPREJETA");
                                System.out.println(dataValue);
                                StringTokenizer st = new StringTokenizer(dataValue, "\034" );
                                String dv = st.nextToken();
                                sequentialNumber = dv.substring(6,10);
                                transactionProcessed = dv.substring(1, 3);
                                transactionFlag = dv.substring(13,15);
                                transactionNumber = dv.substring(15,21);
                                batchNumber = dv.substring(21,25);
                                transactionDate = dv.substring(25,31);
                                transactionTime = dv.substring(31,37);
                                transactionAmount = st.nextToken();
                                st.nextToken(); //Amount exponent
                                st.nextToken(); //Amount currency
                                cardDataSource = st.nextToken();
                                numberCustomerCard = st.nextToken();
                                expirationDate = st.nextToken();
                                st.nextToken(); // authorization code
                                terminalId = st.nextToken();
                                merchandId = st.nextToken();
                                companyName = st.nextToken();
                                System.out.println("================");
                                System.out.println(transactionProcessed);
                                System.out.println(transactionFlag);
                                System.out.println(transactionNumber);
                                System.out.println(batchNumber);
                                System.out.println(transactionDate);
                                System.out.println(transactionTime);
                                System.out.println(transactionAmount);
                                System.out.println(cardDataSource);
                                System.out.println(numberCustomerCard);
                                System.out.println(expirationDate);
                                System.out.println(terminalId);
                                System.out.println(merchandId);
                                System.out.println(companyName);
                                if (this.mHandler != null)
                                  System.out.println("dispatch custom event");
                                  CustomEvent ce = new CustomEvent(this.mHandler, EVT_OK);
                                  dispatchCustomEvent(ce);
                                return;
                    } catch (IOException ev) {
                      System.err.println("Exception sm: " + ev.toString());
                System.out.print('*');
                Thread.sleep(200);
              }//end state machine loop
          * protocolStream prepare the stream to be send over RS232 to POS terminal
          * with LRC cheksum control
          * @param data
          * @return byte[]
         private byte[] protocolStream(String data) {
              char STX = (char) 0x02;
              String tmp = "" + STX + STX + data + "" + getLRC(data);
              System.out.println("PStream: " + tmp);
              for (int i = 0; i < tmp.getBytes().length; i++) {
                   System.out.print(tmp.getBytes() + ":");
              return tmp.getBytes();
    * close port and stream
    private void closePort()
    try {
    serialPort.close();
    is.close();
    os.close();
    } catch (Exception ee) {
         * Longitudinal Redundancy Check (LRC)
         * @param packet
         * @return String
         private String getLRC(String packet) {
              char[] splitPacket = packet.toCharArray();
              char lrc = 0x00;
              for (int x = 0; x < splitPacket.length; x++) {
                   lrc = (char) (lrc ^ splitPacket[x]);
              return "" + (char) lrc;
         private String paddingString(String s, int n, char c, boolean paddingLeft) {
              if (s == null) {
                   return s;
              int add = n - s.length(); // may overflow int size... should not be a
              if (add <= 0) {
                   return s;
              StringBuffer str = new StringBuffer(s);
              char[] ch = new char[add];
              Arrays.fill(ch, c);
              if (paddingLeft) {
                   str.insert(0, ch);
              } else {
                   str.append(ch);
              return str.toString();
    public boolean setProperty(ID id, Object value)
    if (id.toString().equalsIgnoreCase("COMPORT")) {
    setComPort((String)value);
    System.out.println("RS232 com port: " + getComPort());
    return false;
    if (id.toString().equalsIgnoreCase("AMOUNT")) {
    this.setAmount((String)value);
    System.out.println("Amount value: " + getAmount());
    return false;
    if (id.toString().equalsIgnoreCase("TRANSACTIONTYPE")) {
    this.setTransactionType((String)value);
    System.out.println("Transaction Type value: " + this.getTransactionType());
    return false;
    if (id.toString().equalsIgnoreCase("EXECUTE")) {
    System.out.println("Invoke pos terminal");
    try
    doTransaction();
    catch(Exception ex)
    System.err.println("Execute Exception>> " + ex.toString());
    this.showError(res.getProperty("s_dlg_err_title"),res.getProperty("s_gen_exception"));
    return false;
    return false;
         * Display error message inside oracle form
         * @param title
         * @param exceptionString
         private void showError(String title, String exceptionString) {
              JOptionPane.showMessageDialog(this, exceptionString, title, 0);
    Edited by: peterv6i.blogspot.com on May 8, 2012 10:18 AM
    Edited by: peterv6i.blogspot.com on May 8, 2012 10:20 AM
    Edited by: peterv6i.blogspot.com on May 8, 2012 10:21 AM

  • Too many usb comm ports

    Good Morning,
        I've run into what may be issue soon, where we have the units being tested that have built in USB ports that appear as serial comm ports. The problem is that every time we connect a UUT that hasn't been run on that computer before Windows assigns it a new com port number. My concern is that quite soon, as the production line gets into full swing, we will hit the "magic number" of 255, the highest com port number and I don't have any idea what Windows will do at that point. Before I start writing code to parse the new com port number returned by VISA, and adjust" the registry entries accordingly, I want to know if it is necessary. I figure that there are a couple of possible scenarios, that Windows complains and won't issue a com port #, that Windows starts over at the beginning, or that Windows just hits 255 and then keeps reissuing it. I would prefer that it be the later two, don't want to have my program messing around in the registry, and really don't have time at the moment, nor access to the machine(s) to experiment to see.
    Thanks,
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion
    Solved!
    Go to Solution.

    I'm not sure that I understand your answer. The problem is that on our test stands we will see hundreds of the product boards go by over the life of the boards. As I have seen with "standalone" usb-serial adapters, when a new one is plugged in, that the computer hasn't "seen" before, it will assign it the next available comm port #. It probably knows that it hasn't seen it before by some serial numbering type scheme that is returned in the USB's header info when plugged in. As the hardware design for the unit containing this USB interface is essentially frozen, and as that side of the design group won't see it as a problem in the target systems (where the boards won't be "talked to" via the USB path) it is unlikely that I can get any hardware/firmware changes. I'm not sure that would be the way to go anyway. Definitely not going to get a change to the BOM at this point (on top of which I'm an outside contract test consultant). So I will have to address the problem on my side of the fence. I haven't looked yet, but am pretty certain that the Com#'s are stored in the registry, so I can just make sure that I "reset" those numbers before they get to 255, but am never comfortable with my programs modifying the registry.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Phantom retired disk also listed as available - with same friendly name

    I recently had to mark a good disk as "Retired" in an attempt to get it ejected from a Storage Pool so that I could repair some Storage Pool issues on my server.
    The strange thing is that now this disk appears to be listed twice with the same disk friendly name when I run "Get-PhysicalDisk" in PowerShell - once marked as "Retired," the second time as available for pooling. I can’t rename the retired
    instance, and I have no idea how I might remove it.
    PowerShell output showing the Object ID's of the disk (other system disks removed from the output):
    PS C:\Windows\system32> Get-PhysicalDisk | ft FriendlyName, ObjectId, BusType –auto
    FriendlyName ObjectId BusType
    PhysicalDisk9 {b1b3fc5e-ccd7-11e2-b1dc-806e6f6e6963} RAID
    PhysicalDisk9 {10e2b595-a097-11e3-943a-806e6f6e6963} RAID
    I have tried setting a new friendly name on the retired disk using Set-PhysicalDisk, but this is the result:
    PS C:\Windows\system32> Set-PhysicalDisk -UniqueId b1b3fc5e-ccd7-11e2-b1dc-806e6f6e6963 -NewFriendlyName OldPhysicalDisk
    9
    Set-PhysicalDisk : The requested object could not be found.
    At line:1 char:1
    + Set-PhysicalDisk -UniqueId b1b3fc5e-ccd7-11e2-b1dc-806e6f6e6963 -NewFriendlyName ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ObjectNotFound: (PS_StorageCmdlets:ROOT/Microsoft/..._StorageCmdlets) [Set-PhysicalDisk]
    , CimException
    + FullyQualifiedErrorId : MI RESULT 6,Set-PhysicalDisk
    Is there anything else I can do to rename the phantom retired disk or -  preferably - remove it altogether? Note that it does not show up in Disk Manager or Server Manager.

    Thank you for the reply. I tried directly running Get-PhysicalDisk, and the disk still appeared to be listed twice.
    I also tried running the commands in the article you referenced, but without success.
    Nothing appeared to happen when I ran the Repair-VirtualDisk command. And this is the result when I ran the Remove-PhysicalDisk command.
    PS C:\Windows\system32> Remove-PhysicalDisk -FriendlyName PhysicalDisk9
    Remove-PhysicalDisk : A parameter cannot be found that matches parameter name 'FriendlyName'.
    At line:1 char:21
    + Remove-PhysicalDisk -FriendlyName PhysicalDisk9
    + ~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Remove-PhysicalDisk], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Remove-PhysicalDisk
    The disk in question is perfectly good, and I need to add it back to the storage pool. I used the DISKPART clean command to clean the disk's configuration, but after I opened Disk Management and followed the prompt to initialize the disk, the
    disk appeared in Server Manager in its former Storage Pool - as retired!
    And when I ran Get-PhysicalDisk after trying all these steps, the drive still shows up twice with the same FriendlyName, once as retired, once as available to pool.
    How can I fix this? It really doesn't seem like it should be this hard.

  • Comm port enumeration

    Hi,
    im using javacomm to detect my comm ports.i have two serial
    and a parallel port (com1,com2 and LPT1) but it found no ports and throws
    as follows,
    found: javax.comm.CommPortEnumerator@e83912
    found: 0 open ports
    i placed .properties file in ..\jdk1.5.0\jre\lib
         comm jar file in ..\jdk1.5.0\jre\lib\ext
    and WIN32COM.DLL in ..jre\bin
    am i doing right?
    Here is the code,
    import javax.comm.CommPortIdentifier;
    import javax.comm.SerialPort;
    import javax.comm.PortInUseException;
    import java.util.Enumeration;
    import java.util.Vector;
    public class TestEnumeration {
    public static void main(String args[]) {
    Vector portslist = TestEnumeration.getAvailableSerialPorts();
    System.out.println("found: "+portslist.size()+" open ports");
    public static Vector getAvailableSerialPorts() {
    CommPortIdentifier pId=null;
    SerialPort sPort=null;
    Enumeration pList=null;
    boolean foundport=false;
    pList = CommPortIdentifier.getPortIdentifiers();
    String port=null;
    Vector ports=new Vector();
    if(!pList.hasMoreElements()) {
    System.out.println("found: "+pList);
    return ports;
    while (pList.hasMoreElements()) {
    pId = (CommPortIdentifier) pList.nextElement();
    if (pId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
    foundport=true;
    try {
    sPort = (SerialPort)pId.open("serialport", 1000);
    } catch (PortInUseException e) {
    foundport=false;
    System.out.println(pId.getName()+ " is closed");
    } finally {
    if(sPort!=null) {
    try { sPort.close(); } catch(Exception e) {}
    if(foundport) {
    ports.add(pId.getName());
    System.out.println(pId.getName()+ " is open");
    return ports;
    please help me on how to open the comm ports..

    hi,
    thanks for your reply..actually my problem was with my comm properties file and i replaced with the new comm file then..now its working fine..
    Thanks for everyone...
    bye

  • I am trying to download words with friends app and it says it is no longer available from itunes.  I had already downloaded it and did a update in my I phone 4 and it is still not letting me download it?

    I am trying to download words with friends and itunes is saying it is no longer available for purchase.  What is going on??I

    First you need to research all the problems people are having with the higher OSX versions, & make sure you have a bootable clone of what you have just in case.
    then you must get 10.6 if they still have it, install it & update to 10.6.8 so you have the App Store to buy & download the huge 10.8 Installer.
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least, more if you can afford it)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It's been pulled from the online store & Apple Stores, so you have to call Apple to buy it, last I heard.
    Call Apple Sales...in the US: 1-800-MY-APPLE. Or Support... 1-800-275-2273
    Other countries...
    http://support.apple.com/kb/HE57

  • I have a new ipod and when I sign in to Words with Friends it says that user name is already in use. How can I continue using the same user name with a different ipod?

    I have a new ipod and added all my apps to it. When I sign in to Words with Friends it says that "user name is already in use" because it is linked to my old ipod. How can I use the same user name with my new ipod?

    Was the iPod setup via iTunes on this computer?
    Setup via wifi?
    Was the iPod previous synced to another iTunes library/computer?
    Have you successfully synced from this iTunes library/computer before?
    Do the songs play in iTunes?           
    Do you have the right boxes checked to sync?
    iTunes: Syncing media content to iOS devices and iPod        
    Try syncing using the manual method                 

  • Setting "Friendly name" with keytool

    Hi. I run Java 1.4.1 and Tomcat 4.1. Using keytool, I would like to generate a keystore which generates certificates that have a friendly name that I specify. For example, in Internet Explorer, after installing a certificate as a Trusted Root Authority, I would like to go to Tools->Contents tab->Certificates->Trusted Root Certification Authorities tab, and see under the "Friendly name" column the friendly name that I chose for a certificate. I don't see a -genkey option to specify a friendly name in the keytool help. If there's no way to directly change the certificate's friendly name with keytool, I can change the certificate's friendly name in IE. How may I then import the modified certificate into the keystore and have the webserver reference the keystore to return the modified certificate?
    Thank you.
    Raj

    Friendly Name is an attribute of the certificate defined in PKCS#9:
    5.5.1 Friendly name
    The friendlyName attribute type specifies a user-friendly name of the
    object it belongs to. It is referenced in [17].
    friendlyName ATTRIBUTE ::= {
    WITH SYNTAX BMPString (SIZE(1..pkcs-9-ub-friendlyName))
    EQUALITY MATCHING RULE caseIgnoreMatch
    SINGLE VALUE TRUE
    ID pkcs-9-at-friendlyName
    where
    pkcs-9 OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840)
                                     rsadsi(113549) pkcs(1) 9}
    pkcs-9-at-friendlyName OBJECT IDENTIFIER ::= {pkcs-9 20}
    See RFC2985.
    If you add/change an attribute to an existing certificate its thumbprint (SHA-1 hash) will be changed.
    Apparently keytool can't change such attribute, but see its source at the SCSL J2SDK Source code.

  • I have a macbook pro and a ipod and yesterday while I was on my laptop on Facebook playing words with friends with my daughter who was on the iPod playing under her user name it seems that they combined into one profile.  what happened

    I have a macbook pro and a ipod and yesterday while I was on my laptop on Facebook playing words with friends with my daughter who was on the iPod playing under her user name it seems that they combined into one profile.  what happened?  they used to be separate and we could play against each other but now it says its the same user for both even though I signed in on facebook with my log on and she was on her ipod with her profile.  can I fix this? 

    You might need to be asking the folks at Facebook.

  • "Finnish with street names" not available in the p...

    Hi all! I just bought a Nokia 5230. I used the Nokia Ovi Suite to upload one additional voice to the phone: Finnish with street names (Suomi katujen nimillä). The upload was successful ( I even checked the memory card). However this voice option is not available on the phone in the Ovi Maps Settings (not for walking or driving). Help!
    Solved!
    Go to Solution.

    I got it working by accident. I have the maps 3.0.4 beta and the finnish voices with street names work with it. I don't if it needs 3.0.4 beta or if the maps needs some kind of reset.
    I had speeding camera problems with maps and installed the maps several times, see
    /t5/Maps-Navigation-and-GPS/Nokia-5230-Safety-Cameras/td-p/679555
    I checked the cities/diskcache/voices directory and the finnish_tts directory had contents, but I was unable choose it from the menus. There is some kind reset problem, when new data is downloaded.
    I can't test if following works, but try it. If it does not work try reinstalling the software after you have deleted the cities-directory and qf file as described in the other post with link above.
    Turn off the driving and walking guidance. Close the map application. Start the map application and use the navigation with a target. Close the navigation and maps application and restart the maps and see I you can find the driving navigation language finnish with street names (suomi - katujen nimillä). 
    If that does not help then try the delete/install procedure. I don't know if it works with 3.0.3 or if you need the 3.0.4 beta.
    I think the maps application needs some kind of refresh or reset or factory settings function.
    BTW, the swedish location names pronounced in finnish (like in motorway exits) are sometimes funny, Mikko's (the voice) swedish is even worse than mine.

  • Linux NSS DB Issue with Personal User/Client Certificate Friendly Names.

    I have an issue with the NSSDB lib and my browsers in which client certificates I use for an application (Nessus Vulnerability Scanner) show up in the list with the same friendly name/nickname, making it very difficult to distinguish which certificate goes with which server.
    Each certificate is generated on a different server with a different hostname but the same username. Upon importing the certificate into my browser, or even the pk12util command, the first certificate will appear correctly. However, importing additional certificates will just reuse the nickname from the first certificate instead of the nickname I chose. I have tested many different scenarios, and it doesn't seem the problem is related at all to the content of the nickname, so I have no idea how to force it to work correctly. I've searched around and found some indications of "nickname conflicts" and things, but nothing that helps me resolve the issue. I'm not sure if it's a bug or if it's some weird condition I've encountered.

    Maybe try to ask on the mozilla.dev.tech.crypto news group.
    *https://developer.mozilla.org/en-US/docs/NSS
    *news://news.mozilla.org/mozilla.dev.tech.crypto
    *http://groups.google.com/group/mozilla.dev.tech.crypto

  • Request Real Name is in with friends requests is a bit daft

    I only figured it out Sony has merged Real Name Requests with Friends Requests.Not all PS4 users will allow their real names to be shown on PS4 - PSN but to add it in with friends requests is forcing those who don't want to reveal their real names to a billion PS4 users.

    Seriously? It's not even half 8 on a Saturday morning and already you're moaning yet again at something you're apparently 'forced' to do You seem to have a real persecution complex with big companies I'm pretty sure the real name thing is still optional as per the PS4's settings and the real name thing is just the option (which was seperate after a friend request had been accepted) now combined into the initial friend requestThe person receiving the request doesn't HAVE to give their real name Sony wouldn't force anyone to give their real name, Data Protection Act and all that Stop trying to find things you're 'forced' to do when actually that's not the case and do what I'm doing - Chilling out with toast and a cup of coffee By the way Mr Exaggeration, there isn't even a billion PS4 users on the planet

  • Request Real Name is in with friends requests bit daft

    I only figured it out Sony has merged Real Name Requests with Friends Requests.Not all PS4 users will allow their real names to be shown on PS4 - PSN but to add it in with friends requests is forcing those who don't want to reveal their real names to a billion PS4 users.

    Seriously? It's not even half 8 on a Saturday morning and already you're moaning yet again at something you're apparently 'forced' to do You seem to have a real persecution complex with big companies I'm pretty sure the real name thing is still optional as per the PS4's settings and the real name thing is just the option (which was seperate after a friend request had been accepted) now combined into the initial friend requestThe person receiving the request doesn't HAVE to give their real name Sony wouldn't force anyone to give their real name, Data Protection Act and all that Stop trying to find things you're 'forced' to do when actually that's not the case and do what I'm doing - Chilling out with toast and a cup of coffee By the way Mr Exaggeration, there isn't even a billion PS4 users on the planet

  • Question about "words with friends" rules-can more than 1 person play on the same Ipod device?

    I have a Ipod touch 5th Generation and I like to play the free game version of "Words with Friends"  Can other family members in my house sign up to play on my Ipod using a different user name?  I have tried to figure this part out and there's no clue available on the "Words with Friends" website.  Thanks for your help again!!!  I also have music on my computer that I would like to transfer to the new Ipod.  How do I do that?  I haven't been able to link it to "Itunes" yet, and then sync it to my Ipod. 

    Well, E3000 doesn't support any usb port replicator. So, in case if you want to use any hard drive you need to connect it directly to the router.

Maybe you are looking for

  • MRP not running - Issue with Planning File

    Hi In MD06 - MRP List, I see MRP list last generated on 5/30/2008. There is a production order with requirements date of 3/27/2008 which has been met but is still showing up on the MRP List. The goods issue for the production order was posted on 7/30

  • Windows 2008 R2 Hyper-V has really slow VMs disk access

    Wondering if anyone can help? I have noticed in a couple of Windows Server 2008 R2 Hyper-V scenarios, that the VM guests are often very slow. Disk access is especially slow. In one situation their was only a couple of guest VMs, and they were running

  • Trouble Opening Photoshop CC on MacBook

    Hi, I recently purchased a used MacBook Pro and just put my Photoshop CC on it today.  Now when I try to open it, I'm getting this error message: "To open "Adobe Photoshop CC," you need to install a Java runtime, but you are not connected to the Inte

  • Search very slow

    Hi, I'm searching for messages in a message folder ("Inbox", 72 MB, about 100 messages) with a given message ID: SearchTerm st = new HeaderTerm("Message-ID", messageId); Message[] msgs = folder.search(st);This search lasts about 1 minute and more. I

  • Labview executable only works for about ten seconds before shutting down

    Hi, I'm not a newbie to LabVIEW but I am a newbie to creating executables and installers using LV. On my first attempts I'm having a strange problem that I cannot resolve. I already began discussing this problem on another thread, but I was advised t