Top > calendar - 日記

2021年 03月 の 日記

<< 2021.3 >>
[日記]
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

21
March, 2021Edit

Analog_Refrector(AR)の追加

【構成概要】

  1. 使用したイメージ(2021-02-14-DVSwitch-Server-AllStar-lite.zip)
  2. DVSメニューと asl-menu で設定され、DVSwitch及びAllstarlinkは、個別に正常に動作していることが前提
  3. AR をこのPDFに従ってインストール

【AR設定で関連するファイルの変更点】
 変更箇所を主に掲載(元ファイルはこのページ最下位よりdown loard可能。D/L後nameの.txtを削除して使用すること)
 
 --- Analog_Bridge.ini ---

include = dvsm.macro

[GENERAL]
logLevel = 2

exportMetadata = true
subscriberFile = /var/lib/dvswitch/subscriber_ids.csv
transferRootDir = /tmp

decoderFallBack = true
useEmulator = false
emulatorAddress = 127.0.0.1:2470

[AMBE_AUDIO]
address = 127.0.0.1
txPort = 31103
rxPort = 31100
ambeMode = DMR
minTxTimeMS = 2000

gatewayDmrId = 4411004 ;←必ず自IDに変更すること(7桁)
repeaterID = 441100405 ;←必ず自ID変更すること(7+2= 9桁)
txTg = 44121 ;←要変更(DMRで使用するdefaultのTG)
txTs = 2
colorCode = 1

[USRP]
address = 127.0.0.1
txPort = 31001   ;←要変更 Analog_Reflector.jsonに合わせる
rxPort = 31001   ;←要変更 Analog_Reflector.jsonに合わせる
usrpAudio = AUDIO_USE_GAIN   ;-----ここから  --- オリジナルだと深すぎて割れるため
usrpGain = 0.90                         ; Gain調整している。割れてないならdefaultのまま  
usrpAgc = -20,10,100                ;  でもOK
tlvAudio = AUDIO_USE_GAIN      ;           
tlvGain = 0.90                            ;---ここまで ---

[MACROS]

[DV3000]
address = 192.168.xxx.yyy        ; IP address of AMBEServer
rxPort = 2460 ;←要変更             ; Port of AMBEServer

 
 --- Analog_Reflector.json ---

{
  "nodeName":"DVSwitch",
  "dmrID":"1234567",
  "abAddress": "127.0.0.1",
  "usrpTxPort": "31001",
  "usrpRxPort": "31001",
  "mobilePort": "12345",
  "wsPort": "443",
  "keyDir": "./ssl/",
  "siteroot": "./arRoot",
  "logFileName": "/var/log/dvswitch/Analog_Reflector.log",
  "logLevel": "2",
  "disallowUnknownClients": false,
  "brokerURL": "mqtt://localhost:1883",
  "rightsMask": "4",
  "autoMute": true,
  "clientDebugMode": false,
  "clientModes": ["Intercom", "DMR", "STFU", "DSTAR|D-Star", "NXDN", "P25", "YSF", "ASL|AllStar"],
  "bridges": {
    "asl": [
      {"node" : "node#", "address" : "127.0.0.1", "rxPort" : "34001", "txPort" : "32001", "rights" : 3, "amiUserName" : "admin", "amiSecret": "xxxxxx"}
   ],
    "ab" : [
      {"name" : "DMR",    "address" : "127.0.0.1", "rxPort" : "51100", "txPort" : "51103", "rights" : 1},
      {"name" : "D-Star", "address" : "127.0.0.1", "rxPort" : "52100", "txPort" : "52103", "rights" : 1},
      {"name" : "NXDN",   "address" : "127.0.0.1", "rxPort" : "53100", "txPort" : "53103", "rights" : 1},
      {"name" : "P25",    "address" : "127.0.0.1", "rxPort" : "54100", "txPort" : "54103", "rights" : 1},
      {"name" : "YSF",    "address" : "127.0.0.1", "rxPort" : "55100", "txPort" : "55103", "rights" : 1}
    ]
  }
}

 ※ node#: コントロールする自ノード番号、amiSecret:/etc/asterisk/manager.conf に合わせる
 
 --- DVSwitch.ini ---

[QUANTAR]
logFilePath = /var/log/Quantar_Bridge.log
Address = 127.0.0.1
TXPort = 34103     
RXPort = 34100     
quantarPort = 1994 
logLevel = 2       
debug = 0          

[DMR]
Address = 127.0.0.1
TXPort = 31100
RXPort = 31103     
Slot = 2           
ExportTG = 0       
TalkerAlias = JH1BLT/Masa Chiba.JP ; ←要変更

[DSTAR]
Address = 127.0.0.1    
TXPort = 32100         
RXPort = 32103         
FallbackID = 1234567   
ExportTG = 9           
Slot = 2               
RemotePort = xxxxx ; ← ircddbgateway のRemotePort
Message = %location %description

[NXDN]
Address = 127.0.0.1
TXPort = 33100 
RXPort = 33103     
FallbackID = 1234567    
NXDNFallbackID  = 12345 
Translate = 1234=4321   
Slot = 2                

[P25]
Address = 127.0.0.1
TXPort = 34100     
RXPort = 34103     
Slot = 2           

[YSF]
Address = 127.0.0.1
TXPort = 35100
RXPort = 35103     
TXWidePort = 35105 
FallbackID = 1234567
ExportTG = 9        
Slot = 2            
RemotePort = 6073

 
 --- extensions.conf ---

[general]
static = yes
writeprotect = yes

[globals]
HOMENPA = 215
NODE = 52984   ;← 自ノード番号に
NODE1 = 1999

[default]
exten => i,1,Hangup

[radio-secure]
exten => ${NODE},1,rpt,${NODE}
exten => ${NODE1},1,rpt,${NODE1}

以下省略

 
 --- rpt.conf ---

[1999]
rxchannel = USRP/127.0.0.1:34001:32001

中略
[52984] ; 以下2つのパラメーターは、音声案内の音量を下げ、また誰かがしゃべっている
             ;場合は、ミュート近くまで更に下げるために設定している。不要な場合は追加せずで良い
telemnomdb=-9                           ; Overall reduction in telemetry level
telemduckdb=-12                         ; Telemetry level reduction with signal

[nodes]
##### = radio@127.0.0.1:4569/#####,NONE ;asl-menuで自ノード番号に設定されている 
1999 = radio@127.0.0.1/1999,NONE

 
 以上、全てのファイルにおいて、自環境に必ず合わせること。


URL B I U SIZE Black Maroon Green Olive Navy Purple Teal Gray Silver Red Lime Yellow Blue Fuchsia Aqua White

16
March, 2021Edit

supermonの地域温度表示

AllstarLinkのコントロール画面(supermon)の初期地域温度表示は主に米国の
地域しか対応してないので、日本国内対応版にlink.phpを改変した。
参考:PHPで天気を取得、表示させたい!OpenWeatherMap APIの使い方 (hsmt-web.com)

  1. 【概要】
     
     Webサーバ上に、wth.phpを作成する。 --- /var/www/html/wth.php
     1.自Webserver 上にwth.phpを作成する
     2.link.phpを改修して、wth.phpをアクセスさせる
     3.得られた文字列を加工・抽出して表示させる
     具体的に要求するURLは
      [[http://api.openweathermap.org/data/2.5/weather?q=mobara,jp&appid=xxxxxxxyyyyyzzz: ]]
     ※appidは個人で得たAPIのid。http://192.168.xx.yy/wth.php をブラウザで開くと
    w_iconMobaraw_nameTemp_16_degfew clouds_Description_Press_1009_hpascalWind_13.89_m/sSunrise:05:03:39Sunset:17:03:29
    が得られ、このTemp_16_deg を抽出する。
  2. 【詳細】 
    /var/www/html/wth.php ----
    <!DOCTYPE html>
    <html>
    <head>
    <title>OpenWeather</title>
    </head>
    <body>
    <?php
    $url = "http://api.openweathermap.org/data/2.5/weather?q=";
    $city = 'mobara,jp&';
    $appid = 'appid=b31f206a2ad51c9a3928e4ed36e0c0ac';
    #$url = $city.$appid;
    $url = "http://api.openweathermap.org/data/2.5/weather?q=mobara,jp&appid=xxxxxxxyyyyyzzz";
    $icon = '<img align="middle" style="width:45px;" src="http://openweathermap.org/img/w/';
    $k_temp = 273.15;
    $json = file_get_contents($url);
    $json = mb_convert_encoding($json, 'UTF8', 'ASCII,JIS,UTF-8,EUC-JP,SJIS-WIN');
    $arr = json_decode($json,true);
    if ($arr === NULL) {
        return;
    }else{
        $weather_temp = $arr["main"]["temp"] - $k_temp;
        $weather_temp_min = $arr["main"]["temp_min"] - $k_temp;
        $weather_temp_max = $arr["main"]["temp_max"] - $k_temp;
        $weather_id = $arr["weather"][0]["id"];
        $weather_description = $arr["weather"][0]["description"];
        $weather_icon = $icon.$arr["weather"][0]["icon"].'.png">';
        $weather_main = $arr["main"]["temp_min"];
        $weather_lat = $arr["coord"]["lat"];
        $weather_lon = $arr["coord"]["lon"];
        $weather_pressure = $arr["main"]["pressure"];
        $weather_humidity = $arr["main"]["humidity"];
        $weather_speed = $arr["wind"]["speed"];
        $weather_name = $arr["name"];
        $weather_country = $arr["sys"]["country"];
        $weather_sunrise = $arr["sys"]["sunrise"];
        $weather_sunset = $arr["sys"]["sunset"];
        echo '<p style="position: static;margin:0;">';
        echo($weather_icon.'w_icon');
        echo($weather_name.'w_name');
        echo('Temp_'.intval($weather_temp).'_deg');
        echo($weather_description.'_Description_');
        echo('Press_'.$weather_pressure.'_hpascal');
        echo('Wind_'.$weather_speed.'_m/s');
        echo 'Sunrise:'.date( "H:m:s" , $weather_sunrise ).'';
        echo 'Sunset:'.date( "H:m:s" , $weather_sunset ).'<br>';
        echo '</p>';
    }
        echo('Wind_'.$weather_speed.'_m/s');
        echo 'Sunrise:'.date( "H:m:s" , $weather_sunrise ).'';
        echo 'Sunset:'.date( "H:m:s" , $weather_sunset ).'<br>';
        echo '</p>';
    }
    ?>
    </body>
    </html>?>
    </body>
    </html>
     
    以下工事中


    ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS