Hello, I am trying to find the best way to implement a bell 202 modem in gnuradio. The problem I am facing is that I need to produce two tones, one for mark and one for space, and I have to switch from one to other depending on which symbol I am sending. The duration of the tone (or tone switch) must be set exactly according to the baud rate of 1200 I have to produce. I was thinking to use the nco class to generate the tones, and to output n samples per symbol at a certain fixed sample rate that would be enough for the 1200 baud, let´s say the standard audio 48000. Has anyone better suggestions to work this out? MC
on 2006-03-28 23:51
on 2006-03-29 00:02
Matteo Campanella wrote: > > Has anyone better suggestions to work this out? > > MC > > There's a dialtone example. The relevant lines are: src0 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 350, ampl) src1 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 440, ampl) dst = audio.sink (sample_rate, options.audio_output) self.connect (src0, (dst, 0)) self.connect (src1, (dst, 1)) I think what you'd want to do is stick a "multiply" in the signal chain for each generator, and then combine the outputs of the generator with an "add". Generate two different copies of your bitstream, one which is "straight up", and the other is inverted. Feed this to the multipliers on each signal path. Effectively, the ones and zeros turn on and off the relevant signal sources by multiplying them by one or zero.
on 2006-03-29 00:50
On Tue, Mar 28, 2006 at 11:51:03PM +0200, Matteo Campanella wrote: > > Has anyone better suggestions to work this out? > > MC Use the gr.frequency_modulator_fc block to generate complex baseband FSK. You'll probably want to use gr.bytes_to_syms to in front of it, or in the more general case: gr.packed_to_unpacked followed by gr_chunks_to_symbols_bf. Eric
on 2006-03-29 10:01
bell 202 coding requires to send a steady tone (mark or space depending on the previous state) on 1 and a tone change on 0, so the tone change must happen in the middle of a bit. in order to use a modulator I guess I should use a block to get a sequence of symbols that is twice as long as the bit sequence, that should be "played" twice as fast as the bit stream sequence, where bits at zero are represented by 1,-1 (or -1,1) and bits at one are represented by -1,-1 (or 1,1). is there any way to do that by using an already made block? Matteo
on 2006-03-29 11:51
On Wed, Mar 29, 2006 at 09:59:32AM +0200, Matteo Campanella wrote: > is there any way to do that by using an already made block? > > Matteo I don't have the spec in front of me, but this sounds like DPSK. Use the same modulator, but differentially encode prior to modulation. You'll need to code up the differential encoder and decoder. They are trivial. "Digital Signal Processing in Communication Systems", by Marvin E. Frerking, ISBN 0-442-01616-6 gives several ways to mod and demod DPSK. Eric
on 2006-03-29 15:19
Bel 202 does NOT use Manchester encoding. The individual bits are NOT sent bilevel but opposite polarity. Bel 202 very much as energy at DC after demodulation which Manchester would eliminate. It does have differential encoding but that is not Manchester. 100011010..... would be transmitted as ?10010111.... This is nothing to do with biphase elements. Bob Matteo Campanella wrote: > is there any way to do that by using an already made block? >>> depending on which symbol I am sending. The duration of the tone (or >>> Has anyone better suggestions to work this out? >> > > -- AMSAT VP Engineering. Member: ARRL, AMSAT-DL, TAPR, Packrats, NJQRP/AMQRP, QRP ARCI, QCWA, FRC. ARRL SDR Wrk Grp Chairman Laziness is the number one inspiration for ingenuity. Guilty as charged!
on 2006-03-29 16:02
100011010 should become 1 0 0 0 1 1 0 1 0 space-space,mark-mark,space-space,mark-mark-mark-mark,space-space-mark,space with the arbitrary decision on the first bit, that could be either space or mark, as there is no previous state. space is 1200Hz and mark is 2200Hz. I have already encoded this on a DDS based on PWM on a PIC 16F628, but I had control over REAL time there. I have just written a block to do the differential encoding, that is, to obtain the correct -1,1 sequence, but my doubt is how to apply this to the freq modulator in order to obtain exactly the two tones I need for mark and space, and the correct bit timing, as I do not have control over time... MC
on 2006-03-29 18:04
Matteo: Normally I do not play the game this way but let me suggest that you do the following thing so we can get beyond this to give people the correct information. Open up Google. Type in BEL-202, hit enter. Please tell me WHOSE NAME and DSP assembler code you see on the first several entries and many of the remaining entries. My code and name are not there by accident as the most referred to pages in the world on BEL-202. The data is not Manchester encoded. It is not split level in the middle of the bit. I think your safest bet is to assume that the people who are in this group are not idiots. 100011010... is transmitted as x10010101... The Bel-202 standard allows transmission up to 1800 bps. If it were encoded biphase or Manchester, the channel would need to be > 3600Hz wide. This was done back in the ancient days before equalizers, and easy DSP so one could not mitigate for channel edges. There is no split phase data in BEL-202. Take it or leave it. I have left this conversation as of now. Bob Matteo Campanella wrote: > obtain the correct -1,1 sequence, but my doubt is how to apply this to the > freq modulator in order to obtain exactly the two tones I need for mark > and space, and the correct bit timing, as I do not have control over > time... > > MC > > -- AMSAT VP Engineering. Member: ARRL, AMSAT-DL, TAPR, Packrats, NJQRP/AMQRP, QRP ARCI, QCWA, FRC. ARRL SDR Wrk Grp Chairman Laziness is the number one inspiration for ingenuity. Guilty as charged!
on 2006-03-29 21:04
I'm quite surprised by this response of yours, as it is not exactly aligned with the friendly style of the list - I know that to make things clear is more difficult than slamming doors, but I like it more. Maybe I am referring to the BELL 202 erroneously, because I am actually trying to implement a modem for 1200 AFSK to use on AX25 on ham vhf band - I am not sure about it is BELL202, but I am sure it is encoded the way I said, as I have read this on a number of papers, including those from TAPR/ARRL Digital Communication Conferences, particularly: PIC-et Radio: How to Send AX.25 UI Frames Using Inexpensive PIC Microprocessors by John Hansen, W2FS State University of New York 49 Maple Avenue ... 3. Packet radio uses a modulation scheme called NRZI (Non-Return to Zero, Inverted). This means that the ones and zeros are not represented by high and low states (or tones). Rather, a zero is represented by a change in tone (if it was high, it goes low, if it was low, it goes high) while a one is represented by no change in tone. Together with bit-stuffing, this ensures that there will be a tone change at least every five bits, if not more often (except for flags). This helps the transmit and receive timing stay in sync.i maybe the correct name for this mod scheme is NRZI, and I wrongly called it BELL202 as I used an MX614 in one of my implementations, that is frequently reported as being BELL202 modem. useless to say, I do not consider anyone an idiot - neither in the list, nor in the whole world - that would be the very opposite of the HAM spirit you should know very well. yours truly Matteo iz2eeq
on 2006-03-29 21:16
Hello! I suspect, (And correct me if I am wrong here Bob!) that he was getting some what annoyed by the questions. I strongly suggest that you pursue this idea away from the list. And when you've got an obvious question as to how it relates to the world of SDR then please contact us. That's my opinion however please do not become annoyed at me. -- Gregg C Levine firstname.lastname@example.org "This signature was once found posting rude messages in English in the Moscow subway."
on 2006-03-29 21:47
Having been an innocent bystander here, I think I see a classic case of people talking past each other. Matteo, the 1200 baud modulation used in AX.25 packet radio uses BEL 202 tones, *but* the signal that's being provided to the modulator has been through an HDLC chip (or equivalent) that converts the data stream into a synchronous format that includes flags, FCS, etc., *and* uses NRZI (non-return-to-zero, inverted) modulation. That HDLC activity isn't part of the BEL 202 protocol. What you're trying to implement isn't BEL 202, but 1200 baud AX.25, and those aren't the same things. Bob's answers were based on the assumption you were trying to produce a BEL 202 data stream as it would appear on a telephone line. That data stream is asynchronous and doesn't include any of the AX.25 frame characteristics. The only connection between the two is that in the ancient, early days of packet radio the first experimenters glommed onto some surplus BEL 202 modems and used those as the last stage of their cobbled-together TNCs; the use of AFSK with 1200 and 2200Hz tones is simply an artifact of that. 73, John N8UR ----
on 2006-03-29 22:11
yep, my fault to use the wrong name for it :-) I am indeed working on the bits to symbol (nrzi) block right now, and later on I am willing to do the HDLC block with flag, FCS and bit stuffing in order to put up the following chain: message_source->hdlc->nrzi->modulation->duc right now i am stuck at modulation, that is, to find a method to use the frequency modulator to do that at baseband, as suggested from Eric... 73, Matteo iz2eeq
on 2006-03-30 00:09
On Wed, Mar 29, 2006 at 10:07:21PM +0200, Matteo Campanella wrote: > 73, Matteo iz2eeq A few more hints: The sensitivity argument of the gr.frequency_modulator_fc is in radians/sample/<input-units>. If your input data is +/- 1, then you can produce two tones symmetrically around zero. Remember that this is complex and hence -freq is distinguishable from +freq. Then just translate the baseband up to the center frequency you like by multiplying by a complex sinusoid (or let the usrp duc handle it). Eric
on 2006-03-30 06:12
John Ackermann N8UR wrote: > the use of AFSK with 1200 and 2200Hz tones is simply an artifact of that. Instead of toggling back-and-forth between two independent tone sources, how hard would it be to create samples for a 1200 hz tone spanning one symbol period where the initial phase was arbitrary eg. if you used a sin(theta) function, it wouldn't always start at theta = 0. Same for the function to generate samples spanning one symbol period for the 2200 hz tone. The idea I'm getting at is you could have your signal transition smoothly (as possible) between the two tones which would result in a cleaner, more efficient signal. A sample rate that is an integer multiple of the symbol rate is a nice thing but isn't required. -rick
on 2006-03-30 07:01
On Wed, Mar 29, 2006 at 10:08:50PM -0600, Rick Parrish wrote: > > The idea I'm getting at is you could have your signal transition > smoothly (as possible) between the two tones which would result in a > cleaner, more efficient signal. > > A sample rate that is an integer multiple of the symbol rate is a nice > thing but isn't required. > > -rick gr.frequency_modulator_fc will give you continuous phase. Eric