diff --git a/src/main/java/nsusbloader/Utilities/nxdumptool/NxdtUsbAbi1.java b/src/main/java/nsusbloader/Utilities/nxdumptool/NxdtUsbAbi1.java index dd2a1bc..4a3d7fd 100644 --- a/src/main/java/nsusbloader/Utilities/nxdumptool/NxdtUsbAbi1.java +++ b/src/main/java/nsusbloader/Utilities/nxdumptool/NxdtUsbAbi1.java @@ -111,6 +111,9 @@ class NxdtUsbAbi1 { DeviceInformation deviceInformation = DeviceInformation.build(handlerNS); NsUsbEndpointDescriptor endpointInDescriptor = deviceInformation.getSimplifiedDefaultEndpointDescriptorIn(); this.endpointMaxPacketSize = endpointInDescriptor.getwMaxPacketSize(); + + USBSTATUS_SUCCESS[8] = (byte)(endpointMaxPacketSize & 0xFF); + USBSTATUS_SUCCESS[9] = (byte)((endpointMaxPacketSize >> 8) & 0xFF); } private void readLoop(){ @@ -187,16 +190,8 @@ class NxdtUsbAbi1 { writeUsb(USBSTATUS_UNSUPPORTED_ABI); throw new Exception("ABI v"+versionABI+" is not supported in current version."); } - replyToHandshake(); - } - private void replyToHandshake() throws Exception{ - // Send status response + endpoint max packet size - ByteBuffer buffer = ByteBuffer.allocate(USBSTATUS_SUCCESS.length + 2).order(ByteOrder.LITTLE_ENDIAN); - buffer.put(USBSTATUS_SUCCESS); - buffer.putShort(endpointMaxPacketSize); - byte[] response = buffer.array(); - - writeUsb(response); + + writeUsb(USBSTATUS_SUCCESS); } private void handleSendFileProperties(byte[] message) throws Exception{ diff --git a/src/main/resources/NSLMain.fxml b/src/main/resources/NSLMain.fxml index a2d42d6..9114c3d 100644 --- a/src/main/resources/NSLMain.fxml +++ b/src/main/resources/NSLMain.fxml @@ -71,12 +71,12 @@ Steps to roll NXDT functionality back: - + - +