<commit_before>multi-rtl-sdr-udp-relay README

=======================
By a enthusiast <<EMAIL>> <<EMAIL>> of Software Defined Radio.

Relay multiple rtl-sdr dongles IQ samples out by UDP packets for easy real-time use in Matlab or other program.

Different dongles IQ samples are sent through different UDP ports.

Currently, it is only tested in Ubuntu Linux (12.04 LTS), and only relay to localhost/host-computer.

Some codes are copied/modified from rtl-sdr: http://sdr.osmocom.org/trac/wiki/rtl-sdr

Build
=======================
Open a shell/command-line, and enter the directory where there is Makefile.

Type "make".


Usage
=======================
	./rtl-sdr-relay -f 409987500 -g 30 -d 0 1 -p 6666 6667 -b 65536 -l 16384
	-f: frequency in Hz. If not specified, 1090000000 will be set as default.
	-g: gain value. If not specified, maximum gain will be set as default.
	-d: device IDs. If not specified, all detected dongles will be involved.
	-p: UDP ports. If not specified, ports will be used begining with 6666, 
	for example, 6666, 6667, 6668.... The number of ports must be equal to the number of dongles or 
	the number of dongles counted from -d option.
	-b: buffer length for reading IQ from dongle. If not specified, default value is 262144.
	-l: length of UDP packet. If not specified, default value is 32768.

	./rtl-sdr-relay
	display help/usage

In matlab, you may receive and process UDP packets like this:

	udp_obj = udp('127.0.0.1', 10000, 'LocalPort', 6666);
	fread_len = 8192; % max allowed
	set(udp_obj, 'InputBufferSize', fread_len);
	set(udp_obj, 'Timeout', 1);
	fopen(udp_obj);
	while 1
	    [a, real_count] = fread(udp_obj, fread_len, 'uint8');
	    if real_count<fread_len
	        continue;
	    end
	
	    //process samples in varable "a"
	    ....
	end

See detail script in recv_proc_udp.m

Contributing
=======================
multi-rtl-sdr-udp-relay was written during the end of 2013 in my spare time. 

You are welcome to send pull requests in order to improve the project.
<commit_msg>improve formate of README<commit_after>multi-rtl-sdr-udp-relay README

=======================
By a enthusiast <<EMAIL>> <<EMAIL>> of Software Defined Radio.

Relay multiple rtl-sdr dongles IQ samples out by UDP packets for easy real-time use in Matlab or other program.

Different dongles IQ samples are sent through different UDP ports.

Currently, it is only tested in Ubuntu Linux (12.04 LTS), and only relay to localhost/host-computer.

Some codes are copied/modified from rtl-sdr: http://sdr.osmocom.org/trac/wiki/rtl-sdr

Build
=======================
Open a shell/command-line, and enter the directory where there is Makefile.

Type "make".


Usage
=======================
	./rtl-sdr-relay -f 409987500 -g 30 -d 0 1 -p 6666 6667 -b 65536 -l 16384
	-f: frequency in Hz. If not specified, 1090000000 will be set as default.
	-g: gain value. If not specified, maximum gain will be set as default.
	-d: device IDs. If not specified, all detected dongles will be involved.
	-p: UDP ports. If not specified, ports will be used begining with 6666, 
	for example, 6666, 6667, 6668.... The number of ports must be equal to the number of dongles or 
	the number of dongles counted from -d option.
	-b: buffer length for reading IQ from dongle. If not specified, default value is 262144.
	-l: length of UDP packet. If not specified, default value is 32768.

	./rtl-sdr-relay
	display help/usage

In matlab, you may receive and process UDP packets like this:

	udp_obj0 = udp('127.0.0.1', 10000, 'LocalPort', 6666);
	udp_obj1 = udp('127.0.0.1', 10000, 'LocalPort', 6667);

	fread_len = 8192; % max allowed
	set(udp_obj0, 'InputBufferSize', fread_len);
	set(udp_obj0, 'Timeout', 1);
	set(udp_obj1, 'InputBufferSize', fread_len);
	set(udp_obj1, 'Timeout', 1);

	fopen(udp_obj0);
	fopen(udp_obj1);
	while 1
	    [a0, real_count0] = fread(udp_obj0, fread_len, 'uint8');
	    [a1, real_count1] = fread(udp_obj1, fread_len, 'uint8');
	    if real_count0~=fread_len || real_count1~=fread_len
	        continue;
	    end
	
	    %process samples from two dongles in varable "a0" and "a1"
	    ....
	end

See detail script in recv_proc_udp.m

Contributing
=======================
multi-rtl-sdr-udp-relay was written during the end of 2013 in my spare time. 

You are welcome to send pull requests in order to improve the project.

{'fraction_non_alphanumeric': 0.12934407364787112, 'fraction_numerical': 0.053164556962025315, 'mean_word_length': 3.7549234135667398, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '847933', 'n_tokens_mistral': 1681, 'n_tokens_neox': 1426, 'n_words': 574}