Pleasure, mr_bean! Hope you get some use out of it..
There are lots more things that could be done on the Huawei..
The BBU port on the front needs activating. It's clearly an RS232 serial port. The port is seen by the Linux-MIPS kernel as /dev/ttyS1. However, it needs to be enabled in the firmware.[1] As yet, that hasn't been done. There are two binaries in the firmware that try to access the BBU port (/bin/monitor and /bin/equipcmd). The relevant extracts of code from those binaries have been disassembled. For those interested or with suggestions, please email.
It's a puzzle why OpenReach/Huawei ever fitted the BBU port. In early photos of the Huawei in BT's SIN 498 document [2], the BBU port is shown as a USB Type A socket.
Yet at some point, it was decided to downgrade the BBU port from USB to RS232 . A strange decision since the Linux kernel has a mature USB driver for the 63xx processor family. And modems built on that platform do normally have a USB port. Maybe BT thought that a USB port would be too alluring to meddlers and tinkerers?!
Mechanically the RS232 BBU port is presented externally as an obscure JST-XH socket. [3] That socket is apparently more commonly found in model aircraft where it connects servo power packs. Perhaps Huawei had a surplus dustbin full of the connectors. And where better to dump them than on Blighty Telecom!
That xdslcmd command discussed above can supply a huge amount of different statistics, including individual bit depths and SNRs for each of the subcarriers. There are too many stats to manually analyse from their numerical values alone. The stats need to be graphed. That could be done on the Huawei itself. The device could graphically present its line stats via its own web interface. Fun project for someone?!
Alternatively, the device could log an overview of its line statistics to a remote syslogd daemon. That framework is largely supported on the Huawei [4]. Some sort of periodic (cron?) job just needs to be run on the device. That process would query the xdsl driver for the various line statistics. An overview of the stats would be generated. The overview would be sent over the LAN or even the wider internet to a logging daemon.
The xDSL driver in the Huawei can also conjure up undocumented statistics, such as the QAM constellation maps.
Late last year, Netgear accidentally (oopsadaisy!) released Broadcom's confidential source code for its 63xx xDSL driver. Cat, bag, out! It's in that release that the hidden goodies can be found.[5]
Briefly, have a good poke into the xdsl driver code.. In particular, look at the function prototypes in ~/DG834GBv4_V5/DG834GBv4_V5.01.01_src/bcmdrivers/broadcom/char/adsl/bcm96348/adsldrv.c.
There's a function in that file called adsl_ioctl(). If you examine the array of function pointers in adsl_ioctl(), you can determine the full range of ioctl() request codes that the xdsl driver responds to.
Some of those ioctl requests, which query the xdsl driver for stats, are hidden and cannot be reached from userspace using the standard tool xdslcmd.
However, it should be fairly easy (famous last words) to hack up some code that invoked those hidden functions.
I haven't tried it yet, but the function DoGetConstelPoints() sounds particularly interesting.
Judging by its name, the function provides the coordinates of the QAM constellation maps. Calling that function may well provide the data needed to render one of those curious looking graphics like this one..[6]
Anyway.. enough rambling!
cheers,
asbokid
[1]
http://huaweihg612hacking.wordpress.com/2011/07/19/a...
[2]
http://www.sinet.bt.com/498v3p2.pdf
[3]
http://huaweihg612hacking.wordpress.com/2011/08/15/b...
[4]
http://img89.imageshack.us/img89/5436/huaweihg612log...
[5]
http://huaweihg612hacking.wordpress.com/2011/07/26/b...
[6]
http://zone.ni.com/cms/images/devzone/pub/RF_sw_test...
Edited by asbokid (Mon 05-Sep-11 22:59:11)