How can I use a C-Media interface with FreeBSD-13.2 and Fldigi?

Good morning: I need some help here. I am trying to use a Masters Communiciations DRA digital interface, which is connected to the computer via a USB port, with Fldigi and my FreeBSD-13.2-RELEASE install. Fldigi (and Flmsg and Flamp) installed flawlessly and run perfectly. Fldigi has a function in it which permits keying the DRA interface on and off using the DRA interface's C-Media sound chip.

When I fire up Fldigi, it detects the interface and activates it correctly for receiving. The waterfall appears as it should, and incoming signals are detected and decoded as they should be.

There is a setting within Fldigi to "key" the DRA digital interface on and off using the C-Media chip's GPIO capabilties. This is called "C-Media PTT". or Push To Talk. This is NOT the same as the PTT function which is used by a different bit of software, specifically, Flrig, to key the transmitter on and off directly.

I have investigated how the Linux users have done this. According to the info I have been given, the process, for Linux, is as below:

Create /etc/udev/rules.d/cmedia.rules and write the single line KERNEL=="hidraw*", SUBSYSTEM=="hidraw". MODE="0664", GROUP="plugdev" into it.

But this does not appear to work in FreeBSD. Nothing happens at all. My conclusion is that the above is not recognized by FreeBSD.

When I do dmesg -a C- , the system returns the correct info about my C-Media device, and it appears on ugen0.6 as uhid1

Is there some "translation" that must be done here? I have included linux_enable="YES" in my rc.conf from the day I installed FreeBSD.

Anyone?

Ken Gordon
 
Last edited:
OK. Doing further research into the FreeBSD system, I find that the new file cmedia.rules, for FreeBSD, could be written into a different directory from that used by Linux, which is /etc/udev/rules.d. In order to write the file shown above, i.e., cmedia.rules into the directory /etc/udev/rules.d, I must mkdir the directories, udev and rules.d. And at this point I am not at all certain that FreeBSD even reads anything there at boot up.

I.e., the file cmedia.rules COULD go into the directory /usr/local/lib/udev/rules.d. In that directory, I also find another ruleset for a joystick. However, I also find that the files in the directory /usr/local/lib/udev/rules.d are system default files and should not be edited or changed....or apparently, added to either.

Yet, when I DO write the file cmedia.rules into the directory /usr/local/lib/udev/rules.d, then rebooting and doing dmesg -a and scrolling through that response, I find the notification: uhid1 devmatch: devinfo init: Invalid Argument, so it appears to me that by doing the above, I am at least getting a response from the system now, but that my file cmedia.rules is not yet correct.

Might anyone here have any idea of how I can correct this issue and permit FLDIGI to use the C-Media PTT function?

From the previous lack of responses to my first question, it would appear to me that either I am asking the wrong questions, or am making other egregious errors, or that my question concerns something so unusual that most of the folks here don't have a clue what I am trying to work with, and couldn't really care about this....which is completely understandable to me. Even so, if someone could suggest a direction for me to pursue, I would be grateful.

Ken
 
I don't have an answer KenGordon. I am currently playing with svxlink with includes an option to talk to a 'hidraw' device.

If all that rule file is doing is setting the group and permission mask, worst case is you do it manually to verify it works and then write your own devd rule.

 
One more thing - the few devd rule files I have created are under /usr/local/etc/devd/.

If the cmedia device appears as '/dev/uhid1' - try the appropriate 'chown / chmod' operations and re-start fldigi. If that works, you can worry about a devd rule later.
 
Well, I am still having no luck whatever getting this to work.

I am going to have some communication with the porter who ported Fldigi over to FreeBSD. Although he did an excellent job on this (he also ported Flmsg and Flamp) I am going to ask him specifically about this issue.

Apparently, it all works just fine in Linux, but won't work at all in the FreeBSD version.

If anyone else has any clue here, I would appreciate hearing from you.

Later,

Ken
 
Back
Top