Benutzer-Werkzeuge

Webseiten-Werkzeuge


raspagerc9000

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
raspagerc9000 [2018/07/24 12:31]
dh3wr [Temperature Monitoring]
raspagerc9000 [2019/07/16 23:24] (aktuell)
df2et
Zeile 30: Zeile 30:
  
 ===== Modification of C9000 ===== ===== Modification of C9000 =====
 +
 +==== 24V Power supply ====
 +
 +The Compact9000 uses 24V input. At 20W output the unit draws roughly 2.5A at 24V. The power connector is a Sub-D Type with 3 pins. Two of those are used. The center pin is GND (labelled as A2) and the outer pin facing to the bottom (labelled A3) is Vcc. The following parts from Germany electronics distributor Reichelt can be used if the original plug is missing / needs replace:
 +
 +  * 1x MIX-BUG 3W3
 +  * 1x KAPPE 1820
 +  * 2x MIX-BU3 CRIMP
 +
 +A shopping cart is here: https://​www.reichelt.de/​my/​1503982
 +
 +{{ :​c9000:​c9000powerplug.jpg?​direct&​600 |}}
 +
 +{{ :​c9000:​c9000powerdetail.jpg?​direct&​600 |}}
 +
  
 ==== Power Supply for Raspberry ==== ==== Power Supply for Raspberry ====
-FIXME+ 
 +There is an internal 5v0 rail but it is unsure if that can supply continous current for running the Raspberry Pi. One solution is to use a DC/DC converter powered by the 24V input. A Mean Well SD-15B-05 is a good choice. The case fits exactly into the small slot aside from the exciter unit. You just have arrange some wires to the backplane of the Base Station Controller board. There are some free pins that can also be used for the ethernet connection of the Raspberry Pi. It can be mounted with two 3mm screws to the side of the case. That should also allow for some heat dissipation. 
 + 
 +{{ :​c9000:​internal_powersupply.jpg?​direct&​600 |}} 
 ==== Using the backplane RJ45 jack for ethernet ==== ==== Using the backplane RJ45 jack for ethernet ====
 There is a RJ45 jack on the backplane of the C9000. It was formerly used to connect a landline telephone connection to the transmitter,​ so it could make a call if something bad had happend. There is a way to re-use this jack to bring an 100 MBit/s ethernet connection inside the C9000 without mechanical modification of the housing. There is a RJ45 jack on the backplane of the C9000. It was formerly used to connect a landline telephone connection to the transmitter,​ so it could make a call if something bad had happend. There is a way to re-use this jack to bring an 100 MBit/s ethernet connection inside the C9000 without mechanical modification of the housing.
Zeile 130: Zeile 149:
  
  
 +==== Front Panel LEDs =====
 +
 +You can wire two LEDs to the RasPagerC9000 board that can be integrated into the front panel. The wires need to be connected to pins 5,6,7 of RasPagerC9000. The pinout is as follows:
 +
 +  * Pin 5: GND
 +  * Pin 6: SWAct
 +  * Pin 7: MasterConn
 +
 +{{ :​c9000:​c9000leds.png?​nolink&​600 | Pinout for Fron Panel LEDs}}
 +
 +These LEDs indicate if UniPager is connected to the Master (MasterConn) and when its active (SWAct). The corresponding LEDs are not controlled by UniPager directly. You have to use the extra python script called unipagerled.py. It is sufficient to use the preset from the example in the config (/​etc/​unipagerledconfig.py):​
 +
 +   ​preset = "​c9000"​
 +
 +Two resistors (330R) are already present on the PCB (see R10 and R11). The two LEDs can be mounted on the fron panel of the Base Station Controller.
 +
 +{{ :​c9000:​c9000frontpanelleds.jpg?​nolink&​600 | Front Panel LEDs}}
 ==== Temperature Monitoring ==== ==== Temperature Monitoring ====
 The RasPagerC9000 PCB is already prepared for easy implementation of a temperature monitoring of the C9000. It is done by cheap DS18x20 OneWire temperature sensors. In order to activate the built-in support for OneWire temperature sensors in the Raspbian software, add the following line tho ''/​boot/​config.txt''​ The RasPagerC9000 PCB is already prepared for easy implementation of a temperature monitoring of the C9000. It is done by cheap DS18x20 OneWire temperature sensors. In order to activate the built-in support for OneWire temperature sensors in the Raspbian software, add the following line tho ''/​boot/​config.txt''​
Zeile 166: Zeile 202:
 graph_strategy cgi graph_strategy cgi
 </​file>​ </​file>​
 +
 +Be aware that you need the cgi modules of apache enabled.
 +<​code>​
 +sudo apt-get install libapache2-mod-fcgid
 +sudo a2enmod rewrite
 +sudo a2enmod fcgid
 +sudo service apache2 restart
 +</​code>​
  
 Change the part where the localhost entry is given a a useful name of your C9000. The example here is ''​c9000.db0sda.ampr.org''​. Change the part where the localhost entry is given a a useful name of your C9000. The example here is ''​c9000.db0sda.ampr.org''​.
Zeile 175: Zeile 219:
 </​file>​ </​file>​
  
-Change ​the //munin-node// config:+A complete example is given here: 
 +<​file>​ 
 +# Example configuration file for Munin, generated by 'make build'​ 
 + 
 +# The next three variables specifies where the location of the RRD 
 +# databases, the HTML output, logs and the lock/pid files. ​ They all 
 +# must be writable by the user running munin-cron. ​ They are all 
 +# defaulted to the values you see here. 
 +
 +#​dbdir ​ /var/lib/munin 
 +#htmldir /​var/​cache/​munin/​www 
 +#logdir /​var/​log/​munin 
 +#​rundir ​ /​var/​run/​munin 
 + 
 +# Where to look for the HTML templates 
 +
 +#​tmpldir ​       /​etc/​munin/​templates 
 + 
 +# Where to look for the static www files 
 +
 +#staticdir /​etc/​munin/​static 
 + 
 +# temporary cgi files are here. note that it has to be writable by 
 +# the cgi user (usually nobody or httpd). 
 +
 +# cgitmpdir /​var/​lib/​munin/​cgi-tmp 
 + 
 +# (Exactly one) directory to include all files from. 
 +includedir ​/etc/munin/​munin-conf.d 
 + 
 +# You can choose the time reference for "​DERIVE"​ like graphs, and show 
 +# "per minute",​ "per hour" values instead of the default "per second"​ 
 +
 +#​graph_period second 
 + 
 +# Graphics files are generated either via cron or by a CGI process. 
 +# See http://​munin-monitoring.org/​wiki/​CgiHowto2 for more 
 +# documentation. 
 +# Since 2.0, munin-graph has been rewritten to use the cgi code. 
 +# It is single threaded *by design* now. 
 +
 +#​graph_strategy cron 
 +graph_strategy cgi 
 + 
 +# munin-cgi-graph is invoked by the web server up to very many times at the 
 +# same time.  This is not optimal since it results in high CPU and memory 
 +# consumption to the degree that the system can thrash. ​ Again the default is 
 +# 6.  Most likely the optimal number for max_cgi_graph_jobs is the same as 
 +# max_graph_jobs. 
 +
 +#​munin_cgi_graph_jobs 6 
 + 
 +# If the automatic CGI url is wrong for your system override it here: 
 +
 +cgiurl_graph /​munin-cgi/​munin-cgi-graph 
 + 
 +# max_size_x and max_size_y are the max size of images in pixel. 
 +# Default is 4000. Do not make it too large otherwise RRD might use all 
 +# RAM to generate the images. 
 +
 +#max_size_x 4000 
 +#max_size_y 4000 
 + 
 +# HTML files are normally generated by munin-html, no matter if the 
 +# files are used or not. You can change this to on-demand generation 
 +# by following the instructions in http://​munin-monitoring.org/​wiki/​CgiHowto2 
 +
 +# Notes: 
 +# - moving to CGI for HTML means you cannot have graph generated by cron. 
 +# - cgi html has some bugs, mostly you still have to launch munin-html by hand 
 +
 +#​html_strategy cron 
 + 
 +# munin-update runs in parallel. 
 +
 +# The default max number of processes is 16, and is probably ok for you. 
 +
 +# If set too high, it might hit some process/​ram/​filedesc limits. 
 +# If set too low, munin-update might take more than 5 min. 
 +
 +# If you want munin-update to not be parallel set it to 0. 
 +
 +#​max_processes 16 
 + 
 +# RRD updates are per default, performed directly on the rrd files. 
 +# To reduce IO and enable the use of the rrdcached, uncomment it and set it to 
 +# the location of the socket that rrdcached uses. 
 +
 +#​rrdcached_socket /​var/​run/​rrdcached.sock 
 + 
 +# Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime 
 +# something changes (OK -> WARNING, CRITICAL -> OK, etc) 
 +#​contact.someuser.command mail -s "Munin notification"​ somejuser@fnord.comm 
 +#​contact.anotheruser.command mail -s "Munin notification"​ anotheruser@blibb.comm 
 +
 +# For those with Nagios, the following might come in handy. In addition, 
 +# the services must be defined in the Nagios server as well. 
 +#​contact.nagios.command /​usr/​bin/​send_nsca nagios.host.comm -c /​etc/​nsca.conf 
 + 
 +[c9000.db0sda.ampr.org] 
 +    address localhost 
 +    use_node_name yes 
 +</​file>​ 
 + 
 +Change the ''​munin-node'' ​config:
 <​code>​sudo nano /​etc/​munin/​munin-node.conf</​code>​ <​code>​sudo nano /​etc/​munin/​munin-node.conf</​code>​
  
Zeile 184: Zeile 332:
 # #
 host_name c9000.db0sda.ampr.org host_name c9000.db0sda.ampr.org
 +</​file>​
 +
 +A complete ''​munin-node.conf''​ would look like:
 +<​file>​
 +#
 +# Example config-file for munin-node
 +#
 +
 +log_level 4
 +log_file /​var/​log/​munin/​munin-node.log
 +pid_file /​var/​run/​munin/​munin-node.pid
 +
 +background 1
 +setsid 1
 +
 +user root
 +group root
 +
 +# This is the timeout for the whole transaction.
 +# Units are in sec. Default is 15 min
 +#
 +# global_timeout 900
 +
 +# This is the timeout for each plugin.
 +# Units are in sec. Default is 1 min
 +#
 +# timeout 60
 +
 +# Regexps for files to ignore
 +ignore_file [\#~]$
 +ignore_file DEADJOE$
 +ignore_file \.bak$
 +ignore_file %$
 +ignore_file \.dpkg-(tmp|new|old|dist)$
 +ignore_file \.rpm(save|new)$
 +ignore_file \.pod$
 +
 +# Set this if the client doesn'​t report the correct hostname when
 +# telnetting to localhost, port 4949
 +#
 +host_name c9000.db0sda.ampr.org
 +
 +# A list of addresses that are allowed to connect. ​ This must be a
 +# regular expression, since Net::Server does not understand CIDR-style
 +# network notation unless the perl module Net::CIDR is installed. ​ You
 +# may repeat the allow line as many times as you'd like
 +
 +allow ^127\.0\.0\.1$
 +allow ^::1$
 +
 +# If you have installed the Net::CIDR perl module, you can use one or more
 +# cidr_allow and cidr_deny address/​mask patterns. ​ A connecting client must
 +# match any cidr_allow, and not match any cidr_deny. ​ Note that a netmask
 +# *must* be provided, even if it's /32
 +#
 +# Example:
 +#
 +# cidr_allow 127.0.0.1/​32
 +# cidr_allow 192.0.2.0/​24
 +# cidr_deny ​ 192.0.2.42/​32
 +
 +# Which address to bind to;
 +host *
 +# host 127.0.0.1
 +
 +# And which port
 +port 4949
 </​file>​ </​file>​
  
Zeile 191: Zeile 406:
 [[https://​github.com/​insertjokehere/​munin-1wire|munin-1wire]]. As stated in the //readme//, the [[https://​github.com/​samuel/​python-munin|pyhton-munin]] lib is needed, so install it first. [[https://​github.com/​insertjokehere/​munin-1wire|munin-1wire]]. As stated in the //readme//, the [[https://​github.com/​samuel/​python-munin|pyhton-munin]] lib is needed, so install it first.
  
-To configure the OneWire ​Ids and set humand ​readable descriptions,​ follow the [[https://​github.com/​insertjokehere/​munin-1wire/​blob/​master/​README.md|README.md]]+To configure the OneWire ​IDs and set human readable descriptions,​ follow the [[https://​github.com/​insertjokehere/​munin-1wire/​blob/​master/​README.md|README.md]] 
 +Example: 
 +<​code>​ 
 +root@c9000:/​etc/​munin/​plugin-conf.d#​ cat 1wire 
 +[1wire] 
 +env.alias_000800c34c66 Innenraum 
 +env.alias_000800c312bf PA 
 +</​code>​
  
 Plugins are activated or deactivated by placing a symlink in ''/​etc/​munin/​plugins''​ to the plugin executable or script. Look [[http://​guide.munin-monitoring.org/​en/​latest/​plugin/​use.html|here]] if you need more information on that. Plugins are activated or deactivated by placing a symlink in ''/​etc/​munin/​plugins''​ to the plugin executable or script. Look [[http://​guide.munin-monitoring.org/​en/​latest/​plugin/​use.html|here]] if you need more information on that.
 +
 +In our case it would be:
 +<​code>​ln -s /​usr/​share/​munin/​plugins/​1wire /​etc/​munin/​plugins/</​code>​
  
 The result should look like: The result should look like:
 +
 {{:​c9000:​munin_plugin_1wire.png?​direct&​600|}} {{:​c9000:​munin_plugin_1wire.png?​direct&​600|}}
- 
- 
  
  
Zeile 208: Zeile 432:
 </​code>​ </​code>​
  
-Restart the //​munin-node//​ to apply the changes:+{{:​icons:​warning.png?​nolink|}}Restart the //​munin-node//​ to apply the changes:
 <​code>​sudo service munin-node restart</​code>​ <​code>​sudo service munin-node restart</​code>​
  
 Also the default apache config allows just accesses from ''​localhost''​ to the ''/​munin''​ URL. Edit Also the default apache config allows just accesses from ''​localhost''​ to the ''/​munin''​ URL. Edit
-''/​etc/​apache2/​conf-enabled/​munin''​ and replace+''/​etc/​apache2/​conf-enabled/​munin.conf''​ and replace
 <​code>​require local</​code>​ <​code>​require local</​code>​
 by by
Zeile 220: Zeile 444:
  
 === Monitoring with Nagios === === Monitoring with Nagios ===
-It's easy to monitor remote hardware with the nagios nrpe server. It's a local execution agent to run commands on the remote ​maschine ​and provide the gathered data back to a main nagios instance.+It's easy to monitor remote hardware with the nagios nrpe server. It's a local execution agent to run commands on the remote ​machine ​and provide the gathered data back to a main nagios instance.
  
 == Nagios NRPE Server setup == == Nagios NRPE Server setup ==
Zeile 385: Zeile 609:
 {{:​c9000:​nano-ch340modifiction3.jpg?​direct&​600|}} {{:​c9000:​nano-ch340modifiction3.jpg?​direct&​600|}}
  
 +
 +==== PCB with 7-segement display ====
 +
 +There is a PCB that can carry an Arduino nano along with a 7-segement LED to show the configured power level. The sixteen values are shown as a hexadcimal value (0-F). The PCB design is Open Source. ​
 +
 +{{ :​c9000:​c9000padummydisplay.jpg?​direct&​600 |}}
 +
 +You can find the layout files here: 
 +
 +https://​github.com/​phl0/​C9000PADummyDisplay
 +
 +The author has some PCBs to sell at cost. Please contact DF2ET if you are interested.
 +
 +The 7-segement display is supported by the C9000PADummy Arduino code. To activate it you have to compile the code with 
 +
 +  #define HAS_7SEG
 ==== Programming the flash of the ATMega ==== ==== Programming the flash of the ATMega ====
 To still be able to program the Arduino Nano, you need to connect the ISP Header on it to free GPIO lines on the Raspberry Pi and use ''​avrdude''​ to send the hex file into the flash of the ''​ATMega''​. In the GitHub-Repo there is an example of a configuration file and a bash script with the necessary parameters for ''​avrdude''​ to work [[https://​github.com/​rwth-afu/​C9000PADummy/​tree/​master/​software/​C9000PADummy|https://​github.com/​rwth-afu/​C9000PADummy/​tree/​master/​software/​C9000PADummy]]. To still be able to program the Arduino Nano, you need to connect the ISP Header on it to free GPIO lines on the Raspberry Pi and use ''​avrdude''​ to send the hex file into the flash of the ''​ATMega''​. In the GitHub-Repo there is an example of a configuration file and a bash script with the necessary parameters for ''​avrdude''​ to work [[https://​github.com/​rwth-afu/​C9000PADummy/​tree/​master/​software/​C9000PADummy|https://​github.com/​rwth-afu/​C9000PADummy/​tree/​master/​software/​C9000PADummy]].
  
 ==== Connecting to the C9000 I2C Bus ==== ==== Connecting to the C9000 I2C Bus ====
-FIXME+ 
 +The internal I²C bus can be found on the RCU external bus connector on the back. In addition to that there are some solder pads next to the connector on the inside that you can use to connect the PA dummy to the I²C bus.  
 + 
 +{{ :​c9000:​internal_i2c_bus.jpg?​direct&​600 |}} 
 + 
 +There are six solder pads. The pinout is as follows: 
 + 
 +<​code>​ 
 + 
 +             rear panel 
 +  ---------------------------------------------- 
 +   
 +  ----------------+ ​ SDA GND SDA 
 +  DB25 connector ​ |   ​O ​  ​O ​  O 
 +  ----------------+ ​  ​O ​  ​O ​  O 
 +                     5v0 SCL SCL 
 +</​code>​ 
 +   
 +So you can either connect a µC based PAdummy (powered from the 5v0 pin) or the Arduino based solution described above (powered by USB from the Raspberry Pi).
  
 ==== Setting the emulated output power ==== ==== Setting the emulated output power ====
-FIXME+ 
 +The emulated output power on the Arduino based PADummy can be set from the UniPager web interface. You simply select the desired power level from the drop-down menu. In this case there is an udev rule installed which maps the serial device to a symlink to /​dev/​C9000PADummy.  
 + 
 +{{ :​c9000:​unipager_padummy.png?​direct&​600 |}} 
 + 
 +After setting the power level you need to adjust the output power of the Ericsson Compact9000 transmitter. Use the menu 
 + 
 +  Operate -> Tx -> Outp pwr 
 +   
 +Adjust the parameter Pset to the power level you set in UniPager. Note that the Pset parameter shows the output power after the (dummy) PA. This corresponds to the power levels shown in brackets in UniPager. The real output power of the C9000 without PA is noted in front of this value.
raspagerc9000.1532428278.txt.gz · Zuletzt geändert: 2018/07/24 12:31 von dh3wr