* [Bluez-users] Source sample custom Bluetooth
2004-12-27 5:26 ` Marcel Holtmann
@ 2004-12-31 20:30 ` Jonathan Sass
2005-01-01 18:40 ` Marcel Holtmann
0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Sass @ 2004-12-31 20:30 UTC (permalink / raw)
To: bluez-users
I am writing code to talk to a custom bluetooth device that I need two
way communication with. (I sent it commands and it sends characters).
Can you please point me to some sample linux (fc2 ideally) source code.
Jonathan
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
[not found] <20050101041221.D959F32E17@sc8-sf-spam1.sourceforge.net>
@ 2005-01-01 8:12 ` Tom Watson
0 siblings, 0 replies; 13+ messages in thread
From: Tom Watson @ 2005-01-01 8:12 UTC (permalink / raw)
To: bluez-users
> From: Jonathan Sass <jsass@magnifeye.com>
> To: bluez-users@lists.sourceforge.net
> Subject: [Bluez-users] Source sample custom Bluetooth
> Reply-To: bluez-users@lists.sourceforge.net
>
> I am writing code to talk to a custom bluetooth device that I need two
> way communication with. (I sent it commands and it sends characters).
> Can you please point me to some sample linux (fc2 ideally) source code.
>
> Jonathan
>
Look at minicom. It can do 2-way "serial" communication. I had a bluetooth
GPS goodie. I could use minicom to send it commands and get results.
=====
--
Tom Watson
tsw@johana.com
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2004-12-31 20:30 ` [Bluez-users] Source sample custom Bluetooth Jonathan Sass
@ 2005-01-01 18:40 ` Marcel Holtmann
2005-01-03 17:14 ` Jonathan Sass
0 siblings, 1 reply; 13+ messages in thread
From: Marcel Holtmann @ 2005-01-01 18:40 UTC (permalink / raw)
To: BlueZ Mailing List
Hi Jonathan,
> I am writing code to talk to a custom bluetooth device that I need two
> way communication with. (I sent it commands and it sends characters).
> Can you please point me to some sample linux (fc2 ideally) source code.
the best thing is using a serial profile based communication at RFCOMM
protocol level. See rctest or attest for examples.
Regards
Marcel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-01 18:40 ` Marcel Holtmann
@ 2005-01-03 17:14 ` Jonathan Sass
2005-01-03 18:20 ` Marcel Holtmann
0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Sass @ 2005-01-03 17:14 UTC (permalink / raw)
To: bluez-users
Thank you for your response.
The custom device I am talking to does not support a sdp server. I can
see it with a hcitool scan. The call to sdptool fails to connect due to
a timeout.
Is there a sample that shows sending bytes at a higher level?
I am sure that eventually I will figure it out, but just in case is
there a make file or command to build rctest?
Jonathan
On Jan 1, 2005, at 10:40 AM, Marcel Holtmann wrote:
> Hi Jonathan,
>
>> I am writing code to talk to a custom bluetooth device that I need two
>> way communication with. (I sent it commands and it sends characters).
>> Can you please point me to some sample linux (fc2 ideally) source
>> code.
>
> the best thing is using a serial profile based communication at RFCOMM
> protocol level. See rctest or attest for examples.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-03 17:14 ` Jonathan Sass
@ 2005-01-03 18:20 ` Marcel Holtmann
2005-01-03 18:38 ` Jonathan Sass
0 siblings, 1 reply; 13+ messages in thread
From: Marcel Holtmann @ 2005-01-03 18:20 UTC (permalink / raw)
To: BlueZ Mailing List
Hi Jonathan,
> The custom device I am talking to does not support a sdp server. I can
> see it with a hcitool scan. The call to sdptool fails to connect due to
> a timeout.
>
> Is there a sample that shows sending bytes at a higher level?
>
> I am sure that eventually I will figure it out, but just in case is
> there a make file or command to build rctest?
having a SDP server is nice, but you don't really need it. Simple make
sure that you use the same RFCOMM channel on the server and on the
client side and everything will be fine.
Regards
Marcel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-03 18:20 ` Marcel Holtmann
@ 2005-01-03 18:38 ` Jonathan Sass
2005-01-03 18:56 ` Marcel Holtmann
0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Sass @ 2005-01-03 18:38 UTC (permalink / raw)
To: bluez-users
This device has a custom blue tooth stack (no rfcomm). I need to
inquire, connect (I can do that and see code to do it) and then to
build a aclpacket and do a aclread. What is the equivalent on the linux
side?
On Jan 3, 2005, at 10:20 AM, Marcel Holtmann wrote:
> Hi Jonathan,
>
>> The custom device I am talking to does not support a sdp server. I can
>> see it with a hcitool scan. The call to sdptool fails to connect due
>> to
>> a timeout.
>>
>> Is there a sample that shows sending bytes at a higher level?
>>
>> I am sure that eventually I will figure it out, but just in case is
>> there a make file or command to build rctest?
>
> having a SDP server is nice, but you don't really need it. Simple make
> sure that you use the same RFCOMM channel on the server and on the
> client side and everything will be fine.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-03 18:38 ` Jonathan Sass
@ 2005-01-03 18:56 ` Marcel Holtmann
2005-01-04 6:34 ` Jonathan Sass
0 siblings, 1 reply; 13+ messages in thread
From: Marcel Holtmann @ 2005-01-03 18:56 UTC (permalink / raw)
To: BlueZ Mailing List
Hi Jonathan,
> This device has a custom blue tooth stack (no rfcomm). I need to
> inquire, connect (I can do that and see code to do it) and then to
> build a aclpacket and do a aclread. What is the equivalent on the linux
> side?
in this case you have to use the HCI raw socket. Otherwise you won't be
able to deal with ACL data packets. However every stack should at least
suppport L2CAP, because dealing with raw ACL data packets is never a
good idea.
Regards
Marcel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-03 18:56 ` Marcel Holtmann
@ 2005-01-04 6:34 ` Jonathan Sass
2005-01-04 11:50 ` Marcel Holtmann
0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Sass @ 2005-01-04 6:34 UTC (permalink / raw)
To: bluez-users
The stack that I am talking to only supports raw packets.
So far I am able to do an inquiry and see the device and get its
address, type and name. I am unable to connect to it.
I create a socket
s = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
then I set up the parameters for the addr
sockaddr_hci addr
addr.hci family = AF_BLUETOOTH;
addr.hci_dev = 0;
I then do a bind
bind(s, (struct sockaddr *)&addr, sizeof(addr));
I then try a connect
connect(s, (struct sockaddr *) &addr, sizeof(addr)) and it fails
What might I be missing here? I cannot find any samples
Thank you,
Jonathan
On Jan 3, 2005, at 10:56 AM, Marcel Holtmann wrote:
> Hi Jonathan,
>
>> This device has a custom blue tooth stack (no rfcomm). I need to
>> inquire, connect (I can do that and see code to do it) and then to
>> build a aclpacket and do a aclread. What is the equivalent on the
>> linux
>> side?
>
> in this case you have to use the HCI raw socket. Otherwise you won't be
> able to deal with ACL data packets. However every stack should at least
> suppport L2CAP, because dealing with raw ACL data packets is never a
> good idea.
>
> Regards
>
> Marcel
>
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-04 6:34 ` Jonathan Sass
@ 2005-01-04 11:50 ` Marcel Holtmann
2005-01-05 3:53 ` Jonathan Sass
0 siblings, 1 reply; 13+ messages in thread
From: Marcel Holtmann @ 2005-01-04 11:50 UTC (permalink / raw)
To: BlueZ Mailing List
Hi Jonathan,
> The stack that I am talking to only supports raw packets.
>
> So far I am able to do an inquiry and see the device and get its
> address, type and name. I am unable to connect to it.
>
> I create a socket
>
> s = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
>
> then I set up the parameters for the addr
>
> sockaddr_hci addr
> addr.hci family = AF_BLUETOOTH;
> addr.hci_dev = 0;
>
> I then do a bind
>
> bind(s, (struct sockaddr *)&addr, sizeof(addr));
>
> I then try a connect
>
> connect(s, (struct sockaddr *) &addr, sizeof(addr)) and it fails
>
> What might I be missing here? I cannot find any samples
the HCI raw socket doesn't support connect(). It is not meant for doing
actual data transmission. You must do this all by yourself. Look at the
source code of the hci*.c tools.
Regards
Marcel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-04 11:50 ` Marcel Holtmann
@ 2005-01-05 3:53 ` Jonathan Sass
2005-01-05 11:44 ` Marcel Holtmann
0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Sass @ 2005-01-05 3:53 UTC (permalink / raw)
To: bluez-users
>
> the HCI raw socket doesn't support connect(). It is not meant for doing
> actual data transmission. You must do this all by yourself. Look at the
> source code of the hci*.c tools.
>
> Regards
>
> Marcel
>
I have looked at the hcitool.c program and I am stuck by my lack of
understanding. The cmd_cmd seems like what I want to do to read data
from my custom device. What I want to do is given a device address, I
want to read bytes from it and occasionally write to it. Is there a
code fragment that you can point me to?
From the person who wrote the stack on our device.
This is a connect device with a ACL DH5 packet type. The transfers are
standard ACL L2CAP packets from the remote. The remote appears to the
host as a master device, pushing down ACL packets when a button is
pressed.
Thank you,
Jonathan
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-05 3:53 ` Jonathan Sass
@ 2005-01-05 11:44 ` Marcel Holtmann
2005-01-06 0:00 ` Jonathan Sass
0 siblings, 1 reply; 13+ messages in thread
From: Marcel Holtmann @ 2005-01-05 11:44 UTC (permalink / raw)
To: BlueZ Mailing List
Hi Jonathan,
> I have looked at the hcitool.c program and I am stuck by my lack of
> understanding. The cmd_cmd seems like what I want to do to read data
> from my custom device. What I want to do is given a device address, I
> want to read bytes from it and occasionally write to it. Is there a
> code fragment that you can point me to?
the HCI raw socket uses H4 as protocol with one packet per read or write
operation. The cmd_cmd() is not what you want, because you wanna send
data packets and not a HCI command.
> From the person who wrote the stack on our device.
>
> This is a connect device with a ACL DH5 packet type. The transfers are
> standard ACL L2CAP packets from the remote. The remote appears to the
> host as a master device, pushing down ACL packets when a button is
> pressed.
So do it uses L2CAP or not? However if not, why don't you get your
device fixed to response to L2CAP. Relying on ACL data packets is not
the best idea to get this working reliable.
Regards
Marcel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-05 11:44 ` Marcel Holtmann
@ 2005-01-06 0:00 ` Jonathan Sass
2005-01-06 12:34 ` Marcel Holtmann
0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Sass @ 2005-01-06 0:00 UTC (permalink / raw)
To: bluez-users
Thank you for your help.
Progress. I have now made a connection using hci_create_connection. My
final task for this device is to read data. Thats all, just read. I am
looking for some hci_read command? My hunt continues.
On Jan 5, 2005, at 3:44 AM, Marcel Holtmann wrote:
> Hi Jonathan,
>
>> I have looked at the hcitool.c program and I am stuck by my lack of
>> understanding. The cmd_cmd seems like what I want to do to read data
>> from my custom device. What I want to do is given a device address, I
>> want to read bytes from it and occasionally write to it. Is there a
>> code fragment that you can point me to?
>
> the HCI raw socket uses H4 as protocol with one packet per read or
> write
> operation. The cmd_cmd() is not what you want, because you wanna send
> data packets and not a HCI command.
>
>> From the person who wrote the stack on our device.
>>
>> This is a connect device with a ACL DH5 packet type. The transfers are
>> standard ACL L2CAP packets from the remote. The remote appears to the
>> host as a master device, pushing down ACL packets when a button is
>> pressed.
>
> So do it uses L2CAP or not? However if not, why don't you get your
> device fixed to response to L2CAP. Relying on ACL data packets is not
> the best idea to get this working reliable.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bluez-users] Source sample custom Bluetooth
2005-01-06 0:00 ` Jonathan Sass
@ 2005-01-06 12:34 ` Marcel Holtmann
0 siblings, 0 replies; 13+ messages in thread
From: Marcel Holtmann @ 2005-01-06 12:34 UTC (permalink / raw)
To: BlueZ Mailing List
Hi Jonathan,
> Progress. I have now made a connection using hci_create_connection. My
> final task for this device is to read data. Thats all, just read. I am
> looking for some hci_read command? My hunt continues.
there is no hci_read function. It is a HCI raw socket with H4 protocol.
This means if you read() you get a HCI packet with one byte H4 header
and then a ACL packet or a HCI event. You will see the same as hcidump
is seeing.
Regards
Marcel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-01-06 12:34 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20050101041221.D959F32E17@sc8-sf-spam1.sourceforge.net>
2005-01-01 8:12 ` [Bluez-users] Source sample custom Bluetooth Tom Watson
2004-12-24 10:13 [Bluez-users] Error when compiling bluez-utils CoCozZ geek
2004-12-25 17:23 ` CoCozZ geek
2004-12-25 17:28 ` Marcel Holtmann
2004-12-25 17:45 ` CoCozZ geek
2004-12-25 17:49 ` Marcel Holtmann
2004-12-25 17:54 ` CoCozZ geek
2004-12-25 17:58 ` Marcel Holtmann
2004-12-25 18:08 ` CoCozZ geek
2004-12-25 18:08 ` CoCozZ geek
2004-12-25 18:11 ` CoCozZ geek
2004-12-25 18:32 ` CoCozZ geek
2004-12-25 18:48 ` Marcel Holtmann
2004-12-27 2:03 ` [Bluez-users] How is the CTP in BLUEZ going? Heejune AHN
2004-12-27 5:26 ` Marcel Holtmann
2004-12-31 20:30 ` [Bluez-users] Source sample custom Bluetooth Jonathan Sass
2005-01-01 18:40 ` Marcel Holtmann
2005-01-03 17:14 ` Jonathan Sass
2005-01-03 18:20 ` Marcel Holtmann
2005-01-03 18:38 ` Jonathan Sass
2005-01-03 18:56 ` Marcel Holtmann
2005-01-04 6:34 ` Jonathan Sass
2005-01-04 11:50 ` Marcel Holtmann
2005-01-05 3:53 ` Jonathan Sass
2005-01-05 11:44 ` Marcel Holtmann
2005-01-06 0:00 ` Jonathan Sass
2005-01-06 12:34 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox