• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created over 11 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build an open source fm radio station with your raspberry pi

FMBerry Logo FMBerry

Written by Tobias Mädel ([email protected])

http://tbspace.de

What is this?

FMBerry is a piece of software that allows you to transmit FM radio with your Raspberry Pi.

YouTube-Video

How does it work?

It uses the Sony-Ericsson MMR-70 transmitter, which was originally intended for use with Sonys Walkman cellphones from early 2000s. You can get these for really cheap from Amazon.

If you can't seem to get one, contact me via Mail ([email protected]), I managed to get hold of quite a lot of these transmitters.

What do I need to build this?

  • MMR-70 transmitter
  • Raspberry Pi (compatible & tested with every Pi, Model Beta, A, B, B+, 2, Zero, 3)
  • Soldering equipment (soldering iron and some solder)
  • Cable for connecting to your Raspberry Pis GPIO port (old IDE cable does work fine!)

The hardware is explained here: HARDWARE.md

Installation

This software was developed under Raspbian Wheezy 2013-02-09.

Arch Linux users: AUR - fmberry-rpi-git

Step 1: Enabling I²C

Open raspi-blacklist.conf:

sudo nano /etc/modprobe.d/raspi-blacklist.conf

Comment out the Line "blacklist i2c-bcm2708" with a #. Save with Ctrl+O and close nano with Ctrl+X

To make sure I²C Support is loaded at boottime open /etc/modules.

sudo nano /etc/modules

Add the following lines:

i2c-dev

Then again, Save with Ctrl+O and then close nano with Ctrl+X.

Please reboot your Raspberry after this step.

Step 2: Installing I²C tools and dependencies for the build

First update your local package repository with sudo apt-get update

then install all needed software with the following command: sudo apt-get install i2c-tools build-essential git libconfuse-dev

Step 3: Finding out your hardware revision

Run cat /proc/cpuinfo | grep "CPU revision" in your terminal.

All Raspberry Pi's with a revision newer than rev. 2 have their i2c port connected up to /dev/i2c-1.

Older devices (beta, alpha, early 256MB Model B's) have it connected up to /dev/i2c-0.

Step 4: Checking the hardware

You can check your wiring with the following command:

i2cdetect -y 1

Please remember that you need to run the command on another port on older revisions!

i2cdetect -y 0

You should then see your transmitter at 0x66.

If you are not able to see your transmitter please double check your wiring!

If you connect you MMR-70 to I²C bus 0 on Raspberry Pi rev2 make sure that header P5 pins are configured as I²C pins!

Output of i2cdetect

Step 5: Building the software

To build the software execute the following commands (in your homefolder):

git clone https://github.com/Manawyrm/FMBerry/
cd FMBerry

If you have got an old revision board, please open fmberryd.c and change the RPI_REVISION definition to RPI_REV1!

make

Compiling the software will take a couple of seconds.

Step 6: Installing the software

FMBerry is essentially a daemon called fmberryd. To install it into your system path type sudo make install.

You can start it by typing sudo /etc/init.d/fmberry start.

To control the daemon you have to use ctlfmberry.

It currently allows the following commands:

  • ctlfmberry set freq 99000 - Frequency in kHz (76000 - 108000)
  • ctlfmberry poweron
  • ctlfmberry poweroff
  • ctlfmberry set rdsid DEADBEEF (8 chars! Longer strings will be truncated, shorter - padded with spaces)
  • ctlfmberry set rdstext Mike Oldfield - Pictures in the Dark (max. 64 chars. Longer strings will be truncated)
  • ctlfmberry set txpwr 0 - 0.5 mW Outputpower
  • ctlfmberry set txpwr 1 - 0.8 mW Outputpower
  • ctlfmberry set txpwr 2 - 1.0 mW Outputpower
  • ctlfmberry set txpwr 3 - 2.0 mW Outputpower (Default.)
  • ctlfmberry stereo on - Enables stereo signal (Default)
  • ctlfmberry stereo off - Disables stereo signal
  • ctlfmberry muteon - Mute audio
  • ctlfmberry muteoff - Unmute audio
  • ctlfmberry gainlow - Audio gain -9dB
  • ctlfmberry gainoff - Audio gain 0dB"
  • ctlfmberry set volume 0-6 Audio volume level 0 to 6, equal -9dB to +9db, 3dB step
  • ctlfmberry status - Print current status
  • ctlfmberry stop - Stop FMBerry daemon

That's it! :)

Step 7: Debugging

FMBerry writes debugging output to /var/log/syslog.

You can watch the information by running ctlfmberry log. It's essentially just a cat /var/log/syslog | grep fmberryd

It will tell you what's wrong.

Updating the software

Please check for new dependencies. You can safely just run the apt-get install command again. It will only install new dependencies if necessary.

First stop the daemon by typing /etc/init.d/fmberry stop.

Then run git pull followed by a make and a sudo make install.

You can then start FMBerry again with /etc/init.d/fmberry start.

Notes

  • WARNING! I am not a professional C programmer. Please expect this software to have major security flaws. Please don't expose it's control port to the internet! I'm fairly certain that this software is vulnerable to buffer overflows.

  • If you are a C programmer, please help by securing this software and sending a pull request.

  • The Daemon itself is essentially a simple TCP server. It is listening to Port 42516. (set in fmberry.conf) You can control it by sending the exact same commands you would give to ctlfmberry.

  • For information on How to control the Daemon have a look into ctlfmberry. It's a simple shell script.

  • Feel free to contact me: [email protected] (english and german)

Projects using FMBerry

https://github.com/Manawyrm/FMBerryRDSMPD (streaming of MPD title data via RDS) https://github.com/akkinitsch/FMBerryRemote (streaming of internet radio streams, controllable via Webinterface) http://achilikin.blogspot.de/2013/06/sony-ericsson-mmr-70-transmitter-led.html (enabling the LED on the transmitter to be software controllable)

Common problems

The daemon does not show anything.

That's normal. You have to use ./ctlfmberry to control the daemon.

I can't seem to hear music.

Turn up the volume/unmute your raspi with alsamixer.

I am getting compile errors.

Did you install all dependencies? (All lines with apt-get)

The transmission dies after a couple of minutes.

You didn't disable the internal processor of the MMR70. Do this by connecting TP18 to GND.

The power supply of the raspberry pi shorts out/there are no lights anymore_

There is a short circuit. Probably caused by a wiring fault or by using an 80pin IDE cable for connecting the FMBerry.

Alternative linux distributions don't detect the I2C bus (ArchLinux, OpenWRT, OSMC)

Linux 3.18 introduced a new feature called Device Tree support. To get the I²C Bus working, you need to put this configuration at the end of /boot/config.txt (change the first parameter according to the RPi you have):

device_tree=bcm2708-rpi-b-plus.dtb
device_tree_param=i2c1=on
device_tree_param=spi=on

Thanks to Daniel for the solution to that problem!

More Repositories

1

fxIP

TCP/IP for Casio fx-9860 graphical calculators (with SLIP support, uIP stack)
C
221
star
2

pata-gpio

Linux kernel driver for PATA bit-banging over GPIOs
C
165
star
3

nvme-int13h-optionrom

Option ROM to boot x86 PCs from NVMe drives (legacy BIOS, INT 13h)
C
122
star
4

ISA8019

RTL8019-based ISA network card, NE2000-compatible
HTML
107
star
5

ISASTM

STM32-based ISA-over-USB-adapter
HTML
107
star
6

sdrsharp-plutosdr

ADALM-PLUTO frontend for SDRSharp
C#
102
star
7

rock_lobster

Linux kernel module for providing /proc/lobster
C
31
star
8

headsetcontrol-notificationd

Logitech G933 battery notification daemon for Linux
PHP
29
star
9

Gigaset-Debug-Adapter

OpenSCAD
28
star
10

ESP32_VirtualPrinter

ESP32 emulator for LPT/parallel port printers
C++
25
star
11

ISASTM-Firmware

C
24
star
12

PHPPLD

Use EEPROMs as programmable logic with PHP
PHP
22
star
13

AnotterKiosk

Just an-otter kiosk OS for Raspberry Pis and x86 PCs
Shell
21
star
14

ESP8266-HTTP

semi-HTTP-compliant lua libary to download files and send GET requests
Lua
20
star
15

ISAMega

ISA-bus implementation for Arduino Mega 2560 / AVR processors
C++
19
star
16

ATAPIMega-Firmware

Firmware for standalone (P)ATA/ATAPI CD Player
C++
14
star
17

RC2014-Ethernet

RTL8019 Ethernet card for the RC2014 Z80 computer
13
star
18

plutosdr-readsb-fr24feed

PlutoSDR standalone ADS-B decoder and FR24 feeder (using readsb)
Shell
13
star
19

PC104-ISA-Card

Adapter for mounting a PC104 module onto an ISA card (for use with a 16bit backplane)
12
star
20

ATAPIHat-SMI

High-speed ATAPIHat for BCM2835 Secondary Memory Interface
HTML
11
star
21

ATAPIMega

Standalone (P)ATA/ATAPI CD Player
HTML
10
star
22

SolarCamPi

solar-powered WiFi webcam
HTML
9
star
23

CMM2-JLC

Colour Maximite 2 - unofficial PCB design for automated assembly
HTML
8
star
24

RC2014-Ethernet-Firmware

Z80 software for RTL8019-based Ethernet adapter
C
8
star
25

cloudlog-rigctl-interface

Connects Cloudlog to rigctld / hamlib via PHP
PHP
8
star
26

FMBerryRDSMPD

Allows you to stream MPD song information via FM radio
JavaScript
8
star
27

ISAMega-x86Emuator

libx86emu-based emulator to run ISA VGA bioses
C
8
star
28

ESP32-IrDA-MCP2120

ESP32-based IrDA adapter (emulating MCP2120 protocol)
C++
6
star
29

PAL-GAL-CI

Continuous integration build scripts for Atmel/Microchip GAL/PAL (like 22V10, 16V8, etc.)
6
star
30

Gigaset-Ringtone-Converter

Gigaset propritary ringtone format (L22 / 722) encoder/decoder, written in PHP
PHP
6
star
31

unifirespondd

UniFi respondd bridge using SNMP
PHP
5
star
32

switchconf

YAML-based ethernet switch automation tool for consumer/home-use (TP-Link TL-SG105, etc.)
Python
5
star
33

RC2014-MIDISynth

MIDI synthesizer for the RC2014, using YM2149/AY-3-8910
C
5
star
34

NeonMatrix

neon bulb matrix, very dangerous, pretty deadly!
5
star
35

LipoSolder

AVR-based PID-regulated soldering station
Arduino
4
star
36

RC2014-CFBootloader

RC2014/Z80 CF card bootloader (and small OS)
C
4
star
37

gigaset-c430-modding

Firmware hacking on the Gigaset C430 DECT phones (custom ringtones, etc.)
Shell
4
star
38

Vortex-X-ISA-Card

Adapter for mounting a Vortex86DX module onto an ISA card (for use with a 16bit backplane)
3
star
39

slirpNG

fixed version of slirp (PPP/SLIP) emulator for compiling on newer *nix versions
C
3
star
40

internetconnectionwizard-server

Server for vintage Windows Internet Connection Wizard auto dial-up ISP discovery
PHP
3
star
41

Thinkpad820

Linux on ThinkPad PowerSeries 820/850
C
3
star
42

ATAPIHat

[experimental, very slow] ATA/ATAPI hat for Raspberry Pi
3
star
43

dn42info

bird peering status page written in PHP -- Initial idea and design by @Sammy8806
PHP
3
star
44

AVRAMTransmitter

Allows you to transmit great music via AM band just with an arduino and some stuff vom RadioShack!
Arduino
3
star
45

ATXflip

soft-powerswitching for ATX power supplies
Makefile
2
star
46

IrDA_RS232

IrDA to RS232, using MCP2155, can be embedded into Modems, ISDN TAs, printers, etc.
2
star
47

freifunkClients

Munin plugin for monitoring wifi clients in Freifunk networks
2
star
48

nRFPowerMonitor

Control a MingHe VAC-1030A wireless power monitor with a Raspberry Pi
PHP
2
star
49

ImagePost

Java
2
star
50

NeonMatrix-Firmware

firmware for 74HC595 neon bulb indicator matrix
C++
2
star
51

sq-1000-terminal

AVR firmware to convert an old typewriter to a teletype
C++
2
star
52

Z80-CF-Driver

RC2014/Z80 CF card implementation in C / z88dk
C
2
star
53

HB-Sen-Env-I-Firmware

Firmware for HB-Sen-Env temperature, humidity and pressure sensor
C++
1
star
54

pulso-r500-membrane

OpenSCAD model of the membrane for a Pulso R500 pulse jet
OpenSCAD
1
star
55

typo3-4.5-mysqli-adapter

experimental mysqli_* database adapter for Typo3. YMMV!
PHP
1
star
56

RC2014-MX29F001

MX29F001B 128KiB Flash board, compatible with RC2014
1
star
57

warehouseTurtles

Fully automated ComputerCraft-turtle warehouse with sorting, indexing and a graphic terminal
1
star
58

ras

open source ISDN/synchronous network access server (similar to PortMaster, etc.)
C
1
star
59

pdfsandwich-txt-output

Hacked version of pdfsandwich with additional txt-file-output
OCaml
1
star
60

RC2014-CFHexLoader

RC2014/Z80 Intel .hex to CF card uploader with FAT16/32 support
C
1
star
61

FreifunkFlasher

Windows utility for flashing Ubiquiti AC-wifi devices with Freifunk firmware
1
star
62

CCPDATaxi

ComputerCraft - ImmibisAMI -- PDA-based Waypoint teleport
Lua
1
star
63

NE2PI-Node

Analogue cable/terrestrial TV headend, based on a Raspberry Pi cluster (node firmware)
Shell
1
star
64

RTTTLGrubInitTunes

run play.sh.
C
1
star
65

odroid-go-a2dp-bt-speaker

Odroid Go - A2DP Bluetooth speaker
C
1
star
66

RC2014-LPT

1
star
67

dhltrack_cs

C# (windows) version of dhltrack
C#
1
star
68

hm-i2c-dimmer

STM32-based I2C PWM LED dimming controller
Makefile
1
star
69

SMAPHPConnect

fetches data from SMA solar inverters via ModBus
PHP
1
star