Step VI works at the time, but not by operating normally

I am very new to LabView and have created a simple VI to register a single measure of my multimeter HP 34401 via a RS 232 connection.

The problem I encounter is that the VI works when I run one step at a time (clicking the button on the stage has ended).  When I try to run the whole thing well, I get the following error:

1073807339 error occurred read visa in Untitled 2

Possible reasons:

VISA: (Hex 0xBFFF0015) timeout expired before the operation is complete.

After reading the help page for this error, I tried to add a delay time, but that did not fix the problem.


Trace of e/s NOR provided no answers for me, but I have attached a screenshot.  Lines 1-13 are the only step to run, the rest is to try to run the whole thing at a time.

Can someone please help me understand what is happening here?  Thanks in advance!

If anyone is interested:

Windows 7

LabVIEW 2009

HP 34401 multimeter

RS 232 connection is via a USB-serial adapter

The only thing I can think is that you send the remote command and then do not wait long enough so that it complements.  The manual States:

It is very important that you send the

System: REMote command

to put the multimeter in remote mode. Send or receive data

via the interface RS - 232 when not configured for remote operation can

give unpredictable results.

And I think that we live unpredictable results.

I don't know if you can change the command in a query using the * OPC? command, but use that could solve it - or we could run into the same issue due to the above caveat.  You may need a manual wait between the remote control and the "write" command.

Tags: NI Software

Similar Questions

  • Firefox does not open, but is rather the error message "Unable to read the configuration file." He has worked in the past, but not now.

    Firefox does not open, but is rather the error message "Unable to read the configuration file." He has worked in the past, but not now.

    I'm piss because I need firefox work again, so I can finish my reseaching in 5 days.

  • Train with webutil works with the browser, but not with webstart JNLP 12 c


    I set up forms and reports suite 12 c according to the instructions and I'm testing my forms updated since version 10 g.

    In some forms, I use webutil.

    I can run forms without webutil with the browser or java web start (everything works fine).

    I have problems with the forms use webutil tha, they work very well with the browser, but not with java web start.

    When I run forms with webutil and webstart I see all white and the "crash" application: I must leave because other forms without webutil also do not work.

    Here is my config in formsweb.cfg:

    [Appws] <-start java web

    form = nomeform

    Archive = frmall.jar, frmicons.jar

    WebUtilArchive = jacob.jar, frmwebutil.jar

    WebUtilTrustInternal = true

    WebUtilLogging = off

    WebUtilLoggingDetail = normal

    WebUtilErrorMode = alert

    WebUtilDispatchMonitorInterval = 5

    WebUtilTrustInternal = true

    WebUtilMaxTransferSize = 16384

    baseHTML = webutilbase.htm

    baseHTMLjpi = webutiljpi.htm

    basejnlp = webutil.jnlp

    WebStart = on

    [appnows] <-no java web start

    shape = mercurio

    separateFrame = true

    Archive = frmall.jar, frmicons.jar

    WebUtilArchive = jacob.jar, frmwebutil.jar

    WebUtilTrustInternal = true

    WebUtilLogging = off

    WebUtilLoggingDetail = normal

    WebUtilErrorMode = alert

    WebUtilDispatchMonitorInterval = 5

    WebUtilTrustInternal = true

    WebUtilMaxTransferSize = 16384

    baseHTML = webutilbase.htm

    baseHTMLjpi = webutiljpi.htm

    basejnlp = webutil.jnlp

    What could be the problem?


    Remove Appws:

    Archive = frmall.jar, frmicons.jar

    WebUtilArchive = jacob.jar, frmwebutil.jar

    baseHTML = webutilbase.htm

    baseHTMLjpi = webutiljpi.htm

    Add frmicons.jar and jacob.jar to $ORACLE_HOME/forms/java/extensions.jnlp.

    and try again.


  • Help. Work with a Belkin router... works in the computer, but not by wireless... was fine until yesterday

    Until yesterday the relatively new router was working fine... However, he began to say that the password has changed and I had to click to renew (or repair), but everything I did it now only works if the cable is connected to the computer laptop and not by wireless... Help

    Hi Twentytwo22 (2),

    Thanks for posting that query you in Microsoft Communities. Provide the following information:

    ·         Did you do changes on the computer before the show?

    ·         You get the error message?

    ·         You use a third-party security software?

    Follow these methods.

    Method 1: Temporarily disable the security software .

    Note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you do not disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network during the time that your antivirus software is disabled, your computer is vulnerable to attacks.

    Method 2: Follow these steps:

    Step 1: Start the computer in safe mode with network and check if the problem persists.

    Step 2: If the problem does not persist in safe mode with networking, perform a clean boot to see if there is a software conflict as the clean boot helps eliminate software conflicts.

    Note: After completing the steps in the clean boot troubleshooting, follow step 3 from the link to start the computer to a Normal startupmode.

    Method 3: Follow the steps in the article.

    Windows wireless and wired network connection problems

    You can read this article for more information:

    How to reset the Protocol Internet (TCP/IP)

    I hope this helps. Let us know if you need more assistance.

    Thank you.

  • database simple html5 works in the browser but not emulator

    I have a database of simple html5. It works on browser (chrome/safari) but not in the emulator. If after having included the html5_init.js file does not work on an os device five? I also simulated a sd card, so this isn't a problem, why it does not work. Here is the code:

    html PAG

    !DOCTYPE html PUBLIC-//W3C//DTD HTML 4.01 Transitional//E nameviewpor idMeta contentinitial-scale=1.0,user-scalable=n meta namex-blackberry-defaultHoverEffec contentfals link  relstyleshee typetext/cs hrefcss/common.cslink  link  relstyleshee typetext/cs hrefcss/start.cslink link  relstyleshee typetext/cs hrefcss/tabs.cslink
    titlAdd Birthda/titlscript typetext/javascrip srcjs/common.j/scripscript typetext/javascrip srcjs/html5_init.j idhtml5_ini/scripscript typetext/javascrip srcjs/birthdayapp.j/scrip
    /heabody onLoadinit()
           div classmy_heade
               p aligncenteAdd Birthda/
               div classmain-pane
                   div classpanel-top-lef/di
                   div classpanel-top-righ/di
                   div classpanel-insid
                    div classpanel-noga
                       div classro
                           div classlaeFirst Name/di
                           input typetex idfirstnam
                       div classlistSeparato/di
                       div classro
                           div classlabeLast Name/di
                           input typetex idlastnam
                       div classlistSeparato/di
                       div classro
                           div classlabeEmail/di
                           input typetex idemai
                        div classlistSeparato/di
                       div classro
                           div classlabePhone Number/di
                           input typetex idphonenumbe
                       div classlistSeparato/di
                        div classro
                           div classlabeImage/di
                           input typetex idimag
                       div classlistSeparato/di
                        div classro
                           div classlabeBirthday/di
                           input typetex idbirthda
                        div classlistSeparato/di
                        div classro
                           div classlabeBaught Gift/di
                           input typetex idbaughtgif
                           div classlistSeparato/di
                        div classro
                           div classlabeReminder Day/di
                           input typetex idreminderda
                   div classpanel-bottom-lef/di
                   div classpanel-bottom-righ/di
               input typebutto stylefloat: right; padding: 6px; margin-right: 8px idsav valueSav onClickmakeReminder()
            ul idreminder 

    Now for the javascript database thread

    var birthdayapp = {};
    //Step 1. Opening the database
    birthdayapp.db = null; = function() {
      var dbSize = 5 * 1024 * 1024; // 5MB
      birthdayapp.db = openDatabase('bdreminder', '1.0', 'Birthday Reminder', dbSize);
    birthdayapp.onError = function(tx, e) {
      alert('Something unexpected happened: ' + e.message );
    birthdayapp.onSuccess = function(tx, r) {
      // re-render all the data
      // loadReminders is defined in Step 4a
      alert("an action was performed successfully!");
    //Step 2. Creating the table
    birthdayapp.createTable = function() {
      birthdayapp.db.transaction(function(tx) {
        tx.executeSql('CREATE TABLE IF NOT EXISTS bdreminders(reminder_id INTEGER PRIMARY KEY ASC,'+
                                                            'firstname   varchar(50), '+
                                                            'lastname    varchar(50), '+
                                                            'email       varchar(50), '+
                                                            'phonenumber varchar(50), '+
                                                            'image       varchar(50), '+
                                                            'birthday    varchar(30), '+
                                                            'baughtgift  char(3),     '+
                                                            'reminderday varchar(50),'+
                                                            'createdon   date)', []);
    //Step 3. Adding data to the table
    birthdayapp.addReminder = function(firstname,lastname,email,phonenumber,image,birthday,baughtgift,reminderday) {
        var createdon = new Date();
        tx.executeSql('INSERT INTO bdreminders(firstname, lastname, email, phonenumber, image, birthday, baughtgift, reminderday, createdon) '+
                      'VALUES (?,?,?,?,?,?,?,?,?)', [firstname, lastname, email, phonenumber, image, birthday, baughtgift, reminderday, createdon],
    //Step 4. Selecting data from the table
    birthdayapp.getAllReminders = function(renderFunc) {
      birthdayapp.db.transaction(function(tx) {
        tx.executeSql('SELECT * FROM bdreminders', [], renderFunc,
    //Step 4a. Rendering data from the table
    function loadReminders(tx, rs) {
      var rowOutput = "";
      for (var i=0; i < rs.rows.length; i++) {
        rowOutput += renderReminders(rs.rows.item(i));
      var reminders = document.getElementById('reminders');
      reminders.innerHTML = rowOutput;
    function renderReminders(row) {
      return '
  • ' + row.reminder_id + '[X]
  • '; } //Step 5. Deleting data from the table birthdayapp.deleteReminder = function(id) { birthdayapp.db.transaction(function(tx) { tx.executeSql('DELETE FROM bdreminders WHERE reminder_id=?', [id], birthdayapp.onSuccess, birthdayapp.onError); }); } //Step 6. update the table birthdayapp.updateReminder = function(reminder_id,firstname,lastname,email,phonenumber,image,birthday,baughtgift,reminderday) { birthdayapp.db.transaction(function(tx) { tx.executeSql('UPDATE bdreminders set firstname = ?, lastname = ?, email = ?,phonenumber = ?,image = ?,birthday = ?, baughtgift = ?, reminderday = ? WHERE reminder_id = "reminder_id" ', [firstname, lastname, email, phonenumber, image, birthday, baughtgift, reminderday], birthdayapp.onSuccess, birthdayapp.onError); }); } //Step 7. select a specific from table birthdayapp.getOneReminder = function(reminder_id) { birthdayapp.db.transaction(function(tx) { tx.executeSql('SELECT * FROM bdreminders WHERE reminder_id = ? ', [reminder_id], birthdayapp.onSuccess, birthdayapp.onError); }); } //select specific record function makeReminder(){ alert("add reminder called"); var fn = document.getElementById('firstname').value; var ln = document.getElementById('lastname').value; var em = document.getElementById('email').value; var ph = document.getElementById('phonenumber').value; var im = document.getElementById('image').value; var bd = document.getElementById('birthday').value; var bg = document.getElementById('baughtgift').value; var rd = document.getElementById('reminderday').value; birthdayapp.addReminder(fn,ln,em,ph,im,bd,bg,rd); } //init function function init() {; birthdayapp.createTable(); birthdayapp.getAllReminders(loadReminders); }

  • Mercury pass working in the first, but not After Effects (CC 2015)

    Hello people. Did some research on Google, but not came with something useful.

    I use a TV regular ole plugged into the HDMI port on my graphics card to production and to see my work on a larger screen, thanks to pass mercury. 2014 CC gave me no problem. Make the same settings in CC 2015 and first works like a pro, but After Effects is a no-go. I tried to ensure that the window cross the edges of the screen, try it with or without first opened, with or without "disable in the background."

    Loss - of ideas? Of qualifying questions that can help to provide more information?

    System specs

    Mac OSX 10.10.4 (early 2009 MacPro)

    2 x Quad-core 2.26
    680 2 GB GTX

    20 GB of ram

    With the help of AE in the last update

    Hi DG;

    Have you tried measures to solve the issue that helped you? If so, mention the steps you tried this number shouldn't, t come on CC 2014 or 15 on 10.10.5 and below.

    Have you tried to calibrate the seconday monitor or rename the Adobe folder in the Documents and MAC hd library > Application Support > Adobe? or tried any other HDMI and redefinition of workspaces?


  • Camera works to the MAX, but not in LabVIEW

    I struggled a lot with getting a camera DCC3240M of Thorlabs working in LabVIEW. The software supplied (Thorcam) works as it should. However, the LabVIEW SDK does not work as it should, it gives an error 155 "the operation is not supported.

    Instead of the SDK software, I tried the drivers for DirectShow and now the camera arrives in MAX and works as it should. He also appears with IMAQdx list and in Vision Acquisition Express vi. BUT when I try to run IMAQdx open or the Express vi it does not work. Open device gives a DirectShow error code 0 x 80040275 "no capture hardware is available, or the hardware is not responding." And when I try to select the camera in the express vi, a red icon is displayed and I can only choose "Cancel":

    It's really very annoying that the camera obviously work with the drivers provided, but I can't use it in LabVIEW.

    I would be grateful for any ideas what is wrong. I'm running LabVIEW 32 bit on 64 bit Win8.1.

    Problem solved!

    I carefully removed all the drivers that came with the camera and then I installed the drivers from manufacturers (IDS) instead of Thorlabs drivers. And now it works, the camera always appears in MAX and it does not work. But now the supplied screw. I'm so happy. It took me a week to understand.

  • communication serial port works to the max, but not in labview


    I am trying to connect a regulator to oxygen flow (flow Bronkhorst EL) to a laptop through a USB using MAX and Labview series port adapter. After the MAX aperture, I see my instrument on port COM5 and need to change the baud rate to 9600 to 38400. After this I querry the command: 06030101217D00\r\n, I can turn the mass flow at maximum power regulator (looks a little weird order because of the syntax of the instrument, but it works very well). If I write a vi to do the same and send the same string through visa series, I get no results, it seems that the command is not send to the device. I tried to change all settings for the serial port, nothing seems to work.

    I've attached an example vi here, any suggestions?


    just a simple misunderstanding, happy that you added the code.

    In MAX \r\n will be always interpreted as send a cr and line break.

    In LabVIEW only when you select \codes view by right-clicking on the channel.

    In your situation, it now sends a-a r another- and a n

  • GPS works on the Simulator, but not on phone


    I created a simple application that gets the location of the device's GPS. The app works perfectly on the Simulator, but I have no GPS updates on the phone. I've been in options-> device-> Location.Settings on the phone and can see the GPS updates are coming through. But the app says there is no valid received GPS.

    I tried it on BlackBerry 9800... All I get on the phone is 'pending GPS update', that my app is displayed if no valid GPS don't trouble is received.

    Thanks in advance.


    C criteria = newCriteria();

    c.setHorizontalAccuracy (Criteria.NO_REQUIREMENT);

    c.setVerticalAccuracy (Criteria.NO_REQUIREMENT);

    c.setCostAllowed (true);

    c.setPreferredPowerConsumption (Criteria.POWER_USAGE_HIGH);

    LocationProvider lp;



    LP = LocationProvider.getInstance (c);

    if (lp! = null)


    lp.getLocation (timeout);

    lp.setLocationListener (newMyLocationListener(),-1, 1, 1);


    on the other


    Dialog.Alert ("sorry - your phone does not support GPS");



    catch (Exception e)



    Err.println (try ());



    private class MyLocationListener implementsLocationListener


    public voidlocationUpdated (LocationProvider provider, a place)


    if (location! = null& location.isValid ())


    QualifiedCoordinates qc = location.getQualifiedCoordinates ();



    Lat string = Double.toString (qc.getLatitude ());

    String long = Double.toString (qc.getLongitude ());

    UpdateScreen ('place of registration successfully');


    on the other


    UpdateScreen (' Failed to day location ');



    catch (Exception e)




    on the other


    UpdateScreen ("waiting for GPS update");



    public void providerStateChanged (LocationProvider provider, intnewState)


    TODO: If the provider has been disabled, then disable the reporting



    Try the examples of programs that you can find here:

    or here:

    See if these work on the unit.  If they do, look at the code listed and compare with yours.

  • Play video works on the Simulator, but not on phone


    I created a simple application that plays a video of Media Card. It works very well and play the video properly on simulators. But when I loaded the app on the phone (BB Bold), it shows just a white screen and no video.

    The media file is in the following path on the map:

    / Media Card/BlackBerry/videos/I66.3GP

    The path should be:



    file:/// Card/BlackBerry/videos/I66.3GP Media

    Any suggestions on how to get it to work on the phone?

    class final VideoScreen extends form {}
    Private player player;
    private VideoControl vc;

    try {}

    Reader = Manager.createPlayer ("file:///SDCard/BlackBerry/videos/I66.3GP");
    Player.Realize ();
    VC = player.getControl ("VideoControl") (alarm);
    vc.initDisplayMode (VideoControl.USE_DIRECT_VIDEO, this);
    GUIControl gc;
    If ((gc = player.getControl ("GUIControl")) (GUIControl)! = null)
    Add ((Field) gc.initDisplayMode (GUIControl.USE_GUI_PRIMITIVE, null));
    vc.setDisplayLocation (15, 15);
    vc.setDisplaySize (400, 400);
    vc.setVisible (true);
    Player.Start ();
    } catch (Exception e) {}

    Problem solved! It turns out that the "IoException: cannot access the media file" is because the BB is hooked up to the computer via USB, apprently Media Card is not available when USB is plugged.

    However, when USB is removed, I get this error:

    java.lang.IllegalArgumentException: arg must not be null and must be a javax.microedition.lcdui.Canvas

    It turns out that the audio/video tutorial of BB is incorrect, initDisplayMode cannot accept "GUIControl", he cannot accept that the canvas. In addition, if we directly on canvas without instantiate, it will be also caused an IllegalArgumentException.

    Then, the following code works:

    VideoControl vc;

    Canvas canvas = new MyCanvas ();

    If ((vc = player.getControl ("VideoControl")) (alarm)! = null) {}

    vc.initDisplayMode (VideoControl.USE_DIRECT_VIDEO, canvas);

    vc.setDisplayLocation (15, 15);

    vc.setDisplaySize (400, 400);

    vc.setVisible (true);

    Player.Start ();


    While (MyCanvas) is a dummy class that extends from javax.microedition.lcdui.Canvas

    Import javax.microedition.lcdui.Canvas;

    import net.rim.device.api.ui.Graphics;


    MyCanvas class extends Canvas {}



    public MyCanvas() {}



    Protected Sub paint (javax.microedition.lcdui.Graphics arg0) {}

    / / TODO Auto-generated method stub



  • Event Swipe works in the Simulator, but not on the device

    I'm using panels on my 9900 and I have 4 panels that the user will slide back and forth similar functioning BB app world, changing the summary of comments on signs etc..

    My expection who was up and down for scanning of touch screen functions and the touchpad has the same function by default, that is to the left and right slide on the screen should also be identical to forehand and left on the block to tack. But it does nothing for the panels when you use the trackpad.

    So I replace NavigationMovement and and can see the touchscreen and the track pad to generate a NavigationMovement event with +/-x according to the direction slide. So I'm first puzzled why hit swiping the trackpad on the left and right triggers not the same behavior by hitting swiping left and right on the touch screen.

    Accept that as a limitation of the API, I added my own features to NavigationMovement to inject a key event when user left or right on the trackpad moves. As follows:

    EventInjector.TouchEvent [] moveEvents = new EventInjector.TouchEvent [7];

    moveEvents [0] = new EventInjector.TouchEvent (TouchEvent.MOVE, 420, -1, -1, 60-1);
    moveEvents [1] = new EventInjector.TouchEvent (TouchEvent.MOVE, 360, 60,-1, -1, -1);
    moveEvents [2] = new EventInjector.TouchEvent (TouchEvent.MOVE, 300, 60,-1, -1, -1);
    moveEvents [3] = new EventInjector.TouchEvent (TouchEvent.MOVE, 240, 60,-1, -1, -1);
    moveEvents [4] = new EventInjector.TouchEvent (TouchEvent.MOVE, 180, 60,-1, -1, -1);
    moveEvents [5] = new EventInjector.TouchEvent (TouchEvent.MOVE, 120, 60,-1, -1, -1);
    moveEvents [6] = new EventInjector.TouchEvent (TouchEvent.MOVE, 60, 60,-1, -1, -1);
    EventInjector.TouchEvent.injectSwipeGesture (480, 60, moveEvents);

    It works perfectly in the Simulator, but on the device, there is no movement at all. So I thought that maybe the touchpad on the Simulator is more sensitive than on the real device, so I added a menu item to perform the injection above. Again, this works perfectly on the Simulator, but nothing on the device.

    Has anyone tried this brain left and just before the injection?  Up and down the injection works perfectly on the device.

    Have you enabled event injection in request permission settings for your application?  It is disabled by default.  You can do so by going to Options-> Application, select your application and click on change permissions.  You can also request these permissions programmatically using the class ApplicationPermission.

  • Verification of link - worked in the preview, but not after sending to the browser

    I had to reorganize my files for this project due to the demand of the customer. I moved all the files inside DW. I did a check of all the Local Site links. Most of the links have been updated. I need to fix the rest.

    I downloaded on my server. When I test the links in the navigation bar, they do not work. I don't know what the problem is.  Thanks to all those who will look at this for me.


    The structure of the files should be the same locally because they are on the remote control.  If you work in DW and the files are not in a folder named QOP but you start linking to pages in your local folder, DW will keep track of them.  However, once you move the file to the remote control and all of a sudden you put files in the QOP folder, then all the links will be incorrect.y

    When you move files, always do it through the Control Panel files in DW, and then make sure that the same folder structure exists on the remote control.

  • App works on the Simulator, but not on the device

    Just try to run the helloworlddemo app compiles fine and works on the Simulator without problem. All I get on the device is an icon of the application that does nothing when clicked.

    I had read this might have to do with the version of the JDE is high for the operating system on the device, but I'm running JDE and the operating system on the device is

    I tried with my own app first, compiled, signed it and get the same result as helloworld, then its certainly some mounted sort of question but I have no idea of what

    Thank you


    Thought of it - was to set the permission of application so that all 3 items were "allow."

  • ID of Leap BlackBerry blackBerry works in the browser, but not in BlackBerry settings

    When accessing the Web site my BlackBerry Id and password are fine, but when accessed through the settings on the device password is not recognized and screen stays on the login page.
    Cannot do anything, not even reset.
    New device and the first time I create a BlackBerry id.

    WiFi-carrier switching does not solve the problem.

    I did a cleanup of security that the device is new and no specific data was on it.

    Restart from scratch, the installer worked.

  • EventInjector works in the emulator but not on the phone.

    Long time listener, first time caller...

    (1) I use the version of the plugin or Eclipse JDE (. 64)

    (2) I use the pack 4.5 component (. 16) to launch the 8330 emulator.

    (3) I have a phone of Verizon 8330 with CDMA, V4.5.077 (Platform

    (4) I'm signing certs installed properly for RBB, RRT and CPR.

    (5) I read the examples for headphones to phone, phone call and the Injection of the event.

    (6) I tried to manually set permissions in options > advanced

    I'm trying to write an app that interrupts a call initiated by the user and redirects to another number.

    This works very well in the emulator.

    However, the following code snippet generates an error of "No sig of 0 x 33" on the 8330. This occurs even if the application is duly signed.

    EventInjector.KeyCodeEvent releaseEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP,(char)Keypad.KEY_END,KeypadListener.STATUS_NOT_FROM_KEYPAD,100);

    But curiously

    System.out.println("the injector perm is " + ApplicationPermissionsManager.getInstance().getApplicationPermissions().getPermission(ApplicationPermissions.PERMISSION_EVENT_INJECTOR));

    indicates the value of 999 perm which apparently means it's allowed.

    So my only guess is that Verizon phones do not allow outbound calls to be interrupted by program.

    Can someone confirm or deny or otherwise tell me please what the hell I am doing wrong?


    import net.rim.blackberry.api.invoke.Invoke;
    import net.rim.blackberry.api.invoke.PhoneArguments;
    import net.rim.device.api.applicationcontrol.ApplicationPermissions;
    import net.rim.device.api.applicationcontrol.ApplicationPermissionsManager;
    import net.rim.device.api.system.EventInjector;
    import net.rim.device.api.system.KeypadListener;
    import net.rim.device.api.system.EventInjector.KeyCodeEvent;
    import net.rim.device.api.ui.Keypad;
    import java.util.Timer;
    import java.util.TimerTask;
    public final class SDdemo extends AbstractPhoneListener {
      private String mTarget;
      private Timer mTimer;
      private CallTask mCallTask;
      private static SDdemo mInstance;
      static public void main(String[] args)
      static private void registerOnStartup()
        System.out.println("@@@@ phone listener start up");
        mInstance= new SDdemo();
      private SDdemo(){}
      private void checkCall(String ehandler, int callid)
        PhoneCall callInfo = Phone.getCall(callid);
        if ( callInfo != null ) {
           * Event Handler: ehandler
           * Telephone No.: callInfo.getDisplayPhoneNumber();
           * Elapsed Time : callInfo.getElapsedTime();
           * Call Status  : callInfo.getStatusString();
            System.out.println("@#@#@#  the call is " + callInfo.getDisplayPhoneNumber());
            System.out.println("2@#@#@#  the status is " +  callInfo.getStatusString());
            System.out.println("3@#@#@#  the handle is " +  ehandler);
            mTarget = callInfo.getDisplayPhoneNumber();
      static private void requestApplicationPermissions() {
              //      Set permissions for the application
          System.out.println("@@@@@@ We are now requesting premissions");
              ApplicationPermissions ap1 = ApplicationPermissionsManager.getInstance().getApplicationPermissions();
              System.out.println("the injector perm is " + ap1.getPermission(ApplicationPermissions.PERMISSION_EVENT_INJECTOR));
              ApplicationPermissions ap2 = new ApplicationPermissions();
              boolean needPermission=false;
              if(ap1.getPermission(ApplicationPermissions.PERMISSION_PHONE)!=ApplicationPermissions.VALUE_ALLOW ){
              if(ap1.getPermission(ApplicationPermissions.PERMISSION_EVENT_INJECTOR)!=ApplicationPermissions.VALUE_ALLOW ){
                 // Dialog.inform("Please save the permissions manually");
                  boolean permission=ApplicationPermissionsManager.getInstance().invokePermissionsRequest(ap2);
                //  if(!permission){
                //                        "Application is exiting",3000);
                //      myApp.exitApplication();
                //  }
            }catch(Exception e){
                  System.out.println("~~~Exception while setting permissions"+e);
      // A call has been added to a conference call
      public void callAdded(int callId)
      { checkCall("callAdded", callId); }
      // User answered a call
      public void callAnswered(int callId)
      { checkCall("callAnswered", callId); }
      // Conference call established
      public void callConferenceCallEstablished(int callId)
      { checkCall("callConferenceCallEstablished", callId); }
      // Network indicates a connected event
      public void callConnected(int callId)
      { checkCall("callConnected", callId); 
        System.out.println("Sending DTMF for " + mTarget);
        System.out.println("DTMF SENT");
      // Direct-connect call connected
      public void callDirectConnectConnected(int callId)
      { checkCall("callDirectConnectConnected", callId); }
      // Direct-connect call disconnected
      public void callDirectConnectDisconnected(int callId)
      { checkCall("callDirectConnectDisconnected", callId); }
      // Call disconnected
      public void callDisconnected(int callId)
      { checkCall("callDisconnected", callId); }
      // User ended call
      public void callEndedByUser(int callId)
      { checkCall("callEndedByUser", callId); }
      // Call has been placed on "hold"
      public void callHeld(int callId)
      { checkCall("callHeld", callId); }
      // New call has arrived
      public void callIncoming(int callId)
      { checkCall("callIncoming", callId); }
      // Outbound call initiated by the handheld
      public void callInitiated(int callid)
          System.out.println("@@@@ Call init");
          System.out.println("the injector perm is " + ApplicationPermissionsManager.getInstance().getApplicationPermissions().getPermission(ApplicationPermissions.PERMISSION_EVENT_INJECTOR));
          System.out.println(mTarget.length() + " len PBX" + mPBXcall);
          if (mTarget.length()==4)
              EventInjector.KeyCodeEvent pressEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_DOWN,( char)Keypad.KEY_END,KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
              EventInjector.KeyCodeEvent releaseEndKey=new EventInjector.KeyCodeEvent(KeyCodeEvent.KEY_UP,(char)Keypad.KEY_END,KeypadListener.STATUS_NOT_FROM_KEYPAD,100);
              System.out.println("###@@  calling inject 1");
              System.out.println(" ###@@ calling inject 2");
              System.out.println("###@@ calling inject 3");
              System.out.println("###@@ calling inject 4");
              System.out.println("###@@ calling inject DONE");
              mTimer = new Timer();
              mCallTask = new CallTask(mTarget);
              mTimer.schedule(mCallTask, 2000);
      // Call removed from a conference call
      public void callRemoved(int callId)
      { checkCall("callRemoved", callId); }
      // Call taken off of "hold"
      public void callResumed(int callId)
      { checkCall("callResumed", callId); }
      // Call is waiting
      public void callWaiting(int callid)
      { checkCall("callWaiting", callid); }
      // Conference call has been terminated
      // (all members disconnected)
      public void conferenceCallDisconnected(int callId)
      { checkCall("conferenceCallDisconnected", callId); }
      // Call failed
      public void callFailed(int callId, int reason)
        checkCall("callFailed", callId);
        // determine reason
        switch( reason ) {
          case PhoneListener.CALL_ERROR_AUTHORIZATION_FAILURE: break;
          case PhoneListener.CALL_ERROR_CALL_REPLACED_BY_STK: break;
          case PhoneListener.CALL_ERROR_CONGESTION: break;
          case PhoneListener.CALL_ERROR_CONNECTION_DENIED_BY_NETWORK: break;
          case PhoneListener.CALL_ERROR_DUE_TO_FADING: break;
          case PhoneListener.CALL_ERROR_EMERGENCY_CALLS_ONLY: break;
          case PhoneListener.CALL_ERROR_FDN_MISMATCH: break;
          case PhoneListener.CALL_ERROR_GENERAL: break;
          case PhoneListener.CALL_ERROR_HOLD_ERROR: break;
          case PhoneListener.CALL_ERROR_INCOMING_CALL_BARRED: break;
          case PhoneListener.CALL_ERROR_LOST_DUE_TO_FADING: break;
          case PhoneListener.CALL_ERROR_MAINTENANCE_REQUIRED: break;
          case PhoneListener.CALL_ERROR_NUMBER_NOT_IN_SERVICE: break;
          case PhoneListener.CALL_ERROR_NUMBER_UNOBTAINABLE: break;
          case PhoneListener.CALL_ERROR_OUTGOING_CALLS_BARRED: break;
          case PhoneListener.CALL_ERROR_PLEASE_TRY_LATER: break;
          case PhoneListener.CALL_ERROR_RADIO_PATH_UNAVAILABLE: break;
          case PhoneListener.CALL_ERROR_SERVICE_CONFLICT: break;
          case PhoneListener.CALL_ERROR_SERVICE_NOT_AVAILABLE: break;
          case PhoneListener.CALL_ERROR_SUBSCRIBER_BUSY: break;
          case PhoneListener.CALL_ERROR_SYSTEM_BUSY_TRY_LATER: break;
          case PhoneListener.CALL_ERROR_TRY_AGAIN: break;
          case PhoneListener.CALL_ERROR_USER_BUSY_IN_DATA: break;
          case PhoneListener.CALL_ERROR_USER_BUSY_IN_PRIVATE: break;
          case PhoneListener.CALL_ERROR_USER_NOT_AUTHORIZED: break;
          case PhoneListener.CALL_ERROR_USER_NOT_AVAILABLE: break;
          case PhoneListener.CALL_ERROR_USER_NOT_REACHABLE: break;

    import java.util.TimerTask;
    import net.rim.blackberry.api.invoke.Invoke;
    import net.rim.blackberry.api.invoke.PhoneArguments;
    public class CallTask extends TimerTask {
        public String mCallTarget;
        public CallTask(String _target)
            mCallTarget = _target;
        public void run() {
            System.out.println("calling task dial");
            PhoneArguments call = new PhoneArguments(PhoneArguments.ARG_CALL,"555-867-5309");
            Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, call);

    Thank you for pointing me in the right direction almeida.

    In case this help someone else:

    (1) looking at conducting thread me section of the knowledge base on problems with "52525400 = RIM Runtime API" line missing in the CSL file when using JDE.

    (2) I use Eclipse JDE plugin. When I looked in the file AREA, this tag was present.

    (3) poking around a little more, I noticed this tag was missing from the CSO file. So I added, why not?

    (4) things like magically started working. I go out, it stops working again.

    For Eclipse IDE using JDE plugin, I'm so going on a branch and saying: you must add '52525400 = RIM Runtime API' to your CSO file.

Maybe you are looking for

  • Where several menu bar buttons?

    I just installed 33.0.3 and there is no "Advanced" button or "back". There is no button 'reload '. There is no stop"" button. Where are all the buttons, that we used to use them to customize the bars on firefox?

  • Satellite A200: How to get old setting for touchpad

    Last Saturday, I bought my A200 satellite with Vista Home Premium. I found that I could set the properties for the touchpad via Control Panel-> mouse and (on the last tab)-> advanced settings. A few hours later the last tab was suddenly replaced by a

  • YouTube (and YouTube only) lost during his visit fitness website

    As you can see here: YouTube and YouTube only and ONLY if you are using Safari will do. Chrome and Firefox both display YouTube with all the formatting, etc. I deleted the cache, temporary internet files, history, delete all data of the Web site, etc

  • Content Advisor pops - up box of

    I did something which, 5 days ago, I get a Content Advisor box that appears when I want to use the internet.  I have to enter my password for every action bit or it does not continue.  I went into the user account and security through my control pane

  • Help! Thunderbird has stopped loading Windows 10 message: unable to load XPCOM.

    I restored my PC to the last date of opening without any results, it does not always load.