magellannh / rtl-wx

RTL-Wx logs data from 433Mhz wireless sensors using an RTL-SDR dongle. The Wiki has some screenshots of the results
GNU General Public License v2.0
21 stars 7 forks source link

built error #5

Open cocothenut opened 9 years ago

cocothenut commented 9 years ago

Hello

built from sources for Raspberry Pi with protocol rubicson /* init protocols somewhat ok */ register_protocol(demod, &rubicson, samp_rate);

i got a error :

gcc -O3 -c -o obj/rtl-433fm-demod.o rtl-433fm-demod.c -I. -I/usr/include/libusb-1.0 -Ilibrtlsdr/include rtl-433fm-demod.c:63:25: fatal error: convenience.h: Datei oder Verzeichnis nicht gefunden compilation terminated. Makefile:58: recipe for target 'obj/rtl-433fm-demod.o' failed make: *\ [obj/rtl-433fm-demod.o] Error 1

maybe missing file : convenience.h ?

thanks for any help

magellannh commented 9 years ago

Yes. convenience.h is part of the librtlsdr git project.

The instructions try to walk you through how to set things up on a raspberry pi here: https://github.com/magellannh/rtl-wx/blob/master/doc/RaspberryPi-Install-Instructions/RaspberryPi%20Installation%20Instructions.txt

Step 8b describes how to fetch librtlsdr into the right place and get it built.

magellannh commented 9 years ago

Please reply if you can't get the build issues resolved, if you find anything in the doc that's confusing or wrong, or if you get it working, so I can close this issue. Thx.

cocothenut commented 9 years ago

i did it (built the librtlsdr) , but there is no convenience.h

same errormessage as before

also your path in the instuctions is wrong (librtlsdr/librtlsdr-0.5.3)..

magellannh commented 9 years ago

Maybe the pathing moved around on librtlsdr.

The convenience.h file is here: https://github.com/steve-m/librtlsdr/tree/master/src/convenience

cocothenut commented 9 years ago

thanks for your replies i trie it

magellannh commented 9 years ago

The file just needs to be somewhere on the include path. Just copy it from rtl-wx\src\librtlsdr\src\convenience to rtl-wx\src\librtlsdr\include and it should work.

This file isn't used by rtl-wx, but it's an indirect dependency from the librtlsdr stuff.

magellannh commented 9 years ago

I updated the instructions to include this step so other people won't get tripped up by this.

cocothenut commented 9 years ago

thx for all built works now without errors ,

but no rubicson-protocol for my sensor

i edit in : rtl-433fm-standalone.c :

/* init protocols somewhat ok */

register_protocol(demod, &rubicson, samp_rate); // register_protocol(demod, &prologue, samp_rate); // register_protocol(demod, &silvercrest, samp_rate); // register_protocol(demod, &generic_hx2262, samp_rate); // register_protocol(demod, &technoline_ws9118, samp_rate); // register_protocol(demod, &elv_em1000, samp_rate); // register_protocol(demod, &elv_ws2000, samp_rate); // register_protocol(demod, &waveman, samp_rate); // register_protocol(demod, &steffen, samp_rate); // register_protocol(demod, &acurite_rain_gauge, samp_rate); register_protocol(demod, &oregon_scientific, samp_rate);

but no registering rubicson , console output :

Using device 0: Generic RTL2832U OEM Found Rafael Micro R820T tuner Tuner gain set to automatic. Tuner error set to 56 ppm. Tuned to 433925000 Hz. Oversampling input by: 9x. Oversampling output by: 1x. Buffer size: 16384kB 7.59ms Exact sample rate is: 1080000.025749 Hz Sampling at 1080000 S/s. Output at 120000 Hz. Registering protocol[01] Oregon Scientific Weather Sensor

how to enable rubicson-protocol ?

thx

cocothenut commented 9 years ago

i had rubicson working with using : https://github.com/Batilan/rtl-wx

but with no web output

console output :

Registering protocol[01] Rubicson Temperature Sensor Found 1 device(s): 0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM Found Rafael Micro R820T tuner Exact sample rate is: 250000.000414 Hz Sample rate set to 250000. Sample rate decimation set to 0. 250000->250000 Bit detection level set to 10000. Tuner gain set to Auto. Reading samples in async mode... Tuned to 433920000 Hz. Sensor temperature event: protocol = Rubicson/Auriol rid = 4e temp = 3.2 4e 80 20 f0 00

magellannh commented 9 years ago

I should warn you that integrating a completely new type of sensor that's not Oregon Scientific into rtl-wx is not a small task.

The RTL demodulation and decode part of rtl-wx was already pretty complicated and it became a lot more complicated since I merged in code from the rtl-fm project to simultaneously support rtl-433 devices and the Efergy energy sensor which uses rtl-fm. I did try to retain backward compatibility and the ability to disable the rtl-fm stuff since it causes the pi cpu to work a lot harder than just the rtl-433 code.

For debugging you can simply rename the rtl-433fm binary to rtl-433. This changes the startup code so it doesn't initialize the rtl-fm stuff (see main() at the very bottom of rtl-433fm-standalone.c). This will cause the register protocol call you added in rtl-433fm-standalone.c to be invoked so the rubicson protocol is registered.

Keep in mind that the rtl-433fm (or rtl-433) binary was kept just for debugging. If you just want a tool that outputs stuff to the console, the rtl-433 git project is a much better bet.

To get the rubiscon sensor data integrated into the rtl-wx web server and graph pages, you'll need to do a bunch of work.
1) Comment out EFERGY_SUPPORT_FLAG in Makefile to disable rtl-fm code. 2) Create r_device_rubiscon struct in rtl-433fm-demod.c

3) Add register protocol for rubicson in init_rtl_433_for_rtlwx_without_rtlfm() 4) Add rubiscon message decode routine in rtl-fm-decode.c