[chirp_devel] Getting started with the Alinco DR-635

Nate Bargmann
Mon Jul 25 20:39:59 PDT 2016


I am revisiting this after a bit of a break.

I think I have narrowed down some things.  For example, it seems as
though this radio simply responds with a '\n' rather than an "OK" string
like the other Alinco models  Here is where I am at now:

$ ./chirpc --log ./dr635.txt -r Alinco_DR635T --serial=/dev/ttyUSB0 --mmap=dr635t.img --download-mmap

Contents of dr635.txt:

[2016-07-25 22:20:42,234] chirp.logger - DEBUG: log level=10
[2016-07-25 22:20:42,235] chirp.logger - DEBUG: CHIRP 0.3.0dev on Linux - Devuan GNU/Linux 1 (Python 2.7.9)
[2016-07-25 22:20:42,235] chirpc - INFO: opening /dev/ttyUSB0 at 9600
[2016-07-25 22:20:42,236] chirp.drivers.alinco - DEBUG: PC->R: ( 7) 'DR635\r\n'
[2016-07-25 22:20:42,746] chirp.drivers.alinco - DEBUG: R->PC: ( 1) '\n'
[2016-07-25 22:20:42,746] chirp.drivers.alinco - DEBUG: PC->R: (11) 'AL~F0000R\r\n'
[2016-07-25 22:20:42,808] chirp.drivers.alinco - DEBUG: R->PC: (41) '\r\nA533553C0000000000000000000000000000000'
[2016-07-25 22:20:42,808] chirpc - ERROR: Unexpected response from radio
Traceback (most recent call last):
  File "./chirpc", line 377, in <module>
    radio.sync_in()
  File "/home/nate/git/chirp.hg/chirp/drivers/alinco.py", line 197, in sync_in
    self._mmap = self._download(self._memsize)
  File "/home/nate/git/chirp.hg/chirp/drivers/alinco.py", line 138, in _download
    data += self._download_chunk(addr)
  File "/home/nate/git/chirp.hg/chirp/drivers/alinco.py", line 118, in _download_chunk
    raise errors.RadioError("Unexpected response from radio")
RadioError: Unexpected response from radio

The response to the AL-F0000R command seems consistent and is
encouraging.

However, I am not at all up to speed on Python (I'm a C guy) and it
appears as though the _identify() method in the AlincoStyleRadio() class
needs to be overridden by the DR635Radio() class I'm trying to develop.
I've tried various incorrect ways to do the override but am obviously
missing something as I can change the tested response string in
_identify() method, but then it's broken for all other models.

Is someone willing to help by writing the proper code that I can test?
So far I have made it to:

@directory.register
class DR635Radio(DRx35Radio):
    """Alinco DR635"""
    VENDOR = "Alinco"
    MODEL = "DR635T"

    _model = "DR635"
    _memsize = 8192
    _range = [(136000000, 174000000), (335000000, 480000000)]
    _power_levels = [chirp_common.PowerLevel("Low", watts=5.00),
                     chirp_common.PowerLevel("Med", watts=20.00),
                     chirp_common.PowerLevel("High", watts=50.00)]


    @classmethod
    def match_model(cls, filedata, filename):
        return len(filedata) == cls._memsize and \
            filedata[0x64] == chr(0x00) and filedata[0x65] == chr(0x00)

    def _DRx35Radio__identify(self):
        for _i in range(0, 3):
            self._send("%s\r\n" % self._model)
            resp = self._read(16)
            if resp == '\n':
                return True
            time.sleep(1)


            return False


73, Nate

-- 

"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."

Ham radio, Linux, bikes, and more: http://www.n0nb.us



More information about the chirp_devel mailing list