Transmitting voice with Osmocom

Michael Dvoishes michaeld at
Mon Apr 18 08:58:28 UTC 2011

Hi All,

I am trying to transmit voice with my GTA02 and Osmocom. Upon looking into code I did not find any code transmitting voice. I have tried to do it myself but without much success.
What have I done:

1.       Merge branch "jolly/voice" into main.

2.       Add handling of L1CTL_VOICE_REQ at l23_api.c

3.       Create additional queue for voice requests to be handled within the scheduler

4.       Create "loopback" code, issuing L1CTL_VOICE_REQ each time voice is received at layer23

5.       At l1s_tch_cmd, add code, sending the frame from voice request queue, similar to code, sending FACCH frame.

6.       During tests against OpenBTS, it appears, that the voice frames are being sent, but all of them have "Stolen" bit turned on, e.g. BTS considers them FACCH frames.

My question is how do I transmit TCH frame with "Stolen" indicator turned off.
Or even better, is there any other implementation of transmitting voice via TCH?

Code fragment from l1s_tch_cmd,
                if (facch_tx_now) {
                                uint16_t *info_ptr = dsp_api.ndb->a_fu;
                                struct msgb *msg;
                                const uint8_t *data;

                                /* Pull FACCH data (if ready) */
                                if (icnt > 26)
                                                msg = msgb_dequeue(&l1s.tx_queue[L1S_CHAN_MAIN]);
                                                if(!msg && (tch_mode == TCH_FS_MODE))
                                                                msg = msgb_dequeue(&l1s.tx_queue[L1S_CHAN_VOICE]);
                                                                if(msg && msg->l3h)
                                                                                printf("rx_frames: %d tx_recv: %d tx_sent: %d\n", rx_frames, tx_recv, tx_sent);
                                                                                printf("l1s_tch_cmd: voice data = %s\n", hexdump(msg->l3h, 33));
                                                msg = NULL;

Many thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the baseband-devel mailing list