Since I'm currently at the BOSSA conference and thus basically on a break in my Brazil holidays, I decided I might as well get some work done and imported the zebra/quagga VTY code into OpenBSC. I used a fork of that code that I used some time ago for a never-announced (but in my public svn) 'cardshell' project.
What this means is that we now have a quite nice shell interface into OpenBSC, where you can interactively explore the data structures with commands like 'show bts 0', 'show e1_line' or 'show timeslot'. Over time, I hope we can easily add also interactive commands for [re]configuration, i.e. reconfigure the BTS on the fly, change administrative state via OML, or set TEI/timeslot configurations or the like.
Importing those bits from zebra/quagga has the advantage the we have things like a history and tab-completion without having to spend much time on it. Also, we can use the same codebase for saving/restoring the current configuration from/to a text file.
To give you an idea, it looks like this:
ideapad.de.gnumonks.org> show bts BTS 0 is of nanobts900 type, has LAC 1, TSC 7 and 1 TRX NM State: Oper 'RFU', Admin 0, Avail 'In test' Site Mgr NM State: Oper 'RFU', Admin 0, Avail 'In test' Paging: FIXME pending requests, 100 free slots E1 Signalling Link: E1 Line 0, Timeslot 1, Type OML E1 TEI 0, SAPI 255 ideapad.de.gnumonks.org> show trx TRX 0 of BTS 0 is on ARFCN 123 NM State: Oper 'RFU', Admin 0, Avail 'In test' Baseband Transceiver NM State: Oper 'RFU', Admin 0, Avail 'In test' E1 Signalling Link: E1 Line 0, Timeslot 2, Type RSL E1 TEI 0, SAPI 0 ideapad.de.gnumonks.org> show timeslot 0 0 0 Timeslot 0 of TRX 0 in BTS 0, phys cfg CCCH+SDCCH4 NM State: Oper 'RFU', Admin 0, Avail 'In test' Bound IP: 0.0.0.0 Port 0 FC=0 F8=0