BlueZ on ETRAX 100LX devboard 82+
Hi,
I am currently working on the Axis devboard 82+ for a project that requires bluetooth support on the board. The kernel for the SDK (obtained from the axis developer website) has support for BlueZ, and I have been able to compile the kernel and flash the image onto the board without any errors (the linux kernel used is 2.4.29). The basic stack functions like sdptool, hcitool, l2ping, work fine.
However, the problem is with rfcomm. I cannot connect to any remote devices (I have tried with Nokia 6600), attempting which gives the "Can't create RFCOMM socket: resource currently unavailable"), cannot bind ("Can't create device list: Operation not supported"), cannot release, etc. Has anyone faced this problem with RFCOMM on this board? I have also tried porting Axis's openBT stack, which I could not compile into the kernel at all.
I am totally new at Linux, and would greatly appreciate any help that someone can provide.
Sincerely and desperately,
Naved
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Hello
There're (a lot) of mails about this topic in the archive. I don't remember directly how they ended, but if you've to program the rfcomm stuff yourself anyway, you're probably best of if you do it from beginning. I had more or less the same problem when I started. I never was able to use the rfcomm utility, it never worked for me. So I programmed everything myself from the beginning on...
regards
Marco
Quoted 8 lines · Naved Aziz
Hi,
I am currently working on the Axis devboard 82+ for a project that requires bluetooth support on the board. The kernel for the SDK (obtained from the axis developer website) has support for BlueZ, and I have been able to compile the kernel and flash the image onto the board without any errors (the linux kernel used is 2.4.29). The basic stack functions like sdptool, hcitool, l2ping, work fine.
However, the problem is with rfcomm. I cannot connect to any remote devices (I have tried with Nokia 6600), attempting which gives the "Can't create RFCOMM socket: resource currently unavailable"), cannot bind ("Can't create device list: Operation not supported"), cannot release, etc. Has anyone faced this problem with RFCOMM on this board? I have also tried porting Axis's openBT stack, which I could not compile into the kernel at all.
I am totally new at Linux, and would greatly appreciate any help that someone can provide.
Quoted 9 lines
Sincerely and desperately,
Naved
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi Marco,
Thanks for your reply; I really appreciate it =)
So you're saying that you programmed, as in write the code, for the rfcomm protocol, while keeping the other (working) BlueZ stuff (meaning the other utilities like sdptool) on the board? I will eventually have to write some applcation using rfcomm in order to exchange files and stuff with phones, but now, I am actually at a loss as to how to progress. As a cherry on top, it has been only a couple of weeks since I have begun working with Linux.
Marco, it would mean a lot to me if you could provide me with some guidance as to how to get rfcomm working on the devboard 82+. I am a total newbie at this, so if you could give me a step-by-step guide as to how to set up the Axis board with rfcomm support, I would be forever in your debt =)
Thanks and sincerely,
Naved
Marco Trudel <[email protected]> wrote:
Hello
There're (a lot) of mails about this topic in the archive. I don't remember directly how they ended, but if you've to program the rfcomm stuff yourself anyway, you're probably best of if you do it from beginning. I had more or less the same problem when I started. I never was able to use the rfcomm utility, it never worked for me. So I programmed everything myself from the beginning on...
regards
Marco
Quoted 20 lines · Naved Aziz
Hi,
I am currently working on the Axis devboard 82+ for a project that requires bluetooth support on the board. The kernel for the SDK (obtained from the axis developer website) has support for BlueZ, and I have been able to compile the kernel and flash the image onto the board without any errors (the linux kernel used is 2.4.29). The basic stack functions like sdptool, hcitool, l2ping, work fine.
However, the problem is with rfcomm. I cannot connect to any remote devices (I have tried with Nokia 6600), attempting which gives the "Can't create RFCOMM socket: resource currently unavailable"), cannot bind ("Can't create device list: Operation not supported"), cannot release, etc. Has anyone faced this problem with RFCOMM on this board? I have also tried porting Axis's openBT stack, which I could not compile into the kernel at all.
I am totally new at Linux, and would greatly appreciate any help that someone can provide.
Quoted 9 lines
Sincerely and desperately,
Naved
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
---------------------------------
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news & more. Check it out!
Hello Naved
Quoted 1 line
So you're saying that you programmed, as in write the code, for the rfcomm protocol, while keeping the other (working) BlueZ stuff (meaning the other utilities like sdptool) on the board? I will eventually have to write some applcation using rfcomm in order to exchange files and stuff with phones, but now, I am actually at a loss as to how to progress. As a cherry on top, it has been only a couple of weeks since I have begun working with Linux.
Can you explain what you try to reach?
Quoted 1 line
Marco, it would mean a lot to me if you could provide me with some guidance as to how to get rfcomm working on the devboard 82+. I am a total newbie at this, so if you could give me a step-by-step guide as to how to set up the Axis board with rfcomm support, I would be forever in your debt =)
Everything works fine. The rfcomm utility creates a device, this creates proglems on some systems. But rfcomm isn't broken.
regards
Marco
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi,
Basically, these are the steps that I am taking to set up an SP connection between the Axis board and the Nokia 6600:
(1) hcid
(2) sdpd
(3) hciconfig hci0 up #set up the bluetooth dongle
(4) hcitool scan #spot the phone, get the BD address
(5) sdptool browse <BD address> #see services and their corrresponding channels
(6) rfcomm connect /dev/rfcomm0 <BD address> <channel> #where, if channel 2 is the one on nokia 6600 providing serial port service, I put 2 for
channel.
The /dev/rfcomm0 is already created prior to flashing the image onto the board as follows:
mknod -m 0666 /dev/rfcomm0 c 216 0
At this point, the phone gives a prompt, asking for a pin number. The value in /etc/bluetooth/pin is 1234, and I have changed the pin_helper in hcid.conf to refer to a script file called qpin that looks like this:
#!/bin/sh
#echo "PIN:1234"
This script file that I have created to work with the pin_helper is stored in the /tmp directory, since this is the only place where I am allowed to create any files, etc once an image has been downloaded onto the board.
After I type in the pin on the Nokia 6600, there is a moment of wait, and then, the phone says "unable to connect", and the board says "can't create socket:
resource temporarily unavailable".
You mentioned that the rfcomm utility creates a device that causes problems on some systems; how to get around this?
Thanks in advance for your help.
Naved
Quoted 28 lines · --- Marco Trudel
Hello Naved
Quoted 1 line
So you're saying that you programmed, as in write
the code, for the
Quoted 1 line
rfcomm protocol, while keeping the other (working)
BlueZ stuff (meaning
Quoted 1 line
the other utilities like sdptool) on the board? I
will eventually have
Quoted 1 line
to write some applcation using rfcomm in order to
exchange files and
Quoted 1 line
stuff with phones, but now, I am actually at a
loss as to how to
Quoted 1 line
progress. As a cherry on top, it has been only a
couple of weeks since
Quoted 1 line
I have begun working with Linux.
Can you explain what you try to reach?
Quoted 1 line
Marco, it would mean a lot to me if you could
provide me with some
Quoted 1 line
guidance as to how to get rfcomm working on the
devboard 82+. I am a
Quoted 1 line
total newbie at this, so if you could give me a
step-by-step guide as to
Quoted 1 line
how to set up the Axis board with rfcomm support,
I would be forever in
Quoted 1 line
your debt =)
Quoted 10 lines
Everything works fine. The rfcomm utility creates a device, this creates
proglems on some systems. But rfcomm isn't broken.regards
Marco
-------------------------------------------------------
Quoted 12 lines
This SF.Net email is sponsored by: NEC IT Guy Games.
How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display:
http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 1 line
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hello Naved
Step 3 should automatically be done from hcid.
Step 2 (sdpd), is not needed if you haven't services on the axis board.
I suggest do program step 6 yourself. look at the sources from rfcomm and read a socket programming howto. bluez is basically socket programming. There are examples in the archive too. If the problem is with the rfcomm utility, you'll get around it by doing this step yourself.
btw, does your script look like:
#!/bin/sh
#echo "PIN:1234"
or like:
#!/bin/sh
echo "PIN:1234"
regards
Marco
Quoted 138 lines · Naved Aziz
Hi,
Basically, these are the steps that I am taking to set up an SP connection between the Axis board and the Nokia 6600:
(1) hcid
(2) sdpd
(3) hciconfig hci0 up #set up the bluetooth dongle
(4) hcitool scan #spot the phone, get the BD address
(5) sdptool browse <BD address> #see services and their corrresponding channels
(6) rfcomm connect/dev/rfcomm0<BD address> <channel> #where, if channel 2 is the one on nokia 6600 providing serial port service, I put 2 for
channel.
The/dev/rfcomm0is already created prior to flashing the image onto the board as follows:
mknod -m 0666/dev/rfcomm0c 216 0At this point, the phone gives a prompt, asking for a pin number. The value in
/etc/bluetooth/pinis 1234, and I have changed thepin_helperin hcid.conf to refer to a script file called qpin that looks like this:#!/bin/sh
#echo "PIN:1234"This script file that I have created to work with the
pin_helperis stored in the /tmp directory, since this is the only place where I am allowed to create any files, etc once an image has been downloaded onto the board.After I type in the pin on the Nokia 6600, there is a moment of wait, and then, the phone says "unable to connect", and the board says "can't create socket:
resource temporarily unavailable".You mentioned that the rfcomm utility creates a device that causes problems on some systems; how to get around this?
Thanks in advance for your help.
Naved
Quoted 48 lines · --- Marco Trudel
Hello Naved
Quoted 1 line
So you're saying that you programmed, as in write
the code, for the
Quoted 1 line
rfcomm protocol, while keeping the other (working)
BlueZ stuff (meaning
Quoted 1 line
the other utilities like sdptool) on the board? I
will eventually have
Quoted 1 line
to write some applcation using rfcomm in order to
exchange files and
Quoted 1 line
stuff with phones, but now, I am actually at a
loss as to how to
Quoted 1 line
progress. As a cherry on top, it has been only a
couple of weeks since
Quoted 1 line
I have begun working with Linux.
Can you explain what you try to reach?
Quoted 1 line
Marco, it would mean a lot to me if you could
provide me with some
Quoted 1 line
guidance as to how to get rfcomm working on the
devboard 82+. I am a
Quoted 1 line
total newbie at this, so if you could give me a
step-by-step guide as to
Quoted 1 line
how to set up the Axis board with rfcomm support,
I would be forever in
Quoted 11 lines
Quoted 1 line
your debt =)
Everything works fine. The rfcomm utility creates a
device, this creates proglems on some systems. But rfcomm isn't broken.regards
Marco-------------------------------------------------------
Quoted 11 lines
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display:
http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list [email protected]https://lists.sourceforge.net/lists/listinfo/bluez-users
__________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail
Quoted 10 lines
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi Marco,
Thanks for your reply. The script file I used did not have echo commented, although I had written it as such in the email. Sorry about that.
I think I may have found the problem regarding rfcomm connect, and as to why it does not work.
Other than /etc and /tmp directories on the Axis devboard, all the other directories are read-only. This is something I also tested out by using mknod in the /dev directory, which gave me the "Read-only file system" error.
Hence, in the main.c file of rfcomm the following
code:
if ((dev = ioctl(sk, RFCOMMCREATEDEV, &req)) < 0) {
perror("Can't create RFCOMM TTY");
close(sk);
return;
}returns a negative value, since it is trying to create a device most likely at a place where it has no permision to do so. I am very sure that it is this ioctl() statement that is wreaking havoc: in fact, all the ioctl() statements that are in main.c cause the same problem.
However, I am allowed to create devices before
building an image to flash onto the devboard. In
fact, I have built such a device in the
/devboard-R2_00/packages/devices/axis-2.4-R1_0_9/Makefile
with the statement
$(MKNOD) -m 0666 $(DEV)/rfcomm0 c 216 0
My question is this: instead of creating a device using ioctl(), do you know how to assign this already created device to dev in the above if statement? The device resides in the /dev directory. This is a problem I will face even if I write step(6) separately, becuase the question of using an already created device will still come up.
Thanks in advance for your help.
Sincerely,
Naved
Quoted 142 lines · --- Marco Trudel
Hello Naved
Step 3 should automatically be done from hcid. Step 2 (sdpd), is not needed if you haven't services on the axis board.
I suggest do program step 6 yourself. look at the sources from rfcomm and
read a socket programming howto. bluez is basically socket programming.
There are examples in the archive too.
If the problem is with the rfcomm utility, you'll get around it by doing
this step yourself.btw, does your script look like:
#!/bin/sh
#echo "PIN:1234"or like:
#!/bin/sh
echo "PIN:1234"regards
MarcoQuoted 3 lines · Naved Aziz
Hi,
Basically, these are the steps that I am taking to
set
Quoted 7 lines
up an SP connection between the Axis board and the Nokia 6600:
(1) hcid
(2) sdpd
(3) hciconfig hci0 up #set up the bluetooth dongle
(4) hcitool scan #spot the phone, get the BDaddress
Quoted 3 lines
(5) sdptool browse <BD address> #see services and their corrresponding channels
(6) rfcomm connect/dev/rfcomm0<BD address><channel>
Quoted 9 lines
#where, if channel 2 is the one on nokia 6600
providing serial port service, I put 2 for
channel.
The/dev/rfcomm0is already created prior to flashing the image onto the board as follows:
mknod -m 0666/dev/rfcomm0c 216 0At this point, the phone gives a prompt, asking
for a
Quoted 1 line
pin number. The value in
/etc/bluetooth/pinis1234,
Quoted 8 lines
and I have changed the
pin_helperin hcid.conf to refer to a script file called qpin that looks like this:#!/bin/sh
#echo "PIN:1234"This script file that I have created to work with
the
Quoted 1 line
pin_helperis stored in the /tmp directory, sincethis
Quoted 2 lines
is the only place where I am allowed to create any files, etc once an image has been downloaded onto
the
Quoted 3 lines
board.
After I type in the pin on the Nokia 6600, there
is a
Quoted 1 line
moment of wait, and then, the phone says "unable
to
Quoted 4 lines
connect", and the board says "can't create socket:
resource temporarily unavailable".You mentioned that the rfcomm utility creates a
device
Quoted 21 lines
that causes problems on some systems; how to get around this?
Thanks in advance for your help.
Naved
Quoted 8 lines · --- Marco Trudel
Hello Naved
Quoted 1 line
So you're saying that you programmed, as in write
the code, for the
Quoted 1 line
rfcomm protocol, while keeping the other
(working)
Quoted 4 lines
Quoted 4 lines
BlueZ stuff (meaning
Quoted 1 line
the other utilities like sdptool) on the board?
I
Quoted 32 lines
Quoted 32 lines
will eventually have
Quoted 1 line
to write some applcation using rfcomm in order to
exchange files and
Quoted 1 line
stuff with phones, but now, I am actually at a
loss as to how to
Quoted 1 line
progress. As a cherry on top, it has been only a
couple of weeks since
Quoted 1 line
I have begun working with Linux.
Can you explain what you try to reach?
Quoted 1 line
Marco, it would mean a lot to me if you could
provide me with some
Quoted 1 line
guidance as to how to get rfcomm working on the
devboard 82+. I am a
Quoted 1 line
total newbie at this, so if you could give me a
step-by-step guide as to
Quoted 20 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
how to set up the Axis board with rfcomm support,
I would be forever in
Quoted 1 line
your debt =)
Everything works fine. The rfcomm utility creates
a
Quoted 11 lines
Quoted 9 lines
device, this creates
proglems on some systems. But rfcomm isn't broken.regards
Marco
-------------------------------------------------------
Quoted 18 lines
Quoted 2 lines
Quoted 2 lines
This SF.Net email is sponsored by: NEC IT Guy
Games.
Quoted 4 lines
Quoted 4 lines
How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to knowthe
Quoted 9 lines
Quoted 7 lines
little guy.
Play to win an NEC 61" plasma display:
http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 6 lines
Quoted 6 lines
Quoted 8 lines
Quoted 7 lines
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
-------------------------------------------------------
Quoted 9 lines
Quoted 1 line
This SF.Net email is sponsored by: NEC IT Guy
Games. How far can you shotput
Quoted 1 line
a projector? How fast can you ride your desk chair
down the office luge track?
Quoted 1 line
If you want to score the big prize, get to know
the little guy.
Quoted 1 line
Play to win an NEC 61" plasma display:
=== message truncated ===
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 3 lines
My question is this: instead of creating a device using
ioctl(), do you know how to assign this already created device to dev in the above if statement?
no. I never worked with such devices.
Quoted 3 lines
The device resides in the /dev directory. This is a problem I will face even if I write step(6) separately
actually no. There's no need for a device, use a socket.
Quoted 2 lines
becuase the question of using an already
created device will still come up.
what for? not for bluez...
regards
Marco
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi Marco,
Thanks a lot for your help. I wrote my own program using rfcomm, and have been able to establish connections with phones.
I have also been able to write data to phones. However, I am currently having trouble reading data sent from the phone to the board.
The application running on the phone receives data from me, displays it, and then echoes it back.
The program I have written is pretty much the same as the RFCOMM's main.c's cmd_connect function, except now it receives an argument from the user and sends that out through a socket once it has connected with a phone. This part works fine.
Just after the write function call, I call read as:
chk_read = read (sk, readbuff, 2);
with sk being the file descriptor of the socket connected to the phone, readbuff being an array of type unsigned char and size 100, and reading in only 2 characters. I have earlier initialized readbuff as:
memset (dread, 0, 100);
However, when I send data to the phone and it receives this data and displays it, once it has sent the data back to the board, the board does not receive it. Rather it waits for data to be received, and once disconnected displays that chk_read has been assigned a -1, meaning no data has been read. I have called the read function for reading more than 2 characters (have used readbuff's maximum size, 100), but still no good.
Any idead what's going wrong here? Any help will be greatly appreciated.
Thanks and sincerely,
Naved
Quoted 15 lines · --- Marco Trudel
Quoted 2 lines
My question is this: instead of creating a device
usingioctl(), do you know how to assign thisalready
Quoted 1 line
created device to dev in the above if statement?
no. I never worked with such devices.
Quoted 1 line
The device resides in the /dev directory. This is
a
Quoted 2 lines
problem I will face even if I write step(6)
separatelyactually no. There's no need for a device, use a
socket.
Quoted 11 lines
Quoted 2 lines
becuase the question of using an already
created device will still come up.what for? not for bluez...
regards
Marco
-------------------------------------------------------
Quoted 8 lines
SF.Net email is sponsored by: Discover Easy Linux
Migration Strategies
from IBM. Find simple to follow Roadmaps,
straightforward articles,
informative Webcasts and more! Get everything you
need to get up to
speed, fast.
http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Quoted 4 lines
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 1 line
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi,
Sorry for the typing mistake in my previous email. It should read
memset (readbuff, 0, 100);
not
memset (dread, 0, 100);
Naved
Naved Aziz <[email protected]> wrote:
Hi Marco,
Thanks a lot for your help. I wrote my own program using rfcomm, and have been able to establish connections with phones.
I have also been able to write data to phones. However, I am currently having trouble reading data sent from the phone to the board.
The application running on the phone receives data from me, displays it, and then echoes it back.
The program I have written is pretty much the same as the RFCOMM's main.c's cmd_connect function, except now it receives an argument from the user and sends that out through a socket once it has connected with a phone. This part works fine.
Just after the write function call, I call read as:
chk_read = read (sk, readbuff, 2);
with sk being the file descriptor of the socket connected to the phone, readbuff being an array of type unsigned char and size 100, and reading in only 2 characters. I have earlier initialized readbuff as:
memset (dread, 0, 100);
However, when I send data to the phone and it receives this data and displays it, once it has sent the data back to the board, the board does not receive it. Rather it waits for data to be received, and once disconnected displays that chk_read has been assigned a -1, meaning no data has been read. I have called the read function for reading more than 2 characters (have used readbuff's maximum size, 100), but still no good.
Any idead what's going wrong here? Any help will be greatly appreciated.
Thanks and sincerely,
Naved
Quoted 15 lines · --- Marco Trudel
Quoted 2 lines
My question is this: instead of creating a device
usingioctl(), do you know how to assign thisalready
Quoted 1 line
created device to dev in the above if statement?
no. I never worked with such devices.
Quoted 1 line
The device resides in the /dev directory. This is
a
Quoted 2 lines
problem I will face even if I write step(6)
separatelyactually no. There's no need for a device, use a
socket.
Quoted 11 lines
Quoted 2 lines
becuase the question of using an already
created device will still come up.what for? not for bluez...
regards
Marco
-------------------------------------------------------
Quoted 8 lines
SF.Net email is sponsored by: Discover Easy Linux
Migration Strategies
from IBM. Find simple to follow Roadmaps,
straightforward articles,
informative Webcasts and more! Get everything you
need to get up to
speed, fast.
http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Quoted 4 lines
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Quoted 1 line
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Am Fre, den 10.06.2005 schrieb Naved Aziz um 7:06:
Quoted 40 lines
Hi,
Basically, these are the steps that I am taking to set up an SP connection between the Axis board and the Nokia 6600:
(1) hcid
(2) sdpd
(3) hciconfig hci0 up #set up the bluetooth dongle
(4) hcitool scan #spot the phone, get the BD address
(5) sdptool browse <BD address> #see services and their corrresponding channels
(6) rfcomm connect/dev/rfcomm0<BD address> <channel> #where, if channel 2 is the one on nokia 6600 providing serial port service, I put 2 for
channel.
The/dev/rfcomm0is already created prior to flashing the image onto the board as follows:
mknod -m 0666/dev/rfcomm0c 216 0At this point, the phone gives a prompt, asking for a pin number. The value in
/etc/bluetooth/pinis 1234, and I have changed thepin_helperin hcid.conf to refer to a script file called qpin that looks like this:#!/bin/sh
#echo "PIN:1234"This script file that I have created to work with the
pin_helperis stored in the /tmp directory, since this is the only place where I am allowed to create any files, etc once an image has been downloaded onto the board.After I type in the pin on the Nokia 6600, there is a moment of wait, and then, the phone says "unable to connect", and the board says "can't create socket:
resource temporarily unavailable".
Quoted 8 lines
You mentioned that the rfcomm utility creates a device that causes problems on some systems; how to get around this?
Thanks in advance for your help.
Naved
are you sure that your board is able to save the link key? It is normally stored in /etc/bluetooth/link_key. If your /etc is r/o, you must make a symlink into a writeable directory.
Regards,
Erwin
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users