I have two questions about bluetooth driver

Hi, I have two questions about bluetooth driver.

  1. There is no bluetooth device on a desktop computer so there is no bluetooth driver.

However, when you connect a bluetooth dongle to the desktop computer it automatically installs a bluetooth driver.

Is it possible to make the computer to believe that it is connected to a dongle and make it install the bluetooth driver??

If this is possible what do I have to do??

  1. I learned that packet of bluetooth and serial are the same.

If so, is it possible to make the computer to install bluetooth driver by connecting a USB driver?

The only inbox driver on desktop is for a usb based Bluetooth adapter. If you want the stack to load, you would have to fake out the entire USB stack. Basically implement the device side of the H.4 bth hw spec. not trivial. A Bluetooth pack is not the same as serial, that is an apples to oranges comparison. A different transport, other than USB is serial, although that is used almost entirely in embedded and SOC based systems.

I think your second question is if you can make the bth stack appear on a usb device that isn’t a Bluetooth dongle. No, you don’t want to do that.

None of this quite interesting though. What larger problem are you trying to solve?

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, August 12, 2014 11:48 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] I have two questions about bluetooth driver

Hi, I have two questions about bluetooth driver.

  1. There is no bluetooth device on a desktop computer so there is no bluetooth driver.

However, when you connect a bluetooth dongle to the desktop computer it automatically installs a bluetooth driver.

Is it possible to make the computer to believe that it is connected to a dongle and make it install the bluetooth driver??

If this is possible what do I have to do??

  1. I learned that packet of bluetooth and serial are the same.

If so, is it possible to make the computer to install bluetooth driver by connecting a USB driver?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi, Doron :slight_smile:

There is a bluetooth adapter in smartphone.
I want to use smartphone as a bluetooth dongle, when I connect the smartphone to the desktop via USB cable.
So when I connect the bluetooth headphone to a smartphone, I want to listen to the song playing on the desktop.

The phone needs to support this or you use a different bluetooth dongle. The phone’s Bluetooth capabilities are not transitive to the other side of the bth connection

d

Bent from my phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?8/?13/?2014 12:21 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] I have two questions about bluetooth driver

Hi, Doron :slight_smile:

There is a bluetooth adapter in smartphone.
I want to use smartphone as a bluetooth dongle, when I connect the smartphone to the desktop via USB cable.
So when I connect the bluetooth headphone to a smartphone, I want to listen to the song playing on the desktop.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

> Is it possible to make the computer to believe that it is connected to a dongle and make it install the

bluetooth driver??

Do you really want to emulate the whole of Bluetooth?


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

Hi, Doron
When smartphone communicates with a bluetooth device, there should be a part where it handles the packet.
I want to intercept the packet from this part and pass it on to the USB cable.(This may require a data transformation)
I am planning to fix Android Framework for this part.

Consequently, I want to make my smartphone as a bluetooh dongle.
I thought about 2 ways to do this.

  1. Make the Windows to think that it is connected to a bluetooth dongle when it is actually connected to smartphone.
    Then Windows will think that it is able to use the bluetooth device and receive bluetooth packet through the smartphone’s USB cable.
    So I can use the bluetooth device from Windows.

  2. On my last project where I made a KMDF HID MiniDriver to make the smartphone work also as a mouse.
    Could I be able to make it work if I make an individual driver when the smartphone sends me the data?
    I won’t be able to make a driver for all the bluetooth device so I am going to make the driver for only a mouse, keyboard, and for a headphone.

Which way out of these two is better?? or is there another way?

Hi, Maxim S. Shatskih
It would be wonderful if I am able to emulate all the bluetooth device, but if it can’t, I will emulate for a keyboard, a mouse and a headset.

You could try emulating a USB Bluetooth dongle, it is far more complex than simulating hid

d

Bent from my phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?8/?15/?2014 11:40 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] I have two questions about bluetooth driver

Hi, Doron
When smartphone communicates with a bluetooth device, there should be a part where it handles the packet.
I want to intercept the packet from this part and pass it on to the USB cable.(This may require a data transformation)
I am planning to fix Android Framework for this part.

Consequently, I want to make my smartphone as a bluetooh dongle.
I thought about 2 ways to do this.

1. Make the Windows to think that it is connected to a bluetooth dongle when it is actually connected to smartphone.
Then Windows will think that it is able to use the bluetooth device and receive bluetooth packet through the smartphone’s USB cable.
So I can use the bluetooth device from Windows.

2. On my last project where I made a KMDF HID MiniDriver to make the smartphone work also as a mouse.
Could I be able to make it work if I make an individual driver when the smartphone sends me the data?
I won’t be able to make a driver for all the bluetooth device so I am going to make the driver for only a mouse, keyboard, and for a headphone.

Which way out of these two is better?? or is there another way?

Hi, Maxim S. Shatskih
It would be wonderful if I am able to emulate all the bluetooth device, but if it can’t, I will emulate for a keyboard, a mouse and a headset.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

But this was just recently discussed in the WDK forum…
A very strange, innatural approach. May I ask what this is
actually for? Remoting or virtualization?
Trying to save on a USB dongle for a PC?
– pa

On 16-Aug-2014 09:40, xxxxx@gmail.com wrote:

Hi, Doron
When smartphone communicates with a bluetooth device, there should be a part where it handles the packet.
I want to intercept the packet from this part and pass it on to the USB cable.(This may require a data transformation)
I am planning to fix Android Framework for this part.

Consequently, I want to make my smartphone as a bluetooh dongle.
I thought about 2 ways to do this.

  1. Make the Windows to think that it is connected to a bluetooth dongle when it is actually connected to smartphone.
    Then Windows will think that it is able to use the bluetooth device and receive bluetooth packet through the smartphone’s USB cable.
    So I can use the bluetooth device from Windows.

  2. On my last project where I made a KMDF HID MiniDriver to make the smartphone work also as a mouse.
    Could I be able to make it work if I make an individual driver when the smartphone sends me the data?
    I won’t be able to make a driver for all the bluetooth device so I am going to make the driver for only a mouse, keyboard, and for a headphone.

Which way out of these two is better?? or is there another way?

Hi, Maxim S. Shatskih
It would be wonderful if I am able to emulate all the bluetooth device, but if it can’t, I will emulate for a keyboard, a mouse and a headset.

To finish your project, you can refer Bluetooth Core Spec, Transport layer
from BT SIG website (
https://www.bluetooth.org/en-us/specification/adopted-specifications ) to
know the data format you need to intercept and redirect.

After you can use Bluetooth from Windows, then the Bluetooth function in
you smart phone will stop working. Because data will be redirect to
windows. Is that what you want?
Could you elaborate what bigger problem you trying to solve?

2014-08-17 8:54 GMT+08:00 Pavel A. :

> But this was just recently discussed in the WDK forum…
> A very strange, innatural approach. May I ask what this is
> actually for? Remoting or virtualization?
> Trying to save on a USB dongle for a PC?
> – pa
>
>
>
> On 16-Aug-2014 09:40, xxxxx@gmail.com wrote:
>
>> Hi, Doron
>> When smartphone communicates with a bluetooth device, there should be a
>> part where it handles the packet.
>> I want to intercept the packet from this part and pass it on to the USB
>> cable.(This may require a data transformation)
>> I am planning to fix Android Framework for this part.
>>
>> Consequently, I want to make my smartphone as a bluetooh dongle.
>> I thought about 2 ways to do this.
>>
>> 1. Make the Windows to think that it is connected to a bluetooth dongle
>> when it is actually connected to smartphone.
>> Then Windows will think that it is able to use the bluetooth device and
>> receive bluetooth packet through the smartphone’s USB cable.
>> So I can use the bluetooth device from Windows.
>>
>> 2. On my last project where I made a KMDF HID MiniDriver to make the
>> smartphone work also as a mouse.
>> Could I be able to make it work if I make an individual driver when the
>> smartphone sends me the data?
>> I won’t be able to make a driver for all the bluetooth device so I am
>> going to make the driver for only a mouse, keyboard, and for a headphone.
>>
>> Which way out of these two is better?? or is there another way?
>>
>>
>> Hi, Maxim S. Shatskih
>> It would be wonderful if I am able to emulate all the bluetooth device,
>> but if it can’t, I will emulate for a keyboard, a mouse and a headset.
>>
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Danny

> When smartphone communicates with a bluetooth device, there should be a part where it handles

the packet.
I want to intercept the packet from this part

I do not think you can intercept anything on iOS or on non-rooted Android.

Doubts with Windows Phone too.

I do not think these OSes allow you to install kernel mode intercepting drivers.

What you really can try (I’m not a Bluetooth guy, but this is probably a possibility, since at least on Windows the Bluetooth driver stack is exposed to user mode as socket address family provider) is to run the Bluetooth server app on the phone, which will listen to some Bluetooth sockets.

Then, on Windows side, you will need to write a BTH dongle driver, probably UMDF one, which will work by communicating to the app of the phone via some channel provided by the phone’s OS.

To investigate this, you should read:

a) Bluetooth spec.
b) the spec on computer<->phone communication channel for your phone’s OS.

Note that, probably, for iOS, this is not documented - though yes there are Windows apps like iPhoneBrowser which talk to iPhone by calling iTunes DLLs. For some scenarios like listing the whole filesystem tree, jailbreak of the phone is a must. For some - probably no need.

Also I have doubts item b) can be implemented on Android. IIRC when you connect Android phone to the computer, it just becomes - from the computer side - a microSD card reader for the phone’s memory card. Music management is done by just putting files there and then, on cable disconnect, the phone apps are signaled to re-read the playlists from the media.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

> Trying to save on a USB dongle for a PC?

Its price is like USD 15


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com

Hi, Doron
It is very difficult for me.
So I am able to develop 3 driver for mouse, keyboard, headphone.
I think that mouse and keyboard driver is developed by KMDF HID MiniDriver.
But how to develop audio driver??
And Can I use Only isochronouse tranefer for streaming data??

Hi, Pavel A
I could not decide between remoting or virtualization but they both seem too hard so I am looking for another way.

Hi, danny
I want to stop working the smartphone’s bluetooth funtion when the smartphone is connected with the Windows.

Hi, Maxim S.Shatskih
Right now I am developing this program in order to learn WDD.
So I am going to use a rooted phone.
And I am able to intercept in Android Framework.

Thank you all for your help :slight_smile:

xxxxx@gmail.com wrote:

It is very difficult for me.

It would be difficult for anyone.

So I am able to develop 3 driver for mouse, keyboard, headphone.
I think that mouse and keyboard driver is developed by KMDF HID MiniDriver.
But how to develop audio driver??

Windows audio drivers are complicated. Because you will control the
Android packaging on the device side, if you’re just doing this as an
experiment, you might try to make your Android side look like a USB
Audio Class device. Then, you wouldn’t have to write a Windows driver
at all. If you don’t control the USB descriptors, however, that won’t
be possible.

And Can I use Only isochronouse tranefer for streaming data??

You are developing the device-side software as well, so you can do
whatever you want. Isochronous is almost always used for audio, because
the timing and latency requirements are so tight. Isochronous was
basically designed for audio and video data.

However, if you are limited to using the descriptors provided by the USB
debug interface, then you can only use the endpoints that are provided.
If there is no isochronous endpoint, you can’t use isochronous transfers.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.