This week I started creating the GUI for my DAB/DAB+ transceiver app. I divided the task into the following sub tasks:
- Create a principle design for the user interface
- Achieve basic functionality for reception
- Achieve basic functionality for transmission
- Add nice features and improve usability/design
- Add developer mode
Create a principle design for the user interface
Operating on the basic user interface should be intuitive and simple. A user who gets in touch with the interface for the first time should be able to set up a receiver/transmitter without any help or manual. In addition, the structure of the transmission and the reception mode should be as equal as possible in order to keep the front end neat at any time. After considering these objectives, a came up with the following principle structure for the user interface:

| Receiver | Transmitter | |
| Settings (1) | set frequency, choose IQ source (USRP src/file src), initial controls | set frequency, initial controls |
| Selection Table (2) | display all receivable sub channels (read FIC) | fill in form for Multiplex Channel Information (MCI) and Service Information (SI) |
| Info Box (3) | display all information about (in (2) selected) sub channel | |
| Audio Player (4) | Plays selected sub channel, audio controls | Plays selected audio file and thereby feeds transmitter, audio control |
As you can see, most features are suitable for the transmission and the reception mode.
Achieve basic functionality for reception
The most basic features for reception are:
- Read the Fast Information Channel (FIC) and display all available sub channels in the Selection Table (2)
- Commit the address, size, protection level and bit rate of a sub channel to the Main Service Channel (MSC) receiver, if it is selected in (2)
- Run a GNU Radio flowgraph with the committed settings , containing MSC decoder and Audio decoder, when the Play button in (4) is pressed
The FIC information is by now only read in the gr sink block fib_sink_vb by printing the received Fast Information Blocks (FIBs) over a logger to the console. This was adequate for reading the FIC manually. For the Selection Table (2) and the Info Box (3) we need that data structured and characterized. The following example shows why:
We receive the following (independed) FIBs over the FIC that all contain relevant information for one specific sub channel:
- Ensemble info: ensemble label, country ID, ensemble reference
- Service info: reference, number of containing sub channels, ID and type of each sub channel
- Service label: reference, service label
- Sub channel info: ID, address, size, protection mode
The example above illustrates the need of a well structured storage method for the FIB information. The choice of this data-interchange format demands the following requirements:
- supporting different data types (string for labels, integer for addresses or sizes, boolean for flags)
- flexible structure in:
- the number of attributes (sub channel info contains 5 attributes, while the service label only has 2)
- the number of elements (we don’t know (a priori) how many services are contained in the ensemble and how many sub channels are included in each service)
- well readable
I finally chose the format JSON (JavaScript Object Notation). The basic data structures that actually explain the whole language, are:



I established the following structure for the FIB data (exemplary for three sub channels in two services):
service_info =
[
{"reference":736, "ID":2, "primary":true}
{"reference":736, "ID":3, "primary":false}
{"reference":942, "ID":4, "primary":true}
]
service_labels=
[
{"reference":942, "label":"SWR2"}
{"reference":736, "label":"SWR1 BW"}
]
subch_info =
[
{"ID":4, "address":54, "size":84, "protection":2}
{"ID":3, "address":234, "size":96, "protection":3}
{"ID":2, "address":0, "size":54, "protection":1}
]
Note that the values of the arrays don’t have a specific order due to the fact that they are not transmitted in any specific order in the FIC.
The JSON arrays are accessed over a string get function from the fib_sink_vb block. In python, a JSON array is interpreted as a python array and a JSON object is interpreted as a python dictionary. It is therefore easy to iterate and sort over objects and access attributes over keys. For example accessing the service label to a given sub channel (and its ID) would be:
reference = (item for item in self.my_receiver.get_service_info() if item['ID'] == int(ID)).next()['reference'] service_label = (item for item in self.my_receiver.get_service_labels() if item['reference'] == int(reference)).next() print service_label['label']
The GUI, right now, is able of displaying all the found sub channels in the Selection Table (2). When choosing a specific sub channel by clicking on it, the Info Box (3) shows basic information (more has to be added) and the audio stream starts by clicking on a “play” button in the Audio Player (4). Therefore the basic features for reception are fulfilled.
Outlook
Next week, I am going to add the basic features for transmission. After that, I want to improve the front end by adding new features and make it pretty.
Luca
