Listen to System Bluetooth Socket - Other Tools & General Discussion

Hi,
I want to use Wii Blaance Board with my Android Device. I already paired it, but i can not find a mehtod to listen to the system Bluetooth Socket
to receive the incoming Bluetooth Packages. Is there any way to sniff it?
The Device is registred as an Input Device, but also the MotionEvent is useless for me, because there is no Object Containing the Raw Data.
Any Help?
Best Regards,
Dirk

I'm not sure I understand the problem. If you need to listen an incoming bluetooth connection, you can use:
listenUsingInsecureRfcommWithServiceRecord(name, uuid), or listenUsingRfcommWithServiceRecord(name,uuid)
eg.
Code:
BluetoothAdapter mBtAdapter = BluetoothAdapter.getDefaultAdapter();
btsSocket = mBtAdapter.listenUsingRfcommWithServiceRecord("Name", MY_UUID);

Mh , i don't know if it works, my problem:
I have the wii balance board, it connects to the system automatically as a bluetooth input device. After it's connected i want to capture the bluetooth packages it sends.

Related

Bluetooth Concerns - WidComm

Good Day to ALL!
I always read in the topics about bluetooth widcomm stacks against ms stacks, and the primary concern is HEADSET/HANDSFREE profiles. Well thats a vey nice function to have IF and WHEN perfected.
Right now, I have the standard bluetooth stack the came with my XDA 2. And I do not have a bluetooth headset or earpiece, my pimary bluetooth concern is SENDING and RECEIVING files over bluetooth, the SENDING PART seems to be OK and can transmit to other phone units (nokia especially but not SonyEricsson). BUT i cannnot receive files from any of these devices.
NOW, if I install the WIDCOMM stack that is available here and can be successfully installed, WILL this allow me to SEND and RECEIVE files to any device via bluetooth?
Thanks, I dont want to install yet coz there might be others out there who already know and I will learn from them and save me the time and effort.
THANKS.
I installed Widcomm 1.4.1 build 58on my 1.60WWE XDAII and I am able to exchange files between both Nokia and SE phones (I've only tried this with smartphones). When using the Widcomm and the MS bluetooth stack you should remember the following:
1. Don't turn both of them on at the same time.
2. BT headset only works with MS Stack
BLUETOOTH - SENDING
I CAN SEND AND RECIEVE AND SEND FILES TO OTHER DEVICES AND PHONES, BUT I CAN NEVER FIND OUT WHO THE SENDER IS WHEN RECIEVING FILES FROM SOMEONE... ON ANY PHONE OR LAPTOP WHEN YOU GET A FILE THROUGH BLUETOOTH IT ASKS DO YOU WANT TO RECIEVE THE FIEL FROM USER "XYZ", WHERE AS ON THE XDAII IT JUST ASKS DO YOU WANT TO RECIEVE THE FILE,,
IS THERE A SOFTWARE OR AN UPGRADE WHERE I CAN FIND OUT WHO THE SENDER IS WHEN RECIEVING BLUETOOTH????
ANYONE HELP ME PLEASE
Re: BLUETOOTH - SENDING
HEX said:
I CAN SEND AND RECIEVE AND SEND FILES TO OTHER DEVICES AND PHONES, BUT I CAN NEVER FIND OUT WHO THE SENDER IS WHEN RECIEVING FILES FROM SOMEONE... ON ANY PHONE OR LAPTOP WHEN YOU GET A FILE THROUGH BLUETOOTH IT ASKS DO YOU WANT TO RECIEVE THE FIEL FROM USER "XYZ", WHERE AS ON THE XDAII IT JUST ASKS DO YOU WANT TO RECIEVE THE FILE,,
IS THERE A SOFTWARE OR AN UPGRADE WHERE I CAN FIND OUT WHO THE SENDER IS WHEN RECIEVING BLUETOOTH????
ANYONE HELP ME PLEASE
Click to expand...
Click to collapse
When such message appears, try to beam smth via bluetooth. The first device appeared will be the sender of the file
chameleon said:
Right now, I have the standard bluetooth stack the came with my XDA 2. And I do not have a bluetooth headset or earpiece, my pimary bluetooth concern is SENDING and RECEIVING files over bluetooth, the SENDING PART seems to be OK and can transmit to other phone units (nokia especially but not SonyEricsson). BUT i cannnot receive files from any of these devices.
Click to expand...
Click to collapse
To receive a file via bluetooth you need to select "Discoverable" mode in bluetooth settings (start-settings-connections-bluetooth). Then, make sure your "beam reception" is checked (enabled) [start-settings-connection-beam-Receive all beams]. Now you can receive any files!
RTFM

Bluetooth A2DP

Hi there,
I don't know where to ask this, so it went to "General".
I've got a JasJar running WM6 and it happily runs stereo music on my Motorola HT820 bluetooth headset. I also have Sony BT2500 car stereo system which supports bluetooth phone as well as A2DP. with my HT820, I just turn the headset on and jasjar sees the headset and connects to it, but with the BT2500 only the phone part is automatically connected. if I want to listen to music I have to (on my jasjar) go to settings/connections/bluetooth and tap and hold on my xplod (my sony BT2500) and set it as wireless stereo.
is there any way to avoid this step (as I'm usually driving when i have to do this)? if not, is there an easy way to do it with one hand and no tap and hold ?
Cheers,
Shafa
Hey Shafa,
I've got the same problem with my Prophet and a Pioneer BTB200. So far i found no solution, so i most likely will have to write a program to connect to a BTdevice as wireless stereo, if it autoconnects as a handsfree device and is a2dp capable.
hey Lemmz,
I'm very interested to know what API you have to call to do this...
Cheers,
Shafa
HTC Faraday
Hello all,
Are there any resources here for the Cingular 2125 , I would like to port linux on the 2125. sorry if i have mis-posted.
thanks,
rvb
@shafa:
there is a Bt_api.h in the wm5 SDK which defines a function called RequestBluetoothNotifications; so far i found
RequestBluetoothNotifications
Handling Events from the Bluetooth Stack
Retrieving AVDTP Connection State
My idea would be to monitor all bluetooth connection events (most likely via a service), see which device (auto)connects and if it is a handsfree-device and supports wireless-stereo, initiate pairing for the latter.
i will try to do some coding later today. i'll keep you informed.
Cheers,
lemmz
Ok, so far i can recieve bt-related events. unfortunately i've found no info on how to initiate an a2dp connection microsoft-style. There's tons of code for AudioGateway stuff, but imho thats pretty useless.
Looking at the registry i found in HKLM\Software\Microsoft\Bluetooth\Services\0000110B-(...) reference to "Wireless Stereo" and bthutil.dll. looking at the WM6 SDK, bthutil.h, there are just two functions, BthGetMode and BthSetMode, for turning BT on and off.
I'm also looking at the sources for the (settings->connections->bluetooth)-Dialog, btenum.cxx and btmgmtui.cpp, maybe there is some info on this.
Edit:
btw, this 0000110B thing is referred to as AudioSinkServiceClass_UUID. But no luck on that either.
Soo, i think i'm quite close now...
DRVM_MAPPER_PREFERRED_SET -- with waveOutMessage you can switch soundoutput to different devices, unfortunately for a2dp it returns NOTSUPPORTED.
But within the a2dp driver i found some messages:
WODM_BT_SCO_AUDIO_CONTROL, WODM_OPEN_CLOSE_A2DP, WODM_PARAM_OPEN_A2DP
they seem to initiate a connection and set the preferred output device, just like the DRVM_MAPPER_PREFERRED_SET should. Tonight i'll experiment with it.
SUCCESS!!
It worked just as i though: a single command does all the work.
waveOutMessage((HWAVEOUT)devId, WODM_OPEN_CLOSE_A2DP, WODM_PARAM_OPEN_A2DP, NULL)
The device to connect to has to be paired and, of course, in range. I'm now going to clean up the code and build a litte configuration-tool.
Freeware tool
EDIT: Version 1.0.rc-2 uploaded . Find the download link below:
http://teksoftco.com/index.php?section=freeware
I've just uploaded version 1.0.rc-1 of the A2DP plugin. It can be downloaded and used as freeware (0 cost) from http://teksoftco.com/index.php?section=freeware , or find it below attached to this message, including a short usage guide.
New in this release (as many users requested):
-signal indicator
-3 modes for headset: OK, Off, Err
-settings panel added
-Handle Bluetooth option
-Execute File after start option
-applet added in start->settings->system to start settings
-a2dp.exe included in the package, that with parameters: a2dp.exe -bluetoothn|off -a2dpn|off or a2dp.exe -bluetooth:1|0 -a2dp:1|0
------------------
Actually devices that support A2DP (most wm6.0 bluetooth devices), come with 2 audio drivers installed:
1) The "Audio Output" Driver (supported since ppc 2002)
2) The "Bluetooth Advanced Audio Output" Driver, that is responsible of sending audio data over a L2CAP Bluetooth connection, as per A2DP protocol
When the user connects a Stereo A2DP headset, and selects the "Wireless Stereo" profile, the Bluetooth Adv. Audio Output becomes the nr. 1 audio output route, and is indexed as the First audio driver. Any application will output sound by using that driver.
The problem is that sometimes we are already listening to audio in the device's speaker's, and then suddenly we want to switch the output to our a2dp headsets - this is sometimes problematic, as the First audio driver changes from "Audio Output" to "Bluetooth Adv. Audio Output" and the applications currently playing audio need to be restarted.
For such issues, I have provided a tool, as freeware, that will install as a today plugin and provide the user with the possibility of instantly switching the audio between Device Speaker and A2DP Stereo Headset.
It is designed for WM6.0, Microsoft Bluetooth stack, please download it and let me know how it works for you. There are some more modifications that will be done, so this is only Beta-1
The CAB installer and instructions are in the ZIP attached.
(tested on ultimate 8150/wm6.0 and eten m600+/wm5.0, the gfx was made for vga but works on qvga too)
Hello Radhoo,
first times thank you, after such a thing I searched for a long time in vain.
tool functions on the Artemis with WM6 perfectly.
If the Tool were still developed further, I would be pleased genuinly, and would like to call hereby gladly my desires:
1. Bluetooth automatically switch on and off
2. Komandozeilensteuerung
3. Traybuttons without Todayplugin
4. Automatic start of a desired program after activation of A2DP (Mortplayer)
thanks Menkul
Hello menkul, Thanks for the feedback.
What is Komandozeilensteuerung?
Sorry Komandozeilensteuerung ist german.
I mean a Funktion a2pd.exe blueon A2DPon
a2dp.exe blueoff
or so.
Also a exe with startparameter
Menkul
Great idea
Any way to indicate bluetooth 1.2 or 2.0 status/line speed, signal strength, bandwidth?
bjrmd said:
Great idea
Any way to indicate bluetooth 1.2 or 2.0 status/line speed, signal strength, bandwidth?
Click to expand...
Click to collapse
Will try to
I have two spare days for research (wow!) so I'll try to come up with something.
lemmz
lemmz said:
SUCCESS!!
It worked just as i though: a single command does all the work.
waveOutMessage((HWAVEOUT)devId, WODM_OPEN_CLOSE_A2DP, WODM_PARAM_OPEN_A2DP, NULL)
The device to connect to has to be paired and, of course, in range. I'm now going to clean up the code and build a litte configuration-tool.
Click to expand...
Click to collapse
I am sorry I've "invaded" this thread, without first saying thanks to lemmz for his work, as I very well understand the effort needed to perform this kind of research.
While I wasn't aware of his findings (which are available in AK :
bt_ddi.h, WM520\PUBLIC\COMMON\OAK\INC\ ) I just wanted to give another free tool to the community, so I posted this in a few threads where users where requesting A2DP tools. I hope this is ok.
Dear Lemmz,
thanks a lot, i will take a look asap.
thanks again
Shafa
Hey Lemmz,
where do you get the devId from?
I'm thinking about writing the application, but I'm not a C++ guy (anymore atleast) I need to write it in C#...
Cheers,
Shafa
me again. should i use WAVE_MAPPER for device ID? if so, what is the value for it or even better, where can i find the whatever.h that has the value? is there an SDK i should download?
Cheers,
Shafa
menkul said:
Sorry Komandozeilensteuerung ist german.
I mean a Funktion a2pd.exe blueon A2DPon
a2dp.exe blueoff
or so.
Also a exe with startparameter
Menkul
Click to expand...
Click to collapse
Done, original post updated, download 1.0.rc-1
Signal indicator also added: it shows the bluetooth connection strength!
shafa said:
me again. should i use WAVE_MAPPER for device ID? if so, what is the value for it or even better, where can i find the whatever.h that has the value? is there an SDK i should download?
Cheers,
Shafa
Click to expand...
Click to collapse
You should use waveOutGetNumDevs() to get the number of wave devices.
Then you can use their index directly: 0 , 1 , eg.:
int idWAVE_BTAudio = 0; // or 1
waveOutMessage((HWAVEOUT)idWAVE_BTAudio ...
Where:
Code:
0. Audio Output
1. Bluetooth Advanced Audio Output
Be careful, the index changes when one device is selected, so you should check the WAVE devices each time you want to switch the audio.
Personally I've used waveOutGetNumDevs() then waveOutGetDevCaps to see what kind of device is each of the enumerated ones.
Hope this helps.

Anyone willing to write me a Mortscript for my Vox - Will Pay !

Hi all
I need a small mortscript script writing for my S710. I have a Bluetooth Stereo in my car which has the facility to play music from the Handset via A2dp. The phone connects fine when you turn the car on but the wireless stereo element will not connect at all.
I am willing to make small paypal dontation to anyone who would be willing to write a script for me ($20?)
Basically I need the script to:-
When the phone makes a bluetooth connection to my carkit
1. Turn Bluetooth off ( bizarre I know but bear with me!)
2. Wait 20 seconds
3. Turn Bluetooth back on
4. tell my phone via either registry keys or series of key presses to enable "Wireless Stereo" for a bluetooth device.
Anyone up for it?
Thanks

Handle call through PC

Hey guys-
I'm running My Mobiler to output the display, and control my phone (Tilt/Kaiser/TytnII/8925) via my PC (XP sp2).
When I receive a call, My Mobiler allows me to accept/reject/sms etc through my pc (really through my phone dialer but I'm using my keyboard and mouse), but when I want to accept the call, and talk to my caller, I'm having to pickup the phone, and resort to what I'll call 'untethered' phone use (i.e., phone to ear/BT headset).
What I'd like to do (and hopefully where you guys can help me out) is to use some method or software to relay the call through my PC (and use my pc's built in speakers & mic). Bonus if the method leverages something I'm already running (ActiveSync/My Mobiler).
Additional info:
BT is an option, but it's Toshiba stack, which from my researching doesn't' seem to support the Headset profile on PC.
Thanks
well if your pc has bluetooth it should be able to work....i have a usb to bluetooth adapter for my pc and i can get the audio going to it never tired to use a mic or use my pc as a speaker phone but 1 thing for sure the audio from calls go on my pc....if i had a mic i would test it out...also as another option(if your phone has it.) u could just use speaker phone...
Grondinm said:
i have a usb to bluetooth adapter for my pc and i can get the audio going to it
Click to expand...
Click to collapse
What's the make/model of the USB BT you're using?
Mine is:
Toshiba Bluetooth Stack for Windows
Version v5.10.15
When I pair up the profiles displayed on the tilt are:
A2DP: Advanced Audio Distribution Profile
SPP: Serial Port Profile
The profiles in the Toshiba BT manager are:
DUN: Dial-Up Networking Profile
LAP: LAN Access Profile
If I use my BT headphones (Sonorix C3) with MortPlayer, A2DP works, If I try to use the Toshiba USB BT it doesn't work.
I think the one I need is (either)
HSP: Headset Profile
or
HFP: Handsfree Profile
I'm suspecting the toshiba bt stack is to blame, anyone else able to use a toshiba stack and get HSP/HFP working on their PC?
Im currently using My Mobiler to use my VOX due to having removed the broken screen from its shell
whenever i take a call, all i do is put it on speakerphone and it works fine
using the computers speakers and mic would be great fun, but for me its impossible due to the bluetooth dongle i use not having any compatible (free) software that uses audio streaming, but if it did, audio streaming should work with both speakers AND a mic! so it should in theory work.
i think
cris_rowlands said:
whenever i take a call, all i do is put it on speakerphone
Click to expand...
Click to collapse
Grondinm said:
u could just use speaker phone...
Click to expand...
Click to collapse
Speakerphone isn't an option, I'm in an office and the sharing of my conversation with my coworkers via loud speaker wouldn't be appreciated.
I intend to use a headset+mic combo hooked up to my pc, this way I can listen to music off my pc, and handle calls.
flow would be:
[Phone]<--display&control(via My Mobiler)-->[KVM - PC]
[Phone]<--voice*(Need solution here)*-->[MIC & Headset - PC]
Salling Clicker Is on the road to what I'd like to do, although it doesn't have voice support under windows. It's on the road to PPC <> PC convergence.
Any one have any experience with tweaking Salling Clicker to work with voice?
thetiltedKaiser said:
What I'd like to do (and hopefully where you guys can help me out) is to use some method or software to relay the call through my PC (and use my pc's built in speakers & mic). Bonus if the method leverages something I'm already running (ActiveSync/My Mobiler).
Click to expand...
Click to collapse
When I paired my MDA Vario III with my notebook (HP TC4200 Tablet PC running a Broadcomm BT stack) I had a "Voice gateway" service available from my phone. This is in addition to DUN and Network Access Point services. Basically when I PC and phone connect my PC acts as a BT speakerphone.
I've not used the setup that often but it seems to work pretty well. When 1st connected a pop up briefly appears to inform me that the "Call Monitor" is active and that's it til a call comes in. At that point a notification gets displayed saying the number or callerID with buttons for "Accept & "Reject". If I take the call, or transfer and active call to the BT headset then my PC picks up the call.
By default my notebook uses its built in loudspeaker and microphone. However I can also pair my PC with a BT headset then route all sounds through it. It's a bit of a faff though as I have to change the active sound device to whatever headset is connected. I also need to connect the PC and eadset 1st if the headset is also paired with the phone, otherwise the real BT headset may take the call instead of the "virtual" one (notebook). I haven't tried this with my BT stereo headset though, only my conventional mono...
Whilst playing during a particularly boring teleconference I also discovered that I can record the calls and pass the sound through a text to speech converter supplied with the PC... the results of the latter are more for entertainment than serious use, althoug I suppose with some training it might be better...
I also use Salling Clicker. The phone events work pretty well, but to date I've yet to take a call using the PC whilst it is running.
Not sure if this helps in your case, but it seems like what you want to do is definitely possible.
Fatman it's like you've taken a page right out of my book. What software are you using for speech to text? This could make for a useful and entertaining audit trail... Sounds like I need to pickup a new BT adapter based on the Broadcomm stack. If anybody has had any luck using the Toshiba stack, please share.
thetiltedKaiser said:
What software are you using for speech to text?
Click to expand...
Click to collapse
I'm not sure if the program is available as separate software. It's called "Microsoft English Recognizer" and was pre-installed on my notebook. I have no idea how it compares to any other programs. I've only playted around with it very briefly as a way of killing time during a boring teleconference!
However, I can't see why any program couldn't be used as the sound from the phone is available to any software as the BT stream from the phone becomes the default input sound feed.
One thing I will definitely be trying next time is recording the call whilst taking notes using Tablet Enhancements for Outlook. THis basically augments the normal MS Outlook Journal functions so I can take handwritten notes which can be edited, commented, and then later searched. If you record the microphone feed (i.e. the phone call in my case) the notes are then linked into "timeline" of the call so you can see what notes were taken when, and conversely what happened in the call when you took a particular note... should be useful if it works...
Let me know if you need any additional info about BT stack versions and drivers etc but it does sound like you'd need the Broadcomm stack - ISTR reading that the Brioadcomm stacks on some PocketPCs have laways performed better than the MS equivalents, and it appears that the same if true for PCs too... The BT on my notebook is far more reliable, and flexible than that on my work PC which uses an MS BT dongle. However, that may be due to the fact that the BT on my notebook is built in and not USB...
Good luck!
found this:
Bluesoleil
http://www.bluesoleil.com/download/index.asp?topic=bluesoleil6x
It has a Dialer plugin.
Have not tried it yet but if someone has please let us know.

[Q] android can be used as a modem?

i want to making trial with my x10 mini pro.
What do you think I could make as a sender and receiver sms via com port and AT COMMAND?
but without application like airdroid.​
regard.
zigots007 said:
i want to making trial with my x10 mini pro.
What do you think I could make as a sender and receiver sms via com port and AT COMMAND?
but without application like airdroid.​
regard.
Click to expand...
Click to collapse
Your best bet is probably using your Bluetooth. We have bought HC-05 bluetooth serial port profile (SPP) for communication over bluetooth (ebay HC-05 and you'll find it). BT is a kind of interesting protocol in that the BT module itself can handle as much or as little as it wants. In our case, it handles handshaking and pairing as well as a few other things but it only has firmware for serial ports. If you want something else like an HID profile you will want to find a different module.
As for doing it without an application, that's rather difficult if not impossible. Why not just write a Service that listens in on SMS broadcasts (no different than writing a simplistic SMS app) and then transmitting it over your Bluetooth connection (which will also be managed by your service).
Edit: I should specify that you don't need an HC-05 module. We were just using it to pair and RECEIVE messages from our phone. In the case of android just use the standard BT interface provided by android.
ArcDatum said:
Your best bet is probably using your Bluetooth. We have bought HC-05 bluetooth serial port profile (SPP) for communication over bluetooth (ebay HC-05 and you'll find it). BT is a kind of interesting protocol in that the BT module itself can handle as much or as little as it wants. In our case, it handles handshaking and pairing as well as a few other things but it only has firmware for serial ports. If you want something else like an HID profile you will want to find a different module.
As for doing it without an application, that's rather difficult if not impossible. Why not just write a Service that listens in on SMS broadcasts (no different than writing a simplistic SMS app) and then transmitting it over your Bluetooth connection (which will also be managed by your service).
Edit: I should specify that you don't need an HC-05 module. We were just using it to pair and RECEIVE messages from our phone. In the case of android just use the standard BT interface provided by android.
Click to expand...
Click to collapse
can i manage the device with bluetooth?
Which device. The phone or the HC-05. Anyway if I recall, yes you can. You'll have to read the data sheet but I THINK you can put AT commands over the BT connection. Dont take my word on that though. As for controlling ur android device from the HC-05, yea. Just listen to the serial port on ur phone app and do whatever depending on the incoming serial stream.
Sent from my SGH-I747M using xda app-developers app

Categories

Resources