Playing

Studying the pyLMS7002M code and playing with the examples - got into the basic/TxNCO_Hopping and started drawing patterns in a receiver waterfall display then remembered a project called gr-paint. Build it, start up gnuradio-companion and finally got an osmocom sink to transmit across the room:

5 Likes

A little more practical but not much - since I’m transmitting in the ham band I’ll need a CW id:

#!/usr/bin/python
from pyLMS7002M import *

txt = {'A': '.-',   'B': '-...',    'C': '-.-.',    'D': '-..',
       'E': '.',    'F': '..-.',    'G': '--.',     'H': '....',
       'I': '..',   'J': '.---',    'K': '-.-',     'L': '.-..',
       'M': '--',   'N': '-.',      'O': '---',     'P': '.--.',
       'Q': '--.-', 'R': '.-.',     'S': '...',     'T': '-',
       'U': '..-',  'V': '...-',    'W': '.--',     'X': '-..-',
       'Y': '-.--', 'Z': '--..',

       '0': '-----',    '1': '.----',   '2': '..---',   '3': '...--',
       '4': '....-',    '5': '.....',   '6': '-....',   '7': '--...',
       '8': '---..',    '9': '----.',   ' ': '\n'
        }



lms = LimeSDR()
lms.LMS7002_Reset()
lms.LMS7002.MIMO = 'MIMO'
lms.LMS7002.CGEN.setCLK(80e6)
lms.LMS7002.SX['T'].setFREQ(435e6)
lms.LMS7002.TxTSP['A'].TSGMODE = 'DC'
lms.LMS7002.TxTSP['A'].INSEL = 'TEST'
lms.LMS7002.TxTSP['A'].CMIX_BYP = 'BYP'
lms.LMS7002.TxTSP['A'].GFIR1_BYP = 'BYP'
lms.LMS7002.TxTSP['A'].GFIR2_BYP = 'BYP'
lms.LMS7002.TxTSP['A'].GFIR3_BYP = 'BYP'
lms.LMS7002.TxTSP['A'].loadDCIQ(0x0,0x0)
lms.LMS7002.TRF['A'].LOSS_MAIN_TXPAD_TRF = 31
lms.LMS7002.TRF['A'].EN_LOOPB_TXPAD_TRF = 0
lms.LMS7002.TRF['A'].L_LOOPB_TXPAD_TRF = 0
lms.LMS7002.TRF['A'].PD_TLOBUF_TRF = 0


msg = 'KB4NEW'
for char in msg:
    sleep(.5)
    morse = txt[char]
    if char != " ":
        print("{} = {}".format(char, morse))
    else:
        print(morse)
    for c in morse:
        if c == '.':
            lms.LMS7002.TxTSP['A'].loadDCIQ(0x7fff,0x8000)
            lms.LMS7002.TRF['A'].LOSS_MAIN_TXPAD_TRF = 0
            sleep(.1)
            lms.LMS7002.TxTSP['A'].loadDCIQ(0,0)
            lms.LMS7002.TRF['A'].LOSS_MAIN_TXPAD_TRF = 31
            sleep(.1)
        elif c == '-':
            lms.LMS7002.TxTSP['A'].loadDCIQ(0x7fff,0x8000)
            lms.LMS7002.TRF['A'].LOSS_MAIN_TXPAD_TRF = 0
            sleep(.3)
            lms.LMS7002.TxTSP['A'].loadDCIQ(0,0)
            lms.LMS7002.TRF['A'].LOSS_MAIN_TXPAD_TRF = 31
            sleep(.1)

lms.LMS7002_Reset()
1 Like