Linux上的dotnet与libusbdotnet依赖项

3zwtqj6y  于 2023-08-03  发布在  Linux
关注(0)|答案(1)|浏览(136)

你好
一点背景。。我不是.Net程序员。我过去做过一些C源代码的GCC编译,但不是通过贸易。我做了很多我的业余爱好工作Linux。我有一个USB设备,我需要在Linux中访问,但源代码是在.NET(FlashcatUSB软件位于@https://www.embeddedcomputers.net/software/)。
我已经按照这些说明从这里在Linux上安装.NET:https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004-
我可以构建软件并尝试运行软件,但访问USB设备超时。采取的步骤如下:

bguthrie@LinDesk01:~/Downloads/flashcat/Console$ dotnet build
Microsoft (R) Build Engine version 16.10.1+2fd48ab73 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
Restored /home/bguthrie/Downloads/flashcat/Console/FlashcatUSB_Console.vbproj (in 187 ms).
FlashcatUSB_Console -> /home/bguthrie/Downloads/flashcat/Console/bin/Debug/net5.0/fcusb_console.dll

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:03.75
bguthrie@LinDesk01:~/Downloads/flashcat/Console$ dotnet list FlashcatUSB_Console.vbproj package
Project 'FlashcatUSB_Console' has the following package references
[net5.0]:
Top-level Package Requested Resolved
> LibUsbDotNet 2.2.29 2.2.29

bguthrie@LinDesk01:~/Downloads/flashcat/Console$ dotnet publish -r linux-x64
Microsoft (R) Build Engine version 16.10.1+2fd48ab73 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

Determining projects to restore...
Restored /home/bguthrie/Downloads/flashcat/Console/FlashcatUSB_Console.vbproj (in 205 ms).
FlashcatUSB_Console -> /home/bguthrie/Downloads/flashcat/Console/bin/Debug/net5.0/linux-x64/fcusb_console.dll
FlashcatUSB_Console -> /home/bguthrie/Downloads/flashcat/Console/bin/Debug/net5.0/linux-x64/publish/

bguthrie@LinDesk01:~/Downloads/flashcat/Console$ dotnet /home/bguthrie/Downloads/flashcat/Console/bin/Debug/net5.0/linux-x64/fcusb_console.dll -check
Welcome to the FlashcatUSB interfacing software, build: 628
Copyright 2021 - Embedded Computers LLC
Running on: Unix (64 bit)
FlashcatUSB Script Engine build: 311
License status: non-commercial use only
Waiting for connected device ***timedout***
----------------------------------------------

字符串
有人有什么建议吗?
谢谢B

gmxoilav

gmxoilav1#

当我遇到同样的问题时,我进行了更深入的研究,最终将软件重构为与LibUsbDotNet 3.0一起使用,解决了这个问题。
为了缩小问题的来源,我首先在各个地方添加了“print”语句(因为软件没有任何可以启用的痕迹)。打印出那些在其他情况下会被静默捕获的异常被证明是特别有用的。有时,由于并不总是有一个控制台可以打印到,它可以帮助写入一个文件。
这一切听起来相当麻烦,但是,我找不到一个适合在Linux上本机运行的Visual Basic .NET的调试器。
为了检查通过USB传入和传出设备的数据包,我使用了Wireshark(和usbmon Linux内核模块),它工作起来很有魅力。
要了解我的工作的当前状态,请查看FlashcatUSB forummy GitHub repository

相关问题