On Thursday, August 31, 2017 at 12:28:44 PM UTC-6, Eddie Lent wrote:
>
> I my set up is an acurite smarthub, a raspberry pi 1 running weewx and 
> weewx-interceptor in sniff mode, port mirroring using netgear GS105Ev2.  
>
> I can't seem to get data into weewx.
> I can run tcpdump on my router and see the packets. I can run tcpdump on 
> the raspberry pi and see packets.
>
> but I am not getting any data into weewx:
>
> from weewx.conf:
> [Interceptor]
>     # This section is for the network traffic interceptor driver.
>
>     # The driver to use:
>     driver = user.interceptor
>
>     # Specify the hardware device to capture.  Options include:
>     #   acurite-bridge - acurite internet bridge
>     #   observer - fine offset WH2600/HP1000/HP1003, aka 'observer'
>     #   lw30x - oregon scientific LW301/LW302
>     #   lacrosse-bridge - lacrosse GW1000U/C84612 internet bridge
>     device_type = acurite-bridge
> mode = sniff
> iface = eth0
> pcap_filter = src 192.168.5.230 and dst port 80
>
>
> pi@raspberrypiFB:~ $ tcpdump --version
> tcpdump version 4.9.0
> libpcap version 1.6.2
> OpenSSL 1.0.1t  3 May 2016
>
> If I run this line while I watch tcpdump on my router to ensure acurite 
> packets have been sent, I get nothing.
>
> pi@raspberrypiFB:~ $ sudo PYTHONPATH=/usr/share/weewx python 
> /usr/share/weewx/user/interceptor.py --device=acurite-bridge --mode=sniff 
> --iface=eth0 --filter="dst port 80"
> ^CTraceback (most recent call last):
>   File "/usr/share/weewx/user/interceptor.py", line 2060, in <module>
>     _data = device.get_queue().get(True, 10)
>   File "/usr/lib/python2.7/Queue.py", line 177, in get
>     self.not_empty.wait(remaining)
>   File "/usr/lib/python2.7/threading.py", line 359, in wait
>     _sleep(delay)
> KeyboardInterrupt
> Exception in thread ServerThread (most likely raised during interpreter 
> shutdown):
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
>   File "/usr/lib/python2.7/threading.py", line 763, in run
>   File "/usr/share/weewx/user/interceptor.py", line 285, in run_server
>   File "/usr/share/weewx/user/interceptor.py", line 320, in run
>   File "/usr/lib/python2.7/dist-packages/pcap.py", line 116, in dispatch
> <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 
> 'pcapObject_dispatch'
>
>
> Here is a tcpdump run:
>
> pi@raspberrypiFB:~ $ sudo tcpdump  -U -i eth0 src 192.168.5.230 and port 80
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
> listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
> 14:12:28.859374 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [S], seq 241058131, 
> win 400, options [mss 536], length 0
> 14:12:28.887870 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [.], ack 912225648, 
> win 400, length 0
> 14:12:28.889708 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 0:80, ack 
> 1, win 400, length 80: HTTP: GET 
> /weatherstation/updateweatherstation?dateutc=now&action=updateraw&realtime=1[!http]
> 14:12:28.920267 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 80:122, ack 
> 1, win 400, length 42: HTTP
> 14:12:28.922539 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 122:149, 
> ack 1, win 400, length 27: HTTP
> 14:12:28.924796 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 149:160, 
> ack 1, win 400, length 11: HTTP
> 14:12:28.931672 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 160:196, 
> ack 1, win 400, length 36: HTTP
> 14:12:28.957005 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 80:196, ack 
> 1, win 400, length 116: HTTP
> 14:12:28.961918 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 196:213, 
> ack 1, win 400, length 17: HTTP
> 14:12:28.963793 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 213:254, 
> ack 1, win 400, length 41: HTTP
> 14:12:28.965296 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [P.], seq 254:277, 
> ack 1, win 400, length 23: HTTP
> 14:12:29.006661 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [.], ack 401, win 
> 400, length 0
> 14:12:29.032033 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [.], ack 413, win 
> 389, length 0
> 14:12:29.033168 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [.], ack 413, win 
> 400, length 0
> 14:12:29.034156 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [F.], seq 277, ack 
> 413, win 400, length 0
> 14:12:29.034827 IP Acurite.1978 > 
> ec2-52-22-110-201.compute-1.amazonaws.com.http: Flags [R.], seq 277, ack 
> 413, win 400, length 0
> ^C
> 16 packets captured
> 17 packets received by filter
> 0 packets dropped by kernel
>
> nothing is coming out of combine-lines.pl when I try it:
> sudo tcpdump  -A -U -w - -i eth0 src 192.168.5.230 and port 80 | 
> /etc/weewx/weewx-interceptor-master/util/combine/combine-lines.pl
> tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 
> 262144 bytes
> ^C1922 packets captured
> 1922 packets received by filter
> 0 packets dropped by kernel
>
> Is tcpdump getting all the packet?  It seems like only part of the line is 
> there.
>  I assume I am missing something obvious, but I am quite frustrated and 
> don't know what to try next.
> Thanks!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to