Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User iisaint's Avatar
    Join Date
    Aug 2008
    Posts
    7
    Hi,

    I have established the ad hoc mode on E51.
    However, the performance is terriable.
    It cost almost 13 sec to establish.
    I think that the problem is getting IP address.
    Maybe I could assign static ip address to improve performance.
    Am I right? Or, anyone could give any idea?
    I appreciate it.

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    It is possible to assign IP address manually, check Advanced settings when configuring the Access point.
    If you want to do that programmatically, search for similar fields (to the ones offered in Advanced settings) in the database. Even in this case you can still benefit from creating an AP manually, and checking its fields in the database.

  3. #3
    Registered User iisaint's Avatar
    Join Date
    Aug 2008
    Posts
    7
    Hi wizard_hu_,
    Thanks for reply.
    It works to assign IP address manually. However, I would program it.
    I found something in COMMDB, eg. SERVICE_IP_ADDR, SERVICE_IP_NETMASK, SERVICE_IP_GATEWAY
    It seems the columns that I need. But, I don't know how to set these columns.

    Here is the code with KERN-EXEC 3 panic.
    Code:
    CCommsDbTableView* wlanServiceView = commDb->OpenTableLC(TPtrC(IAP));
    err = commDb->BeginTransaction();
    wlanServiceView->UpdateRecord();
    wlanServiceView->WriteTextL(TPtrC(SERVICE_IP_ADDR), _L("169.254.127.101"));
    wlanServiceView->WriteTextL(TPtrC(SERVICE_IP_NETMASK), _L("255.255.255.0"));
    wlanServiceView->WriteTextL(TPtrC(SERVICE_IP_GATEWAY), _L("169.254.127.254"));
    wlanServiceView->PutRecordChanges();
    err = commDb->CommitTransaction();

  4. #4
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    I think you should navigate to an actual record. However it would be a good idea finding which line causes the panic. Create logfiles, or use on device debugging.

  5. #5
    Registered User iisaint's Avatar
    Join Date
    Aug 2008
    Posts
    7
    Hi,

    I solved the panic problem. I think I've changed the LAN_SERVICE table value, but it still doesn't work.


    Code:
    CCommsDbTableView* wlanServiceView = commDb->OpenTableLC(TPtrC(LAN_SERVICE));
    err = commDb->BeginTransaction();
    wlanServiceView->UpdateRecord();
    wlanServiceView->WriteTextL(TPtrC(LAN_IF_NETWORKS), _L("ip"));
    wlanServiceView->WriteBoolL(TPtrC(LAN_IP_ADDR_FROM_SERVER), FALSE);
    wlanServiceView->WriteTextL(TPtrC(LAN_IP_ADDR), _L("169.254.127.101"));
    wlanServiceView->WriteTextL(TPtrC(LAN_IP_NETMASK), _L("255.255.0.0"));
    wlanServiceView->WriteTextL(TPtrC(LAN_IP_GATEWAY), _L("169.254.127.254"));
    wlanServiceView->WriteBoolL(TPtrC(LAN_IP_DNS_ADDR_FROM_SERVER), FALSE);
    wlanServiceView->PutRecordChanges();
    err = commDb->CommitTransaction();

  6. #6
    Registered User iisaint's Avatar
    Join Date
    Aug 2008
    Posts
    7
    I found the problem. I didn't get the corresponding table.
    I should use "CCommsDbTableView* OpenViewMatchingTextLC(const TDesC& aTableName, const TDesC& aColumnToMatch, const TDesC8& aValueToMatch);" to get correct table.

    Code:
    CCommsDbTableView* lanServiceView;
    TRAP(err, lanServiceView = commDb->OpenViewMatchingTextLC( TPtrC( LAN_SERVICE ), 
         TPtrC( COMMDB_NAME ), _L8("ApE51")); 
         CleanupStack::Pop(1);
        );
    CleanupStack::PushL(lanServiceView);
    err = commDb->BeginTransaction();
    lanServiceView->UpdateRecord();
    lanServiceView->WriteBoolL(TPtrC(SERVICE_IP_ADDR_FROM_SERVER), EFalse);
    lanServiceView->WriteBoolL(TPtrC(SERVICE_IP_DNS_ADDR_FROM_SERVER), EFalse);
    lanServiceView->WriteTextL(TPtrC(SERVICE_IP_GATEWAY), _L("169.254.1.1"));  
    lanServiceView->WriteTextL(TPtrC(SERVICE_IP_NETMASK), _L("169.254.255.255"));
    lanServiceView->PutRecordChanges();
    err = commDb->CommitTransaction();
    Last edited by iisaint; 2009-05-08 at 21:38.

  7. #7
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Indeed, that part is the navigation: you pick the row where COMMDB_NAME=ApE51.

  8. #8
    Registered User srinusonly's Avatar
    Join Date
    Oct 2009
    Posts
    1
    we are working to create ad-hoc network between nokia 5800 phones. we have installed python 1.9.7 . how to set phone's ip address?

    we would be very thankfull if any one tells how to approach for this...

  9. #9
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Python is a bit different story, you can find dedicated discussion board for it if you click back to "You Are Here: Home > Community > Discussion Boards > Development Platforms" above.
    As far as I understand Python can directly make use of modules/plugins implemented in Symbian C++, the question is if someone has already implemented such plugin or it has to be done from scratch.

Similar Threads

  1. Connnecting two N95 in WLAN ad hoc mode
    By npradeep in forum Wired and Wireless interfaces (Closed)
    Replies: 4
    Last Post: 2010-04-27, 18:04
  2. Fix problem on WLAN ad hoc between PC and Mobile
    By jusore in forum Mobile Web Server
    Replies: 0
    Last Post: 2008-06-30, 16:11
  3. Python for UIQ
    By cassioli in forum Python
    Replies: 141
    Last Post: 2008-06-11, 18:16
  4. Ad Hoc Mode Access Point connection
    By primal in forum Symbian Networking & Messaging (Closed)
    Replies: 13
    Last Post: 2008-02-11, 23:44
  5. some problems with label
    By vivienzhung in forum Mobile Java General
    Replies: 1
    Last Post: 2002-10-21, 09:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved