View Single Post
Posts: 94 | Thanked: 40 times | Joined on Jun 2010 @ Germany
#81
Anyone read the linux documentation about the fm transmitter chip?
There is also an example code to check frequencies for noise, shouldn't it be possible to use it to write a small daemon that checks the current frequency and if it gets noise there scans for a new one?
http://www.mjmwired.net/kernel/Docum...nux/si4713.txt
This is the code
Code:
int main (int argc, char *argv[])
{
	struct si4713_rnl rnl;
	int fd = open("/dev/radio0", O_RDWR);
	int rval;

	if (argc < 2)
		return -EINVAL;

	if (fd < 0)
		return fd;

	sscanf(argv[1], "%d", &rnl.frequency);

	rval = ioctl(fd, SI4713_IOC_MEASURE_RNL, &rnl);
	if (rval < 0)
		return rval;

	printf("received noise level: %d\n", rnl.rnl);

	close(fd);
}
 

The Following 7 Users Say Thank You to weißelstone For This Useful Post: