Viewing 9 posts - 21 through 29 (of 29 total)
  • Author
    Posts
  • #2660
    Aaron, N3MBH
    Forum Administrator

    Gregg,
    Sounds like you are making some head way. I’ve only lightly tinkered with rigctrl. So if I understand correctly the ‘E’ (uppercase) writes the Memory to the radio and the ‘e’ (lowercase) reads the memory to the radio. I presume much like the F and f do for frequency. I assume that the library for the IC7100 is in Beta or just half baked. This feature is likely supported on other radios.

    So I am assuming that the ‘e’ feature yeilds no results when run directly from the command line. If that is the case then you would probably need to turn to the ic7100.c library in hamlib to track down the issue. If you can fix it maybe make a user contribution to get it up to par.

    I am not sure if you are making your edits to a direct SVXLink module under ORP 2.0.0 or if you are using the dev 2.1.0 code with the new module framework. My initial thoughts for UI for a Rig Control module would be to have the modules settings page present a dropdown list for the rig model (pulled from executing a hamlib/rigctrl command to populate the list) then provide a drop down for various baud rates, and a drop down for available serial pins.

    From there we could create some dynamic fields to allow users enter mapping DTMF commands to Rigctrl functions to suite their needs and what their radio supports. We could of course pre populate it with some defaults.

    I would also need to build in some sort of precheck when going to the settings page to check to make sure that the Hamlib package is installed.

    Just some initial thoughts, but it would be a pretty cool module.

    73,
    Aaron – N3MBH / WRFV871

    OpenRepeater is offered free of charge. Find out how you can support us.

    #2661
    Aaron, N3MBH
    Forum Administrator

    I skimmed the ic7100.c file in Hamlib and I see there there is a “.set_mem” variable on line 260, but it appears to be missing the “.get_mem” variable. Maybe check that out.

    73,
    Aaron – N3MBH / WRFV871

    OpenRepeater is offered free of charge. Find out how you can support us.

    #2662

    Aaron,

    Your description of commands is correct. I haven’t progressed to the point of placing code into the module template. Still playing with standalone tcl files. Where is the 2.1.0 code located?

    I looked through the IC-7100 CI-V options and there is no direct command to read the memory #. The entire contents of the a memory channel can be obtained, which includes a lot of additional settings and would have to be parsed to obtain the channel #. The command set can be viewed from the link below under Advanced Instructions.

    IC-7100 manuals

    I have been attempting to get the ‘w’ (send_cmd) option to work which allows for sending raw data to the rig. This could provide an easy way to debug the interface.

    The command list is quite extensive and is most likely very rig dependent. It make sense to allow for some method of entering user data for each dtmf command. Perhaps the user could modify a config file to setup the details ahead of time.

    -Gregg (WB6YAZ)

    #2699
    Aaron, N3MBH
    Forum Administrator

    Gregg,
    Yes I would tend to agree that the command list is extensive, but mileage will vary from rig to rig. There is a command I believe that list the rig models and it think to also shows what development level that the driver is at.

    Perhaps I can get with you at some point to share ideas on how you are interfacing to your rig via the GPIO, unless you are using a USB to serial cable. I might start to tinker with the HamLib on the Pi myself as time permits.

    73,
    Aaron – N3MBH / WRFV871

    OpenRepeater is offered free of charge. Find out how you can support us.

    #2702

    Hi Aaron,

    I am currently using /dev/ttyUSB0 from the Pi to the IC-7100 USB port.

    I am finding that very few of the rigctl command work with the IC-7100. The interactive mode is useful for checking if commands are working.

    The following tcl command works for changing the frequency and mode.

    exec rigctl {*}{-m 370 -r /dev/ttyUSB0 F 146940000 M FM 6000}

    I am slowly getting up to speed with tcl. I have started modifying your RemoteRelay module to work with several rigctl commands.

    How is the best way to debug a module without using the web interface? Can one simply put the conf, tcl and audio files in their proper directories and then issue an ‘orp_helper svxlink restart’ command?

    Thanks,

    -Gregg (WB6YAZ)

    #2706
    Aaron, N3MBH
    Forum Administrator

    Gregg,
    Sounds like you are making some progress. OK, so you are using a USB cable. I might try when time permits with my FT450D. I have a USB to Serial cable for that. I would guess that the IC-7100 driver is not fully developed and is waiting for someone with the ambition to do so to build it out and debug it.

    I would start with the TCL files and manually creating your config files first for the SVXLink side of the Module. With that you can simply use “orp_helper svxlink restart” to restart the SVXLink core and load the changes to your config.

    Once you start working on the UI side of open repeater and using the build_config.php file to save out config variable, then you will need to make a change in the GUI to invoke the red bar at the top then use the Rebuild & Restart button. That will generate new files from the DB settings or anything you have hard coded in your build_config.php file, then restart SVXLink.

    73,
    Aaron – N3MBH / WRFV871

    OpenRepeater is offered free of charge. Find out how you can support us.

    #2710

    Here is a python example for reading the current frequency (IC-7100 CI-V)

    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-
    """
    Created on Mon Dec 31 09:18:32 2018
    
    ICOM IC-7100 read frequency from CI-V
    
    Command structure = FE FE 88 E0 03 FD
    Return structure = FE FE E0 88 03 FD FE FE E0 88 03 00 00 46 94 01 FD (146940000 Hz)
    
    @author: Gregg Daugherty (WB6YAZ)
    """
    
    import serial
    
    ser = serial.Serial('/dev/ttyUSB0',baudrate=9600,timeout=0.5)
    
    print(ser.isOpen())
    
    ser.flushInput()
    ser.flushOutput()
    
    data = b'\xFE\xFE\x88\xE0\x03\xFD' # read freq
    
    ser.write(data)
    print(data)
    
    s = ser.read_until('')
    print(s)
    
    freq = []
    for i in range (0,17):
        freq.append(hex(s[i])[2:])
    
    freq1 = []
    for i in range(15,10,-1):
        print(i)
        if i == 15:
            freq1.append(freq[i])
        elif len(freq[i]) == 1:
            freq1.append('0')
            freq1.append('0')
        elif len(freq[i]) == 2:
            freq1.append(freq[i][0])
            freq1.append(freq[i][1])
        #i = i - 1  
    freq2 = [int(x.strip('"')) for x in freq1]  
    freq3 = int(1e8*freq2[0] + 1e7*freq2[1] + 1e6*freq2[2] + 1e5*freq2[3] + 1e4*freq2[4]  + 1e3*freq2[5] + 1e2*freq2[6] + 10*freq2[7] + freq2[8])
    
    print(freq)
    print(freq1)
    print(freq2)
    print(freq3)
    
    ser.close()
    #2711

    There are some errors in the above. How does one copy code to a post without having having entries substituted?

    ser = serial.Serial('/dev/ttyUSB0',baudrate=9600,timeout=0.5)

    should be

    ser = serial.Serial(‘/dev/ttyUSB0’, baudrate=9600, timeout=0.5)

    #2902
    Aaron, N3MBH
    Forum Administrator

    To those that may be interested, there is a Rig Control module (utilizing the HamLib RigCtl library) that is in development. Again it will probably be beta for a while and will be limited to what RigCtl supports:

    https://github.com/OpenRepeater/MODULE_Rig_Control

    73,
    Aaron – N3MBH / WRFV871

    OpenRepeater is offered free of charge. Find out how you can support us.

Viewing 9 posts - 21 through 29 (of 29 total)
  • You must be logged in to reply to this topic.