Installation libpcap for Interceptor and Froggit WH6000 on rpi2

112 views
Skip to first unread message

sc.lep...@gmail.com

unread,
Jan 9, 2021, 4:39:27 PM1/9/21
to weewx-user
Hello 
I want to use Interceptor Wifi for  my Froggit Station .

I try to install librairy libpcap on my rpi2

I use all these but nok  ;-( 
  1. sudo pip install pypcap 
  2. sudo apt-get install python-libpcap 
  3. sudo apt-get install libcap-dev 

So i try to find another way  : 



And installation by dkpg  :
 dpkg -i python-libpcap_0.6.4-1_armhf.deb

Can someone tell me if my libpcap will work fine ? 

Thansk a lot 
Best regards 
Stéphane

sc.lep...@gmail.com

unread,
Jan 10, 2021, 8:50:29 AM1/10/21
to weewx-user

Here is some  logs  :

Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11691] INFO __main__: Initializing weewx version 4.2.0
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11691] INFO __main__: Using Python 2.7.3 (default, Nov 24 2017, 21:13:24) #012[GCC 4.6.3]
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11691] INFO __main__: Platform Linux-5.10.5-v7+-armv7l-with-debian-7.11
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11691] INFO __main__: Locale is 'fr_FR.UTF-8'
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11691] INFO __main__: PID file is /var/run/weewx-FROGGIT.pid
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] INFO __main__: Using configuration file /home/weewx/FROGGIT.conf
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] INFO __main__: Debug is 0
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] INFO weewx.engine: Loading station type Interceptor (user.interceptor)
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] INFO user.interceptor: driver version is 0.53
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] INFO user.interceptor: device type: wu-client
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] INFO user.interceptor: mode is sniff
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] INFO user.interceptor: sniff iface=wlan0 promiscuous=0
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] INFO user.interceptor: sniff filter 'dst port 80'
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] ERROR weewx.engine: Import of driver failed: in method 'pcapObject_open_live', argument 2 of type 'char *' (<type 'exceptions.TypeError'>)
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****  Traceback (most recent call last):
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/engine.py", line 109, in setupStation
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, self)
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/interceptor.py", line 315, in loader
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****      return InterceptorDriver(**config_dict[DRIVER_NAME])
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/interceptor.py", line 2522, in __init__
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****      self._device = self.DEVICE_TYPES.get(self._device_type)(**stn_dict)
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/interceptor.py", line 728, in __init__
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****      WUClient.Parser(), handler=WUClient.Handler, **stn_dict)
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/interceptor.py", line 427, in __init__
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****      iface, pcap_filter, promiscuous)
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/interceptor.py", line 469, in __init__
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****      self.sniffer.open_live(iface, snaplen, pval, timeout_ms)
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****    File "/usr/lib/python2.7/dist-packages/pcap.py", line 108, in open_live
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****      def open_live(self, *args): return _pcap.pcapObject_open_live(self, *args)
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL weewx.engine:     ****  TypeError: in method 'pcapObject_open_live', argument 2 of type 'char *'
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL __main__: Unable to load driver: in method 'pcapObject_open_live', argument 2 of type 'char *'
Jan 10 14:47:28 raspberrypi weewx-FROGGIT[11696] CRITICAL __main__:     ****  Exiting...


Can someone  help me . 
Thanks

sc.lep...@gmail.com

unread,
Jan 10, 2021, 12:31:54 PM1/10/21
to weewx-user
and another log (from syslog)  


Jan 10 15:17:05 raspberrypi interceptor.py: interceptor: MainThread: mode is sniff
Jan 10 15:17:05 raspberrypi interceptor.py: interceptor: MainThread: sniff iface=wlan0 promiscuous=0
Jan 10 15:17:05 raspberrypi interceptor.py: interceptor: MainThread: sniff filter 'src 192.168.0.36 and dst port 80'
Jan 10 15:17:05 raspberrypi interceptor.py: interceptor: MainThread: pylibpcap (unknown)
Jan 10 15:17:05 raspberrypi interceptor.py: interceptor: ServerThread: start sniff server
Jan 10 15:17:34 raspberrypi interceptor.py: interceptor: MainThread: mode is sniff
Jan 10 15:17:34 raspberrypi interceptor.py: interceptor: MainThread: sniff iface=wlan0 promiscuous=0
Jan 10 15:17:34 raspberrypi interceptor.py: interceptor: MainThread: sniff filter 'src 192.168.0.36 and dst port 80'
Jan 10 15:17:34 raspberrypi interceptor.py: interceptor: MainThread: pylibpcap (unknown)
Jan 10 15:17:34 raspberrypi interceptor.py: interceptor: ServerThread: start sniff server
Jan 10 15:24:14 raspberrypi interceptor.py: interceptor: MainThread: mode is sniff
Jan 10 15:24:14 raspberrypi interceptor.py: interceptor: MainThread: sniff iface=wlan0 promiscuous=0
Jan 10 15:24:14 raspberrypi interceptor.py: interceptor: MainThread: sniff filter 'src 192.168.0.36 and dst port 80'
Jan 10 15:24:14 raspberrypi interceptor.py: interceptor: MainThread: pylibpcap (unknown)
Jan 10 15:24:14 raspberrypi interceptor.py: interceptor: ServerThread: start sniff server


sc.lep...@gmail.com

unread,
Jan 10, 2021, 3:25:25 PM1/10/21
to weewx-user
 My own answer
  i try several solutions and the last is good  ;) 

Architecture armhf
dpkg  -i  python-pypcap_1.1.2+debian-2.2_armhf.deb


It's ok now   ;) 

Jan 10 21:06:22 raspberrypi interceptor.py: interceptor: MainThread: mode is sniff
Jan 10 21:06:22 raspberrypi interceptor.py: interceptor: MainThread: sniff iface=wlan0 promiscuous=0
Jan 10 21:06:22 raspberrypi interceptor.py: interceptor: MainThread: sniff filter 'src 192.168.0.36 and dst port 80'
Jan 10 21:06:22 raspberrypi interceptor.py: interceptor: MainThread: pypcap (1.1)
Jan 10 21:06:22 raspberrypi interceptor.py: interceptor: ServerThread: start sniff server
Jan 10 21:09:13 raspberrypi interceptor.py: interceptor: MainThread: mode is listen
Jan 10 21:09:13 raspberrypi interceptor.py: interceptor: MainThread: listen on :80
Jan 10 21:09:13 raspberrypi interceptor.py: interceptor: ServerThread: start tcp server
Jan 10 21:09:21 raspberrypi interceptor.py: interceptor: ServerThread: GET: ID=Station&PASSWORD=XXXX&action=updateraww&realtime=1&rtfreq=5&dateutc=now&baromin=30.95&tempf=32.0&humidity=95&windspeedmph=0&windgustmph=0&winddir=34&dewptf=30.7&rainin=0&dailyrainin=0&UV=0&indoortempf=68.0&indoorhumidity=52
Jan 10 21:09:21 raspberrypi interceptor.py: interceptor: MainThread: using rain_total 0.0 from dailyrainin

Thanks 
Stéphane
Reply all
Reply to author
Forward
0 new messages