View Single Post
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#6
Originally Posted by Joorin View Post
Happy hacking.

But, using ports < 1024 is not needed. You can pick some other port, 1024 <= p < 65535, and then your process won't have to run as root.

This is recommended unless you give up your root permissions after doing the bind.
I know that I should use higher ports, but my Java ME code cannot discover any service running on ports above 39... I may be doing something wrong, but any port higher, than 39 in connection string causes wrong url exception. I'm not a good "Bluetooth coder" (well, maybe not even good coder at all), so it may be my mistake somewhere in code. But, on the other hand, when I register a service from Java ME (midlet acts as a server), it always gets low port number (3-5 usually) assigned by phone, tested on Nokia N95 and Nokia N97.

Previously, I programmed any bt related code only with Java ME on both sides and never had any permission problem, but I need to keep in mind that N900 programming is more like PC than phone programming :P

Once again, thank you very much for your help.
 

The Following User Says Thank You to misiak For This Useful Post: