How to get wireshark plugin working for ARSDK

#1

For Ubuntu 16.04 (Most likely works for every OS), here is how i got the Wireshark plugin for ARSDK commands working:

Installing SDK:

https://developer.parrot.com/docs/SDK3/#go-deeper

run command:
repo init -u https://github.com/Parrot-Developers/arsdk_manifests.git -m release.xml repo sync

Required dependencies: git, build-essential (only for Linux), autoconf, libtool, python, python3

in repo folder, run command:
./build.sh -p arsdk-native -t build-sdk -j (This is OS specific)

Fixing the necessary .py files to get plugin to build:

  1. Make sure you are using python3

  2. in the folder: …/Tools/libARCommandsgen.py (line 5188 needed 4th argument “prj”, set as empty string “”)
    #The line should be as follows:

    defaultCls = ArClass('defaultCls', 0, '', '')
  1. …/Tools/libARCommandsgen.py (line 5012, added special elif case for ArMultiSetting. Used ARSDK_ARG_TYPE_STRING as type.)
    #The line should be as follows:
    elif isinstance(arg.argType, ArMultiSetting):
        table += '    .type = ARSDK_ARG_TYPE_STRING,\n'

Errors, which this fixes (Hopefully used to find this post by googling):

  1. File “…/…/…/out/arsdk-native/staging-host/usr/lib/arsdkgen/arsdkgen.py”, line 173, in
    main()
    File “…/…/…/out/arsdk-native/staging-host/usr/lib/arsdkgen/arsdkgen.py”, line 92, in main
    generator.generate_files(ctx, tmp_dir, extra)
    File “…/Tools/libARCommandsgen.py”, line 5274, in generate_files
    dump_tree_header(ctx, ‘./tree.h’)
    File “…/Tools/libARCommandsgen.py”, line 5188, in dump_tree_header
    defaultCls = ArClass(‘defaultCls’, 0, ‘’)
    TypeError: init() missing 1 required positional argument: ‘prj’

  1. File “…/…/…/out/arsdk-native/staging-host/usr/lib/arsdkgen/arsdkgen.py”, line 174, in
    main()
    File “…/…/…/out/arsdk-native/staging-host/usr/lib/arsdkgen/arsdkgen.py”, line 93, in main
    generator.generate_files(ctx, tmp_dir, extra)
    File “…/Tools/libARCommandsgen.py”, line 5274, in generate_files
    dump_tree_header(ctx, ‘./tree.h’)
    File “…/Tools/libARCommandsgen.py”, line 5193, in dump_tree_header
    hfile.write(dump_arg_table(ftr, cl, cmd))
    File “…/Tools/libARCommandsgen.py”, line 5012, in dump_arg_table
0 Likes

#2

After fixing those errors, I’m getting the following errors now:

python …/…/…/out/arsdk-native/staging-host/usr/lib/arsdkgen/arsdkgen.py …/Tools/libARCommandsgen.py tree
File “…/…/…/out/arsdk-native/staging-host/usr/lib/arsdkgen/arsdkgen.py”, line 10
file=sys.stderr)
^
SyntaxError: invalid syntax
Makefile:40: recipe for target ‘tree.h’ failed
make: *** [tree.h] Error 1

Any suggestions?

0 Likes

#3

And after if I try to comment it out, I get:

python …/…/…/out/arsdk-native/staging-host/usr/lib/arsdkgen/arsdkgen.py …/Tools/libARCommandsgen.py tree
Traceback (most recent call last):
File “…/…/…/out/arsdk-native/staging-host/usr/lib/arsdkgen/arsdkgen.py”, line 173, in
main()
File “…/…/…/out/arsdk-native/staging-host/usr/lib/arsdkgen/arsdkgen.py”, line 62, in main
os.makedirs(options.outdir, 0o755)
File “/usr/lib/python2.7/os.py”, line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: ‘/home/neelkotak13/GitRepos/C-SCoRE/Parrot/packages/libARCommands/WiresharkPlugin’
Makefile:40: recipe for target ‘tree.h’ failed
make: *** [tree.h] Error 1

0 Likes

#4

Make sure you are using python3. Run all the commands using python3.

0 Likes