discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Multi antenna transmit with RFX2400


From: Jérémy Skelton
Subject: Re: [Discuss-gnuradio] Multi antenna transmit with RFX2400
Date: Thu, 26 Mar 2009 12:36:13 +0100

Hi, again

I should have precise that I'm mainly interested in some piece of advise.

In fact, I found the test_mimo_tx.cc in the trunk but it is designed for usrp2 and I'm not sure about how I can reuse from it.

I also had from other people the following code allowing me to transmit on both antennas but I don't know what is transmitted on each antenna as I don't clearly understand where is the separation between the sides A and B. How can I say for example which symbol goes on side A and how are side A and B synchronised when sending different symbol on each ?

int main(int argc,char **argv)
{
  unsigned int i1;
  unsigned int InterpRate;
  unsigned int nchannels, DdcFreq, LOFreq, gain;
  unsigned long RF_freq;
        usrp_standard_rx_sptr rx0, rx1;
        usrp_standard_tx_sptr tx0, tx1;

  db_flexrf_mimo db_aside0,db_bside0;
  db_flexrf_mimo db_aside1,db_bside1;
  struct sched_param sp;

  number_of_buffers_wanted=atoi(argv[1]);
  if (number_of_buffers_wanted>MAX_NUMBER_OF_BUFFERS)
    number_of_buffers_wanted=MAX_NUMBER_OF_BUFFERS;
  if (number_of_buffers_wanted<2)
    number_of_buffers_wanted=2;

  RF_freq=atof(argv[2]);
  gain=atoi(argv[3]);

  InterpRate=16;

  rx0 = usrp_standard_rx::make(0, InterpRate);
tx0 = usrp_standard_tx::make(0,InterpRate*2,2,47768); //0xBA98 0b 1011 1010 1001 1000

  if (1) {

    unsigned int counter=0;
    bool underrun;

    if(gruel::enable_realtime_scheduling()!=gruel::RT_OK){
      printf("Problems enabeling realtime scheduling!!!\n");
    }

    db_aside0=db_flexrf_mimo(rx0,tx0,0);
    db_bside0=db_flexrf_mimo(rx0,tx0,1);

    db_aside0.configure_tx(0);
    db_aside0.tune_tx(RF_freq,0);
    db_bside0.configure_tx(0);
    db_bside0.tune_tx(RF_freq,0);

    db_aside0.set_tx_auto_tr(true);
    db_bside0.set_tx_auto_tr(true);

    tx0->set_nchannels(2);

    ifstream l("data_to_usrp.dat", ios::binary);
    int i1;
    for (i1=0;i1<number_of_buffers_wanted;i1++)
      l.read((char *) CollectedData[i1],NUMBYTES);

    l.close();

    short* p;

    p=(short *) &CollectedData[0][0];
    for (i1=0;i1<10;i1++) {
        cout << "Buffer=" << *p  << "\n";
        p++;
    };

    tx0->start();

    while (1) {
tx0->write((void *) CollectedData[counter++% number_of_buffers_wanted],
                               NUMBYTES,&underrun);
      if (underrun)
        cout << "Underrrun \n";
    };
  };

Le 24-mars-09 à 09:54, Jérémy Skelton a écrit :

Hi,

I was wondering how I can transmit synchronously on two antenna using two RFX2400 on the same USRP1 motherboard. It should be possible as the daugtherboards are MIMO capable but does anyone have some c++ working piece of code ?

My goal is to implement an Alamouti scheme for diversity transmission.

Thanks,
Jérémy

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]