Skip to contentSkip to conversation

Sending arbitrary data to a connected device

Bluez-devel Rutger Hendriks 4 participants 10 messages Nov 26, 2005 – Nov 29, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi all,

I have a bluetooth device here that has an LCD display. I want to be able to send arbitrary data to the device. This way I can (hopefully) make text appear on the LCD display. The problem is, that I can not find enough documentation to send the arbitrary data. So I'm hoping to find some help here...

What I have done so far:
- Open the hci device
- Create a connection to the LCD device (I have no idea what all the ptype flags (HCI_DM1 etc...) in hci_create_connection do :( ). This gives me a handle to the LCD device.
- I now can send hci_send_req's by filling in ogf and ocf with e.g. OGF_STATUS_PARAM and OCF_READ_RSSI to read the RSSI.

But, now I'm stuck. What function can I call to send arbitrary hex data? Do I use hci_send_req and fill in other values for ogf/ocf and plug the data into rparam? Or do I use another function? (which??)
Any help is appreciated!

Greetings
Rutger Hendriks

maintainer
#1 lore raw

Hi Rutger,

Quoted 14 lines

I have a bluetooth device here that has an LCD display. I want to be able to send arbitrary data to the device. This way I can (hopefully) make text appear on the LCD display. The problem is, that I can not find enough documentation to send the arbitrary data. So I'm hoping to find some help here...

What I have done so far:
- Open the hci device
- Create a connection to the LCD device (I have no idea what all the ptype flags (HCI_DM1 etc...) in hci_create_connection do :( ). This gives me a handle to the LCD device.
- I now can send hci_send_req's by filling in ogf and ocf with e.g. OGF_STATUS_PARAM and OCF_READ_RSSI to read the RSSI.

Quoted 4 lines

But, now I'm stuck. What function can I call to send arbitrary hex data? Do I use hci_send_req and fill in other values for ogf/ocf and plug the data into rparam? Or do I use another function? (which??)
Any help is appreciated!

totally wrong direction. Use sdptool and its various option to discover the services offered by this LCD device.

Regards

Marcel

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw
Quoted 8 lines · Marcel Holtmann

Hi Rutger,

Quoted 6 lines

I have a bluetooth device here that has an LCD display. I want to be able to send arbitrary data to the device. This way I can (hopefully) make text appear on the LCD display. The problem is, that I can not find enough documentation to send the arbitrary data. So I'm hoping to find some help here...

Quoted 8 lines
Quoted 1 line

But, now I'm stuck. What function can I call to send arbitrary hex data?

totally wrong direction. Use sdptool and its various option to discover the services offered by this LCD device.

Regards

Marcel

Hi Marcel,

sdptool finds the LCD device supports the HID service (which I already knew :P ) What I do not know is how I can send data to the device (using HID). Any pointers to docs/example code ?

Thanks!
Rutger

#3 lore raw

Hi,

get the HID SPec from www.usb.org and the hid profile documentation from www.bluetooth.org. HID devices usualy export structures which describes their capabilities and how to use them.

Ciao,

Peter

Quoted 18 lines · Rutger Hendriks
Quoted 8 lines · Marcel Holtmann

Hi Rutger,

Quoted 6 lines

I have a bluetooth device here that has an LCD display. I want to be able to send arbitrary data to the device. This way I can (hopefully) make text appear on the LCD display. The problem is, that I can not find enough documentation to send the arbitrary data. So I'm hoping to find some help here...

Quoted 8 lines
Quoted 1 line

But, now I'm stuck. What function can I call to send arbitrary hex data?

totally wrong direction. Use sdptool and its various option to discover the services offered by this LCD device.

Regards

Marcel

Quoted 9 lines

Hi Marcel,

sdptool finds the LCD device supports the HID service (which I already knew :P ) What I do not know is how I can send data to the device (using HID). Any pointers to docs/example code ?

Thanks!
Rutger

|	Peter Wippich 			Voice: +49 30 46776411		|
|	G&W Instruments GmbH		fax:   +49 30 46776419		|
|	Gustav-Meyer-Allee 25, Geb. 12	Email: [email protected]	|
|	D-13355 Berlin  / Germany					|

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#4 lore raw
In reply to Rutger Hendriks

Hi Rutger,

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

I have a bluetooth device here that has an LCD display. I want to be able to send arbitrary data to the device. This way I can (hopefully) make text appear on the LCD display. The problem is, that I can not find enough documentation to send the arbitrary data. So I'm hoping to find some help here...

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

But, now I'm stuck. What function can I call to send arbitrary hex data?

totally wrong direction. Use sdptool and its various option to discover the services offered by this LCD device.

sdptool finds the LCD device supports the HID service (which I already knew :P ) What I do not know is how I can send data to the device (using HID). Any pointers to docs/example code ?

don't tell me that it is one of the Logitech diNovo devices. If it is is, please see my comments about it on the mailing list. Otherwise send in details about that device.

Regards

Marcel

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#5 lore raw
Quoted 14 lines · Marcel Holtmann

Hi Rutger,

Quoted 12 lines
Quoted 11 lines
Quoted 8 lines

I have a bluetooth device here that has an LCD display. I want to be able to send arbitrary data to the device. This way I can (hopefully) make text appear on the LCD display. The problem is, that I can not find enough documentation to send the arbitrary data. So I'm hoping to find some help here...

But, now I'm stuck. What function can I call to send arbitrary hex data?

totally wrong direction. Use sdptool and its various option to discover the services offered by this LCD device.

Quoted 7 lines
Quoted 3 lines

sdptool finds the LCD device supports the HID service (which I already knew :P ) What I do not know is how I can send data to the device (using HID). Any pointers to docs/example code ?

don't tell me that it is one of the Logitech diNovo devices. If it is is, please see my comments about it on the mailing list. Otherwise send in details about that device.

Actually, it is one of the Logitech diNovo devices (the mediapad). I know you did some work on it (in december 2003) and that all information about it is lost, but I'm willing to try to redo your work. It will be a nice pastime, I hope :)

I have searched the archives in the past and could not find anything, but now I looked again and I've finally found the messages in which you describe some of your findings!

I will read through all I can find and see if there is anything in there I can use, which will probably be the case :) I already saw you were using report ID 16 and 17, so I will try that too.

Greetings
Rutger

maintainer
#6 lore raw

Hi Rutger,

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

sdptool finds the LCD device supports the HID service (which I already knew :P ) What I do not know is how I can send data to the device (using HID). Any pointers to docs/example code ?

Quoted 8 lines
Quoted 3 lines

don't tell me that it is one of the Logitech diNovo devices. If it is is, please see my comments about it on the mailing list. Otherwise send in details about that device.

Actually, it is one of the Logitech diNovo devices (the mediapad). I know you did some work on it (in december 2003) and that all information about it is lost, but I'm willing to try to redo your work. It will be a nice pastime, I hope :)

why don't you tell us from the start what kind of device it is.

Quoted 7 lines

I have searched the archives in the past and could not find anything, but now I looked again and I've finally found the messages in which you describe some of your findings!

I will read through all I can find and see if there is anything in there I can use, which will probably be the case :) I already saw you were using report ID 16 and 17, so I will try that too.

You need to send and receive reports with ID 16 and 17. Both have fixed length and 16 was for the short messages and 17 for the long messages if I remember that correctly. They are the same we used for switching the dongle from HID into HCI mode.

The problem is to get these reports to the device. The HIDP kernel module with the report protocol (see -mh patch) lacks hiddev support.

Regards

Marcel

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#7 lore raw
Quoted 7 lines · Marcel Holtmann

Hi Rutger,

Quoted 4 lines

Actually, it is one of the Logitech diNovo devices (the mediapad). I know you did some work on it (in december 2003) and that all information about it is lost, but I'm willing to try to redo your work. It will be a nice pastime, I hope :)

why don't you tell us from the start what kind of device it is.

Sorry about that.

Quoted 9 lines
Quoted 1 line

I already saw you were using report ID 16 and 17, so I will try that too.

You need to send and receive reports with ID 16 and 17. Both have fixed length and 16 was for the short messages and 17 for the long messages if I remember that correctly. They are the same we used for switching the dongle from HID into HCI mode.

The problem is to get these reports to the device. The HIDP kernel module with the report protocol (see -mh patch) lacks hiddev support.

Is there a specific reason for the lack of hiddev support?

Greetings
Rutger

maintainer
#8 lore raw

Hi Rutger,

Quoted 11 lines
Quoted 9 lines
Quoted 1 line

I already saw you were using report ID 16 and 17, so I will try that too.

You need to send and receive reports with ID 16 and 17. Both have fixed length and 16 was for the short messages and 17 for the long messages if I remember that correctly. They are the same we used for switching the dongle from HID into HCI mode.

The problem is to get these reports to the device. The HIDP kernel module with the report protocol (see -mh patch) lacks hiddev support.

Is there a specific reason for the lack of hiddev support?

basically its because of lack of time and my report protocol patch is still considered a hack by me.

Regards

Marcel

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#9 lore raw

You guys are not talking about implementing a software HID device, are you? I just did that over Thanksgiving ... sofar only a keyboard (so I can use my laptop as a BT keyboard for my 770). I'll have to do some testing and build a gui and stuff before I release anything.

Collin

Quoted 12 lines · Marcel Holtmann

Hi Rutger,

Quoted 10 lines
Quoted 9 lines
Quoted 1 line

I already saw you were using report ID 16 and 17, so I will try that too.

You need to send and receive reports with ID 16 and 17. Both have fixed length and 16 was for the short messages and 17 for the long messages if I remember that correctly. They are the same we used for switching the dongle from HID into HCI mode.

The problem is to get these reports to the device. The HIDP kernel module with the report protocol (see -mh patch) lacks hiddev support.

Quoted 8 lines
Quoted 1 line

Is there a specific reason for the lack of hiddev support?

basically its because of lack of time and my report protocol patch is still considered a hack by me.

Regards

Marcel

--
Collin R. Mulliner <[email protected]>
BETAVERSiON Systems [www.betaversion.net]
info/pgp: finger [email protected]
Never argue with an idiot. He brings you down to his level, then beats you with experience...

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel