Skip to contentSkip to conversation

Periodic noise on microphone with bt_sco (BTA-6030 Dongle, Motorola H500 Headset)

Bluez-users Dirk Stockmann 4 participants 10 messages Nov 7, 2005 – Nov 9, 2005 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have successfully compiled and installed the newest bt_sco driver and userspace programs on SuSE 10.0 (2.6.13 Kernel). And basically it works
great: playback is fine and also the microphone is working. The problem is that the sound coming from the microphone is overlayed with a annoying buzz. The buzz is not very loud but clearly hearable and quite distracting.
The base frequency of the buzz is about 266Hz. If that helps I could post a short recorded sample.
I would be very grateful to get pointers what to do to get rid of that buzz. I am a experienced programmer with some low-level kernel knowledge, so I would also invest some time in debugging if I would knew for what I should look.

Thanks,
Dirk
- --
Key can be found on:
http://sks.keyserver.penguin.de
hkp://sks.keyserver.penguin.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD4DBQFDbxw7Li2VR2b1/voRAqzKAJinAs89WaKcf2vo67gBMJbe2RLSAJwPT6wy suH7s3ULGZVkdpSWEKjNKQ==
=m6ND
-----END PGP SIGNATURE-----

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#1 lore raw

Oooh, this is just like Jeopardy.

I'll take Bluetooth for $500.

Quoted 1 line · Dirk Stockmann

... 266Hz ...

At what rate are SCO packets transmitted in an HV3 link?

What do I win?

Quoted 4 lines

I would be very grateful to get pointers what to do to get rid of that buzz. I am a experienced programmer with some low-level kernel knowledge, so I would also invest some time in debugging if I would knew for what I should look.

Based on the frequency, this looks (sounds?) like an electrical problem. Many parts of the RF will have duty cycles of 266 Hz. Even the current demand of the module will have a profile with this frequency (it may pulse from a few milliamps up to 50 milliamps at this rate, with sharp edges).

I expect you're getting pickup from the electronics on the module onto the microphone cables,or, more likely, the audio card in the PC - they're notoriously badly shielded, you can even hear when you drag a window round the screen.

I don't know if this information helps.

- Steven

Signature · 12 lines
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
maintainer
#2 lore raw

Hi Steven,

Quoted 3 lines

Oooh, this is just like Jeopardy.

I'll take Bluetooth for $500.

you just gave me an idea for another column of the conference game ;)

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#3 lore raw
In reply to Steven Singer

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Quoted 1 line · Steven Singer

At what rate are SCO packets transmitted in an HV3 link?

thanks for your reply, this is already a good hint.

Quoted 10 lines

Based on the frequency, this looks (sounds?) like an electrical problem. Many parts of the RF will have duty cycles of 266 Hz. Even the current demand of the module will have a profile with this frequency (it may pulse from a few milliamps up to 50 milliamps at this rate, with sharp edges).

I expect you're getting pickup from the electronics on the module onto the microphone cables,or, more likely, the audio card in the PC - they're notoriously badly shielded, you can even hear when you drag a window round the screen.

But when the headset is connected to my Mobile Phone there is no noise, so it is unlikely that it is related to the headset itself. And I always thought (maybe wrong?) that the processing inside of the PC is pure digital. So there should be no noise on a recorded file. Besides from that my PC has a very good audio system with no noise at all.

I think that there is a problem with the processing of the received packets that creates the spikes in the signal.

Regards,
Dirk

- --
Key can be found on:
http://sks.keyserver.penguin.de
hkp://sks.keyserver.penguin.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDb1YCLi2VR2b1/voRAioJAKCJwmgPnCv6P4jHkKbXchrcFIAm3wCcCgne bIy5t7G4WMnZhGRZXJGI6qY=
=4B9I
-----END PGP SIGNATURE-----

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#4 lore raw
Quoted 2 lines · Dirk Stockmann

But when the headset is connected to my Mobile Phone there is no noise, so it is unlikely that it is related to the headset itself.

I agree with this diagnostic. If the headset doesn't generate noise when attached to another device then the noise is probably not being inserted at the headset end.

Quoted 4 lines

And I always
thought (maybe wrong?) that the processing inside of the PC is pure digital. So there should be no noise on a recorded file. Besides from that my PC has a very good audio system with no noise at all.

Hmmm, the signal from the dongle to the PC should be digital, as should the signal from the PC to the audio card. All the processing inside the dongle should be digital too. The only analogue stage should be from the audio card to the speakers.

One way to confirm whether it's electrical is to record digital signal received from the dongle into a file, shut down the SCO link and then play the file to the PC's loudspeakers.

Are you sending a signal to the headset and, if so, are you hearing a buzz in the headset's speaker? I'm wondering if a buzz in that direction (coming from the sensitive microphone input on the PC) is being looped through the air (or through the plastic) from the headset's speaker to its microphone.

- Steven

Signature · 12 lines
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
#5 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Quoted 3 lines · Steven Singer

I agree with this diagnostic. If the headset doesn't generate noise when attached to another device then the noise is probably not being inserted at the headset end.

No noise with two different mobile phones, but with two different dongles.

Quoted 3 lines

One way to confirm whether it's electrical is to record digital signal received from the dongle into a file, shut down the SCO link and then play the file to the PC's loudspeakers.

When I record "silence" from the microphone (as silent as possible) then there is clearly the noise with about -40db power.
Is there a way to record the digital from the headset directly, before it is processed in alsa? Similar to the way hcidump works, maybe?

Quoted 5 lines

Are you sending a signal to the headset and, if so, are you hearing a buzz in the headset's speaker? I'm wondering if a buzz in that direction (coming from the sensitive microphone input on the PC) is being looped through the air (or through the plastic) from the headset's speaker to its microphone.

Sound sent to the headset from the PC (e.g. an audiobook) is without the buzz. It is quite low quality (like on a phone) but clear.

Regards,
Dirk

- --
Key can be found on:
http://sks.keyserver.penguin.de
hkp://sks.keyserver.penguin.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDb2CMLi2VR2b1/voRAsm4AJwJh4tySPRkrzk0V88aGjDqGyzZIgCfd2g8 Q9zUy5UtvCTbifPGH9nSyzg=
=ry8L
-----END PGP SIGNATURE-----

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#6 lore raw
Quoted 4 lines · Dirk Stockmann

When I record "silence" from the microphone (as silent as possible) then there is clearly the noise with about -40db power.
Is there a way to record the digital from the headset directly, before it is processed in alsa? Similar to the way hcidump works, maybe?

In theory, if you use hcidump and extract all the SCO data, you should just have raw samples which you can stitch together into a file.

You should be able to see the two directions independently and see where the noise is being introduced.

I don't know if there's a speific tool, but use hcidump -w to make a raw log and then use hcidump -x -r to read the log back later. A little bit of perl and a pass through sox should get the data into a playable format.

- Steven

Signature · 12 lines
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
maintainer
#7 lore raw

Hi Steven,

Quoted 8 lines
Quoted 4 lines

When I record "silence" from the microphone (as silent as possible) then there is clearly the noise with about -40db power.
Is there a way to record the digital from the headset directly, before it is processed in alsa? Similar to the way hcidump works, maybe?

In theory, if you use hcidump and extract all the SCO data, you should just have raw samples which you can stitch together into a file.

Quoted 7 lines

You should be able to see the two directions independently and see where the noise is being introduced.

I don't know if there's a speific tool, but use hcidump -w to make a raw log and then use hcidump -x -r to read the log back later. A little bit of perl and a pass through sox should get the data into a playable format.

I never fully tested it, but you can extract the SCO stream with -A in the latest hcidump version. It was one of my fast and ugly hacks for some security auditing of headsets at the last UnPlugFest, but we never actually came around in using it seriously.

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#8 lore raw

Hi

Quoted 7 lines
Quoted 7 lines

In theory, if you use hcidump and extract all the SCO data, you should just have raw samples which you can stitch together into a file.

You should be able to see the two directions independently and see where the noise is being introduced.

I don't know if there's a speific tool, but use hcidump -w

what about capturing audio using scotest in the bluez cvs (utils/test)? That would help us find out if we are doing something wrong in our driver.

Brad

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#9 lore raw

Re: [Bluez-users] Periodic noise on microphone with bt_sco [Solved]

In reply to Marcel Holtmann

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

first of all I want to thank everybody for the help. I learned a lot about bluetooth and finally got it working, so I am happy ;-).

I installed the newest hcidump and used the -A option to capture the sound data. It already contained the noise - so it was produced by the headset. Then I repeated the test with the mobile phone and there was also some noise - this time.
After some test (most have looked silly) I found out that it is caused by feedback between the RF, the speaker and the microphone. It disappeared when I held the headset to the ear with my hand - that must have been the case with the first test with my mobile.
I applied a small strip of self-adhesive aluminiumfoil to a specific part of the headset, the noise is now completely gone.

Dirk

- --
Key can be found on:
http://sks.keyserver.penguin.de
hkp://sks.keyserver.penguin.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDcbcHLi2VR2b1/voRAvu4AJ4jiOUWxDdmbdRhy9+yYg/9s+btfwCgzJHh n1xu77CYpfBcBHPdDyC2SwE=
=Pg/A
-----END PGP SIGNATURE-----

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users