You Are Here:

Community: Blogs

Open Source Bluetooth PAN's Forum Nokia Blog

BlueZ port using P.I.P.S. environment

Carbider | 16 October, 2007 15:01

After unsatisfactory attempt to port BlueZ system to Symbian due to <sys/signal.h> differences, David advised me to look at P.I.P.S libraries. P.I.P.S. are Symbian libraries that are compatible with POSIX standard.
That could mean reducing efforts while migrating the project to mobile device.
That was true on several positions. But there still was a trouble with <sys/system.h>.
It has sigaction{} structure inside. But BlueZ needs sigaction() function too.
I don’t know, if the trouble is that BlueZ doesn’t support POSIX. Or it is a Symbian’s trait.
[PIPS_Essential_Booklet.pdf]
Which says: “The P.I.P.S. environment does not support signals”.
Other functions that are not supported:
sigfillset()
sigdelset()
I had to examine what Signals are used for. I came to conclusion that they are used to halt child processes.
Sigaction()function was used to specify the action to be associated with a specific signal. After that the process generates his child instance (with fork and exec) which can be killed by sending “halt” signal with this statement:
kill(pid, SIGHUP)
So, I did not still find the replacement to this function to kill child processes. I’m thinking about Symbian’s RProcess class. Any ideas?
I found that Carbide C++ is very strict to data types. Even more strict than unix c.
I had to replace statements like:
struct bnep_setup_conn_req *req;
req = (void *) pkt;
to
req = (struct bnep_setup_conn_req *) pkt;
At this 2 documents:
I found recommendations how to substitute ther “fork”, “exec” operations with other posix functions. The main is posix_spawn().
I tried to follow this idea, outflanking the forks and execs with posix_spawn().It worked well.
At run_script() function there is instruction:
execv(script, argv);
Before run_script()is used, the  fork()function is called to create the instance of program itself.
This execv+forkpair is replaced by one
posix_spawn(&Childpid,script,NULL,NULL,argv,NULL);
call.
There are still lots of goals to reach. I don’t know how to pass command line arguments to Carbide’s console application.
          The sdp.c is not implemented in this version of port because it still makes too much errors and it will take time to solve.
I think there will be resulting GUI application which will run main PAND console instances. After that they should get into single signed SIS installation file.
Please look the sources of port using P.I.P.S. at my CVS repository http://bluspan.cvs.sourceforge.net/bluspan/pand_port_06/
The CVS checkout process to Carbide C++ IDE is described in my post: Get project from CVS to Carbide C++.
Please, checkout the newest pand_port_06 version.
 
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZrelationQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e58E2eowlX qdcZtitleQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qdcZtitleQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qdcZtypeQUqfnZE44istributionQ qdcZtypeQUqfnZSiteQ qdcZtypeQUqvocZTermQ qdcZtypeQUqvocZVocabularyConstructQ qdcZtypeQUqwebZSiteQ qdcZtypeQUqrdfsZE52esourceQ qswZserviceQUxhttpE3aE2fE2fswE2enokiaE2ecomE2furiE71aX quriE71aZserviceQUxhttpE3aE2fE2fswE2enokiaE2ecomE2furiE71aX qvocZpartOfQUqfnZPublicationQ qwebZserviceQUxhttpE3aE2fE2fswE2enokiaE2ecomE2furiE71aX qrdfZtypeQUqfnZE44istributionQ qrdfZtypeQUqfnZSiteQ qrdfZtypeQUqvocZTermQ qrdfZtypeQUqvocZVocabularyConstructQ qrdfZtypeQUqwebZSiteQ qrdfZtypeQUqrdfsZE52esourceQ qrdfsZisE44efinedByQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e58E2eowlX qrdfsZlabelQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qrdfsZlabelQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qrdfsZseeAlsoQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e58E2eowlX