Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


dra818_radio

DRA818 VHF Voice Transceiver Module


DRA818 VHF Voice Transceiver Module


DRA818 VHF Module connected to Raspberry Pi

Serial config with Python

  • Modify if needed:
    #!/usr/bin/python3
    
    import serial
    
    serport = '/dev/ttyAMA0'
    baud = '9600'
    
    channelspace = '0'      # 0=12.5kHz, 1=25kHz
    
    rxfreq = '144.8000'     # TX frequency
    txfreq = rxfreq         # Same as rx freq.
    
    squelch = '1'           # 0-8 (0 = open)
    
    txcxcss = '0000'        # CTCSS / CDCSS
    rxcxcss = txcxcss       # CTCSS / CDCSS
    
    
    ser = serial.Serial(serport, baud, timeout=2)
    print('Opening port: ' + ser.name) 
    
    print ('\r\nConnecting...')
    ser.write(b'AT+DMOCONNECT\r\n')
    
    output = ser.readline()
    print ('reply: ' + output.decode("utf-8"))
    
    print ('\r\nConfiguring radio...')
    config = 'AT+DMOSETGROUP={},{},{},{},{},{}\r\n'.format(channelspace, txfreq, rxfreq, txcxcss, squelch, rxcxcss)
    ser.write(config.encode())
    output = ser.readline()
    print ('reply: ' + output.decode("utf-8"))
    
    print ('\r\nDisabling filters...')
    ser.write(b'AT+SETFILTER=0,0,0\r\n')
    output = ser.readline()
    print ('reply: ' + output.decode("utf-8"))
    
    print ('\r\nSetting volume...')
    ser.write(b'AT+DMOSETVOLUME=1\r\n')
    output = ser.readline()
    print ('reply: ' + output.decode("utf-8"))

Configuration for DireWolf souncard modem

Dire Wolf is a software “soundcard” modem/TNC and APRS encoder/decoder. Source code: https://github.com/wb2osz/direwolf

  • Create ~/.asoundrc:
    pcm.!default {
            type plug
            slave {
                    pcm "hw:1,0"
            }
    }
    
    ctl.!default {
            type hw
            card 1
    }
  • Mixer settings:
    # Set Microphone levels, mute loopback
    amixer -c1 sset Mic playback 0% cap mute
    amixer -c1 sset Mic capture 75% cap mute
    
    # Set Headphone level
    amixer -c1 sset Headphone playback 70% cap unmute
    
    # Disable auto gain control
    amixer -c1 sset 'Auto Gain Control' cap mute
  • direwolf.conf:
    MYCALL <callsign>
    MODEM 1200 E+ /3
    TXDELAY 20
    PTT GPIO -4         #RPI GPIO 4

WAV / audio test

Configure the radio with pre/de-emphasis and filters, see script above.

  • Text-to-speech example:
    # Set pin 4 as output
    raspi-gpio set 4 op
    
    # Transmit
    raspi-gpio set 4 dl
    
    echo "<callsign>" | cwwav -f 700 -w 20 -o morse.wav && aplay morse.wav
    
    /home/pi/.local/bin/google_speech -l nl "Dit is <callsign>, met een testuitzending."
    
    # Receive
    raspi-gpio set 4 dh
    
dra818_radio.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1