×

Discussion Board

Page 1 of 3 123 LastLast
Results 1 to 15 of 42
  1. #1
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    89

    RConnectionMonitor problem

    Hi, I´m trying to developer one application to can obtain the WLAN signal strength with carbide. I´m using RConnectionMonitor API:

    monitor = new (ELeave) RConnectionMonitor;
    CleanupStack::PushL(monitor);
    User::LeaveIfError(monitor->ConnectL());
    monitor->GetPckgAttribute(EBearerIdWLAN, 0, KNetworkNames, pkgNetworks, iStatus);

    I build it without problems but when I run in my device I obtain "Sytem Error -1"
    Why appears this error??Any suggestion??Thank You!!!

  2. #2
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: RConnectionMonitor problem

    Quote Originally Posted by mundial View Post
    Hi, I´m trying to developer one application to can obtain the WLAN signal strength with carbide. I´m using RConnectionMonitor API:

    monitor = new (ELeave) RConnectionMonitor;
    CleanupStack::PushL(monitor);
    User::LeaveIfError(monitor->ConnectL());
    monitor->GetPckgAttribute(EBearerIdWLAN, 0, KNetworkNames, pkgNetworks, iStatus);

    I build it without problems but when I run in my device I obtain "Sytem Error -1"
    Why appears this error??Any suggestion??Thank You!!!
    Have you added required capability?? And also hope, u implemented active object.

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: RConnectionMonitor problem

    Are you sure about that this particular line fails?

  4. #4
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    89

    Re: RConnectionMonitor problem

    Hi to all, I add the capabilities and implemented active objecs:

    void CWLAN::ConstructL()
    {
    CActiveScheduler::Add(this);
    monitor = new (ELeave) RConnectionMonitor;
    CleanupStack::PushL(monitor);
    User::LeaveIfError(monitor->ConnectL());
    monitor->GetPckgAttribute(EBearerIdWLAN, 0, KNetworkNames, pkgNetworks, iStatus);

    SetActive();
    }

    void CWLAN::RunL()
    {

    if(iStatus == KErrNone){
    TInt iNivelTotal=0;
    for(TUint i=0; i<pkgNetworks().iCount; i++){
    iNivelTotal = iNivelTotal + pkgNetworks().iNetwork[i].iSignalStrength;
    }
    iSignal = (iNivelTotal/pkgNetworks().iCount);
    CleanupStack::PopAndDestroy(monitor);
    }

    Where is the problem???Thank You to all!!!

  5. #5
    Nokia Developer Champion
    Join Date
    Jul 2004
    Posts
    2,015

    Re: RConnectionMonitor problem

    I don't think a SystemError -1 would have been caused by either a lack of active object or lack of capability.

    Anyway, is the error occuring before or after your program starts? If before there is something missing, probably therefore in your SIS file. If after put in some logging statements etc. and find out which line is causing it.


    P.S.
    R objects are not intended to be allocated on the heap.

    class data members should be named with i, so it should be iMoniter

    class data members must never be pushed onto the cleanup stack

    P.P.S
    There's no need to double post, why in this posting have you shown code, as if that is the source of the problem, while in your other posting you're showing pkg file contents.
    Why did you post this bit of code, Is it just some random piece of code you think is causing the problem.
    Last edited by hotcheese; 2009-04-02 at 22:59.

  6. #6
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    89

    Re: RConnectionMonitor problem

    I hotcheese system error -1 appears when I try to open mu application in my device. My pkg file is the follow:

    ;Language - standard language definitions
    &EN

    ; standard SIS file header
    #{"probandoWLAN"},(0xED0DE0B5),1,0,0

    ;Localised Vendor name
    %{"Vendor-EN"}

    ;Unique Vendor name
    :"Vendor"

    ;Supports Series 60 v 3.0
    [0x101F7961], 0, 0, 0, {"Series60ProductID"}

    ;Files to install
    ;You should change the source paths to match that of your environment
    ;<source> <destination>
    "E:\Symbian\9.2\S60_3rd_FP1_2\Epoc32\release\gcce\urel\probandoWLAN.exe" -"!:\sys\bin\probandoWLAN.exe"
    "E:\Symbian\9.2\S60_3rd_FP1_2\Epoc32\Data\z\resource\apps\probandoWLAN.rsc" -"!:\resource\apps\probandoWLAN.rsc"
    "E:\Symbian\9.2\S60_3rd_FP1_2\Epoc32\Data\z\private\10003a3f\import\apps\probandoWLAN_reg.rsc" -"!:\private\10003a3f\import\apps\probandoWLAN_reg.rsc"
    "E:\Symbian\9.2\S60_3rd_FP1_2\Epoc32\Data\z\resource\apps\probandoWLAN_aif.mif" -"!:\resource\apps\probandoWLAN_reg.mif"
    "E:\Symbian\9.2\S60_3rd_FP1_2\Epoc32\Data\z\resource\apps\probandoWLAN.mbm" -"!:\resource\apps\probandoWLAN.mbm"
    ; Add any installation notes if applicable
    ;"probandoWLAN.txt" -"!:\private\0xED0DE0B5\probandoWLAN.txt"
    "backup_registration.xml" -"!:\private\ED0DE0B5\backup_registration.xml"


    Can you see any error???Thank You!!!

  7. #7
    Nokia Developer Champion
    Join Date
    Jul 2004
    Posts
    2,015

    Re: RConnectionMonitor problem

    I'm not much of an expert on what the precise contents of .pkgs are supposed to be.

    But if this -1 is happening when you attempt to launch your app then definatly something is missing, either one of your files or something your code links against which isn't on the device.

    Is it just a .exe, no dlls? Post your .mmp file too.

  8. #8
    Nokia Developer Champion
    Join Date
    Jul 2004
    Posts
    2,015

    Re: RConnectionMonitor problem

    Also go to your epoc32 directory and search for files called WLAN*.* to see if there is something that looks like it might be needed but is missing from the pkg.

  9. #9
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    89

    Re: RConnectionMonitor problem

    Hi hotcheese, it is my MMP file:

    TARGET probandoWLAN.exe
    UID 0x0 0xED0DE0B5
    VENDORID 0xED0DE0B5
    TARGETTYPE exe
    SECUREID 0
    EPOCSTACKSIZE 0x5000

    SYSTEMINCLUDE \epoc32\include \epoc32\include\variant \epoc32\include\ecom
    USERINCLUDE ..\inc ..\data

    SOURCEPATH ..\data
    START RESOURCE probandoWLAN.rss
    HEADER
    TARGETPATH resource\apps
    END //RESOURCE

    START RESOURCE probandoWLAN_reg.rss
    TARGETPATH \private\10003a3f\import\apps
    END //RESOURCE


    LIBRARY euser.lib apparc.lib cone.lib eikcore.lib avkon.lib
    LIBRARY commonengine.lib efsrv.lib estor.lib eikcoctl.lib eikdlg.lib
    LIBRARY eikctl.lib bafl.lib fbscli.lib aknnotify.lib aknicon.lib
    LIBRARY etext.lib gdi.lib egul.lib insock.lib
    LIBRARY ecom.lib InetProtUtil.lib http.lib esock.lib
    LIBRARY connmon.lib eiksrv.lib eikcdlg.lib


    LANG SC

    START BITMAP probandoWLAN.mbm
    HEADER
    TARGETPATH \resource\apps
    SOURCEPATH ..\gfx
    SOURCE c12,1 list_icon.bmp list_icon_mask.bmp
    END


    SOURCEPATH ..\src

    SOURCE probandoWLANContainer.cpp ProbandoWLANContainerView.cpp probandoWLANDocument.cpp probandoWLANAppUi.cpp probandoWLANApplication.cpp CWLAN.cpp

    #ifdef ENABLE_ABIV2_MODE
    DEBUGGABLE_UDEBONLY
    #endif

    CAPABILITY LocalServices Location NetworkServices PowerMgmt ProtServ ReadDeviceData ReadUserData SurroundingsDD SwEvent TrustedUI UserEnvironment WriteDeviceData WriteUserData

    Have I add any DLL??Thank You!!

  10. #10
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: RConnectionMonitor problem

    If you are willing to post all of your files, you may consider continuing with the _reg.rss.

  11. #11
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    89

    Re: RConnectionMonitor problem

    Hi wizard_hu this is my _reg.rss file:

    #include <eikon.rh>
    #include <avkon.rsg>
    #include <avkon.rh>
    #include <appinfo.rh>
    #include "probandoWLAN_reg.loc"
    #include <probandoWLAN.rsg>
    #include "probandoWLAN.hrh"
    #include "probandoWLAN.loc"

    UID2 KUidAppRegistrationResourceFile
    UID3 0xED0DE0B5

    RESOURCE APP_REGISTRATION_INFO
    {
    app_file="probandoWLAN";
    localisable_resource_file = qtn_loc_resource_file_1;
    localisable_resource_id = R_LOCALISABLE_APP_INFO;

    embeddability=KAppNotEmbeddable;
    newfile=KAppDoesNotSupportNewFile;
    }

    Thank you very much for help me!!

  12. #12
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: RConnectionMonitor problem

    Exactly when do you get that "System Error -1" message?
    Does it disappear if you comment the localisabe_resource_id and _file lines?

  13. #13
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    89

    Re: RConnectionMonitor problem

    Hi wizard_hu, Tnank you for answer me. I get "System error -1" when I run my application in my device. I´m going to check my reg_rss file like you say me but I´dont certificate my sis file but symbiansigned is unavailable. I´m waiting until Sunday.

  14. #14
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    89

    Re: RConnectionMonitor problem

    Hi to all, I have one doubt about the UID. If I´m developing an application for Symbian OS v9 that I intend to Symbian Sign, Do I should request UIDs from the protected range???
    My actual UID is in 0xE0000000 - 0xEFFFFFFF, the unprotected range. Thank You !!

  15. #15
    Nokia Developer Champion
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: RConnectionMonitor problem

    Quote Originally Posted by mundial View Post
    Hi to all, I have one doubt about the UID. If I´m developing an application for Symbian OS v9 that I intend to Symbian Sign, Do I should request UIDs from the protected range???
    My actual UID is in 0xE0000000 - 0xEFFFFFFF, the unprotected range. Thank You !!
    For symbian signing, you must have protected UID. for requesting UID, you must have account in symbiansigned (https://www.symbiansigned.com/).

    For testing application at development time u can use unprotected range UID and sign your application with either selfsign/developer certificate Or Open signed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •