Jo2003 / netmd_plusplus

C++ variant of libnetmd functionality.
GNU General Public License v3.0
0 stars 0 forks source link

Sony MDS-JB980 does not allow transfer of tracks #2

Open jounii opened 7 months ago

jounii commented 7 months ago

I have Sony MDS-JB980 (European model) and connected to MacBook Pro 2019 (macOS Monterey). The NetMD seems to work only partially. With the different apps available now the NetMD device is detected correctly and type shown correctly. The basic functions seem to work, you can play/stop, edit the disc title. Even erase the disc properly.

However as soon you try to send audio (SP mode, 16-bit/44kHz wav) the device shows "CONNECT" and then goes back to "Net MD" in it's display. The different apps we have behave slightly different on the error handing. Sorry for logs from NetMD Wizard, but by looks of it, it is using the netmd++. I have tried with platinum-md and webmd.pro implementations as well and well debug the code more with those what is going on. The golang implementation I have yet to try.

Trying to get to bottom of this, as it seems it almost works.

Anything to understand a bit on the NetMD protocol? I understand the implementations have a bit differences, but they all seem to fail with this particular case, so there is something going on now.

The webmd.pro especially is a bit problem on error handling as it hangs the deck in the "CONNECT" state (doesn't even allow to turn-off the device without pulling power plug). You can get it recovered, but seems it doesn't return gracefully. platinum-md has some re-try system and it re-tries and finally returns gracefully. But I suppose this is just the UI apps failure in using the underlaying netmd libs.

The NetMD Wizard gives follow log which I traced back to somewhere in https://github.com/Jo2003/netmd_plusplus/blob/b2f1d15cf32d17d197d74ababefe10a3506236bb/src/CNetMdSecure.cpp#L1010 :

2024-02-02 08:33:54.671|INFO|cnetmd.cpp:39|CNetMD::CNetMD(QObject *)|Log File / Stream "/private/var/folders/k7/kbdgjgg90wn6q3zym4mr648c0000gp/T/cd2netmd_transfer_log.tmp" created.
2024-02-02 08:34:16.235|INFO|cnetmd.cpp:132|int CNetMD::getDiscInfo()|getting MD disc / device info ...
2024-02-02 08:34:16.375|INFO|cnetmd.cpp:256|int CNetMD::getDiscInfo()|{
    "device": "Sony MDS-JE780/JB980",
    "disc_flags": "0x10",
    "groups": [
    ],
    "otf_enc": 1,
    "sp_upload": 0,
    "t_free": 4859,
    "t_total": 4859,
    "t_used": 0,
    "title": "TestDisc",
    "toc_manip": 0,
    "tracks": [
    ],
    "trk_count": 0
}
2024-02-02 08:34:16.387|INFO|cnetmd.cpp:522|void CNetMD::procEnded(bool, int)|
2024-02-02 08:34:16|INFO|initDevice():239: Product name: Net MD, serial number:
2024-02-02 08:34:16.387|INFO|mainwindow.cpp:533|void MainWindow::transferFinished(bool, int)|checkBusy: false ret: 0
2024-02-02 08:35:04.183|INFO|cjacktheripper.cpp:117|int CJackTheRipper::extractTrack(int, const QString &, bool)|Extract track 1 to /private/var/folders/k7/kbdgjgg90wn6q3zym4mr648c0000gp/T/cd2netmd.o4Lh65.tmp ...
2024-02-02 08:35:04.183|INFO|mainwindow.cpp:533|void MainWindow::transferFinished(bool, int)|checkBusy: true ret: 0
2024-02-02 08:35:04.228|INFO|mainwindow.cpp:533|void MainWindow::transferFinished(bool, int)|checkBusy: true ret: 0
2024-02-02 08:35:04.229|INFO|cnetmd.cpp:272|int CNetMD::writeTrack(const CNetMD::NetMDCmd &, const QString &, const QString &)|send track: "Aikakoneen taikaa - Mark Vera" file: "/private/var/folders/k7/kbdgjgg90wn6q3zym4mr648c0000gp/T/cd2netmd.o4Lh65.tmp" to "Sony MDS-JE780/JB980"
2024-02-02 08:35:06.600|CRITICAL|cnetmd.cpp:463|virtual void CNetMD::run()|libnetmd action returned with error:  -4
2024-02-02 08:35:06.601|INFO|cnetmd.cpp:522|void CNetMD::procEnded(bool, int)|
2024-02-02 08:35:05|CRITICAL|sendTrack():1013: Error while secureExchange()!
2024-02-02 08:35:05|CRITICAL|sendAudioTrack():1477: sendTrack() failed!
2024-02-02 08:35:06.601|INFO|mainwindow.cpp:533|void MainWindow::transferFinished(bool, int)|checkBusy: false ret: -4

I'm professional programmer, so no problem discussing in low level details. Already thinking about making own MD tool for my own purposes, but trying to figure out what is the issue with these libs now. As fallback solution I probably would make app that just realtime records audio as gapless and modifies the TOC afterwards as TOC editing seems to work. I'm figuring out app for easier mass-MD duplication.

Thanks already. I'll continue with my investigation later.

Jo2003 commented 7 months ago

Hi jounii!

I think all netmd implementations have their source in the linux_netmd project. This is the base of the type script implementation and the go lang implementation as well. There are many forks, but almost nothing new finds its way back into the linux_netmd project. I based my work on the original linux_netmd project, the changed netmd sources of the Platinum MD-, and the webmd project. Since I'm more a C++ programmer than a plain C programmer I started the C++ library. I added the MD header handling and the gapless transfer (UTOC split) to this library. This library is used in NetMD Wizard. The handling is rather easy.

To get some more important information from the log, set the log level to "debug" in the program settings. After that you'll find the raw packet transfer information in the log, which might really help.

Furthermore: These devices are old and use the USB 1.1 standard. You might have issues due to compatibility issues of your Mac Book with the NetMD device. You can try to use a cheap USB2 hub between the Mac Book and the 980 flagship. This helped me more than once.

Best regards, Jörg

jounii commented 7 months ago

I think all netmd implementations have their source in the linux_netmd project.

This was my understanding as well. Although they do seem to different slightly on smaller details like timing and error handling and such.

Furthermore: These devices are old and use the USB 1.1 standard. You might have issues due to compatibility issues of your Mac Book with the NetMD device. You can try to use a cheap USB2 hub between the Mac Book and the 980 flagship. This helped me more than once.

Thanks. I'll find one for testing this as well. I was going to find shorter usb-b cable too, I've had some issues with other devices with longer cables. Although this 980 issue doesn't seem to be such as it works fine (fast detection, TOC reading, etc) and fails always on the same place.

To be continued..

jounii commented 7 months ago

Here is the DEBUG level logging. I didn't dig into it yet. There is emptied used disc (with title set) and single track send.

2024-02-02 10:10:33.530|INFO|cnetmd.cpp:132|int CNetMD::getDiscInfo()|getting MD disc / device info ...
2024-02-02 10:10:33.663|INFO|cnetmd.cpp:256|int CNetMD::getDiscInfo()|{
    "device": "Sony MDS-JE780/JB980",
    "disc_flags": "0x10",
    "groups": [
    ],
    "otf_enc": 1,
    "sp_upload": 0,
    "t_free": 4859,
    "t_total": 4859,
    "t_used": 0,
    "title": "TestDisc",
    "toc_manip": 0,
    "tracks": [
    ],
    "trk_count": 0
}
2024-02-02 10:10:33.676|INFO|cnetmd.cpp:522|void CNetMD::procEnded(bool, int)|
2024-02-02 10:10:33|DEBUG|initDevice():181: Found supported device: Sony MDS-JE780/JB980
2024-02-02 10:10:33|DEBUG|waitForSync():646: device successfully synced!
2024-02-02 10:10:33|DEBUG|getStrings():286: Can't read serial number: Invalid parameter
2024-02-02 10:10:33|INFO|initDevice():239: Product name: Net MD, serial number: 
2024-02-02 10:10:33|DEBUG|initDiscHeader():352: 
2024-02-02 10:10:33|DEBUG|rawDiscHeader():280: 
2024-02-02 10:10:33|DEBUG|sendCmd():384: command:
00 18 08 10 10 01 01 00                                 ........
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 18 08 10 10 01 01 00                                 ........
2024-02-02 10:10:33|DEBUG|sendCmd():384: command:
00 18 06 02 20 18 01 00 00 30 00 0a 00 ff 00 00         .... ....0...�..
00 00 00                                                ...
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x0f / NETMD_STATUS_INTERIM
0f 18 06 02 20 18 01 00 00 30 00 0a 00 ff 00 00         .... ....0...�..
00 00 00                                                ...
2024-02-02 10:10:33|DEBUG|exchange():520: Re-read ...!
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 18 06 02 20 18 01 00 00 30 00 0a 00 10 00 00         .... ....0......
0e 00 00 00 0c 00 0a 00 08 54 65 73 74 44 69 73         .........TestDis
63                                                      c
2024-02-02 10:10:33|DEBUG|rawDiscHeader():307: Total size: 8, chunk size: 8
2024-02-02 10:10:33|DEBUG|listGroups():334: Group 0 'TestDisc', disc title
2024-02-02 10:10:33|DEBUG|tocManipSupported():1816: 
2024-02-02 10:10:33|DEBUG|spUploadSupported():755: 
2024-02-02 10:10:33|DEBUG|supportsSpUpload():1787: 
2024-02-02 10:10:33|DEBUG|trackCount():167: 
2024-02-02 10:10:33|DEBUG|sendCmd():384: command:
00 18 06 02 10 10 01 30 00 10 00 ff 00 00 00 00         .......0...�....
00                                                      .
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x0f / NETMD_STATUS_INTERIM
0f 18 06 02 10 10 01 30 00 10 00 ff 00 00 00 00         .......0...�....
00                                                      .
2024-02-02 10:10:33|DEBUG|exchange():520: Re-read ...!
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 18 06 02 10 10 01 30 00 10 00 10 00 00 08 00         .......0........
00 00 06 00 10 00 02 00 00                              .........
2024-02-02 10:10:33|DEBUG|discFlags():196: 
2024-02-02 10:10:33|DEBUG|sendCmd():384: command:
00 18 06 01 10 10 00 ff 00 00 01 00 0b                  .......�.....
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x0f / NETMD_STATUS_INTERIM
0f 18 06 01 10 10 00 ff 00 00 01 00 0b                  .......�.....
2024-02-02 10:10:33|DEBUG|exchange():520: Re-read ...!
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 18 06 01 10 10 00 10 00 00 01 00 0b 10               ..............
2024-02-02 10:10:33|DEBUG|discCapacity():851: 
2024-02-02 10:10:33|DEBUG|sendCmd():384: command:
00 18 08 10 10 00 01 00                                 ........
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 18 08 10 10 00 01 00                                 ........
2024-02-02 10:10:33|DEBUG|sendCmd():384: command:
00 18 06 02 10 10 00 30 80 03 00 ff 00 00 00 00         .......0�..�....
00                                                      .
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x0f / NETMD_STATUS_INTERIM
0f 18 06 02 10 10 00 30 80 03 00 ff 00 00 00 00         .......0�..�....
00                                                      .
2024-02-02 10:10:33|DEBUG|exchange():520: Re-read ...!
2024-02-02 10:10:33|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:33|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 18 06 02 10 10 00 30 80 03 00 10 00 00 1d 00         .......0�.......
00 00 1b 80 03 00 17 80 00 00 05 00 00 00 00 00         ...�...�........
00 05 00 01 20 59 10 00 05 00 01 20 59 10               .... Y..... Y.
2024-02-02 10:10:33.676|INFO|mainwindow.cpp:533|void MainWindow::transferFinished(bool, int)|checkBusy: false ret: 0
2024-02-02 10:10:48.378|DEBUG|helpers.cpp:263|QString tempFileName(const QString &)|"/cd2netmd.exPj3O.tmp"
2024-02-02 10:10:48.378|INFO|cjacktheripper.cpp:117|int CJackTheRipper::extractTrack(int, const QString &, bool)|Extract track 1 to /private/var/folders/k7/kbdgjgg90wn6q3zym4mr648c0000gp/T/cd2netmd.exPj3O.tmp ...
2024-02-02 10:10:48.379|INFO|mainwindow.cpp:533|void MainWindow::transferFinished(bool, int)|checkBusy: true ret: 0
2024-02-02 10:10:48.423|INFO|mainwindow.cpp:533|void MainWindow::transferFinished(bool, int)|checkBusy: true ret: 0
2024-02-02 10:10:48.423|INFO|cnetmd.cpp:272|int CNetMD::writeTrack(const CNetMD::NetMDCmd &, const QString &, const QString &)|send track: "Aikakoneen taikaa - Mark Vera" file: "/private/var/folders/k7/kbdgjgg90wn6q3zym4mr648c0000gp/T/cd2netmd.exPj3O.tmp" to "Sony MDS-JE780/JB980"
2024-02-02 10:10:50.377|CRITICAL|cnetmd.cpp:463|virtual void CNetMD::run()|libnetmd action returned with error:  -4
2024-02-02 10:10:50.377|INFO|cnetmd.cpp:522|void CNetMD::procEnded(bool, int)|
2024-02-02 10:10:48|DEBUG|sendAudioFile():827: 
2024-02-02 10:10:48|DEBUG|sendAudioTrack():1221: 
2024-02-02 10:10:48|DEBUG|sendAudioTrack():1323: audio file size : 35625576 bytes.
2024-02-02 10:10:48|DEBUG|sendAudioTrack():1331: supported audio file detected
2024-02-02 10:10:48|DEBUG|sendAudioTrack():1359: data chunk position at 36
2024-02-02 10:10:48|DEBUG|sendAudioTrack():1363: audio data size read from file :           35625532 bytes
2024-02-02 10:10:48|DEBUG|sendAudioTrack():1364: audio data size calculated from file size: 35625532 bytes
2024-02-02 10:10:48|DEBUG|aquireDev():659: 
2024-02-02 10:10:48|DEBUG|sendCmd():384: command:
00 ff 01 0c ff ff ff ff ff ff ff ff ff ff ff ff         .�..������������

2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:48|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 ff 01 0c ff ff ff ff ff ff ff ff ff ff ff ff         .�..������������

2024-02-02 10:10:48|DEBUG|leaveSession():682: 
2024-02-02 10:10:48|DEBUG|sendCmd():384: command:
00 18 00 08 00 46 f0 03 01 03 81 ff                     .....F�...��
2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:48|DEBUG|getResponse():470: Response: 0x0a / NETMD_STATUS_REJECTED
0a 18 00 08 00 46 f0 03 01 03 81 ff                     .....F�...��
2024-02-02 10:10:48|DEBUG|sendAudioTrack():1381: leaveSession() failed.
2024-02-02 10:10:48|DEBUG|setTrackProtection():1189: 
2024-02-02 10:10:48|DEBUG|sendCmd():384: command:
00 18 00 08 00 46 f0 03 01 03 2b ff 00 01 00 00         .....F�...+�....
01                                                      .
2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:48|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 18 00 08 00 46 f0 03 01 03 2b 00 00 01 00 00         .....F�...+.....
01                                                      .
2024-02-02 10:10:48|DEBUG|enterSession():666: 
2024-02-02 10:10:48|DEBUG|sendCmd():384: command:
00 18 00 08 00 46 f0 03 01 03 80 ff                     .....F�...��
2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:48|DEBUG|getResponse():470: Response: 0x0f / NETMD_STATUS_INTERIM
0f 18 00 08 00 46 f0 03 01 03 80 ff                     .....F�...��
2024-02-02 10:10:48|DEBUG|exchange():520: Re-read ...!
2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:48|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 18 00 08 00 46 f0 03 01 03 80 00                     .....F�...�.
2024-02-02 10:10:48|DEBUG|sendKeyData():728: 
2024-02-02 10:10:48|DEBUG|buildSendKeyDataCmd():85: 
2024-02-02 10:10:48|DEBUG|sendCmd():384: command:
00 18 00 08 00 46 f0 03 01 03 12 ff 00 48 00 00         .....F�....�.H..
00 48 00 00 00 02 00 00 00 09 26 42 26 42 00 00         .H........&B&B..
00 00 25 45 06 4d ea ca 14 f9 96 bd c8 a4 06 c2         ..%E.M��.���Ȥ.�
2b 81 49 ba f0 df 26 9d b7 1d 49 ba f0 df 26 9d         +�I���&��.I���&�
b7 1d e8 ef 73 45 8d 5b 8b f8 e8 ef 73 45 8d 5b         �.��sE�[����sE�[
8b f8 38 5b 49 36 7b 42 0c 58                           ��8[I6{B.X
2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:48|DEBUG|getResponse():470: Response: 0x0f / NETMD_STATUS_INTERIM
0f 18 00 08 00 46 f0 03 01 03 12 ff 00 48 00 00         .....F�....�.H..
00 48                                                   .H
2024-02-02 10:10:48|DEBUG|exchange():520: Re-read ...!
2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:48|DEBUG|getResponse():470: Response: 0x0a / NETMD_STATUS_REJECTED
0a 18 00 08 00 46 f0 03 01 03 12 92 00 48 00 00         .....F�....�.H..
00 48                                                   .H
2024-02-02 10:10:48|DEBUG|sessionKeyExchange():764: 
2024-02-02 10:10:48|DEBUG|sendCmd():384: command:
00 18 00 08 00 46 f0 03 01 03 20 ff 00 00 00 03         .....F�... �....
82 65 59 d8 44 7d 1b                                    �eY�D}.
2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:48|DEBUG|getResponse():470: Response: 0x0a / NETMD_STATUS_REJECTED
0a 18 00 08 00 46 f0 03 01 03 20 ff 00 00 00 03         .....F�... �....
82 65 59 d8 44 7d 1b                                    �eY�D}.
2024-02-02 10:10:48|DEBUG|sendAudioTrack():1434: sessionKeyExchange() failed!
2024-02-02 10:10:48|DEBUG|setupDownload():838: 
2024-02-02 10:10:48|DEBUG|sendCmd():384: command:
00 18 00 08 00 46 f0 03 01 03 22 ff 00 00 ec e5         .....F�..."�..��
20 80 ad 77 02 1f a9 ba d2 55 72 b6 23 d9 21 91          ��w.���Ur�#�!�
f6 b2 f2 78 00 5b 9e 65 0e e7 cd 45 b3 2f               ���x.[�e.��E�/
2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:48|DEBUG|getResponse():470: Response: 0x0a / NETMD_STATUS_REJECTED
0a 18 00 08 00 46 f0 03 01 03 22 ff 00 00 ec e5         .....F�..."�..��
20 80 ad 77 02 1f a9 ba d2 55 72 b6 23 d9 21 91          ��w.���Ur�#�!�
f6 b2 f2 78 00 5b 9e 65 0e e7 cd 45 b3 2f               ���x.[�e.��E�/
2024-02-02 10:10:48|DEBUG|sendAudioTrack():1442: setupDownload() failed!
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 1 : 1048552 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 2 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 3 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 4 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 5 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 6 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 7 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 8 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 9 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 10 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 11 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 12 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 13 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 14 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 15 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 16 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 17 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 18 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 19 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 20 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 21 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 22 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 23 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 24 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 25 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 26 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 27 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 28 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 29 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 30 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 31 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 32 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 33 : 1048576 bytes
2024-02-02 10:10:48|DEBUG|preparePackets():247: last packet: packet_data_length=1022548 + frame_padding=1476 = chunksize=1024024
2024-02-02 10:10:48|DEBUG|preparePackets():295: generating packet 34 : 1024024 bytes
2024-02-02 10:10:48|DEBUG|sendTrack():994: 
2024-02-02 10:10:48|DEBUG|sendTrack():1002: total transfer size : 35627032 bytes, 17396 frames of 2048 bytes.
2024-02-02 10:10:48|DEBUG|sendCmd():384: command:
00 18 00 08 00 46 f0 03 01 03 28 ff 00 01 00 10         .....F�...(�....
01 ff ff 00 00 06 00 00 43 f4 02 1f a0 18               .��.....C�.�.
2024-02-02 10:10:48|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:49|DEBUG|getResponse():470: Response: 0x0a / NETMD_STATUS_REJECTED
0a 18 00 08 00 46 f0 03 01 03 28 ff 00 01 00 10         .....F�...(�....
01 ff ff 00 00 06 00 00 43 f4 02 1f a0 18               .��.....C�.�.
2024-02-02 10:10:49|CRITICAL|sendTrack():1013: Error while secureExchange()!
2024-02-02 10:10:49|CRITICAL|sendAudioTrack():1477: sendTrack() failed!
2024-02-02 10:10:49|DEBUG|sessionKeyForget():804: 
2024-02-02 10:10:49|DEBUG|sendCmd():384: command:
00 18 00 08 00 46 f0 03 01 03 21 ff 00 00 00            .....F�...!�...
2024-02-02 10:10:49|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:49|DEBUG|getResponse():470: Response: 0x0a / NETMD_STATUS_REJECTED
0a 18 00 08 00 46 f0 03 01 03 21 ff 00 00 00            .....F�...!�...
2024-02-02 10:10:49|DEBUG|sendAudioTrack():1522: sessionKeyForget() failed!
2024-02-02 10:10:50|DEBUG|leaveSession():682: 
2024-02-02 10:10:50|DEBUG|sendCmd():384: command:
00 18 00 08 00 46 f0 03 01 03 81 ff                     .....F�...��
2024-02-02 10:10:50|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:50|DEBUG|getResponse():450: still polling ... (10 / 100 / 20 ms)
2024-02-02 10:10:50|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 18 00 08 00 46 f0 03 01 03 81 00                     .....F�...�.
2024-02-02 10:10:50|DEBUG|releaseDev():678: 
2024-02-02 10:10:50|DEBUG|sendCmd():384: command:
00 ff 01 00 ff ff ff ff ff ff ff ff ff ff ff ff         .�..������������

2024-02-02 10:10:50|DEBUG|getResponse():450: still polling ... (0 / 100 / 10 ms)
2024-02-02 10:10:50|DEBUG|getResponse():470: Response: 0x09 / NETMD_STATUS_ACCEPTED
09 ff 01 00 ff ff ff ff ff ff ff ff ff ff ff ff         .�..������������
2024-02-02 10:10:50.377|INFO|mainwindow.cpp:533|void MainWindow::transferFinished(bool, int)|checkBusy: false ret: -4
jounii commented 7 months ago

Tested now with shorter usb cable and with USB2 hub in the middle. Same log results. Will continue..

jounii commented 7 months ago

With help of Sir68k and asivery from Minidisc Discord, the reason was found that the key block on the deck was all 0xFF, so for unknown reason corrupt/reset. After receiving new special EKB from Sir68k and testing with modified netmd-js the transfer became functional. PR should now be done to switch to different key in specific devices (chip model) and leaf ids for this support.

Possible reasons were corrupt EEPROM, cleared up EEPROM or the drive has been replaced with part from non-NetMD device in this specific deck.

Jo2003 commented 7 months ago

Sounds good. So, NetMD Wizard works now as well?

Best regards, Jörg

jounii commented 7 months ago

@Jo2003 I guess it will, as long as the new EKB key is also added to netmd++ to select for specific leafId and devices. Or allow external key data file to be set up. According to Sir68k the generated EKB will only match with specific security chips/devices as they have different internal keys to decrypt the EEPROM block.