Bluetooth programming - help please

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help

Bluetooth programming - help please

Postby franko3 on Thu Apr 12, 2012 4:06 am


My first post on this forum :D
I am using Linux Mint few years now. :)
I decided to programming in bluetooth - write a simple chat program.
I did not found anything about issues which I encountered on this forum nor I don't know do I put this thread on right place so please move it in the right place if it's not.

I was following this example ... p-server.c and found out that when i try to bind i've got an error message invalid argument.
I am using Linux Mint 12 with latest updates.
Same example works on Mint 9 and probably on Mint 10.

I do not know where the problem is. Is it related whit bluez or with kernel.
Please anyone help.

On Linux Mint 12 I also have a problems with connect my samsung monte on bluetooth but i think that problem is related with nautilus and obex because of the error message it displays. Now I'm waiting on stable release LMDE to use it because I can browse my phone on this distro.
Level 1
Level 1
Posts: 5
Joined: Thu Apr 12, 2012 3:13 am

Linux Mint is funded by ads and donations.

[Solved] Re: Bluetooth programming - help please

Postby franko3 on Sat Apr 14, 2012 8:48 am

I think I found a bug in my program.
Unfortunately I did not read everything about the L2CAP from the above link.
It says that L2CAP use an odd ports numbers.
Here's what I learned from the mailing list linux-bluetooth:
That would be because the PSM value in the example is not valid. Newer
kernels (post 2.6.32) check for this properly:

/* PSM must be odd and lsb of upper byte must be 0 */
if ((psm & 0x0101) != 0x0001) {
err = -EINVAL;
goto done;

But problems with OBEX in Mint 12 still exists.
That's why I wait for new release of Mint or LMDE on which I can browse files in phone (tested).

Thank you for such great distro :)
Level 1
Level 1
Posts: 5
Joined: Thu Apr 12, 2012 3:13 am

Return to Other topics

Who is online

Users browsing this forum: all41, George99 and 4 guests