This commit is contained in:
parent
8e12e82b8c
commit
d34d522f46
4 changed files with 25 additions and 13 deletions
17
README.md
17
README.md
|
@ -40,6 +40,13 @@ JRE/JDK 8u60 or higher.
|
|||
|
||||
2. `root # java -jar /path/to/NS-USBloader.jar`
|
||||
|
||||
3. Optional. Add user to 'udev' rules to use NS not-from-root-account
|
||||
```
|
||||
root # vim /etc/udev/rules.d/99-NS.rules
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", GROUP="plugdev"
|
||||
root # udevadm control --reload-rules && udevadm trigger
|
||||
```
|
||||
|
||||
##### macOS
|
||||
|
||||
Double-click on downloaded .jar file. Follow instructions. Or see 'Linux' section.
|
||||
|
@ -53,7 +60,7 @@ Set 'Security & Privacy' settings if needed.
|
|||
* Connect NS to PC
|
||||
* Open Zadig
|
||||
* Click 'Options' and select 'List All Devices'
|
||||
* Select NS in dropdown, select 'libusbK (v3.0.7.0)' (version may vary), click 'Install WCID Driver'
|
||||
* Select NS in drop-down, select 'libusbK (v3.0.7.0)' (version may vary), click 'Install WCID Driver'
|
||||
* Check that in device list of you system you have 'libusbK USB Devices' folder and your NS inside of it
|
||||
* [Download and install Java JRE](http://java.com/download/) (8u60 or higher)
|
||||
* Get this application (JAR file) double-click on on it (alternatively open 'cmd', go to place where jar located and execute via `java -jar thisAppName.jar`)
|
||||
|
@ -94,14 +101,6 @@ Why when 'NET' once started it never ends?
|
|||
|
||||
Because there is HTTP server inside of application. It can't determine the moment when all transmissions finishes (unless they failed). So you have to look on your NS screen and 'Interrupt' it once done.
|
||||
|
||||
### Tips&tricks
|
||||
##### Linux: Add user to 'udev' rules to use NS not-from-root-account
|
||||
```
|
||||
root # vim /etc/udev/rules.d/99-NS.rules
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", GROUP="plugdev"
|
||||
root # udevadm control --reload-rules && udevadm trigger
|
||||
```
|
||||
|
||||
### Known bugs
|
||||
* Unable to interrupt transmission when libusb awaiting for read event (when user sent NSP list but didn't select anything on NS). Sometimes this issue also appears when network transmission started and nothing received from NS.
|
||||
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
|||
<name>NS-USBloader</name>
|
||||
|
||||
<artifactId>ns-usbloader</artifactId>
|
||||
<version>0.5.2-SNAPSHOT</version>
|
||||
<version>0.5.3-SNAPSHOT</version>
|
||||
|
||||
<url>https://github.com/developersu/ns-usbloader/</url>
|
||||
<description>
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.util.Locale;
|
|||
import java.util.ResourceBundle;
|
||||
|
||||
public class NSLMain extends Application {
|
||||
public static final String appVersion = "v0.5.2";
|
||||
public static final String appVersion = "v0.5.3";
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception{
|
||||
|
||||
|
|
|
@ -144,8 +144,21 @@ public class UsbCommunications extends Task<Void> {
|
|||
if (result != LibUsb.SUCCESS) {
|
||||
logPrinter.print("Open NS USB device\n Returned: "+UsbErrorCodes.getErrCode(result), EMsgType.FAIL);
|
||||
if (result == LibUsb.ERROR_ACCESS)
|
||||
logPrinter.print("Double check that you have administrator privileges (you're 'root') or check 'udev' rules set for this user (linux only)!", EMsgType.INFO);
|
||||
close();
|
||||
logPrinter.print("Double check that you have administrator privileges (you're 'root') or check 'udev' rules set for this user (linux only)!\n\n" +
|
||||
"Steps to set 'udev' rules:\n" +
|
||||
"root # vim /etc/udev/rules.d/99-NS.rules\n" +
|
||||
"SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"057e\", ATTRS{idProduct}==\"3000\", GROUP=\"plugdev\"\n" +
|
||||
"root # udevadm control --reload-rules && udevadm trigger\n", EMsgType.INFO);
|
||||
// Let's make a bit dirty workaround since such shit happened
|
||||
if (contextNS != null) {
|
||||
LibUsb.exit(contextNS);
|
||||
logPrinter.print("Requested context close", EMsgType.INFO);
|
||||
}
|
||||
|
||||
// Report status and close
|
||||
logPrinter.update(nspMap, status);
|
||||
logPrinter.print("\tEnd chain", EMsgType.INFO);
|
||||
logPrinter.close();
|
||||
return null;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue