HP 6550b BIOS Unabled COMM PORT (SERIAL)

Hi,
I have an HP Probook 6550b with BIOS version F.23, I can see my Ricoh PCI connections like USB, SD/MMC Reader and the 1394 Port, but I can't found my Serial COMM PORT??
Thx for your Help!

Hi:
Did you install the AMT driver?
http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/swdDetails/?sp4ts.oid=3688870&sp...

Similar Messages

  • Select serial comm port in sub vi during run-time

    Hi, would like to be able to select the comm port (serial RS232) in sub vi to use in main vi during run time. How can I do this? Have tried and failed, for on startup an error occurs because I have not selected a port yet. An example would be invaluable! Thanks alot, Madri

    Hi Madri !
    What you could do is to intercept the com errors, and open a configuration vi either if there is an init error or if the user has pressed a "Change port" boollean (or menu...). Do not forget to close the previously opened serial port, and to open/init the new one. I have attached a small example of this idea.
    Of course com errors can have various origins, and do not require always to change the serial port. So, you have some additional work to do.
    Hope this helps
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Select_port.vi.zip ‏12 KB
    Com_with_serial_init_vi.vi.zip ‏13 KB

  • How do I pragmmatic​ally determine what comm ports my serial instrument​s are on?

    I am building a test stand that incorporates 5 serial instruments; 2 digital loads and 3 power supplies. I can use my PC's device manager to figure out which comm port each device is on and set the VISA Resource Name so everything runs as expected. All is well at this point. The problem comes in when an instrument's USB connection is unplugged and replugged, at which point the system may renumber the port assignments; the result is that my program errors out, I have to figure out what port everything is on all over again, and change the VISA Resource Name for all of my instruments. While this is a minor annoyance for me as the developer, this would make the program unusable by the user.
    While "don't ever unplug an instrument" is a sensible answer, the fact is that these things happen from time to time - like for calibration - so I want the program to work regardless of instruments being unplugged.
    Is there a way to have the vi automatically identify what port each instrument is on?

    I've used a USB connected barcode scanner that appears as a COM port. If it is left connected to the same USB port the COM port remains constant but if it is disconnected and then put back into a different port the COM port changes. This sounds similar to your problem so I'll share how I solved things for my application.
    The scanner I use accepts commands and will respond with a known string when I send a character 'I' via the serial connection. Using this I can see if the scanner is connected to the expected COM port (default port is stored in an ini file).
    If this fails I create an array of possible serial ports by trying to open COM1 and checking for an error. If this does not generate an error I add it to an array. Next I try the same with COM2, COM3 up to COM16 (for example). This gives me a list of COM ports I can open.
    I then iterate through the array trying for a response and stopping either when I get the expected response and continuing with the application or if the device is not found by the time I get to the end of the array I show the appropriate error condition to the operator.
    If your instruments can return some kind of ID that will allow you to identify them as mentioned in another reply then this method could be used. Your 3 power supplies and 2 digital loads would need to be able to return a unique identifier otherwise you wouldn't be able to tell them apart and I think you'd possibly run in to problems.

  • Reading Data from serial (Comm) Port in developer200 forms 6i

    Dears,
    I have developed an application using Dev2k forms 6i.
    I need to read data from a device (weigh bridge) that is attached to PC on comm port.
    scenario: when a vehicle comes on the Weigh bridge it calculates its weight and send it to the PC on serial port.
    on when-button-pressed event I want to get data into a text field on form.
    If any one has developed such form please help me.
    Thanks and regards

    you can:
    create java class -> wrap plsql -> invoke plsql-code from button trigger
    googling java class instead of creating =)

  • Solving Prolific PL-2303 USB to Serial Comm Port installation issues

    Hello everybody,
    More and more machines are comming without Parallel and serials ports, they are comming with USB external ports only.
    Some have the RS-232 and Parallel headers in the motherboard, and that should last for about a year I think.
    At any rate, the issue I was facing is the following:
    (a) Installing Prolific PL-2303 USB to Serial Comm Port on Windows XP Pro SP3 works OK and system runs fine. there are some capacity issues regarding the buffer size, but that is another post.
    (b) Installing on WEPOS 1.1 SP3 on some motherboards (Older ones) that have at least the Parallel headers and a serial port, the device also works as with (a)
    (c) Installing on WEPOS 1.1 SP3 with a machine with only external USB's (no parallel / serial port or headers). The installation process runs OK. but when the device
    is plugged I get the following error message:
    "An error ocurred during the installation of the device"
    "A service Installation section in this INF is invalid"
    (d) Installing on POSReady 2009. I get the same as with (c)
    This is how I solved, after many frustrating reboots with the same message about the INF section and multiple Prolific drivers tried.  I started digging windows:
    (1) Find the setupapi.log and read it, if the OS is a fresh install it will not be too long.
    (2) Read this:
    #-166 Device install function: DIF_SELECTBESTCOMPATDRV.
    #I063 Selected driver installs from section [ComPort] in "c:\windows\inf\oem15.inf".
    #I320 Class GUID of device remains: {4D36E978-E325-11CE-BFC1-08002BE10318}.
    #I060 Set selected driver.
    #I058 Selected best compatible driver.
    #-166 Device install function: DIF_INSTALLDEVICEFILES.
    #I124 Doing copy-only install of "USB\VID_067B&PID_2303\5&B6C3FC&0&2".
    #-166 Device install function: DIF_REGISTER_COINSTALLERS.
    #I056 Coinstallers registered.
    #-166 Device install function: DIF_INSTALLINTERFACES.
    #-011 Installing section [ComPort.NT.Interfaces] from "c:\windows\inf\oem15.inf".
    #I054 Interfaces installed.
    #-166 Device install function: DIF_INSTALLDEVICE.
    #I123 Doing full install of "USB\VID_067B&PID_2303\5&B6C3FC&0&2".
    #-035 Processing service Add/Delete section [ComPort.NT.Services].
    #E339 Add Service: Binary "C:\Windows\system32\DRIVERS\serenum.sys" for service "Serenum" is not present.
    #E032 Error 0xe0000217: A service installation section in this INF is invalid.
    #E275 Error while installing services. Error 0xe0000217: A service installation section in this INF is invalid.
    #E122 Device install failed. Error 0xe0000217: A service installation section in this INF is invalid.
    #E154 Class installer failed. Error 0xe0000217: A service installation section in this INF is invalid.
    [2010/02/13 23:32:24 2004.2]
    (3) So it was the serenum.sys file that Windows needed to find in the ..\system32\drivers folder. I got the serenum.sys from one of the temporary folders created by the installation process.
    (3a) So, I think that windows installs this sys file if it recognizes the motherboard has at least one parallel or serial port.
    (4) So good luck when installing your serial device to your POS solution. I will open another thread if I have problems with the buffer size of the device.
    Humberto Sequeira

    Hello Terry,
    Indeed, they were not intended as POS system, the EEE Top machines are candy to the eye, but for my taste they do not work in POS environment (I give them 1 year before they pop). Regarding the other, well competition is tought, so you have to get creative in order to keep costs down, and this one can be used as a waiter stations, that do not need heavy serial comunications.
    Anyways, the POSReady does not install these system files if the installation does not detect a serial or parallel port (which make sense, as why would it install drivers for a device that is not detected). I posted this for others to be aware of this when they select the hardware that will be offered to their customers, as good old "on mother-board" serial and parallel ports cannot be beaten by their USB imitations (IRQ and memory addressing processing are needed for end devices to function properly).
    Have a great weekend,
    Humberto

  • Unable to establish serial connection between 2 serial ports of same laptop

    I am trying to run "Basic 2 port serial write and read.vi" from the labview example using the 2 different com ports of same laptop. My serial cable is fine. It has passed loopback test. Also I have successfully communicated with the microcontroller(via max232) using the same cable. Still In the given example, I am not recieving character that I have written in the "string to write" window. I have confirmed the com port numbers. The cable I am using is simple 3 wire tx-rx and ground cable. I have also tried to connect two ports on two different pc's that also doesnt work. What may be the problem? I can't see any.                 

    Are you changing the data being sent?  As currently configured, you need to make sure the \n stays at the end of the data.  To avoid this, turn the termination character off (input on the top of the Configure Serial Port, wire a FALSE constant to it).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • 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

  • 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]

  • How to open the comm ports?

    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..

    Try this, It workd for me. Before doing this make sure you have serial ports on you r computer by following these steps:
    open "regedit"
    go to "HKEY_LOCAL_MACHINE" > HARDWARE > DEVICEMAP
    and check if there is any serial ports. If htere is any, then use following program to enumerate throught the ports:
    class SimpleRead() {
    portList = CommPortIdentifier.getPortIdentifiers();
         while (portList.hasMoreElements()) {
         portId = (CommPortIdentifier) portList.nextElement();
         if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
              if (portId.getName().equals(defaultPort)) {
              System.out.println("Found port: "+defaultPort);
              portFound = true;
              SimpleRead reader = new SimpleRead();
         if (!portFound) {
         System.out.println("port " + defaultPort + " not found.");
    }

  • Wiring FP-1001 to a comm port on my computer?

    I am trying to wire my FP-1001 to my PC. I purchased a 9pin serial port connecter in hope that all I had to do was plug the female end into comm port one, splice the other end and connect them to RX+, RX-, TX+, TX- and GND. My only problem is how do I know which wires go where? Or do I need to purchase a RS-485 card for my PC.

    Hi all
    That is not quite true!National Instruments is selling PCI-485 boards with two, four or eight ports.
    Under this link you find a quick start guide how to connect the FP-1001 to a RS-485 port.
    http://digital.ni.com/manuals.nsf/webAdvsearch/554FEB385A006C8E86256AC300647F62?OpenDocument
    Regards,
    Luca

  • 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

  • Comm port passthrough

    Customer has an old Windows 2003 SBS server that has a Novatime time clock plugged into it via a comm port.
    They now have a new server running 2012 (not R2) in Hyper-V role only with 4 2012 VMs (all licensing correct). They want to get rid of the old server (need to) but
    the time clock prevents that.
    I know we can get a serial 2 USB adapter cable so the time clock can be plugged into the Hyper-V server. Is there any way to pass through the USB comm to one of the VMs
    which would have the Novatime software on it? Would it require a comm card to be added to the Hyper-V server?
    Jonathan

    i think your best bet would be this product (haven't tested it): http://www.serial-server.net/port-redirector/ afaik COM redirection isn't supported on Hyper-V.
    Some people seem to have tested it and shared findings on the matter in this thread: http://social.technet.microsoft.com/Forums/windowsserver/en-US/a7b09e73-3491-405e-889e-06bb991a2b0e/com-port-redirection-physical-to-virtual
    Kind regards, Philipp - Solid IT Solutions
    Philipp,
    thanks for your response. I read through the links you provided and the first one certainly looks like it will do what I need.
    Jonathan

  • COMM port problem

    i'm trying to send an sms thru a serial port but while i'm sending an sms if i recieve one then the message i'm trying to send gets clubbed with the msg that being sent. is there a way to block the comm port while this happens?
    plz help me out

    i'm using java communication API. jdk1.2.2
    i've a java file XYZ that listens to the comm port using javax.comm.SerialPortEventListener.
    i've 2 functions
    a) one that recieves a messgae, processes the message and puts it in a database
    b)another one that sends the processed message using AT commmands
    i've a another java file ABC that continously reads the database,picks the message to be sent and calls the method in XYZ to send the message.
    Now the problem is while sending this message if i recieve another messgae, then the actual sending never happens.
    is there a method whereby i can block the comm port from recieving a messgae while a messgae is being sent

  • 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

  • Envio de Trem de Pulsos pela porta SERIAL

    Olá pessoal. Eu preciso enviar  trem de pulsos de frequencia de 1Hz  com tempo em nível alto de 5us (micro segundos) durante uns 30 minutos  pelo pino 3 da porta serial ( Tx ). Ja montei o circuito de conversao de RS232 para TTL. E no programa ja fiz a rotina basica de envio de sinal pela porta serial e ja constatei seu perfeito funcionamento.  O meu problema é que nao consigo enviar um NIVEL 0 para a saida. No bloco respensavel pela escrita VISA SERIA WRITE o valor que coloco é representado em ASCII e nao consigo enviar um nivel logico zero na saida. Ja consultei a tabela e o codigo NUL que representa os bits 0 nao sai. Tentei usar o VI BREAK mas ele nao satisfaz meu projeto pois mantem o nivel baixo somente por 500ms e ocorre um certo delay.
    Resumindo COMO ENVIO UM BIT ZERO PARA SAIDA PELO VISA SERIAL WRITE EM ASCII??? Desejo que minha saida fique em zero por alguns segundos.
    Obrigado pessoal. Em anexo segue meu programa.
    Anexos:
    serial.vi ‏10 KB

    Oi Thiago,
    Na saída Serial, todos os valores '0' representam valores positivos e todos os '1' representam valores negativos. Para ficar mais fácil de entender, lembre que o MSB determina o sinal do valor:
    0xxxxxxx -> positivo
    1xxxxxxx -> negativo
    Este link fala um pouco mais sobre como medir os valores da porta serial e aborda esse assunto (as imagens não estão abrindo, mas você consegue abrí-las pelos arquivos em anexo):
    http://digital.ni.com/public.nsf/websearch/79B995C3638F4177862572C900593631?opendocument&Submitted&&...
    Para você que está trabalhando com comunicação serial, é legal também manter esse guia:
    http://www.ni.com/pdf/manuals/371253b.pdf
    Espero ter ajudado!
    Ricardo Ramos
    Engenheiro de Vendas - Sul
    National Instruments Brasil

Maybe you are looking for

  • HP LaserJet 4600dn and envelope printing

    I have an HP LaserJet 4600dn and envelopes start to seal up from the heat when printing more than 50 envelopes. We print different sizes, #10, #7, #9. Any ideas how to keep the printer from fusing the envelopes closed?

  • Context connection and error ORA-20100: System.AccessViolationException

    I created a .NET stored procedure by following the instructions on this web (used different proc name): [http://www.oracle.com/technology/obe/net11gobe/stfunc/vs2.htm] I can deploy it fine into the database but got the following error when I ran it i

  • Immediately required the solution

    Hi experts, I have been assigned to work in HR-ABAP.I have gud exp in normal ABAP but i am totally new for hr-abap.Could please help to me as u guys are helping to others. Please solve my HR-ABAP related programming is issue on given below: "A008 REL

  • InDesign CS5 ME Page Layout

    Hi, Joel  ! Our student association publishes a journal. We left MS Word to start with InDesign CS5 ME since we need to put Arabic and French texts. I wonder how to change the ME Page layout (first page on the right) to standard (non ME), meaning fir

  • View music as grid/coverflow

    when i connect my iphone to my itunes it will only let me view my music as a list not a grid or coverflow. It's greyed out on the top right hand side and also under the "view" tab. It allows me to view the music on itunes as a grid or coverflow but n