robotastic / trunk-recorder

Records calls from a Trunked Radio System (P25 & SmartNet)
GNU General Public License v3.0
850 stars 191 forks source link

Broadcastify Calls - ubuntu 18.04 getting error sending #347

Closed rwcts closed 4 years ago

rwcts commented 4 years ago

Running Ubuntu 18.04 on laptop. Below is the output of the build with a few errors that may explain the issue but unsure why we are getting them. Also when getting prerequisites installed the libgnuradio-uhd version was showing 3.7.13 but needed to be 3.7.11 That is the only thing different from what was listed on the instructions. Below will also show the output and errors when attempting to run as well as the config.json file.

-----------------------------------------------START build log-------------------------------------- broadcastify@Broadcastify-Calls:~/trunk-recorder$ git clone https://github.com/robotastic/trunk-recorder.git ~/trunk-recorder/ Cloning into '/home/broadcastify/trunk-recorder'... remote: Enumerating objects: 45, done. remote: Counting objects: 100% (45/45), done. remote: Compressing objects: 100% (38/38), done. remote: Total 7226 (delta 16), reused 14 (delta 7), pack-reused 7181 Receiving objects: 100% (7226/7226), 3.52 MiB | 5.33 MiB/s, done. Resolving deltas: 100% (5115/5115), done. broadcastify@Broadcastify-Calls:~/trunk-recorder$ cd ~/trunk-recorder broadcastify@Broadcastify-Calls:~/trunk-recorder$ cmake . -- The CXX compiler identification is GNU 7.5.0 -- The C compiler identification is GNU 7.5.0 -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Build type not specified: defaulting to release. -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Checking for module 'gnuradio-runtime' -- Found gnuradio-runtime, version 3.7.11 -- Found GNURADIO_RUNTIME: /usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so
-- Checking for module 'cppunit' -- Found cppunit, version 1.14.0 -- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl
Checking for GNU Radio Module: RUNTIME

---------------------------END build log ----------------------------------------

-----------------------------START config.json file-------------------------------- { "sources": [{ "center": 851440000.0, "rate": 2048000, "ppm": 69.0, "gain": 35.0, "digitalLevels": 3, "digitalRecorders": 4, "driver": "osmosdr", "device": "rtl=00,buflen=65536", "modulation": "fsk4" }], "systems": [{ "control_channels": [851425000, 851487500], "type": "p25", "shortName": "GHCS", "broadcastifyApiKey": "REAL-KEY-HERE", "broadcastifySystemId": "99", "audioArchive": false }], "broadcastifyCallsServer": "https://api.broadcastify.com/call-upload", "controlWarnRate": 5, "callTimeout": 0.75 } -----------------------------END config.json file--------------------------------

----------------------------START run ./recorder --------------------------------- broadcastify@Broadcastify-Calls:~/trunk-recorder$ ./recorder linux; GNU C++ version 7.3.0; Boost_106501; UHD_003.010.003.000-0-unknown

[2020-05-03 11:50:29.744127] (info) Using Config file: ./config.json

[2020-05-03 11:50:29.744489] (info)

 Trunk Recorder

[2020-05-03 11:50:29.744508] (info)

SYSTEMS

[2020-05-03 11:50:29.744541] (info)

System Number: 1

[2020-05-03 11:50:29.744553] (info) Short Name: GHCS [2020-05-03 11:50:29.744572] (info) System Type: p25 [2020-05-03 11:50:29.744590] (info) Control Channels: [2020-05-03 11:50:29.744648] (info) 8.514250e+08 [2020-05-03 11:50:29.744709] (info) 8.514875e+08 [2020-05-03 11:50:29.744739] (info) API Key: [2020-05-03 11:50:29.744757] (info) Broadcastify API Key: REAL-KEY-HERE [2020-05-03 11:50:29.744777] (info) Broadcastify Calls System ID: 84 [2020-05-03 11:50:29.744794] (info) Upload Script: [2020-05-03 11:50:29.744806] (info) Call Log: true [2020-05-03 11:50:29.744826] (info) Audio Archive: false [2020-05-03 11:50:29.744841] (info) Loading Talkgroups... [2020-05-03 11:50:29.744858] (info) Talkgroups File: [2020-05-03 11:50:29.744870] (info) Loading Unit Tags... [2020-05-03 11:50:29.744882] (info) Unit Tags File: [2020-05-03 11:50:29.744899] (info) Record Unknown Talkgroups: true [2020-05-03 11:50:29.744916] (info) Decode MDC: false [2020-05-03 11:50:29.744932] (info) Decode FSync: false [2020-05-03 11:50:29.744944] (info) Decode Star: false [2020-05-03 11:50:29.744954] (info) Decode TPS: false [2020-05-03 11:50:29.744965] (info) Talkgroup Display Format: Id [2020-05-03 11:50:29.744978] (info) Hide Encrypted Talkgroups: false [2020-05-03 11:50:29.744989] (info) Hide Unknown Talkgroups: false [2020-05-03 11:50:29.744998] (info) Minimum Call Duration (in seconds): 0 [2020-05-03 11:50:29.745012] (info)
[2020-05-03 11:50:29.745021] (info)


SOURCES

[2020-05-03 11:50:29.745054] (info) Driver: osmosdr [2020-05-03 11:50:29.745069] (info) Center: 8.514400e+08 [2020-05-03 11:50:29.745098] (info) Rate: 2048000 [2020-05-03 11:50:29.745126] (info) Error: 0 [2020-05-03 11:50:29.745144] (info) PPM Error: 69 [2020-05-03 11:50:29.745160] (info) Gain: 35 [2020-05-03 11:50:29.745174] (info) IF Gain: 0 [2020-05-03 11:50:29.745186] (info) BB Gain: 0 [2020-05-03 11:50:29.745197] (info) LNA Gain: 0 [2020-05-03 11:50:29.745213] (info) PGA Gain: 0 [2020-05-03 11:50:29.745226] (info) TIA Gain: 0 [2020-05-03 11:50:29.745237] (info) MIX Gain: 0 [2020-05-03 11:50:29.745248] (info) VGA1 Gain: 0 [2020-05-03 11:50:29.745263] (info) VGA2 Gain: 0 [2020-05-03 11:50:29.745275] (info) Squelch: 0 [2020-05-03 11:50:29.745289] (info) Idle Silence: false [2020-05-03 11:50:29.745302] (info) Digital Recorders: 4 [2020-05-03 11:50:29.745318] (info) Debug Recorder: false [2020-05-03 11:50:29.745333] (info) SigMF Recorders: 0 [2020-05-03 11:50:29.745346] (info) Analog Recorders: 0 [2020-05-03 11:50:29.745358] (info) Modulation: fsk4 [2020-05-03 11:50:29.745371] (info) Source Device: rtl=00,buflen=65536 gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.11 built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya freesrp Using device #0 Realtek RTL2838UHIDIR SN: 00000001 Using 15 buffers of size 65536. Detached kernel driver Found Rafael Micro R820T tuner [R82XX] PLL not locked! [2020-05-03 11:50:30.400393] (info) SOURCE TYPE OSMOSDR (osmosdr) [2020-05-03 11:50:30.400458] (info) Setting sample rate to: 2048000 [R82XX] PLL not locked! [2020-05-03 11:50:30.520741] (info) Actual sample rate: 2048000 [2020-05-03 11:50:30.520876] (info) Tunning to 8.514400e+08 [2020-05-03 11:50:30.573002] (info) Gain Stage: LNA supported values: 0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48 49.6 [2020-05-03 11:50:30.573085] (info) Max Freqency: 8.524000e+08 [2020-05-03 11:50:30.573133] (info) Min Freqency: 8.504800e+08 [2020-05-03 11:50:30.599017] (info) Gain set to: 33.8 [2020-05-03 11:50:30.599138] (info) Setting antenna to [RX] Decim: 16 Decim2: 4 [2020-05-03 11:50:30.663546] (info) P25 Recorder two-stage decimator - Initial decimated rate: 128000 Second decimated rate: 32000 FA: 6250 FB: 16000 System Rate: 2048000 [2020-05-03 11:50:30.682509] (info) P25 Recorder ARB - Initial Rate: 2048000 Resampled Rate: 32000 Initial Decimation: 16 System Rate: 24000 ARB Rate: 0.75 Project 25 IMBE Encoder/Decoder Fixed-Point implementation Developed by Pavel Yazev E-mail: pyazev@gmail.com Version 1.0 (c) Copyright 2009 This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see the file ``LICENSE'' for details. Decim: 16 Decim2: 4 [2020-05-03 11:50:30.685764] (info) P25 Recorder two-stage decimator - Initial decimated rate: 128000 Second decimated rate: 32000 FA: 6250 FB: 16000 System Rate: 2048000 [2020-05-03 11:50:30.692777] (info) P25 Recorder ARB - Initial Rate: 2048000 Resampled Rate: 32000 Initial Decimation: 16 System Rate: 24000 ARB Rate: 0.75 Decim: 16 Decim2: 4 [2020-05-03 11:50:30.696104] (info) P25 Recorder two-stage decimator - Initial decimated rate: 128000 Second decimated rate: 32000 FA: 6250 FB: 16000 System Rate: 2048000 [2020-05-03 11:50:30.703228] (info) P25 Recorder ARB - Initial Rate: 2048000 Resampled Rate: 32000 Initial Decimation: 16 System Rate: 24000 ARB Rate: 0.75 Decim: 16 Decim2: 4 [2020-05-03 11:50:30.706244] (info) P25 Recorder two-stage decimator - Initial decimated rate: 128000 Second decimated rate: 32000 FA: 6250 FB: 16000 System Rate: 2048000 [2020-05-03 11:50:30.715976] (info) P25 Recorder ARB - Initial Rate: 2048000 Resampled Rate: 32000 Initial Decimation: 16 System Rate: 24000 ARB Rate: 0.75 [2020-05-03 11:50:30.720016] (info)

[2020-05-03 11:50:30.720085] (info)


INSTANCE

[2020-05-03 11:50:30.720142] (info) Capture Directory: /home/broadcastify/trunk-recorder [2020-05-03 11:50:30.720158] (info) Upload Server: [2020-05-03 11:50:30.720176] (info) Broadcastify Calls Server: https://api.broadcastify.com/call-upload [2020-05-03 11:50:30.720196] (info) Status Server: [2020-05-03 11:50:30.720210] (info) Instance Key: [2020-05-03 11:50:30.720227] (info) Instance Id: [2020-05-03 11:50:30.720246] (info) Broadcast Signals: false [2020-05-03 11:50:30.720268] (info) Default Mode: digital [2020-05-03 11:50:30.720293] (info) Call Timeout (seconds): 3 [2020-05-03 11:50:30.720314] (info) Log to File: false [2020-05-03 11:50:30.720337] (info) Control channel warning rate: 5 [2020-05-03 11:50:30.720357] (info) Control channel retune limit: 0 [2020-05-03 11:50:30.720377] (info) Frequency format: 0 [2020-05-03 11:50:30.720396] (info) Status as String: true [2020-05-03 11:50:30.720415] (info) Log Level: info [2020-05-03 11:50:30.720448] (info) [GHCS] Started with Control Channel: 8.514250e+08 Decim: 16 Decim2: 4 [2020-05-03 11:50:30.720698] (info) P25 Trunking two-stage decimator - Initial decimated rate: 128000 Second decimated rate: 32000 FA: 6250 FB: 16000 System Rate: 2048000 [2020-05-03 11:50:30.731868] (info) P25 Trunking ARB - Initial Rate: 2048000 Resampled Rate: 32000 Initial Decimation: 16 System Rate: 24000 ARB Rate: 0.75 [2020-05-03 11:50:33.004352] (error) [GHCS] Retuning to Control Channel: 8.514875e+08 [2020-05-03 11:50:33.004500] (info) - System Source 0 - Min Freq: 8.504800e+08 Max Freq: 8.524000e+08 [2020-05-03 11:50:33.004641] (error) [GHCS] Control Channel Message Decode Rate: 0.666667/sec, count: 2 [2020-05-03 11:50:36.006508] (error) [GHCS] Retuning to Control Channel: 8.514250e+08 [2020-05-03 11:50:36.006706] (info) - System Source 0 - Min Freq: 8.504800e+08 Max Freq: 8.524000e+08 [2020-05-03 11:50:36.006854] (error) [GHCS] Control Channel Message Decode Rate: 1/sec, count: 3 [2020-05-03 11:50:39.009276] (error) [GHCS] Retuning to Control Channel: 8.514875e+08 [2020-05-03 11:50:39.009397] (info) - System Source 0 - Min Freq: 8.504800e+08 Max Freq: 8.524000e+08 [2020-05-03 11:50:39.009527] (error) [GHCS] Control Channel Message Decode Rate: 1/sec, count: 3 [2020-05-03 11:50:42.009762] (error) [GHCS] Retuning to Control Channel: 8.514250e+08 [2020-05-03 11:50:42.009901] (info) - System Source 0 - Min Freq: 8.504800e+08 Max Freq: 8.524000e+08 [2020-05-03 11:50:42.010275] (error) [GHCS] Control Channel Message Decode Rate: 1/sec, count: 3 [2020-05-03 11:50:45.011586] (error) [GHCS] Retuning to Control Channel: 8.514875e+08 [2020-05-03 11:50:45.011710] (info) - System Source 0 - Min Freq: 8.504800e+08 Max Freq: 8.524000e+08 [2020-05-03 11:50:45.011822] (error) [GHCS] Control Channel Message Decode Rate: 1/sec, count: 3 [2020-05-03 11:50:48.011074] (error) [GHCS] Retuning to Control Channel: 8.514250e+08 [2020-05-03 11:50:48.011202] (info) - System Source 0 - Min Freq: 8.504800e+08 Max Freq: 8.524000e+08 [2020-05-03 11:50:48.011344] (error) [GHCS] Control Channel Message Decode Rate: 1/sec, count: 3 ^Z [5]+ Stopped ./recorder broadcastify@Broadcastify-Calls:~/trunk-recorder$

----------------------------START run ./recorder ---------------------------------

bctrainers commented 4 years ago

Looking through the code, most of those compile notices/warnings are just that, informational warning or notice.

[ 68%] Building CXX object CMakeFiles/recorder.dir/trunk-recorder/uploaders/call_uploader.cc.o /home/broadcastify/trunk-recorder/trunk-recorder/main.cc: In function ‘void unit_check()’: /home/broadcastify/trunk-recorder/trunk-recorder/main.cc:984:11: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] system(shell_command);

and

[ 70%] Building CXX object CMakeFiles/recorder.dir/trunk-recorder/call_conventional.cc.o /home/broadcastify/trunk-recorder/trunk-recorder/uploaders/call_uploader.cc: In function ‘void upload_call_thread(void)’: /home/broadcastify/trunk-recorder/trunk-recorder/uploaders/call_uploader.cc:28:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] system(shell_command);

and

[ 73%] Building CXX object CMakeFiles/recorder.dir/trunk-recorder/systems/p25_trunking.cc.o /home/broadcastify/trunk-recorder/trunk-recorder/call.cc: In member function ‘void Call::end_call()’: /home/broadcastify/trunk-recorder/trunk-recorder/call.cc:184:15: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] system(shell_command.str().c_str());

Ref Pull Request: https://github.com/robotastic/trunk-recorder/pull/329

@EricTendian, it may be worthwhile doing a quick review of those three code segments in ref to the pull request that was merged in.

bctrainers commented 4 years ago

Also, we need to know what system you are wanting to monitor, decode, and record. An RRDB link would be best, along with the system ID('s) that you're after. It's possible that the single RTLSDR in use cannot cover the entire spectrum needed.

Additionally, a PPM error of 69 is quite large for a SDR - do ensure that is that is indeed correct. Generally, if you're having PPM errors that large, it would be best to obtain another RTLSDR.

rwcts commented 4 years ago

Thank you for the update. I also received some info from broadcastify as well and The example they list on their site wiki was changed some. They also said in credit to them just like your saying is that the PPM is different with each piece of hardware and needs to be checked. GQRX was recommended to play with and allow testing to see the best PPM setting for the RTL-SDR used. This worked and it should have been set at 0 as that was the best reception. And for historical notes. I used the NOAA weather frequency to test the best PPM. Its an interesting process but that worked well.

I did reset some of the original settings but below is the RRDB frequencies. This setup now seems to be working. Also this may NOT be good information but the two RTL-SDR dongles (aluminum cases) are different and received different results. One is the v3 with BIAS+HF that did NOT work no matter what I tried but then the one without a version number and does not have the BIAS+HF on the label worked with the attached settings.

In addition keep in mind that Radio Reference page references to have in the config file "modulation": "fsk4" however for me that does not work at all and it must be "modulation": "qpsk" This is likely different depending on the equipment used but was my experience.

3 (3) | 040 (28) | Goodhue Co. Simulcast | Goodhue | 851.425c | 851.4875a | 851.675 | 851.7125 | 851.975a | 852.450 | 852.750|852.900 | 853.100 | 853.400 | 853.675 | 853.700 | 854.3625 |   https://www.radioreference.com/apps/db/?siteId=13268

Below is the new config file that is working.

{ "sources": [{ "center": 852290000.0, "rate": 2048000, "ppm": 0.0, "gain": 35.0, "digitalLevels": 3, "digitalRecorders": 4, "driver": "osmosdr", "device": "rtl=00,buflen=65536", "modulation": "qpsk" }], "systems": [{ "control_channels": [851425000, 851487500, 851975000, 853400000], "type": "p25", "shortName": "GHCS", "broadcastifyApiKey": "REAL-KEY-HERE", "broadcastifySystemId": "99", "audioArchive": false }], "broadcastifyCallsServer": "https://api.broadcastify.com/call-upload", "controlWarnRate": 5, "callTimeout": 0.75 }

bctrainers commented 4 years ago

Great to hear it's working now.

Modulation is one of those 50/50 things... if FSK doesn't work than QPSK likely will. :)

I'm a bit curious about the RTLSDR hardware differences. I've quite a few RTLSDR's laying around from 2015 to 2019. So I probably have some sticks like what you describe. :)

rwcts commented 4 years ago

I was able to do some more testing and the BIAS T+HF is working. I am unsure why since I had troubleshoot multiple times with the same results. However I have included the photos of inside front and back of both units as asked. Thanks! rtlsdr-NObias rtlsdr-wbias