Page 3 of 13 FirstFirst 123456789101112 ... LastLast
Results 21 to 30 of 122

Thread: bluetooth woes

  1. #21
    Newbie
    Join Date
    Feb 2007
    Posts
    5
    Zimans, could you tell me what I need to compile your app? Not sure if I have all the correct libs.

    Do you possibly have a x86 binary?

    Thanks in advance.

  2. #22
    Low Bitrate
    Join Date
    Sep 2005
    Posts
    82
    Zimans, how is latency with your prog? I have quite a bit of delay but I suspect that's because aplay might be buffering it a little before playing it. Or maybe the pipe is buffering it. Anybody know how to prevent a pipe from buffering?

  3. #23
    Newbie Zimans's Avatar
    Join Date
    Jan 2006
    Posts
    38
    Quote Originally Posted by OLAS View Post
    Zimans, could you tell me what I need to compile your app? Not sure if I have all the correct libs.

    Do you possibly have a x86 binary?

    Thanks in advance.
    The lib you are probably missing is libiax. You need to get the version from svn at digium, as the released libiax is depreciated.

    here is the svn link. (Or should be)

    svn co http://svn.digium.com/svn/libiax2/trunk/

    Also, I forgot to include an example conf file.

    biax.conf

    it looks for /usr/etc/biax.conf

    Quote Originally Posted by gentoocar View Post
    Zimans, how is latency with your prog? I have quite a bit of delay but I suspect that's because aplay might be buffering it a little before playing it. Or maybe the pipe is buffering it. Anybody know how to prevent a pipe from buffering?
    I can only guess, but I believe my app is pretty quick. Asterisk sends me 320 bytes at a time, so I buffer and send 320 bytes at a time in return. This makes asterisk happier than sending smaller chunks. 320 bytes = 50ms.

    FYI Sco data comes in chunks of 48 bytes. I buffer what I get from asterisk and send 48 bytes for every 48 bytes I get from the phone. Asterisk really handles all the timing.

    When I called my GF's phone using the setup, there was a delay between 0.5 and 1 second. But there are alot of sources of delay in the chain (PAP2, Asterisk, Phone Network, GSM network) WHen I make regular calls it really is no different then when I'm talking on the phone normally).

    --Zims
    --------------------------------------------------------------------------------
    Now, Where are my Pants?

  4. #24
    Newbie
    Join Date
    Feb 2007
    Posts
    3

    audio problems!!

    Hey everybody!!

    I am also interested in using my pc as a handsfree with bluetooth!!
    So far i get connection with my mobile phone but my sound seems to have some kind of problems because i get the next result;

    [root@wireless-10-12-9-46 handsfree]# ./handsfree 00:16:75:99:4d:61 8
    Voice setting: 0x0060
    RFCOMM channel connected
    sending.cmd AT+BRSF=31
    poll descriptors count 1
    poll descriptors count 1
    >>
    +MBAN: Copyright 2000-2002 Motorola, Inc.

    +BRSF: 63

    OK

    boo.
    sending.cmd AT+CIND=?
    >>
    +CIND: ("Voice Mail",(0,1)),("service",(0,1)),("call",(0,1)),("Ro am",(0-2)),("signal",(0-5)),("callsetup",(0-3)),("smsfull",(0,1))

    OK

    sending.cmd AT+CIND?
    >>
    +CIND: 0,1,0,1,5,0,0

    OK

    sending.cmd AT+CMER=3,0,0,1
    >>
    OK

    sending.cmd AT+CMER=3,0,0,1
    >>
    OK

    sending.cmd AT+CLIP=1
    >>
    OK

    sending.cmd AT+NREC=0
    >>
    OK

    sending.cmd AT+CHLD=?
    >>
    +CHLD: (0,1,1x,2,2x,3,4)

    OK

    0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005 0005
    5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
    maxbuf: 2730
    0 0 0 0 0 0 0 0 960 0 0 0 0 0 0 0
    indicator 0
    check: total 960, middle 960, fraction 100 % val 1
    adj=0
    .run
    write to audio interface failed (Too many open files)
    .run
    write to audio interface failed (Invalid cross-device link)
    0 0 0 0 0 0 0 0 936 0 0 0 0 0 0 0
    .run
    write to audio interface failed (Invalid cross-device link)
    .run
    write to audio interface failed (Device or resource busy)
    .run
    write to audio interface failed (Not a directory)
    .run
    write to audio interface failed (Invalid cross-device link)
    .run
    write to audio interface failed (Not a directory)
    .run
    write to audio interface failed (Too many open files)
    lost sco audio connection (-1 107)!
    listening s set up.

    At the end of this process i check my mobile phone and it is said that the phone is connected to a handsfree device. However if i make a phone call the only thing i get from the prompt is that i had a "Segmentation fault".

    Any idea of what could be wrong? i am working with mandriva 2007 and i checked my alsa drivers.

  5. #25
    Low Bitrate
    Join Date
    Sep 2005
    Posts
    82
    Quote Originally Posted by iban View Post
    Hey everybody!!

    I am also interested in using my pc as a handsfree with bluetooth!!
    So far i get connection with my mobile phone but my sound seems to have some kind of problems because i get the next result;
    Yes, that's exactly what I got. So I commented out all of the alsa-related calls and instead just wrote the sco data to /tmp/audioOut (which I created with mkfifo). Then I did aplay -f S16_LE /tmp/audioOut, and I can hear audio, albeit with some lag and random crashes.

    Rewriting this may have to wait a few days, as I just got a new car yesterday (03 passat glx ) and will have to play around with it a little...

  6. #26
    Newbie
    Join Date
    Jun 2003
    Posts
    35
    Thanks to you all, I have handsfree connecting to my phone now. It appears as though an active connection is required for 'hcitool con' to return any data for my phone. To be honest, I have not used handsfree since I had originally attempted back at the beginning of December. Now, after simply running 'handsfree [address] [channel]', my phone connected, Bluetooth icon appears on the phone. In terms of audio, I get tones (ie pressing buttons), but audio playback doesn't come through. Still looking into that.

    To get this to work, all I did was place the command 'sdptool add hf' in my local initialization script, configured hcid.conf, and started the Bluetooth init script. Then simply executed handsfree as above.

    I am using gentoo as well, with bluez-utils 2.25-r1, bluez-libs 2.25, and a 2.6.19-rc5 kernel. I am beginning to think an update to bluez is what got this to work better. I did not make any changes to the code, nor did I 'mkfifo /tmp/ctrl' yet. Also, it seems there is a lot of Bluetooth in the kernel now, and that the latest kernel patch is for 2.6.19, though I did a quick grep and think I don't have the latest patch. 2.6.20-rc6-mm3 does however have the latest patch, but I haven't compiled this kernel yet.

    In the meantime, I've been attempting to setup DUN via Sprint, but haven't had enough time yet.

    This is great how many people are interested in using Bluetooth on Linux, and the potential for progress seems great.

  7. #27
    Newbie
    Join Date
    Feb 2007
    Posts
    3
    Thanks gentoocar!

    I did mkfifo /tmp/audioOut and aplay -f U8 /tmp/audioOut but i still get the next result ( i am just posting the most relevant part so it is not too long):

    sending.cmd AT+CHLD=?
    >>
    +CHLD: (0,1,1x,2,2x,3,4)

    OK

    fff7 fff8 fff8 fffb fffd ffff 0000 0001 0002 fff1 fff3 fff5 fff6 fff7 fff8 fffa fffc fffe 0000 0001 0002 fff0 fff2 fff4
    -9 -8 -8 -5 -3 -1 0 1 2 -15 -13 -11 -10 -9 -8 -6 -4 -2 0 1 2 -16 -14 -12
    maxbuf: 2730
    0 0 0 0 0 0 0 0 960 0 0 0 0 0 0 0
    indicator 0
    check: total 960, middle 960, fraction 100 % val 1
    adj=0
    0 0 0 0 0 0 0 0 936 0 0 0 0 0 0 0
    lost sco audio connection (-1 107)!
    listening s set up.

    I am using U8 because i think is the pcm code way of coding the audio. You used S16_LE, i also tried with this one but i even get more errors.

    So any idea how to solve this lost sco sudio connection?

    Thanks a lot !!

  8. #28
    Newbie Zimans's Avatar
    Join Date
    Jan 2006
    Posts
    38
    What Bluetooth chips are people using?

    I have a Broadcom based adapter and I needed to patch the kernel to get SCO audio out to work. I could receive audio, but not send.

    Just an FYI as people troubleshoot.

    --Zims
    --------------------------------------------------------------------------------
    Now, Where are my Pants?

  9. #29
    Low Bitrate
    Join Date
    Sep 2005
    Posts
    82
    Quote Originally Posted by iban View Post
    lost sco audio connection (-1 107)!
    listening s set up.

    I am using U8 because i think is the pcm code way of coding the audio. You used S16_LE, i also tried with this one but i even get more errors.

    So any idea how to solve this lost sco sudio connection?
    The lost sco audio connection stuff is not an error, that is normal. You said when you used S16_LE you got even more errors... you mean from aplay? Also, without modifying the code /tmp/audioOut is not used at all... that's just something I added to mine.

  10. #30
    Low Bitrate
    Join Date
    Sep 2005
    Posts
    82
    It's great to see so many people interested in this. I think I will create a SF site tonight to host this project. Any ideas for a name? I was thinking "Handsfree 2" but that's a little lackluster...

Similar Threads

  1. Bluetooth woes!
    By daveg360 in forum Wireless Communications
    Replies: 1
    Last Post: 10-02-2005, 12:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •