Saturday, October 25, 2008

Bluetooth Headset with Web Browsers and etc in MacOSX

It is weird that MacOSX does not have a good support for Bluetooth. I
have just bougth Sony Wireless Stereo Headset (Bluetooth) DR-BT22 from a
Sony Style store. My operating system version is MacOSX 10.5.5. By
default, this headset works well with Skype, X-Lite (an VoIP phone
software), iTunes (both local mp3 files and online radio), Quicktime, and
other standalone applications. However, I cannot listen to any online
music through any web browser (I tried Safari, Opera and Firefox). What
happened is that all the online music stopped working at all.

The problem is that I can't listen to any online music through any web
browser with my Bluetooth headset.

Luckily, I found this article:

http://macosx.com/forums/hardware-peripherals/296416-problems-using-bluetooth-headset-mac-audio.html

Here is the essential part of the article:
--------------------------------------------------------------------
First, 2 files needed,

a. a2dpcastAudioDevice.tgz:
http://www.coolatoola.com/a2dpcastAudioDevice.tgz

b. the updated a2dpcast: http://www.coolatoola.com/a2dpcast-0.3.zip

Then run terminal from Application/Utilities/terminal and install the
kernel extension for the audio device (replace DOWNLOAD_DIR with the path
to where your browser downloads stuff to) - you need your admin password
to do sudo:

1. cd /
2. sudo tar xfzp DOWNLOAD_DIR/a2dpcastAudioDevice.tgz --same-owner
3. sudo kextload /System/Library/Extensions/AudioReflectorDriver.kext


Copy a2dpcast to /usr/local/bin (replace A2DPEXTRACTDIR with the path to
where your extracted the downloaded a2dpcast-0.3.zip) - you need your
admin password to do sudo:

1. sudo cp A2DPEXTRACTDIR/a2dpcast-0.3/a2dpcast /usr/local/bin

Run a2dpcast with your Bluetooth address

1. /usr/local/bin/a2dpcast aa-bb-cc-dd-ee-ff 27

Keep a2dpcast running, leave the terminal open, then run whatever program
that you want, the sound will be streamed automatically to your headset.
Again, do not close the terminal until you have enough enjoying your
bluetooth headset
--------------------------------------------------------------------

To get your mac address of your Bluetooth Headset, you can go to:

Finder > Applications > Utilities > System Profiler > Bluetooth

There you find your headset model and the mac address of your headset is
there.

Hope that help!

Saturday, October 4, 2008

Windows XP Pro and IIS 6 Limitation as a Web Server

Recently, a server of our client was crashed due to an infection.  It is a Window$ 2003 Server.  We had to put the website back to the Internet as fast as possible.  To save time, we decided to set up the temporary website on a Windows XP Pro machine available at that time.  And this was our wrong decision.

After we had finished set up this temporary server on Windows XP Pro.  We made the website went LIVE.  Just a few minutes after, we then tried to browse the website.  What we saw is the website with a number of missing images.  And if we used 2 (or more) browsers to access the website at the same time (or almost the same time), we will get HTTP 403.9 error (Access Forbidden: Too many users are connected Internet Information Services).

This fucked us up (although everything had already been fucked up by the infected server).
Fortunately, we found this article:

http://weblogs.asp.net/cazzu/archive/2003/10/10/31476.aspx

In summary, IIS on Windows XP Pro, by default, it can accept only 10 connections at the same time.  However, there is a trick by running:

c:\inetpub\AdminScripts\adsutil set w3svc/MaxConnections 40

which will make IIS on XP Pro passes its limitation.  It can now accept 40 connections at the same time (but unfortunately 40 is the limit).

This saved us for a few hours and then we set up a new machine with Windows 2003 to solve the problem for real.

Note that a normal web browser when we use it to browse a webpage, it will create multiple connections to get several parts of the webpage in parallel which means 1 browser may create 2 (or more) connections to the webserver.

Window$ Bastards!