Saturday, October 22, 2011

Huawei E367 on linux

The Huawei E367 modem is a fast USB modem for 3g connectivity. It worked  out-of-the box when connected to Telkom's 8ta service via a TP-LINK router. However when I attempt to use the modem directly (i.e. not through the router) I got the following error when installing the module:

FATAL: module vendor=0x12d1 not found

Fortunately getting the E367 to work on a linux box takes only about five minutes of effort. It requires the installation of the "modeswitch" package, configuration of the "modeswitch data", installation of the module and the usual setting up of the connection.

Install the "modeswitch" package (using apt, yum etc.) . At this stage installing the  package will not necessarily solve the problem as the details of the vendor and product have yet to be added to the configuration. As root edit the file:

'/etc/usb_modeswitch.conf" (Debian systems).

Append the following text to that file.


########################################################
# Huawei E367

EnableLogging=1

DefaultVendor= 0x12d1
DefaultProduct=0x1446

TargetVendor=  0x12d1
TargetProductList="1001,1406,140b,140c,1412,141b,14ac,1506"

CheckSuccess=20

MessageEndpoint= 0x01
MessageContent="55534243123456780000000000000011062000000100000000000000000000"

##############################################################

Now, with the modem attached, run (as root) the command
"usb_modeswitch"

You should not have another usbserial device running so unplug it or run the command "rmmod usbserial".

At this stage you need to install the E367 module, as root do a:
 "modprobe usbserial vendor=0x12d1 product=0x1506"

(or change product code as reflected by the command "lsusb").



You may now configure the modem using NetworkManager or whatever other system you use. For 8ta this usually requires indicting only the dial number *99# and the APN as "internet".

For full instruction see:
http://www.zeroshell.net/eng/forum/viewtopic.php?t=2986

Monday, October 3, 2011

Tornadoes in South Africa

Recently I had to estimate the probability of a tornado damaging a school in South Africa. The issue was made all the more topical by the appearance of two destructive tornadoes on 2 October. The one occurred in Duduza in the east rand and the other half way across the country in Ficksburg.  Was this a freak incident or are tornadoes a greater danger than we suppose? Drawing on a study by Milford and Goliger 1997 it would appear that approximately 15 destructive (greater than force F0) tornadoes occur each year on average.

The graphic below shows the Milford and Goliger's estimates of the likelihood a tornado occurs (in a given year) in any 1km square area of the country. The likelihood ranges from an effective 0 in the Western and Northern Cape, through one in 100 000 in the Eastern Cape and Free State (including Ficksburg). The likelihood increases to one in 10 000 in parts of Gauteng and the KwaZulu Natal midlands (including Duduza).


The vast majority of Tornadoes  go unreported as they occur in the sparsely populated areas - like large tracts of the Eastern Cape and Free State. Given that only about 15 destructive tornadoes occur each year  the occurrence of two tornadoes in populated areas on the same day would be highly unusual. However there is some doubt as to whether  the two could be classified as F1 or higher. F0 tornadoes are unlikely to damage permanent structures. Usually the  damage associated with F0 tornadoes are the result of peripheral damage - like tree branches falling onto houses. Unfortunately if a F0 tornado is able to topple an old tree or break  branches off they are more than likely to be able to level shacks in Duduza or force poorly built structures to collapse.

The two incidents may thus say more about the quality of housing than they do about the prevalence of tornadoes.

Saturday, October 1, 2011

Service delivery protests: a new trend?

In early September two violent "service delivery" protests took place in Gauteng. The first was in Thembalihle informal settlement outside Lenasia, the second was in Tembisa on the east Rand. Although media coverage treated the two protests as similar, dubbing them "service protests", they have very different origins and profoundly different implications for the political future of the province.

Thembalihle

The Thembalihle protests were the latest resurgence of a dispute that started at least two decades ago. This is an informal housing  settlement located adjacent to Lenasia. However the settlement is located on land unsuited for habitation or development. Much of the ground in the region is dolomitic and prone to developing sinkholes which pose an ongoing threat to life and property. However sinkholes occur infrequently and thus do not appear, at least to Thembalihle residents, to present an imminent danger. Subsequently when Thembalihle residents  contrast their service levels and the level of investment in infrastructure to that of their middle class Lenasia neighbours they feel aggrieved. It is these grievance that are at the root case of the periodic protests.

The Johannesburg Metro Council, which is responsible for failing to prevent the repeated resettlement of the area now seeks, once again, to relocate the residents to geologically stable land about 10km away. As the the proposed resettlement area is far from shops, amenities, employment opportunities and the social connections offered by Lenasia few Thembalihle residents are happy to be resettled. Unfortunately the geological conditions preclude significant investment in the Thembalihle and it is improbable that grievances about service levels and investment levels will be addressed. The capital investment required to assuage grievances can well be considered as wasted investment or, even worse, a means of encouraging the settlement on unstable land.

Thembalihle residents are thus faced with the option of relocating or to continue occupying the unstable ground. If the council does make a serious attempt to relocate residents a breakdown in the relationships between council and residents may ensue. If residents wish to remain in the area in the face of such a resettlement drive they will possible make the area a no-go zone as far as the council is concerned.

However residents creating a no-go area for the council and, possibly,  rendering the area ungovernable is not he worst case scenario being faced. The latter is represented by accelerated sinkhole activity. Although the informal settlement has been geographically stable for some time the  decline of  mining activity in the larger region has resulted in a rapidly rising water table. Moreover the water now entering the dolomitic deposits is highly acidic - it is the infamous "acid mine water" about which several  apocalyptic  predictions centre. These two factors (the rising water table and its acidity) promise a marked increase in sinkhole activity - and there is little doubt that Thembalihle residents now face increased risks.

The protests in Thembalihle represent one heritage of poor urban management as Johannesburg Metro Council has never demonstrated the political will to ensure that the area is not used for housing. Resettlements that took place in the past were all accompanied by an immediate resettlement of the land. The failure of adequate urban land management gives rise to the current impasse as grievances cannot be addressed (at least not safely).

Fortunately the disputes in Thembalihle are sure to remain localized, however the same can not be said of the protests at Tembisa.

Tembisa

Tembisa  represents a dramatically different situation and has far more wide ranging implications.  In Tembisa protests were sparked less by the absence of services than by the poor quality of the services and the cost of those services. Residents  cited many grievances but most prominent among their grievances was the rapidly rising cost of electricity. This was blamed, variously, on "overcharging" by the council and the installation of pre-paid meters. The impact of electricity prices and suspicions about Ekhuruleni metro Councils efficacy was most vividly expressed by calls that ESKOM be made the service electricity provider.

This latter demand seems to have been particularly misguided. City councils merely resell electricity bought in bulk from ESKOM. The prices of many services provided by the state (electricity, gas, water, road tolls, license fees) are determined administratively i.e. they are determined by the interaction of supply and demand in a competitive setting but on consideration of other issues. The other considerations include the need to provide free basic services, redress of inequities in service levels, affordability and the need to recoup costs. In other words prices are set by political consideration rather than by markets. Be this as it may the costs of services still have to be recouped from either the fiscus or from other taxes or charges.

In recent years administrative charges have been rising more rapidly than market-related prices. In March this year Business Day gave the example:

"... (in the) last month administered prices rose twice as much as general services and three times as much as the average price of consumer goods".

As ESKOM seeks to fund massive new capital projects increases in the price of electricity has been particularly pronounced. These price increase of approximately 25% each year for four years in a row is not exclusively due to capitalisation costs. They have been prompted by the need to (temporarily at least) reduce electrify consumption and pay very lucrative salaries in the parastatal. Recent reports indicate that the average salary in ESKOM  is well in excess of R500 000 per annum. This is more than ten times the value of South Africa' per capita GDP (which, in turn, is higher than average wages).  ESKOM is not alone in presenting massive wage bills. In the three years leading to 2010 the total municipal wage bill rose by 54%. Over this period the total number of municipal employees rose by only 5% indicating that average remuneration in municipalities is rising rapidly . All these costs - capitalisation costs, wage bills etc. have to recouped from consumers - hence the pressure of administered prices. These factors ensure that the cost of municipal services like electricity will continue to increase at above the rate of inflation - irrespective of whether the services are provided by the council or another service provider (like ESKOM).

The Tembisa protests indicate that those setting administrative prices have misread the willingness of township residents to bear the ever increasing remuneration and other costs.

Ultimately this is a political misjudgement by the elected representatives and by those appointed to oversee the provision of essential services. If the political representatives have indeed misread the willingness of consumers to absorb ever-increasing costs, as the Tembisa protests imply, then the latest protests  may just be the first of many against the price of services.  Perhaps we have entered a phase where an increasing proportion of public protests will centre not on the failure to deliver services but on the costs of those services.


What unites the Tembisa and Themblihle protests is the underlying lack of faith residents have in the metropolitan councils. In Thembalihle residents distrust the argument about the impact of dolomite as they witness better services and  infrastructure across the road in Lenasia. Moreover they have not recently been affected by sinkholes. Much of the anger in Tembisa has been brought on by the belief that the council is overcharging them for electricity (hence he call for ESKOM to take over). Ultimately the combination of misjudgement by those setting prices and reservations about the integrity of elected representatives suggest that the issue of public order policing will become even more prominent in the years to come.