Page : 1/168

First Page    Prev. Page    Next Page    Last Page


Thursday, 19 Jan 2012

I have recently spent a considerable amount of time trying to work out why the read rate of my Netgear ReadyNAS Duo (using CIFS/SMB) was only giving me around 10MB/s. As this (well 12.5 MB/s to be precise) roughly works out at 100Mbps I figured it was clearly a networking issue. I tried all manner of things including playing with cables, network switches, driver versions, Flow Control, Jumbo Frames, TCP Offloading.. all of these had some effect on the transfer but not significantly enough to make the network card work harder than 10% of its full capacity. I have no other gigabit devices on my network so testing was rather tricky but I eventually managed to eliminate everything but the network card and the ReadyNAS.

Others who also had this device were reporting perfect speeds with it, so I became a bit attached to a forum post blaming Windows 7 for giving slow network performance (Why is Windows 7 so slow in copying network files?) particularly given a large percentage of the users listing their network hardware mentioned "realtek". As a result of one of the posts I even ended up buying a new gigabit network card:
There was a windows update that changed the driver a few months ago and I had problems after that (Realtek driver update for Realtek PCIe GBE Family Controller 10/25/2010).

Then I found a chart that seemed to reproduce my issue quite nicely:

Source: SmallNetBuilder.com

Others I knew to have a ReadyNAS, so I then asked them to specifically test large files over SMB. They reported that though AFP transfers were fine, they too had an issue with SMB.

With a bit of searching, in the end it turned out to be the ReadyNAS' most recent firmware (V4.1.8) that introduced this problem.

Hidden away in the "Performance" section of the ReadyNAS forums is Performance halved at a stroke (ReadyNAS Duo, 4.1.8) ... and Performance drop after update to 4.1.8 Duo apparantly the issue started somewhere between the last beta of 4.1.8 (T9) and the final release of 4.1.8 (Lion, AFP, 4.1.8-T9 vs 4.1.8).

The current public beta (test software version) fixes for not only me but also others according to 4.1.9 T2 Performance as for a test version 3 (T3) : "No T3 right now." (Source). You can download the test version here : *NEW BETA* RAIDiator 4.1.9 and I believe you should be able to downgrade. The current change log for it is the following:

Bug Fixes since RAIDiator 4.1.8

1. [T2] Fixed performance problem reported by forum members, specifically folks using the ReadyNAS over AFP.

I do not even use AFP, but I certainly found my SMB/CIFS read performance to be improved to a more healthy 29MB/s after trying the second test version of 4.1.9.

Saturday, 7 Jan 2012

Finally I received a notification that a software update (2 actually) was available for my unbranded HTC Desire S Europe version (x.xx.401.xx).

Update 1:

System Upgrade
Update: Improve system performance

System upgrade1.47.401.4 (35.39 MB)

We would recommend using a free Wi-Fi hotspot or an unlimited data plan to apply this update. If not, standard data connection charges may apply. Any questions? Contact us via http://www.htc.com/www/CA_Hotline.aspx

I was previously running:

Software Version : 1.28.401.99 CL24343 release-keys
Radio Firmware : 20.28b.30.0805U_38.03.02.11_M
Bootloader : 0.98.0000

The update took me up to:

Software Version : 1.47.401.4 CL78999 release-keys
Radio Firmware : 20.28I.30.085AU_3805.06.02.03_M
Bootloader : 0.98.0002

and took 11 minutes and 55 seconds to run once downloaded.

The manual download link was : http://fotadl.htc.com/OTA_Saga_HTC_Europe_1.47.401.4-1.28.401.1_release_1995996yr4vjvs0uio160x.zip

Update 2:

Then after updating there was another update available:

System Upgrade
Update: Android 2.3.5 update with HTC Sense 3.0 227.04 MB

You can now download the latest software update for new features and improved performance. It won't delete any of your content and we'd recommend using a Wi-Fi connection as this is a large update. If not, standard data connection charges may apply. Any questions? Contact us via http://www.htc.com/www/contact/call-us/

This left me with:

Software Version : 2.10.401.8 CL156318 release-keys
Radio Firmware : 20.4801.30.0822U_3822.10.08.04_M
Bootloader : 2.00.0002

and took 15 minutes and 22 seconds to run once downloaded.

The manual download link was : http://41.185.19.162/OTA_Saga_S_HTC_Europe_2.10.401.8-1.47.401.4_release_225210uj1q93xrps74xzje.zip

Further information about what patches these files contained (and the full files it added or completely replaced) can be found by going through the ZIP files.
The HTC Desire S does not appear to support 5GHz wireless, only 2.4GHz. If connecting to a 2.4GHz 802.11n capable router then it appears to be incompatible with 40MHz channel width configurations and will be unable to use the extra width on this channel. This was tested on a Linksys E3000.

Information about your phone's status can be found by dialling the number *#*#4636#*#* selecting "Wifi information" -> "Wi-Fi Status" and tapping "Refresh Stats", you should see the maximum "Link Speed" of "72 Mbps" (which is the maximum you can get from a 20MHz wide channel on 802.11n).

Wednesday, 4 Jan 2012

Further to UPnP, IP Addresses and C# I have now updated the code to automatically detect the routers' address and it now should support more devices.

Many thanks to the code at The Code Project - NAT Traversal with UPnP in C# which helped diagnose why it wasn't working. It turns out the VirginMedia SuperHub (made by Netgear) has not only case-sensitive URLs but also required the "ContentType" to be set for it to even accept our connection.

Here is the updated method (for if you already know the UPnP URL to query) :

        public static string getIPAddressFromUPnP(string UPnPServiceURL)
        {
            // Tell C# not to bother confirming hosts are available before sending data.
            ServicePointManager.Expect100Continue = false;

            WebRequest request = WebRequest.Create(UPnPServiceURL);
            
            // This is a HTTP POST message.
            request.Method = "POST";

            // SOAP dictates that we add the action (or method to involve) to/in the headers.
            request.Headers.Add("SOAPAction", "urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress");

            // The VirginMedia SuperHub requires this or it will refuse to respond.
            request.ContentType = "text/xml; charset=\"utf-8\"";

            // The payload we will be sending to the above SOAP method.
            byte[] requestBytes = new ASCIIEncoding().GetBytes("<?xml version=\"1.0\"?>\r\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><SOAP-ENV:Body><m:GetExternalIPAddress xmlns:m=\"urn:schemas-upnp-org:service:WANIPConnection:1\"/></SOAP-ENV:Body></SOAP-ENV:Envelope>");

            // Send the requestedBytes in their entirety.
            using (Stream dataStream = request.GetRequestStream())
            {
                dataStream.Write(requestBytes, 0, requestBytes.Length);
            }

            // Read the response into an XmlDocument so that we can easily read the result (and ignore all the XML tags).
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd());

            // Return just the inner text (and ignore all the XML tags).
            return xmlDoc.InnerText;
        }


but here is my modified discovery code (for if you don't):

        public static string DiscoverUPnPServiceURL()
        {
            // If we do not recieve a response within 3 seconds then this will throw an exception instead of blocking.
            using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp) { ReceiveTimeout = 3000 })
            {
                // Allow this socket to broadcast.
                socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);
                
                // Send the actual UPnP Discovery packet.
                socket.SendTo(Encoding.ASCII.GetBytes("M-SEARCH * HTTP/1.1\r\n" +
                "HOST: 239.255.255.250:1900\r\n" +
                "ST:upnp:rootdevice\r\n" +
                "MAN:\"ssdp:discover\"\r\n" +
                "MX:3\r\n\r\n"), new IPEndPoint(IPAddress.Broadcast, 1900));
                
                // Space to store the incoming data.
                byte[] receiveBuffer = new byte[0x1024];

                // The number of bytes we read into the buffer.
                int bytesRead = 0;

                do
                {
                    try
                    {
                        // Read some bytes from the socket into the buffer (remembering how many we read).
                        bytesRead = socket.Receive(receiveBuffer);
                    }
                    catch (SocketException)
                    {
                        // Errors aren't important at this stage but they are catastrophic for this method.
                        return null;
                    }

                    // Convert the bytes of the response into characters.
                    string response = Encoding.ASCII.GetString(receiveBuffer, 0, bytesRead);

                    // Was the response from a rootdevice or are we awaiting more data?
                    if (response.ToLowerInvariant().Contains("upnp:rootdevice"))
                    {
                        // Extract the UPnP "Description URL" XML it is directing us to.
                        Match location = Regex.Match(response, "location:(?: )?(?<Host>http://.*?)(?<DescriptionURL>/[a-zA-Z0-9-./:]*)", RegexOptions.IgnoreCase);

                        // Ask GetServiceURL to return the actual UPnP "Service URL" we can interact with from the Description XML.
                        return location.Success ? GetServiceUrl(location.Groups["Host"].Value, location.Groups["DescriptionURL"].Value) : null;
                    }

                } while (bytesRead > 0);
            }

            return null;
        }

        private static string GetServiceUrl(string host, string descriptionURL)
        {
            XmlDocument xmlDocument = new XmlDocument();

            // Load in the UPnP Description XML document.
            xmlDocument.Load(WebRequest.Create(host + descriptionURL).GetResponse().GetResponseStream());

            // Add a target namespace so that we can refer to elements contained within the XML document easily.
            XmlNamespaceManager xmlNamespaceManager = new XmlNamespaceManager(xmlDocument.NameTable);
            xmlNamespaceManager.AddNamespace("tns", "urn:schemas-upnp-org:device-1-0");

            // Is this an InternetGatewayDevice? (we are wasting our time if not).
            if (!xmlDocument.SelectSingleNode("//tns:device/tns:deviceType/text()", xmlNamespaceManager).Value.Contains("InternetGatewayDevice")) { return null; }

            // Does this contain the WANIPConnection service?
            XmlNode node = xmlDocument.SelectSingleNode("//tns:service[tns:serviceType=\"urn:schemas-upnp-org:service:WANIPConnection:1\"]/tns:controlURL/text()", xmlNamespaceManager);

            // Return the service URL or null.
            return (node != null ? host + node.Value : null);
        }

Saturday, 17 Dec 2011

I have just been reading about Philips' latest breakthrough. Seemingly the result of a $10 million US competition :

"The new Philips EnduraLED A21 17-watt light bulb is the first LED equivalent to 75-watt incandescent bulbs, and it will consume 80 percent less energy than its outdated predecessor. The new bulbs last 25 times longer than normal incandescent bulbs, marking another important milestone technological achievement everyday LED residential use"
http://inhabitat.com/philips-to-unveil-the-worlds-first-led-replacement-for-the-75-watt-bulb/

US reviews of the 60w (uses 12w) equivalent seem positive:


They recently announced a 100W replacement. Unfortunately the technology doesn't seem to be economically viable at the moment as commercially available on Amazon in the UK only appears to be the EnduraLED for £34 (source) or directly from Philips for £54.99 (source). This is far too expensive for a bulb currently.

The Philips website currently lists some of their older and far less brighter bulbs but does list some of the MasterLEDs for corporate customers.

Searching on the Internet seemed to also reveal Philips cannot quite decide on a name for their technology, I have seen "AmbientLED", "MyAmbiance", "EnduraLED" and "MasterLED". The differences (if any) are not immediately apparent.