Compare commits
2 Commits
75453e11b8
...
c69ba9bd3f
Author | SHA1 | Date |
---|---|---|
Vadim Yanitskiy | c69ba9bd3f | |
Vadim Yanitskiy | 5b18cded95 |
|
@ -0,0 +1,2 @@
|
|||
[build-system]
|
||||
requires = ["setuptools"]
|
|
@ -2,4 +2,3 @@ construct
|
|||
pyserial
|
||||
crcmod
|
||||
cmd2
|
||||
pyshark
|
||||
|
|
|
@ -46,7 +46,7 @@ class SEDbgMuxDumpApp:
|
|||
'auto' : (dumpio_auto, 'Automatic dump format detection (by filename)'),
|
||||
'native' : (DumpIONative, 'Native binary dump format for this package'),
|
||||
'socat' : (DumpIOSocat, 'ASCII hexdump generated by socat (-x option)'),
|
||||
'btpcap' : (DumpIOBtPcap, 'PCAP file with Bluetooth RFCOMM packets'),
|
||||
'btpcap' : (DumpIOBtPcap, 'PCAP file with Bluetooth RFCOMM packets (requires pyshark)'),
|
||||
}
|
||||
|
||||
def __init__(self, argv) -> None:
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import logging
|
||||
import pyshark
|
||||
|
||||
from . import DumpIO
|
||||
from . import DumpIOError
|
||||
|
@ -38,9 +37,14 @@ class DumpIOBtPcap(DumpIO):
|
|||
self.timestamp = 0.0 # cached
|
||||
self.readonly = readonly
|
||||
|
||||
try:
|
||||
from pyshark import FileCapture
|
||||
except ImportError as e:
|
||||
raise DumpIOError('pyshark is not installed') from e
|
||||
|
||||
log.info('Opening Bluetooth RFCOMM capture %s', fname)
|
||||
dfilter = 'btrfcomm.channel == %s' % kw.get('chan', '2')
|
||||
self._pcap = pyshark.FileCapture(fname, display_filter=dfilter)
|
||||
self._pcap = FileCapture(fname, display_filter=dfilter)
|
||||
self._find_connect()
|
||||
|
||||
def read(self) -> dict:
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
name='sedbgmux',
|
||||
version='1.0',
|
||||
url='https://gitea.osmocom.org/fixeria/sedbgmux',
|
||||
license='GPLv3',
|
||||
author='Vadim Yanitskiy',
|
||||
author_email='fixeria@osmocom.org',
|
||||
description='DebugMux client for [Sony] Ericsson phones and modems',
|
||||
packages=['sedbgmux', 'sedbgmux.io', 'sedbgmux.ch'],
|
||||
install_requires=[
|
||||
'construct',
|
||||
'pyserial',
|
||||
'crcmod',
|
||||
'cmd2 >= 2.0.0',
|
||||
],
|
||||
extras_require={
|
||||
# sedbgmux-dump.py optionally requires pyshark
|
||||
'btpcap' : ['pyshark'],
|
||||
},
|
||||
scripts=[
|
||||
'sedbgmux-shell.py',
|
||||
'sedbgmux-dump.py',
|
||||
]
|
||||
)
|
Loading…
Reference in New Issue