pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: comms/bthfp floating point exception



On Sunday 10 December 2006 11:56, Iain Hibbert wrote:

> thats cool, you get mouse and keyboard from your phone [00:0f:de:a7:e7:04]?

Yes, but there's no way to use the keyboard mode, mouse mode works
perfectly :-)

> > btsco0 at bthub0 remote-bdaddr 00:0f:de:a7:e7:04 listen mode channel 5
> > audio1 at btsco0: full duplex
> > btsco1 at bthub0 remote-bdaddr 00:0f:de:a7:e7:04 channel 4
> > audio2 at btsco1: full duplex
>
> [btw for bthfp you don't need to configure btsco devices, it handles the
> audio connection with an SCO socket]

Ok!

> I guess this is on incoming call? (+CIEV: 3,1)

Yes.

> The only arithmetic that I can think of is when an incoming SCO connection
> is detected (ie the phone opens an audio link to send the ringtone) then
> we round up the blocksize on the audio device to make it easier to copy
> the SCO packets into audio blocks exactly:
>
>       blocksize = (info.blocksize / mtu + 1) * mtu;
>       info.blocksize = blocksize;
>
> - this should not be (?) floating point but it will occur when an
> incoming call is detected. perhaps you could put a 'printf' before and
> after this and see if that catches it?
>
> iain

Yeah, the error was the first line you showed:
Handsfree channel: 4
Press ? for commands
Connecting.. ok
Features: 0x01f7
Service Level established
accept_sco: blocksize=0 info.blocksize=800 mtu=0
zsh: floating point exception (core dumped)  sudo ./bthfp -a xtraeme -s 5

Core was generated by `bthfp'.
Program terminated with signal 8, Arithmetic exception.
#0  0x08049cd4 in accept_sco (fd=1, ev=2, arg=0x0) at bthfp.c:544
544             blocksize = (info.blocksize / mtu + 1) * mtu;
(gdb) bt
#0  0x08049cd4 in accept_sco (fd=1, ev=2, arg=0x0) at bthfp.c:544
#1  0xbbbe57ec in event_base_loop () from /usr/lib/libevent.so.1
#2  0xbbbe595f in event_loop () from /usr/lib/libevent.so.1
#3  0xbbbe597e in event_dispatch () from /usr/lib/libevent.so.1
#4  0x08049571 in main (ac=5, av=0xbfbfeb48) at bthfp.c:280
(gdb)

blocksize and mtu are 0!

-- 

http://plog.xtrarom.org/
Juan RP's blog - NetBSD/pkgsrc news in Spanish



Home | Main Index | Thread Index | Old Index