GMSK Modem

The GMSK object implements a GMSK modulator / demodulator.
For background information, read the Modems Introduction section

class GMSKModem {
    constructor( name : string );
    configure( { 'sps': 4, 'delay': 3, 'bt' : 0.35 } );

    IQData modulate( Uint8Array of bytes );
    IQData modulateBits( Uint8Array of bits );

    getSamplesPerSymbol();

    Uint8Array demodulate( IQData in );
} ;

.configure

Configure GMSKModem object :

configure( { 'sps': 4, 'delay': 3, 'bt' : 0.35 }  ); 

Parameters :

  • 'sps' : Samples per symbol.
  • 'delay' : Filter delay, in samples.
  • 'bt' : bandwidth-time product.

.getSamplesPerSymbol

Returns the configured number of samples per symbol for this modem.

.modulate

Performs the modulation of the given input. Input is processed as bytes (8bits), MSB first.
IQData object is returned, containing the baseband signal.

IQData modulate( array );

Parameters :

  • array : this is a Uint8Array array of bytes

.modulateBits

Performs the modulation of the given input. Input is processed as bit.
IQData object is returned, containing the baseband signal.

IQData modulateBits( array );

Parameters :

  • array : this is a Uint8Array array of bit. Any value >= 1 is considered as bit value 1.

.demodulate

  • Performs demodulation. Internally a buffer is used to keep the required number of samples (see configuration, number of samples per symbol).
  • The number of bits returned is not constant, depending on how many complex samples are available in the buffer.
Uint8Array demodulate( IQData in );

Input arameters :
* A block of baseband IQ samples (IQData).

Output parameters :
* A Uint8Array array of bit. Any value >= 1 is to be considered as bit value 1.

Example

var samples_per_symbol = 50 ;
var sample_rate = 48e3 ;
var filter_delay = 3 ;
var gmsk_rolloff = .35 ;

var length = 16 ;
var msg = new Uint8Array(length) ;
for( var i=0 ; i < length ; i++ ) {
    msg[i] = i ;
}

var modem = new GMSKModem('test');
modem.configure( {
    'sps' : samples_per_symbol,
    'delay' : filter_delay,
    'bt' : gmsk_rolloff
});


var IQ = modem.modulate( msg );
IQ.setSampleRate(sample_rate);


var tx = BladeRF.makeDevice( {'device_name' : 'blade' });
tx.setTxGain( 55 );
tx.txOn( 435, 4e6 ); 
IQ.setCenterFrequency( .1 ) ; // transmit with carrier at + 200kHZ => on 435.2
tx.txData( IQ );
tx.txOff();
Last update: January 6, 2022