Thursday, July 27, 2023

how to decode Radiosonde Weathex Wxr-301D | Raspberry Pi 4 8Gb.

 Ini adalah kaedah yang paling asas sekali dalam proses dekod payload ini.


step 1 :

git clone https://github.com/rs1729/RS.git --branch test --single-branch

cd RS

cd weathex

ls

tukar nama file weathex_20230512_401100kHz.c ke weathex.c , pendek sikit sedap mata memandang.

mv weathex_20230512_401100kHz.c weathex.c  

compile fail weathex.c

gcc weathex.c -lm -o weathex

OK siap, sekarang mari kita test. download sample audio Wxr-301D di sini, kredit kepada 9W2RUT diatas rakamannya. ini adalah rakaman radiosonde KLIA.

https://drive.google.com/drive/folders/18_jP7fFdnwR7SiAJHTHSYHdl4uiUZMTl

pilih mana-mana rakaman, saya pilih yang paling kecil saiz dia (jimat masa sikit nak test). Kemudian...

./weathex -b audio_401100000Hz_20-19-46_12-05-2023.wav  

hasilnya adalah seperti ini.

pi@9m2zak:~/RS/weathex $ ./weathex -b audio_401100000Hz_20-19-46_12-05-2023.wav 

sample_rate: 48000

bits       : 16

channels   : 2

samples/bit: 10.00

 (0x89375412)  [ 4325]  12:19:22  alt: 12296.7  lat: 2.6765  lon: 101.5865   [OK]

 (0x89375412)  [ 4326]  12:19:23  alt: 12300.8  lat: 2.6765  lon: 101.5865   [OK]

 (0x89375412)  [ 4327]  12:19:24  alt: 12305.2  lat: 2.6765  lon: 101.5864   [OK]

 (0x89375412)  [ 4328]  12:19:25  alt: 12309.2  lat: 2.6765  lon: 101.5864   [OK]

 (0x89375412)  [ 4329]  12:19:26  alt: 12313.2  lat: 2.6766  lon: 101.5863   [OK]

 (0x89375412)  [ 4330]  12:19:27  alt: 12317.4  lat: 2.6766  lon: 101.5863   [OK]

 (0x89375412)  [ 4331]  12:19:28  alt: 12321.7  lat: 2.6766  lon: 101.5862   [OK]

 (0x89375412)  [ 4332]  12:19:29  alt: 12325.9  lat: 2.6767  lon: 101.5862   [OK]

 (0x89375412)  [ 4333]  12:19:30  alt: 12330.2  lat: 2.6767  lon: 101.5861   [OK]

 (0x89375412)  [ 4334]  12:19:31  alt: 12333.9  lat: 2.6767  lon: 101.5861   [OK]

 (0x89375412)  [ 4335]  12:19:32  alt: 12338.4  lat: 2.6768  lon: 101.5860   [OK]

 (0x89375412)  [ 4336]  12:19:33  alt: 12342.3  lat: 2.6768  lon: 101.5860   [OK]

 (0x89375412)  [ 4337]  12:19:34  alt: 12346.4  lat: 2.6768  lon: 101.5859   [OK]

 (0x89375412)  [ 4338]  12:19:35  alt: 12350.4  lat: 2.6769  lon: 101.5859   [OK]

 (0x89375412)  [ 4339]  12:19:36  alt: 12355.0  lat: 2.6769  lon: 101.5858   [OK]

 (0x89375412)  [ 4340]  12:19:37  alt: 12359.9  lat: 2.6769  lon: 101.5858   [OK]

 (0x89375412)  [ 4341]  12:19:38  alt: 12364.7  lat: 2.6769  lon: 101.5857   [OK]

 (0x89375412)  [ 4342]  12:19:39  alt: 12369.1  lat: 2.6770  lon: 101.5856   [OK]

 (0x89375412)  [ 4343]  12:19:40  alt: 12373.2  lat: 2.6770  lon: 101.5856   [OK]

 (0x89375412)  [ 4344]  12:19:41  alt: 12377.4  lat: 2.6770  lon: 101.5855   [OK]

 (0x89375412)  [ 4345]  12:19:42  alt: 12382.2  lat: 2.6771  lon: 101.5855   [OK]

 (0x89375412)  [ 4346]  12:19:43  alt: 12386.3  lat: 2.6771  lon: 101.5855   [OK]

 (0x89375412)  [ 4347]  12:19:44  alt: 12390.7  lat: 2.6771  lon: 101.5854   [OK]

 (0x89375412)  [ 4348]  12:19:45  alt: 12394.8  lat: 2.6772  lon: 101.5854   [OK]

 (0x89375412)  [ 4349]  12:19:46  alt: 12399.2  lat: 2.6772  lon: 101.5853   [OK]

 (0x89375412)  [ 4350]  12:19:47  alt: 12403.5  lat: 2.6772  lon: 101.5853   [OK]

 (0x89375412)  [ 4351]  12:19:48  alt: 12408.0  lat: 2.6772  lon: 101.5852   [OK]

 (0x89375412)  [ 4352]  12:19:49  alt: 12412.6  lat: 2.6773  lon: 101.5851   [OK]

 (0x89375412)  [ 4353]  12:19:50  alt: 12417.0  lat: 2.6773  lon: 101.5851   [OK]

 (0x89375412)  [ 4354]  12:19:51  alt: 12421.3  lat: 2.6773  lon: 101.5850   [OK]

 (0x89375412)  [ 4355]  12:19:52  alt: 12425.3  lat: 2.6774  lon: 101.5850   [OK]

 (0x89375412)  [ 4356]  12:19:53  alt: 12429.7  lat: 2.6774  lon: 101.5850   [OK]

 (0x89375412)  [ 4357]  12:19:54  alt: 12433.8  lat: 2.6774  lon: 101.5849   [OK]

 (0x89375412)  [ 4358]  12:19:55  alt: 12437.9  lat: 2.6775  lon: 101.5849   [OK]

 (0x89375412)  [ 4359]  12:19:56  alt: 12442.0  lat: 2.6775  lon: 101.5848   [OK]

 (0x89375412)  [ 4360]  12:19:57  alt: 12446.5  lat: 2.6775  lon: 101.5848   [OK]

 (0x89375412)  [ 4361]  12:19:58  alt: 12450.6  lat: 2.6776  lon: 101.5847   [OK]

 (0x89375412)  [ 4362]  12:19:59  alt: 12455.0  lat: 2.6776  lon: 101.5847   [OK]

 (0x89375412)  [ 4363]  12:20:00  alt: 12459.0  lat: 2.6776  lon: 101.5846   [OK]

 (0x89375412)  [ 4364]  12:20:01  alt: 12463.1  lat: 2.6776  lon: 101.5846   [OK]

 (0x89375412)  [ 4365]  12:20:02  alt: 12466.8  lat: 2.6776  lon: 101.5845   [OK]

 (0x89375412)  [ 4366]  12:20:03  alt: 12470.9  lat: 2.6777  lon: 101.5844   [OK]

 (0x89375412)  [ 4367]  12:20:04  alt: 12475.3  lat: 2.6777  lon: 101.5844   [OK]

 (0x89375412)  [ 4368]  12:20:05  alt: 12479.8  lat: 2.6777  lon: 101.5844   [OK]

 (0x89375412)  [ 4369]  12:20:06  alt: 12483.8  lat: 2.6778  lon: 101.5843   [OK]

 (0x89375412)  [ 4370]  12:20:07  alt: 12487.5  lat: 2.6778  lon: 101.5843   [OK]

 (0x89375412)  [ 4371]  12:20:08  alt: 12491.9  lat: 2.6778  lon: 101.5842   [OK]

 (0x89375412)  [ 4372]  12:20:09  alt: 12496.0  lat: 2.6778  lon: 101.5842   [OK]

 (0x89375412)  [ 4373]  12:20:10  alt: 12500.2  lat: 2.6779  lon: 101.5841   [OK]

 (0x89375412)  [ 4374]  12:20:11  alt: 12504.5  lat: 2.6779  lon: 101.5841   [OK]

 (0x89375412)  [ 4375]  12:20:12  alt: 12509.3  lat: 2.6779  lon: 101.5840   [OK]

 (0x89375412)  [ 4376]  12:20:13  alt: 12513.7  lat: 2.6780  lon: 101.5840   [OK]

 (0x89375412)  [ 4377]  12:20:14  alt: 12518.9  lat: 2.6780  lon: 101.5839   [OK]

 (0x89375412)  [ 4378]  12:20:15  alt: 12522.9  lat: 2.6780  lon: 101.5838   [OK]

 (0x89375412)  [ 4379]  12:20:16  alt: 12527.3  lat: 2.6780  lon: 101.5838   [OK]

 (0x89375412)  [ 4380]  12:20:17  alt: 12531.5  lat: 2.6780  lon: 101.5838   [OK]

 (0x89375412)  [ 4381]  12:20:18  alt: 12536.3  lat: 2.6781  lon: 101.5837   [OK]

 (0x89375412)  [ 4382]  12:20:19  alt: 12540.8  lat: 2.6781  lon: 101.5837   [OK]

 (0x89375412)  [ 4383]  12:20:20  alt: 12545.2  lat: 2.6781  lon: 101.5836   [OK]

 (0x89375412)  [ 4384]  12:20:21  alt: 12550.1  lat: 2.6782  lon: 101.5836   [OK]

 (0x89375412)  [ 4385]  12:20:22  alt: 12554.6  lat: 2.6782  lon: 101.5835   [OK]

 (0x89375412)  [ 4386]  12:20:23  alt: 12559.0  lat: 2.6782  lon: 101.5834   [OK]

 (0x89375412)  [ 4387]  12:20:24  alt: 12563.5  lat: 2.6782  lon: 101.5834   [OK]

 (0x89375412)  [ 4388]  12:20:25  alt: 12567.7  lat: 2.6783  lon: 101.5833   [OK]

 (0x89375412)  [ 4389]  12:20:26  alt: 12571.6  lat: 2.6783  lon: 101.5833   [OK]

 (0x89375412)  [ 4390]  12:20:27  alt: 12576.0  lat: 2.6783  lon: 101.5832   [OK]

 (0x89375412)  [ 4391]  12:20:28  alt: 12579.6  lat: 2.6783  lon: 101.5832   [OK]

 (0x89375412)  [ 4392]  12:20:29  alt: 12584.1  lat: 2.6783  lon: 101.5831   [OK]

 (0x89375412)  [ 4393]  12:20:30  alt: 12587.7  lat: 2.6784  lon: 101.5831   [OK]

 (0x89375412)  [ 4394]  12:20:31  alt: 12591.5  lat: 2.6784  lon: 101.5830   [OK]

 (0x89375412)  [ 4395]  12:20:32  alt: 12595.8  lat: 2.6784  lon: 101.5830   [OK]

 (0x89375412)  [ 4396]  12:20:33  alt: 12600.3  lat: 2.6785  lon: 101.5829   [OK]

 (0x89375412)  [ 4397]  12:20:34  alt: 12604.4  lat: 2.6785  lon: 101.5828   [OK]

 (0x89375412)  [ 4398]  12:20:35  alt: 12609.0  lat: 2.6785  lon: 101.5828   [OK]

 (0x89375412)  [ 4399]  12:20:36  alt: 12612.9  lat: 2.6785  lon: 101.5827   [OK]

 (0x89375412)  [ 4400]  12:20:37  alt: 12616.6  lat: 2.6785  lon: 101.5827   [OK]

 (0x89375412)  [ 4401]  12:20:38  alt: 12620.8  lat: 2.6786  lon: 101.5826   [OK]

 (0x89375412)  [ 4402]  12:20:39  alt: 12624.9  lat: 2.6786  lon: 101.5826   [OK]

 (0x89375412)  [ 4403]  12:20:40  alt: 12629.3  lat: 2.6786  lon: 101.5825   [OK]

 (0x89375412)  [ 4404]  12:20:41  alt: 12633.8  lat: 2.6786  lon: 101.5825   [OK]

 (0x89375412)  [ 4405]  12:20:42  alt: 12638.1  lat: 2.6787  lon: 101.5824   [OK]

 (0x89375412)  [ 4406]  12:20:43  alt: 12642.6  lat: 2.6787  lon: 101.5824   [OK]

 (0x89375412)  [ 4407]  12:20:44  alt: 12646.6  lat: 2.6787  lon: 101.5823   [OK]

 (0x89375412)  [ 4408]  12:20:45  alt: 12651.7  lat: 2.6787  lon: 101.5823   [OK]

 (0x89375412)  [ 4409]  12:20:46  alt: 12655.3  lat: 2.6788  lon: 101.5822   [OK]

 (0x89375412)  [ 4410]  12:20:47  alt: 12659.0  lat: 2.6788  lon: 101.5822   [OK]

 (0x89375412)  [ 4411]  12:20:48  alt: 12663.7  lat: 2.6788  lon: 101.5821   [OK]

 (0x89375412)  [ 4412]  12:20:49  alt: 12668.1  lat: 2.6788  lon: 101.5821   [OK]

 (0x89375412)  [ 4413]  12:20:50  alt: 12672.6  lat: 2.6788  lon: 101.5820   [OK]

 (0x89375412)  [ 4414]  12:20:51  alt: 12677.5  lat: 2.6789  lon: 101.5820   [OK]

 (0x89375412)  [ 4415]  12:20:52  alt: 12681.7  lat: 2.6789  lon: 101.5819   [OK]


pi@9m2zak:~/RS/weathex $ 


siap sudah bagi decode menggunakan cara rakaman, untuk decode secara terus atau real time pula, ikut step ini.

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install python3 python3-numpy python3-setuptools python3-crcmod python3-requests python3-dateutil python3-pip python3-flask sox git build-essential libtool cmake usbutils libusb-1.0-0-dev rng-tools libsamplerate-dev libatlas3-base libgfortran5

kemudian install dongle anda.

git clone https://github.com/osmocom/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON ../
sudo make install
sudo ldconfig
kemudian....
sudo nano /etc/modprobe.d/rtlsdr-blacklist.conf
tambah list ini,
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
blacklist dvb_usb_rtl2832u
blacklist dvb_usb_v2
blacklist dvb_core
kemudian periksa samada dongle anda sukses atau tidak install
rtl_test

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000002

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.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.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
[R82XX] PLL not locked!
Sampling at 2048000 S/s.

Info: This tool will continuously read from the device, and report if
samples get lost. If you observe no further output, everything is fine.

Reading samples in async mode...

ok sukses, rtl-sdr dongle anda sudah siap. ok jom decode real time plak (tapi kena buat time radiosonde Weathex Wxr-301D terbanglah, sila semak jadual pelepasan di kawasan anda)

cd RS

cd weathex

ls

pi@9m2zak:~/RS/weathex $ rtl_fm -M fm -s 64k -f 401.1M | sox -t raw -r 64k -e s -b 16 -c 1 - -r 48000 -t wav - lowpass 4000 2>/dev/null | ./weathex -b

ubah frequency mengikut freq lokalan anda. katakan di Kuantan, maka akan jadi...

pi@9m2zak:~/RS/weathex $ rtl_fm -M fm -s 64k -f 401.490M | sox -t raw -r 64k -e s -b 16 -c 1 - -r 48000 -t wav - lowpass 4000 2>/dev/null | ./weathex -b

Kalau di Bayan Lepas, maka akan jadi...

pi@9m2zak:~/RS/weathex $ rtl_fm -M fm -s 64k -f 404.300M | sox -t raw -r 64k -e s -b 16 -c 1 - -r 48000 -t wav - lowpass 4000 2>/dev/null | ./weathex -b

tapi freq tepat untuk Kuantan dan Bayan Lepas saya tak pasti ketepatannya, untuk lebih tepat, pantau dahulu dengan menggunakan sdr sharp. Kota Bharu pun sama juga. apabila dah dapat freq di tempat anda, maka gantikan sahajalah.

Kredit kepada 9m2tpt atas usaha beliau bagi mencari jalan agar radiosonde Weathex Wxr-301D ini dapat di dekod.

Baiklah sampai disini sahaja dulu posting saya, jumpa lagi pada post-post akan datang. selamat memburu radiosonde gais..... KITA MOVE ON!!!

Sumber rujukan : https://github.com/rs1729/RS

Chromebook OS tukar ke Linux/Window OS

Sebelum kita mulakan, pastikan chromebook anda ada tersenarai dalam list ni, jika tiada... sila beli yang ada dalam list tersebut. klik sin...