blob: 502d661e5afab80ca59dbfe504ec1f2b0a32729d [file] [log] [blame]
Alexander Chemerisc19d1f62015-06-08 23:44:58 -04001This is the interface to the transcevier.
Alexander Chemeris040b3052013-06-16 14:29:54 +04002
Alexander Chemerisc19d1f62015-06-08 23:44:58 -04003Each TRX Manager UDP socket interface represents a single ARFCN.
4Each of these per-ARFCN interfaces is a pair of UDP sockets, one for control and one for data.
5Give a base port B (5700), the master clock interface is at port P=B.
6The TRX-side control interface for C(N) is on port P=B+2N+1 and the data interface is on an odd numbered port P=B+2N+2.
7The corresponding core-side interface for every socket is at P+100.
8For any given build, the number of ARFCN interfaces can be fixed.
Alexander Chemeris040b3052013-06-16 14:29:54 +04009
10
11
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040012Indications on the Master Clock Interface
Alexander Chemeris040b3052013-06-16 14:29:54 +040013
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040014The master clock interface is output only (from the radio).
15Messages are "indications".
Alexander Chemeris040b3052013-06-16 14:29:54 +040016
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040017CLOCK gives the current value of the transceiver clock to be used by the core.
18This message is sent whenever a trasmission packet arrives that is too late or too early. The clock value is NOT the current transceiver time. It is a time setting the the core should use to give better packet arrival times.
19IND CLOCK <totalFrames>
Alexander Chemeris040b3052013-06-16 14:29:54 +040020
21
22
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040023Commands on the Per-ARFCN Control Interface
Alexander Chemeris040b3052013-06-16 14:29:54 +040024
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040025The per-ARFCN control interface uses a command-reponse protocol.
26Commands are NULL-terminated ASCII strings, one per UDP socket.
27Each command has a corresponding response.
28Every command is of the form:
Alexander Chemeris040b3052013-06-16 14:29:54 +040029
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040030CMD <cmdtype> [params]
Alexander Chemeris040b3052013-06-16 14:29:54 +040031
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040032The <cmdtype> is the actual command.
33Parameters are optional depending on the commands type.
34Every response is of the form:
Alexander Chemeris040b3052013-06-16 14:29:54 +040035
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040036RSP <cmdtype> <status> [result]
Alexander Chemeris040b3052013-06-16 14:29:54 +040037
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040038The <status> is 0 for success and a non-zero error code for failure.
39Successful responses may include results, depending on the command type.
Alexander Chemeris040b3052013-06-16 14:29:54 +040040
41
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040042Power Control
Alexander Chemeris040b3052013-06-16 14:29:54 +040043
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040044POWEROFF shuts off transmitter power and stops the demodulator.
45CMD POWEROFF
46RSP POWEROFF <status>
Alexander Chemeris040b3052013-06-16 14:29:54 +040047
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040048POWERON starts the transmitter and starts the demodulator. Initial power level is very low.
49This command fails if the transmitter and receiver are not yet tuned.
50This command fails if the transmit or receive frequency creates a conflict with another ARFCN that is already runnng.
51If the transceiver is already on, it response with success to this command.
52CMD POWERON
53RSP POWERON <status>
Alexander Chemeris040b3052013-06-16 14:29:54 +040054
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040055SETPOWER sets output power in dB wrt full scale.
56This command fails if the transmitter and receiver are not running.
57CMD SETPOWER <dB>
58RSP SETPOWER <status> <dB>
Alexander Chemeris040b3052013-06-16 14:29:54 +040059
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040060ADJPOWER adjusts power by the given dB step. Response returns resulting power level wrt full scale.
61This command fails if the transmitter and receiver are not running.
62CMD ADJPOWER <dBStep>
63RSP ADJPOWER <status> <dBLevel>
Alexander Chemeris040b3052013-06-16 14:29:54 +040064
Alexander Chemeris040b3052013-06-16 14:29:54 +040065
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040066Tuning Control
Alexander Chemeris040b3052013-06-16 14:29:54 +040067
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040068RXTUNE tunes the receiver to a given frequency in kHz.
69This command fails if the receiver is already running.
70(To re-tune you stop the radio, re-tune, and restart.)
71This command fails if the transmit or receive frequency creates a conflict with another ARFCN that is already runnng.
72CMD RXTUNE <kHz>
73RSP RXTUNE <status> <kHz>
Alexander Chemeris040b3052013-06-16 14:29:54 +040074
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040075TXTUNE tunes the transmitter to a given frequency in kHz.
76This command fails if the transmitter is already running.
77(To re-tune you stop the radio, re-tune, and restart.)
78This command fails if the transmit or receive frequency creates a conflict with another ARFCN that is already runnng.
79CMD TXTUNE <kHz>
80RSP TXTUNE <status> <kHz>
Alexander Chemeris040b3052013-06-16 14:29:54 +040081
Alexander Chemeris040b3052013-06-16 14:29:54 +040082
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040083Timeslot Control
Alexander Chemeris040b3052013-06-16 14:29:54 +040084
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040085SETSLOT sets the format of the uplink timeslots in the ARFCN.
86The <timeslot> indicates the timeslot of interest.
87The <chantype> indicates the type of channel that occupies the timeslot.
88A chantype of zero indicates the timeslot is off.
89CMD SETSLOT <timeslot> <chantype>
90RSP SETSLOT <status> <timeslot> <chantype>
Alexander Chemeris040b3052013-06-16 14:29:54 +040091
Alexander Chemeris040b3052013-06-16 14:29:54 +040092
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040093Messages on the per-ARFCN Data Interface
Alexander Chemeris040b3052013-06-16 14:29:54 +040094
Alexander Chemerisc19d1f62015-06-08 23:44:58 -040095Messages on the data interface carry one radio burst per UDP message.
96
97
98Received Data Burst
99
1001 byte timeslot index
1014 bytes GSM frame number, big endian
1021 byte RSSI in -dBm
1032 bytes correlator timing offset in 1/256 symbol steps, 2's-comp, big endian
104148 bytes soft symbol estimates, 0 -> definite "0", 255 -> definite "1"
105
106
107Transmit Data Burst
108
1091 byte timeslot index
1104 bytes GSM frame number, big endian
1111 byte transmit level wrt ARFCN max, -dB (attenuation)
112148 bytes output symbol values, 0 & 1
113
114
Alexander Chemeris040b3052013-06-16 14:29:54 +0400115
116