Author Topic: Using the FMT212R radio  (Read 1136 times)

Online JonB256

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Granbury, Texas
  • Posts: 5,208
  • Kudos: 124
    • Granbury Christmas Lights
Using the FMT212R radio
« on: October 31, 2013, 04:52:48 AM »

 Materdaddy, in chat you said "I have some code in linux that changes the frequency of the FMT212R! W00T!!!"

So I looked it up. USB controlled from PC or Pi ??

RDS capability and about $120 from AliExpress?

Tell me (us) more about what you've been doing with this.

Offline Materdaddy

  • Moderator
  • *****
  • Join Date: Jul 2013
  • Location: Oceanside, CA
  • Posts: 2,050
  • Kudos: 10
    • Christmas On Quiet Hills
Re: Using the FMT212R radio
« Reply #1 on: October 31, 2013, 08:57:19 AM »
I actually bought mine through a group buy last year for $100.

Two of the usual "DIYC" vendors list them, but both are out of stock:

I found out that I could configure it in windows, save the configuration to EEPROM and plug it into a linux machine and the audio portion shows up as a generic USB/Audio device, meaning I can switch the output of my linux machine and transmit the audio.

I originally bought this not even knowing it might be controllable in linux.  Once I got it, the eventual plan was to use it in my display, but I still didn't know it would be possible without TONS of effort.  A month or two ago Gizmo posted on DIYC that there was source code available for various versions/similar devices using the same chip, etc. and he was working on stuff for Vixen 3.  I was able to get some links and downloaded a few repositories.

One was this repository called fmstick that uses Qt and is cross-platform:

  * Cross-platform
  * Compiled & worked (mostly) right out of the repository on my linux machine
  * Supports tons of features for the device (setting RDS, changing all sorts of parameters, reading/writing EEPROM, etc.)
  * GUI (this is a con for the PI)
  * Very unstable - crashes a lot

There were also posts from drlucas on DIYC and we exchanged a few PMs.  He found a CLI version, but it wasn't very useful because it was based on the USB device/I2c hookup that isn't used in this VAST, even though it was a similar chip:

  * CLI, what we want for our use-case
  * Didn't work, even after changing the usb product ID and vendor ID

After a couple PMs with drlucas and digging through the fmstick source, generating logging using the compiled fmstick, I was able to see that all the "guts" happen in fmtx.c which is the main API to control the device so I got that compiling separate from fmstick and started tweaking things.

Currently the only thing my code does is change the transmit frequency, but I don't store it because I don't want to screw up the eeprom.  I need to investigate the order of operations to the device based on the (mostly) working fmstick application and go from there, but the good news is, I have successfully been transmitting and changed frequency.

Here's what I have so far:


Back to top