Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

opening a new bluetooth serial port and transmitting sound

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-20-2009, 08:59 PM
Newbie
 
Join Date: Jan 2008
Posts: 3
Default opening a new bluetooth serial port and transmitting sound

Hi,
I am trying to open a port on a bluetooth enabled device to transmit sound to a bluetooth headset. I have read many of the posts concrning opening a port and transmitting text, but does anyone know how I can take one of the B4ppc examples that are on the forum, and change it to transmit sound instead of text? Any help will be greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 06-21-2009, 05:03 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 592
Awards Showcase
Beta Tester 
Total Awards: 1
Default

You don't need to make a connection with b4ppc to the headset.

Use BTio from here btIO - WM5 Tray Bluetooth Mode Switcher
Pair the headset with your device and select 'Audio2BT' in BTio's menu.
Any sounds played within your b4ppc app, eg sound("ding.wav")
will be played throught the Bluetooth headset.

Edit: Totally forgot this bit.

I don't 'think' you can do what you want from within b4ppc.
It is possibly, but not without a new library (.dll)

I've looked at writing a bluetooth dll for another reason. I gave up. It's very complex.
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk

Last edited by taximania : 06-21-2009 at 06:34 PM.
Reply With Quote
  #3 (permalink)  
Old 07-01-2009, 06:00 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 592
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by taximania View Post
It is possibly, but not without a new library (.dll)
I got bored, no current project to work on. So I came back to this one.

I'd over looked the fact my headset doesn't make a noise if I receive a text message.
This is of no use to me, if I'm out of my taxi having a fag, I could be missing possible work.

I had a brainwave, considering my last post.
Use BTio.
If I get out of the car without taking my phone, use BTio's Audio2BT but I've found that my headset has constant 'white noise/hash, like turned on but with no sound'.
This sounds (hahaha, sorry) like a waste of headset battery power.

So:

Here's what I found. BTAudioOn.exe and BTAudioOff.exe
With your headset paired and connected to your device . . . . .

You can use Shell("BTAudioOn.exe","") from within B4ppc to pass all audio the the headset

And Shell("BTAudioOff.exe","") to kill it.

Simples 'English joke, ish'

Using the Outlook.dll, I can Intercept an incoming sms, eg.

Sub Intercept_MessageReceived
Shell("BTAudioOn.exe","")
Sound("whatever.wav")
Shell("BTAudioOff.exe","")
End Sub

Sorted

I'll post a few files tomorrow evening
I'm still trying to find the RegKeys that BTAudioxxx.exe use.
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #4 (permalink)  
Old 07-04-2009, 06:22 AM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 592
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Update:

I've attached the BTAudio files, they're from the xda-developers forum.
I edited my SMS received tone and added a 1 second 'silence' to the start of it.
This gives the system time to pass the audio to the headset before any sound is actually heard.
The delay (sleep(5000)) is required, or the audio is switched off before the tone has finished playing.
Set BT to 1 when bluetooth is switched on, and 0 when off. Otherwise it displays an error messagebox.

Sub Intercept_MessageReceived
if BT = 1
Shell("BTAudioOn.exe","")
sleep(5000)
Shell("BTAudioOff.exe","")
End If
End Sub

Works for me. Just thought I'd share it
Attached Files
File Type: zip btaudio.zip (4.3 KB, 18 views)
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bluetooth serial port program with Automatic Sequence repeat function. pdablue Share Your Creations 2 04-08-2009 02:10 PM
Bluetooth Serial Port communication program for the PDA. pdablue Share Your Creations 3 03-30-2009 02:45 PM
Serial Port ceaser Questions (Windows Mobile) 10 01-11-2009 03:26 PM
Use Basic4ppc to send serial data from a PDA to a BlueSMiRF Bluetooth module. pdablue Share Your Creations 3 11-19-2007 09:58 PM
Serial Port Profile & Bluetooth Paul Questions (Windows Mobile) 5 07-27-2007 04:08 PM


All times are GMT. The time now is 04:33 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0