Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 1 | This is the interface to the transcevier. |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 2 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 3 | Each TRX Manager UDP socket interface represents a single ARFCN. |
| 4 | Each of these per-ARFCN interfaces is a pair of UDP sockets, one for control and one for data. |
| 5 | Give a base port B (5700), the master clock interface is at port P=B. |
| 6 | The 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. |
| 7 | The corresponding core-side interface for every socket is at P+100. |
| 8 | For any given build, the number of ARFCN interfaces can be fixed. |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 9 | |
| 10 | |
| 11 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 12 | Indications on the Master Clock Interface |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 13 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 14 | The master clock interface is output only (from the radio). |
| 15 | Messages are "indications". |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 16 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 17 | CLOCK gives the current value of the transceiver clock to be used by the core. |
| 18 | This 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. |
| 19 | IND CLOCK <totalFrames> |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 20 | |
| 21 | |
| 22 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 23 | Commands on the Per-ARFCN Control Interface |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 24 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 25 | The per-ARFCN control interface uses a command-reponse protocol. |
| 26 | Commands are NULL-terminated ASCII strings, one per UDP socket. |
| 27 | Each command has a corresponding response. |
| 28 | Every command is of the form: |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 29 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 30 | CMD <cmdtype> [params] |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 31 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 32 | The <cmdtype> is the actual command. |
| 33 | Parameters are optional depending on the commands type. |
| 34 | Every response is of the form: |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 35 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 36 | RSP <cmdtype> <status> [result] |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 37 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 38 | The <status> is 0 for success and a non-zero error code for failure. |
| 39 | Successful responses may include results, depending on the command type. |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 40 | |
| 41 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 42 | Power Control |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 43 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 44 | POWEROFF shuts off transmitter power and stops the demodulator. |
| 45 | CMD POWEROFF |
| 46 | RSP POWEROFF <status> |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 47 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 48 | POWERON starts the transmitter and starts the demodulator. Initial power level is very low. |
| 49 | This command fails if the transmitter and receiver are not yet tuned. |
| 50 | This command fails if the transmit or receive frequency creates a conflict with another ARFCN that is already runnng. |
| 51 | If the transceiver is already on, it response with success to this command. |
| 52 | CMD POWERON |
| 53 | RSP POWERON <status> |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 54 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 55 | SETPOWER sets output power in dB wrt full scale. |
| 56 | This command fails if the transmitter and receiver are not running. |
| 57 | CMD SETPOWER <dB> |
| 58 | RSP SETPOWER <status> <dB> |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 59 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 60 | ADJPOWER adjusts power by the given dB step. Response returns resulting power level wrt full scale. |
| 61 | This command fails if the transmitter and receiver are not running. |
| 62 | CMD ADJPOWER <dBStep> |
| 63 | RSP ADJPOWER <status> <dBLevel> |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 64 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 65 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 66 | Tuning Control |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 67 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 68 | RXTUNE tunes the receiver to a given frequency in kHz. |
| 69 | This command fails if the receiver is already running. |
| 70 | (To re-tune you stop the radio, re-tune, and restart.) |
| 71 | This command fails if the transmit or receive frequency creates a conflict with another ARFCN that is already runnng. |
| 72 | CMD RXTUNE <kHz> |
| 73 | RSP RXTUNE <status> <kHz> |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 74 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 75 | TXTUNE tunes the transmitter to a given frequency in kHz. |
| 76 | This command fails if the transmitter is already running. |
| 77 | (To re-tune you stop the radio, re-tune, and restart.) |
| 78 | This command fails if the transmit or receive frequency creates a conflict with another ARFCN that is already runnng. |
| 79 | CMD TXTUNE <kHz> |
| 80 | RSP TXTUNE <status> <kHz> |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 81 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 82 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 83 | Timeslot Control |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 84 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 85 | SETSLOT sets the format of the uplink timeslots in the ARFCN. |
| 86 | The <timeslot> indicates the timeslot of interest. |
| 87 | The <chantype> indicates the type of channel that occupies the timeslot. |
| 88 | A chantype of zero indicates the timeslot is off. |
| 89 | CMD SETSLOT <timeslot> <chantype> |
| 90 | RSP SETSLOT <status> <timeslot> <chantype> |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 91 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 92 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 93 | Messages on the per-ARFCN Data Interface |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 94 | |
Alexander Chemeris | 2beb1ad | 2015-06-08 23:44:58 -0400 | [diff] [blame] | 95 | Messages on the data interface carry one radio burst per UDP message. |
| 96 | |
| 97 | |
| 98 | Received Data Burst |
| 99 | |
| 100 | 1 byte timeslot index |
| 101 | 4 bytes GSM frame number, big endian |
| 102 | 1 byte RSSI in -dBm |
| 103 | 2 bytes correlator timing offset in 1/256 symbol steps, 2's-comp, big endian |
| 104 | 148 bytes soft symbol estimates, 0 -> definite "0", 255 -> definite "1" |
| 105 | |
| 106 | |
| 107 | Transmit Data Burst |
| 108 | |
| 109 | 1 byte timeslot index |
| 110 | 4 bytes GSM frame number, big endian |
| 111 | 1 byte transmit level wrt ARFCN max, -dB (attenuation) |
| 112 | 148 bytes output symbol values, 0 & 1 |
| 113 | |
| 114 | |
Alexander Chemeris | 040b305 | 2013-06-16 14:29:54 +0400 | [diff] [blame] | 115 | |
| 116 | |