How to assign static IP in ad hoc mode
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.
Re: How to assign static IP in ad hoc mode
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.
Re: How to assign static IP in ad hoc mode
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();
[/CODE]
Re: How to assign static IP in ad hoc mode
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.
Re: How to assign static IP in ad hoc mode
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();
[/CODE]
Re: How to assign static IP in ad hoc mode
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();
[/CODE]
Re: How to assign static IP in ad hoc mode
Indeed, that part is the navigation: you pick the row where COMMDB_NAME=ApE51.
Re: How to assign static IP in ad hoc mode
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...
Re: How to assign static IP in ad hoc mode
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 > [B]Development Platforms[/B]" 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.