Filter was an issue because the class Consumer init function uses pcap_filter: def __init__(self, parser, mode='listen', address=DEFAULT_ADDR, port=DEFAULT_PORT, handler=None, iface=DEFAULT_IFACE, pcap_filter=DEFAULT_FILTER):
but you are still using filter as an argument name in the __main function__ device = InterceptorDriver.DEVICE_TYPES.get(options.device_type)( mode=options.mode, iface=options.iface, filter=options.filter, address=options.addr, port=options.port) and class InterceptorDriver init only passes in stn_dict when the conf file is used, so it resolves the conf file name directly: self._device = self.DEVICE_TYPES.get(self._device_type)(**stn_dict) If we use pcap_filter in the consumer class init, then we have to use the same argument names in the other places too. On Tuesday, November 8, 2016 at 9:12:43 AM UTC-6, mwall wrote: > > > > On Tuesday, November 8, 2016 at 8:55:31 AM UTC-5, Jerome Helbert wrote: >> >> Finally got a chance to check out the driver (latest commit 2ad77b7 >> <https://github.com/matthewwall/weewx-interceptor/commit/2ad77b771db76b46858e04750a9f902f113ecaa8>), >> >> had to make some changes to get it to run at all. >> >> >> 1. I see you had to change from filter to pcap_filter >> 1. The weewx.conf template still references filter >> 2. The standalone version of the program (__main__) does as well >> 2. class SniffServer had references to itself in its init when >> referencing SniffServer.SNAPLEN, SniffServer.PROMISCUOUS, >> SniffServer.TIMEOUT_MSEnter code here... >> 1. Changed these to self.SNAPLEN, self.PROMISCUOUS, self.TIMEOUT_MS >> 3. The two logdbg statements in decode_ip_packet are causing >> problems... some of the values arent strings. >> 1. I had no solution... just commented them out for now. >> >> With those changes it seems to be running great now >> >>> >>>> > jerome, > > thank you for testing. fixes applied at commit 3258d44 > > i left 'filter' intentionally in the conf and command-line, although if > you think 'pcap_filter' is more helpful from a ui point of view i'm happy > to change it. i used pcap_filter as a variable name since 'filter' is a > python built-in. > > readme and comments have been updated with the pcap details. > > thanks again for posting your implementation. having pcap sniffing as an > option in the interceptor is very powerful. > > m > -- 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 weewx-user+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.