BIKAB 100/100 Fiber C4 Stadsnät

C:\iperf>iperf3 -c web01.agriprim.se
Connecting to host web01.agriprim.se, port 5201
[ 4] local 192.168.2.222 port 41573 connected to 91.106.199.51 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 17.5 MBytes 147 Mbits/sec
[ 4] 1.00-2.00 sec 13.9 MBytes 116 Mbits/sec
[ 4] 2.00-3.00 sec 9.75 MBytes 81.8 Mbits/sec
[ 4] 3.00-4.00 sec 12.0 MBytes 101 Mbits/sec
[ 4] 4.00-5.00 sec 10.6 MBytes 89.1 Mbits/sec
[ 4] 5.00-6.00 sec 11.8 MBytes 98.5 Mbits/sec
[ 4] 6.00-7.00 sec 13.6 MBytes 114 Mbits/sec
[ 4] 7.00-8.00 sec 7.00 MBytes 58.7 Mbits/sec
[ 4] 8.00-9.00 sec 17.4 MBytes 146 Mbits/sec
[ 4] 9.00-10.00 sec 5.25 MBytes 44.0 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 119 MBytes 99.6 Mbits/sec sender
[ 4] 0.00-10.00 sec 119 MBytes 99.5 Mbits/sec receiver

iperf Done.

C:\iperf>iperf3 -c web01.agriprim.se -R
Connecting to host web01.agriprim.se, port 5201
Reverse mode, remote host web01.agriprim.se is sending
[ 4] local 192.168.2.222 port 41642 connected to 91.106.199.51 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 10.9 MBytes 91.5 Mbits/sec
[ 4] 1.00-2.00 sec 5.82 MBytes 48.8 Mbits/sec
[ 4] 2.00-3.00 sec 8.18 MBytes 68.6 Mbits/sec
[ 4] 3.00-4.00 sec 11.3 MBytes 95.1 Mbits/sec
[ 4] 4.00-5.00 sec 10.9 MBytes 91.8 Mbits/sec
[ 4] 5.00-6.00 sec 5.05 MBytes 42.4 Mbits/sec
[ 4] 6.00-7.00 sec 11.9 MBytes 99.9 Mbits/sec
[ 4] 7.00-8.00 sec 11.6 MBytes 97.4 Mbits/sec
[ 4] 8.00-9.00 sec 7.38 MBytes 61.9 Mbits/sec
[ 4] 9.00-10.00 sec 10.6 MBytes 89.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 94.0 MBytes 78.9 Mbits/sec sender
[ 4] 0.00-10.00 sec 93.9 MBytes 78.8 Mbits/sec receiver

iperf Done.

C:\iperf>ping web01.agriprim.se

Pinging web01.agriprim.se [91.106.199.51] with 32 bytes of data:
Reply from 91.106.199.51: bytes=32 time=7ms TTL=119
Reply from 91.106.199.51: bytes=32 time=7ms TTL=119
Reply from 91.106.199.51: bytes=32 time=7ms TTL=119
Reply from 91.106.199.51: bytes=32 time=7ms TTL=119

Ping statistics for 91.106.199.51:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 7ms, Maximum = 7ms, Average = 7ms

C:\iperf>tracert web01.agriprim.se

Tracing route to web01.agriprim.se [91.106.199.51]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.2.1
  2     1 ms     1 ms     1 ms  ip-85-197-160-1.c4stads.bikab.com [85.197.160.1]

  3     1 ms     1 ms     1 ms  10.33.246.25
  4     *        *        *     Request timed out.
  5    12 ms     3 ms     2 ms  83.145.21.129
  6     5 ms     3 ms     3 ms  semal0001-rc3.ip-only.net [62.109.44.125]
  7     7 ms     7 ms     7 ms  213.132.100.162
  8     7 ms     7 ms     7 ms  po-501.kna1.core.citynetwork.se [91.123.206.50]

  9     7 ms     7 ms     7 ms  91.106.199.51
 10    10 ms    10 ms     7 ms  91.106.199.51
Trace complete.

C:\iperf>

BIKAB ADSL 14/2

Detta är vad koppartråden maximalt kunde leverera vid goda väderbetingelser.

C:\iperf>iperf3 -c web01.agriprim.se
Connecting to host web01.agriprim.se, port 5201
[  4] local 192.168.2.222 port 38902 connected to 91.106.199.51 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   256 KBytes  2.10 Mbits/sec
[  4]   1.00-2.00   sec   256 KBytes  2.10 Mbits/sec
[  4]   2.00-3.00   sec   128 KBytes  1.05 Mbits/sec
[  4]   3.00-4.00   sec   256 KBytes  2.10 Mbits/sec
[  4]   4.00-5.00   sec   256 KBytes  2.10 Mbits/sec
[  4]   5.00-6.00   sec   128 KBytes  1.05 Mbits/sec
[  4]   6.00-7.00   sec   256 KBytes  2.10 Mbits/sec
[  4]   7.00-8.00   sec   128 KBytes  1.05 Mbits/sec
[  4]   8.00-9.00   sec   128 KBytes  1.05 Mbits/sec
[  4]   9.00-10.00  sec   256 KBytes  2.10 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  2.00 MBytes  1.68 Mbits/sec                  sender
[  4]   0.00-10.00  sec  1.81 MBytes  1.52 Mbits/sec                  receiver

iperf Done.

C:\iperf>iperf3 -c web01.agriprim.se -R
Connecting to host web01.agriprim.se, port 5201
Reverse mode, remote host web01.agriprim.se is sending
[  4] local 192.168.2.222 port 38960 connected to 91.106.199.51 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  1.53 MBytes  12.9 Mbits/sec
[  4]   1.00-2.00   sec  1.57 MBytes  13.2 Mbits/sec
[  4]   2.00-3.00   sec  1.57 MBytes  13.2 Mbits/sec
[  4]   3.00-4.00   sec  1.57 MBytes  13.2 Mbits/sec
[  4]   4.00-5.00   sec  1.56 MBytes  13.1 Mbits/sec
[  4]   5.00-6.00   sec  1.57 MBytes  13.2 Mbits/sec
[  4]   6.00-7.00   sec  1.57 MBytes  13.2 Mbits/sec
[  4]   7.00-8.00   sec  1.57 MBytes  13.2 Mbits/sec
[  4]   8.00-9.00   sec  1.56 MBytes  13.1 Mbits/sec
[  4]   9.00-10.00  sec  1.57 MBytes  13.2 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  15.9 MBytes  13.3 Mbits/sec                  sender
[  4]   0.00-10.00  sec  15.8 MBytes  13.2 Mbits/sec                  receiver

iperf Done.

C:\iperf>ping web01.agriprim.se

Pinging web01.agriprim.se [91.106.199.51] with 32 bytes of data:
Reply from 91.106.199.51: bytes=32 time=16ms TTL=120
Reply from 91.106.199.51: bytes=32 time=16ms TTL=120
Reply from 91.106.199.51: bytes=32 time=16ms TTL=120
Reply from 91.106.199.51: bytes=32 time=16ms TTL=120

Ping statistics for 91.106.199.51:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 16ms, Maximum = 16ms, Average = 16ms

C:\iperf>tracert web01.agriprim.se

Tracing route to web01.agriprim.se [91.106.199.51]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.2.1
  2     *        *        *     Request timed out.
  3     *        *        *     Request timed out.
  4    21 ms    12 ms    22 ms  83.145.21.129
  5    12 ms    24 ms    20 ms  62.109.44.237
  6    16 ms    17 ms    16 ms  213.132.100.162
  7    16 ms    17 ms    16 ms  po-501.kna1.core.citynetwork.se [91.123.206.50]

  8    16 ms    17 ms    17 ms  91.106.199.51
  9    16 ms    16 ms    16 ms  91.106.199.51

Trace complete.

BFI

<?php
file_put_contents('bfi.txt', 
	json_encode(
		array(
			'csr' => array_map("intval", explode(',', $_GET["csr"])), 
			'param' => array_map("intval", explode(',', $_GET["param"])), 
			'time'=>time()
		)
	)
);
printf("OK=".time());
?>
#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-

# bfi registers
csr = {1:'Drive Control Command Word',
2:'Frequency Setpoint (Reference)',
3:'Reserved',
4:'Modbus ramp control time',
5:'Reserved',
6:'Error code Drive status',
7:'Output Frequency',
8:'Output Current',
9:'Reserved',
10:'Output Power',
11:'Digital Input Status',
12:'Rating ID',
13:'Power rating',
14:'Voltage rating',
15:'IO Processor Software Version',
16:'Motor Control Processor Software Version',
17:'Drive Type',
18:'Reserved',
19:'Reserved',
20:'Analog Input 1 Signal Level',
21:'Analog Input 2 Signal Level',
22:'Pre Ramp Speed Reference (Hz)',
23:'DC bus Voltage',
24:'Drive Temperature',
25:'Drive Serial Number 4',
26:'Drive Serial Number 3',
27:'Drive Serial Number 2',
28:'Drive Serial Number 1',
29:'Relay Output Status',
30:'kWh meter (User)',
31:'MWh meter (User)',
32:'kWh Meter',
33:'MWh Meter',
34:'Running time - hour',
35:'Running time - min/sec',
36:'Running time since last enable',
37:'Running time since last enable',
38:'Service time (hours)',
39:'Room (Control PCB) temperature',
40:'Reserved',
41:'Reserved',
42:'Digital pot reference value',
43:'P0-80',
44:'Reserved',
45:'Reserved'}

param = {1:'P1-15 Tryck Börvärde',
2: 'P1-16 Max Starttid',
3: 'P1-17 Max Effekt Start',
4: 'P1-18 Max Effekt Drift',
5: 'P1-19 Lågtryck',
6: 'P1-20 Tidsfördröjning Lågtryck',
7: 'P1-21 Högtryck',
8: 'P1-22 Auth TH',
9: 'P1-23 TH tryck'}

import time
import minimalmodbus
import requests
import datetime
import traceback

# modbus interface
instrument = minimalmodbus.Instrument('/dev/ttyUSB0', 1)
instrument.serial.baudrate = 115200

#instrument.debug = True
#print instrument
rr = instrument.read_registers(233,2)
print rr

currentp = 100

while True:
try:
# read from BFI
current_csr = instrument.read_registers(0,44)
current_param = instrument.read_registers(114,9)
# print out
for index, item in enumerate(current_csr):
print '{};{};{}'.format(index,item,csr[index+1])
for index, item in enumerate(current_param):
print '{};{};{}'.format(index,item,param[index+1])
if currentp==100:
currentp = 90
else:
currentp = 100
#instrument.write_register(114,currentp,0,6)
# send to web
userdata = {"csr": ','.join(map(str, current_csr)), "param":','.join(map(str, current_param)) }
resp = requests.post('http://torgil.com/bfi.php', params=userdata, timeout = 1.0)
print resp.text
except:
# check for errror
tb = traceback.format_exc()
else:
tb = "OK"

# print timestamp
print tb, datetime.datetime.now().time()
# delay
time.sleep(5)