From glaubitz@physik.fu-berlin.de Sat Sep 03 00:38:34 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1QzcNd-0007S6-Md>; Sat, 03 Sep 2011 00:38:33 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1QzcNd-00047T-KZ>; Sat, 03 Sep 2011 00:38:33 +0200 Received: from 89-98-8.connect.netcom.no ([89.8.98.89] helo=[172.20.10.2]) by inpost2.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtpsa (envelope-from ) id <1QzcNd-000303-FQ>; Sat, 03 Sep 2011 00:38:33 +0200 From: John Paul Adrian Glaubitz Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 3 Sep 2011 00:38:32 +0200 Message-Id: <062EAA9C-8947-44AF-887B-A614447725AF@physik.fu-berlin.de> To: linux-minidisc mailing list Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) X-Originating-IP: 89.8.98.89 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315003113-00005A17-A88B318E/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.015340, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Subject: [linux-minidisc] Announcement: libnetmd and new repository X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 22:38:34 -0000 Dear subscribers of the linux-minidisc mailing list, I am very pleased to announce that we recently made a big leap forward in development and have now included NetMD support into our C code. Previously, NetMD functionality was only available through a number of Python scripts which worked fine for many people but also required some background knowledge for proper installation and usage. We have therefore made the decision to create a C library called "libnetmd" analogous to our existing library "libhimd" which is used to access HiMD devices so that we can eventually integrate NetMD functionality into our GUI application "QHiMDTransfer" (which we will consequently rename to reflect these changes). libnetmd was actually not written from scratch, but we adopted the original project hosted on SourceForget.net [1]. The library was imported into our code repository and the code has been extended with transfer capabilities. Most of this work was done by Alexander Sulfrian during the recent "Google Summer of Code 2011". Since we did not succeed applying for GSoC ourselves, we asked the people from the VideoLAN project for support and they were so kind to allow one of their students work for our project. So without VideoLAN and Google, this work wouldn't have been possible. For anyone who would like to give the recently updated libnetmd a try, please check out the source code from our main repository here: git clone git://minidisc.dyndns.org/linux-minidisc.git Note that we have changed the address of the git repository during the last maintenance to be more consistent with the common standards. Also, we have completely cloned Alexander's repository and will continue the work from there, thus you must re-checkout the repository into a new folder or merge your old local repository with our new master repository. To be able to build libnetmd and the "netmd" command line utility, the following libraries will have to be installed including their development headers: - libgcrypt - libusb-0.1* (Note: libusb-1.0.0 is currently unsupported) The code can be compiled by simply calling "make". Before that works, edit the Makefile and comment the following out: PEDANTIC += -Werror by putting a #-sign in front of it. Have fun testing the code! Any feedback is naturally welcome. Adrian [1] http://sourceforge.net/projects/libnetmd/ From linux-minidisc@lists.fu-berlin.de Mon Sep 05 00:58:08 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R0Ldf-0002VU-GX>; Mon, 05 Sep 2011 00:58:07 +0200 Received: from mail-clifton1.uio.no ([129.240.10.66]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R0Ldf-00071e-Bd>; Mon, 05 Sep 2011 00:58:07 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R0Lde-0003Kx-Qw for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 00:58:06 +0200 Received: from mail-mx3.uio.no ([129.240.10.44]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R0Lde-0003Ku-QA for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 00:58:06 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx3.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R0Lde-000872-Ds for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 00:58:06 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R0Lde-0005Xd-5E for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 00:58:06 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 3cd17e2cd9c8cb90013e56a247ea5e1fcb47e74d X-Git-Newrev: 6763dd1797aaf7d03e9e8c97fef2bb3b43705fc9 Message-Id: From: John Paul Adrian Glaubitz Date: Mon, 05 Sep 2011 00:58:06 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TO_NO_BRKTS_PCNT=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: 02E1CC3C09F39149C8E8D7BEF970D414A979B187 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 83 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.66 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315177087-00005A17-AB4D0344/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 6763dd1797aaf7d03e9e8c97fef2bb3b43705fc9 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 22:58:08 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 6763dd1797aaf7d03e9e8c97fef2bb3b43705fc9 (commit) from 3cd17e2cd9c8cb90013e56a247ea5e1fcb47e74d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6763dd1797aaf7d03e9e8c97fef2bb3b43705fc9 Author: Adrian Glaubitz Date: Mon Sep 5 00:56:44 2011 +0200 Rename himd.pro to md.pro to reflect we're building libnetmd now as well. ----------------------------------------------------------------------- Summary of changes: himd.pro => md.pro | 0 1 files changed, 0 insertions(+), 0 deletions(-) rename himd.pro => md.pro (100%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Mon Sep 05 01:13:43 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R0Lsk-00035b-JX>; Mon, 05 Sep 2011 01:13:42 +0200 Received: from mail-clifton2.uio.no ([129.240.10.67]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R0Lsk-00088w-EL>; Mon, 05 Sep 2011 01:13:42 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R0Lsj-0005bX-W7 for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:13:41 +0200 Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R0Lsj-0005bU-VA for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:13:41 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx2.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R0Lsj-0005BM-IY for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:13:41 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R0Lsj-0005tn-Bg for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:13:41 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 6763dd1797aaf7d03e9e8c97fef2bb3b43705fc9 X-Git-Newrev: a59c87783db8bb9b2853beb635ae3b4be8cd6b84 Message-Id: From: John Paul Adrian Glaubitz Date: Mon, 05 Sep 2011 01:13:41 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TO_NO_BRKTS_PCNT=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: 5168197820F2B527827BDE0EF06DC3F4C0C97F38 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 84 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.67 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315178022-00005A17-959CC255/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. a59c87783db8bb9b2853beb635ae3b4be8cd6b84 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 23:13:43 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via a59c87783db8bb9b2853beb635ae3b4be8cd6b84 (commit) from 6763dd1797aaf7d03e9e8c97fef2bb3b43705fc9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a59c87783db8bb9b2853beb635ae3b4be8cd6b84 Author: Adrian Glaubitz Date: Mon Sep 5 01:12:43 2011 +0200 Move netmd.c into separate directory and rename to 'netmdcli', use qmake for building it. ----------------------------------------------------------------------- Summary of changes: .../use_libhimd.pri => libnetmd/use_libnetmd.prl | 16 ++++++++-------- {libnetmd => netmdcli}/netmd_dev.c | 0 libnetmd/netmd.c => netmdcli/netmdcli.c | 0 himddump/himddump.pro => netmdcli/netmdcli.pro | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) copy libhimd/use_libhimd.pri => libnetmd/use_libnetmd.prl (67%) rename {libnetmd => netmdcli}/netmd_dev.c (100%) rename libnetmd/netmd.c => netmdcli/netmdcli.c (100%) copy himddump/himddump.pro => netmdcli/netmdcli.pro (61%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Mon Sep 05 01:19:53 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R0Lyj-0003Li-7B>; Mon, 05 Sep 2011 01:19:53 +0200 Received: from mail-forward2.uio.no ([129.240.10.71]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R0Lyj-0008W9-2P>; Mon, 05 Sep 2011 01:19:53 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R0Lyi-00077z-Ja for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:19:52 +0200 Received: from mail-mx4.uio.no ([129.240.10.45]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R0Lyi-00077w-Im for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:19:52 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx4.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R0Lyi-0004Bm-6d for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:19:52 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R0Lyi-00065I-0J for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:19:52 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: a59c87783db8bb9b2853beb635ae3b4be8cd6b84 X-Git-Newrev: d6608c4aa2e1a2e24fcf532a2efc57714531303d Message-Id: From: John Paul Adrian Glaubitz Date: Mon, 05 Sep 2011 01:19:52 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: EBAB4CC90B92EE95F27D4EE08D293B916750C2D6 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 2 total 85 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.71 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315178393-00005A17-17252A10/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. d6608c4aa2e1a2e24fcf532a2efc57714531303d X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 23:19:54 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via d6608c4aa2e1a2e24fcf532a2efc57714531303d (commit) from a59c87783db8bb9b2853beb635ae3b4be8cd6b84 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d6608c4aa2e1a2e24fcf532a2efc57714531303d Author: Adrian Glaubitz Date: Mon Sep 5 01:19:04 2011 +0200 Include 'netmdcli' in master qmake file. ----------------------------------------------------------------------- Summary of changes: md.pro | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Mon Sep 05 01:21:36 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R0M0O-0003Qb-5K>; Mon, 05 Sep 2011 01:21:36 +0200 Received: from mail-clifton1.uio.no ([129.240.10.66]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R0M0O-0000C7-0R>; Mon, 05 Sep 2011 01:21:36 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R0M0N-0000oi-PN for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:21:35 +0200 Received: from mail-mx1.uio.no ([129.240.10.29]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R0M0N-0000of-Ob for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:21:35 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx1.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R0M0N-0007L0-CA for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:21:35 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R0M0N-00067y-5L for linux-minidisc@lists.fu-berlin.de; Mon, 05 Sep 2011 01:21:35 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: d6608c4aa2e1a2e24fcf532a2efc57714531303d X-Git-Newrev: 6a4f7084bf23aff93235959fbe3b7f043c70828b Message-Id: From: John Paul Adrian Glaubitz Date: Mon, 05 Sep 2011 01:21:35 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: 74F1C03DEE00E8A45CEA5ECD80783DFE9BC35C59 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 3 total 86 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.66 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315178496-00005A17-FB33B0DD/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 6a4f7084bf23aff93235959fbe3b7f043c70828b X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 23:21:36 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 6a4f7084bf23aff93235959fbe3b7f043c70828b (commit) from d6608c4aa2e1a2e24fcf532a2efc57714531303d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6a4f7084bf23aff93235959fbe3b7f043c70828b Author: Adrian Glaubitz Date: Mon Sep 5 01:21:23 2011 +0200 Remove old Makefile for libnetmd. ----------------------------------------------------------------------- Summary of changes: libnetmd/Makefile | 33 --------------------------------- 1 files changed, 0 insertions(+), 33 deletions(-) delete mode 100644 libnetmd/Makefile hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Tue Sep 06 21:47:32 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R11cJ-0001Tr-O8>; Tue, 06 Sep 2011 21:47:31 +0200 Received: from mail-forward2.uio.no ([129.240.10.71]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R11cJ-0002Kp-JA>; Tue, 06 Sep 2011 21:47:31 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R11cI-00014i-Sq for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:47:30 +0200 Received: from mail-mx4.uio.no ([129.240.10.45]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R11cI-00014f-S3 for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:47:30 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx4.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R11cI-0002L7-DE for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:47:30 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R11cH-0002Z3-Ni for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:47:29 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 6a4f7084bf23aff93235959fbe3b7f043c70828b X-Git-Newrev: bcfe8d8b19d4e00cffc8587e44a7587200d55d39 Message-Id: From: John Paul Adrian Glaubitz Date: Tue, 06 Sep 2011 21:47:29 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: 64DB6C7FCD570A980CB6A42AA9BFEFA17A0188A5 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 87 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.71 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315338451-00005A17-1B64D7A9/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. bcfe8d8b19d4e00cffc8587e44a7587200d55d39 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 19:47:32 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via bcfe8d8b19d4e00cffc8587e44a7587200d55d39 (commit) from 6a4f7084bf23aff93235959fbe3b7f043c70828b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bcfe8d8b19d4e00cffc8587e44a7587200d55d39 Author: Adrian Glaubitz Date: Tue Sep 6 21:44:16 2011 +0200 Change licenses for libraries 'libnetmd' and 'libhimd' from GPLv2 to LGPLv2.1 to allow linking the libraries to non-GPL software. ----------------------------------------------------------------------- Summary of changes: COPYING.LIB | 502 +++++++++++++++++++++++++++++++++++++++++++ libhimd/encryption.c | 25 +++ libhimd/frag.c | 25 +++ libhimd/himd.c | 25 +++ libhimd/himd.h | 25 +++ libhimd/mdstream.c | 25 +++ libhimd/sony_oma.c | 25 +++ libhimd/trackindex.c | 25 +++ libnetmd/common.c | 31 ++-- libnetmd/error.c | 29 ++-- libnetmd/libnetmd.c | 30 ++-- libnetmd/libnetmd.h | 30 ++-- libnetmd/log.c | 30 ++-- libnetmd/playercontrol.c | 31 ++-- libnetmd/secure.c | 24 ++- libnetmd/trackinformation.c | 29 ++-- libnetmd/utils.c | 23 ++ 17 files changed, 840 insertions(+), 94 deletions(-) create mode 100644 COPYING.LIB hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Tue Sep 06 21:51:37 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R11gG-0001di-OG>; Tue, 06 Sep 2011 21:51:36 +0200 Received: from mail-forward1.uio.no ([129.240.10.70]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R11gG-0002eO-Iw>; Tue, 06 Sep 2011 21:51:36 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R11gG-0002qv-6J for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:51:36 +0200 Received: from mail-mx3.uio.no ([129.240.10.44]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R11gG-0002qs-5T for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:51:36 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx3.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R11gF-0004vB-Oc for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:51:36 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R11gF-0002gL-Fp for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:51:35 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: bcfe8d8b19d4e00cffc8587e44a7587200d55d39 X-Git-Newrev: 7772794d6eeeb18a55adb609041e4792a41f2c33 Message-Id: From: John Paul Adrian Glaubitz Date: Tue, 06 Sep 2011 21:51:35 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TO_NO_BRKTS_PCNT=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: EE75716FADF96966F7A297A9BADBD3FFE67B5733 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 2 total 88 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.70 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315338696-00005A17-034A3E0B/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 7772794d6eeeb18a55adb609041e4792a41f2c33 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 19:51:37 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 7772794d6eeeb18a55adb609041e4792a41f2c33 (commit) from bcfe8d8b19d4e00cffc8587e44a7587200d55d39 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7772794d6eeeb18a55adb609041e4792a41f2c33 Author: Adrian Glaubitz Date: Tue Sep 6 21:51:01 2011 +0200 Rename 'himddump' to 'himdcli' to be more consistent (see 'netmdcli'). ----------------------------------------------------------------------- Summary of changes: {himddump => himdcli}/.gitignore | 0 himddump/himddump.c => himdcli/himdcli.c | 2 +- himddump/himddump.pro => himdcli/himdcli.pro | 0 md.pro | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename {himddump => himdcli}/.gitignore (100%) rename himddump/himddump.c => himdcli/himdcli.c (99%) rename himddump/himddump.pro => himdcli/himdcli.pro (100%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Tue Sep 06 21:53:13 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R11ho-0001ia-MH>; Tue, 06 Sep 2011 21:53:12 +0200 Received: from mail-forward1.uio.no ([129.240.10.70]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R11ho-0002o3-Ez>; Tue, 06 Sep 2011 21:53:12 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R11ho-0003CJ-8W for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:53:12 +0200 Received: from mail-mx4.uio.no ([129.240.10.45]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R11ho-0003CG-7i for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:53:12 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx4.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R11hn-0003y5-S3 for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:53:12 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R11hn-0002kV-Ki for linux-minidisc@lists.fu-berlin.de; Tue, 06 Sep 2011 21:53:11 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 7772794d6eeeb18a55adb609041e4792a41f2c33 X-Git-Newrev: 9aa7cb4edc86745d92e845424aed8338740b2e14 Message-Id: From: John Paul Adrian Glaubitz Date: Tue, 06 Sep 2011 21:53:11 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: 04AE441776D96FF1D530969E7952414871E13A08 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 3 total 89 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.70 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315338792-00005A17-B8AA493D/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 9aa7cb4edc86745d92e845424aed8338740b2e14 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2011 19:53:13 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 9aa7cb4edc86745d92e845424aed8338740b2e14 (commit) from 7772794d6eeeb18a55adb609041e4792a41f2c33 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9aa7cb4edc86745d92e845424aed8338740b2e14 Author: Adrian Glaubitz Date: Tue Sep 6 21:52:27 2011 +0200 Forgot to change name in himdcli.pro to 'himdcli.c'. ----------------------------------------------------------------------- Summary of changes: himdcli/himdcli.pro | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Wed Sep 07 23:20:09 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1PXU-0003cZ-AA>; Wed, 07 Sep 2011 23:20:08 +0200 Received: from mail-forward1.uio.no ([129.240.10.70]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1PXU-0002qM-5B>; Wed, 07 Sep 2011 23:20:08 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R1PXT-0004yz-Od for linux-minidisc@lists.fu-berlin.de; Wed, 07 Sep 2011 23:20:07 +0200 Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R1PXT-0004yw-Nr for linux-minidisc@lists.fu-berlin.de; Wed, 07 Sep 2011 23:20:07 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx2.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R1PXT-0003Tg-Ag for linux-minidisc@lists.fu-berlin.de; Wed, 07 Sep 2011 23:20:07 +0200 Received: from mkarcher by z6 with local (Exim 4.76) (envelope-from ) id 1R1PXS-0005lx-SO for linux-minidisc@lists.fu-berlin.de; Wed, 07 Sep 2011 23:20:06 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 9aa7cb4edc86745d92e845424aed8338740b2e14 X-Git-Newrev: c5a16774418f25ff30089589c8249d3708c8335c Message-Id: From: Michael Karcher Date: Wed, 07 Sep 2011 23:20:06 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TO_NO_BRKTS_PCNT=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: 8F992659C98DF3FDB0EA7738BD08E778C6D56FFD X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 90 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.70 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315430408-00005A17-A6A1D69F/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. c5a16774418f25ff30089589c8249d3708c8335c X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 21:20:09 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via c5a16774418f25ff30089589c8249d3708c8335c (commit) via ac5b812e399837121c0fc93fac7251ee78b8ca6d (commit) from 9aa7cb4edc86745d92e845424aed8338740b2e14 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c5a16774418f25ff30089589c8249d3708c8335c Author: Michael Karcher Date: Wed Sep 7 22:05:00 2011 +0200 use gcrypt instead of mcrypt in libhimd to harmonize with libnetmd Also, on my test system, libgcrypt is more than 20% faster than libmcrypt for single DES. commit ac5b812e399837121c0fc93fac7251ee78b8ca6d Author: Michael Karcher Date: Wed Sep 7 21:37:44 2011 +0200 Don't add libs by default, they alread got added when enabled ----------------------------------------------------------------------- Summary of changes: libhimd/encryption.c | 62 +++++++++++++++++++++---------------------------- libhimd/libhimd.pro | 7 ++--- libhimd/mdstream.c | 2 +- 3 files changed, 31 insertions(+), 40 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Thu Sep 08 17:06:18 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1gBF-0002XR-Jz>; Thu, 08 Sep 2011 17:06:17 +0200 Received: from mail-clifton2.uio.no ([129.240.10.67]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1gBF-0004R4-EM>; Thu, 08 Sep 2011 17:06:17 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R1gBE-0001j2-TJ for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:06:16 +0200 Received: from mail-mx1.uio.no ([129.240.10.29]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R1gBE-0001iz-SW for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:06:16 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx1.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R1gBE-0007bP-GR for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:06:16 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R1gBE-00079O-3x for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:06:16 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: c5a16774418f25ff30089589c8249d3708c8335c X-Git-Newrev: 5beb36a6be5eeed6fcebad4aa068bd45e89949e2 Message-Id: From: John Paul Adrian Glaubitz Date: Thu, 08 Sep 2011 17:06:16 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TO_NO_BRKTS_PCNT=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: AADC6B8953E720AD17C413EC4106377B3E854B46 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 92 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.67 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315494377-00005A17-4CBD530A/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 5beb36a6be5eeed6fcebad4aa068bd45e89949e2 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 15:06:18 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 5beb36a6be5eeed6fcebad4aa068bd45e89949e2 (commit) from c5a16774418f25ff30089589c8249d3708c8335c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5beb36a6be5eeed6fcebad4aa068bd45e89949e2 Author: Adrian Glaubitz Date: Thu Sep 8 17:04:55 2011 +0200 Move netmd_dev.c back into libnetmd directory, it was accidentally moved into the netmdcli directory before. ----------------------------------------------------------------------- Summary of changes: {netmdcli => libnetmd}/netmd_dev.c | 0 1 files changed, 0 insertions(+), 0 deletions(-) rename {netmdcli => libnetmd}/netmd_dev.c (100%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Thu Sep 08 17:10:55 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1gFj-0002gw-0H>; Thu, 08 Sep 2011 17:10:55 +0200 Received: from mail-forward1.uio.no ([129.240.10.70]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1gFi-00050N-Qm>; Thu, 08 Sep 2011 17:10:54 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R1gFi-0007dy-Is for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:10:54 +0200 Received: from mail-mx3.uio.no ([129.240.10.44]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R1gFi-0007dv-I5 for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:10:54 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx3.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R1gFi-0007yI-5f for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:10:54 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R1gFh-0007Hi-VF for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:10:54 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 5beb36a6be5eeed6fcebad4aa068bd45e89949e2 X-Git-Newrev: 85fda773e4b97f28a9c826c2b23423e06502b8e4 Message-Id: From: John Paul Adrian Glaubitz Date: Thu, 08 Sep 2011 17:10:53 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TO_NO_BRKTS_PCNT=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: 77D980D79F50B81AA4BD9DD4305B62EBEB13F439 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 2 total 93 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.70 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315494655-00005A17-30BE2F8D/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 85fda773e4b97f28a9c826c2b23423e06502b8e4 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 15:10:55 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 85fda773e4b97f28a9c826c2b23423e06502b8e4 (commit) from 5beb36a6be5eeed6fcebad4aa068bd45e89949e2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 85fda773e4b97f28a9c826c2b23423e06502b8e4 Author: Adrian Glaubitz Date: Thu Sep 8 17:09:53 2011 +0200 Update himdcli/.gitignore to reflect renaming of himddump to himdcli. Add netmdcli/.gitignore as well. ----------------------------------------------------------------------- Summary of changes: himdcli/.gitignore | 2 +- {himdcli => netmdcli}/.gitignore | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) copy {himdcli => netmdcli}/.gitignore (74%) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Thu Sep 08 17:23:22 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1gRl-0003Ew-IP>; Thu, 08 Sep 2011 17:23:21 +0200 Received: from mail-forward2.uio.no ([129.240.10.71]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1gRl-0006Xc-DA>; Thu, 08 Sep 2011 17:23:21 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R1gRl-00078C-5F for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:23:21 +0200 Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R1gRl-000789-4V for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:23:21 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx2.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R1gRk-0000M3-OT for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:23:21 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R1gRk-0007ZH-HR for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 17:23:20 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 85fda773e4b97f28a9c826c2b23423e06502b8e4 X-Git-Newrev: 2f38b39a538a92fffaa343c8ab855a5e6957227c Message-Id: From: John Paul Adrian Glaubitz Date: Thu, 08 Sep 2011 17:23:20 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: 2C2A6CF0AA76B9DF1A7941E5643FB24446A0EC33 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 3 total 94 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.71 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315495401-00005A17-17CCF667/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 2f38b39a538a92fffaa343c8ab855a5e6957227c X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 15:23:22 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 2f38b39a538a92fffaa343c8ab855a5e6957227c (commit) from 85fda773e4b97f28a9c826c2b23423e06502b8e4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2f38b39a538a92fffaa343c8ab855a5e6957227c Author: Adrian Glaubitz Date: Thu Sep 8 17:22:02 2011 +0200 Forgot to adapt qmake configuration after moving netmd_dev.c from netmdcli directory back into libnetmd directory. ----------------------------------------------------------------------- Summary of changes: libnetmd/libnetmd.pro | 4 ++-- netmdcli/netmdcli.pro | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Thu Sep 08 20:10:25 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1j3Q-0001DM-Mh>; Thu, 08 Sep 2011 20:10:24 +0200 Received: from mail-clifton1.uio.no ([129.240.10.66]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1j3Q-00030g-HK>; Thu, 08 Sep 2011 20:10:24 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R1j3Q-0002M1-5O for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 20:10:24 +0200 Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R1j3Q-0002Ly-4Y for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 20:10:24 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx2.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R1j3P-00089p-OC for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 20:10:24 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R1j3P-0003XZ-A2 for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 20:10:23 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 2f38b39a538a92fffaa343c8ab855a5e6957227c X-Git-Newrev: 976e896aacf1251da928abc623ffb2ebe5226841 Message-Id: From: John Paul Adrian Glaubitz Date: Thu, 08 Sep 2011 20:10:23 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: 4EF2CD65E6CEA61306D384CAA7F4483BF2BDE364 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 95 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.66 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315505424-00005A17-3A7C7688/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000094, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 976e896aacf1251da928abc623ffb2ebe5226841 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 18:10:25 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 976e896aacf1251da928abc623ffb2ebe5226841 (commit) from 2f38b39a538a92fffaa343c8ab855a5e6957227c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 976e896aacf1251da928abc623ffb2ebe5226841 Author: Adrian Glaubitz Date: Thu Sep 8 20:09:44 2011 +0200 Update libnetmd/.gitignore to ignore Makefiles and *.prl. ----------------------------------------------------------------------- Summary of changes: libnetmd/.gitignore | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From glaubitz@physik.fu-berlin.de Thu Sep 08 23:28:41 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1m9I-0008Rc-VQ>; Thu, 08 Sep 2011 23:28:41 +0200 Received: from mail-forward1.uio.no ([129.240.10.70]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1m9I-0001E1-Rw>; Thu, 08 Sep 2011 23:28:40 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R1m9I-0001j0-Jf for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 23:28:40 +0200 Received: from mail-mx4.uio.no ([129.240.10.45]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R1m9I-0001ix-Is for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 23:28:40 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx4.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R1m9I-0003xH-7l for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 23:28:40 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R1m9H-0008TC-MO for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 23:28:39 +0200 From: Adrian Glaubitz To: linux-minidisc@lists.fu-berlin.de Date: Thu, 8 Sep 2011 23:28:33 +0200 Message-Id: <1315517314-32134-1-git-send-email-glaubitz@physik.fu-berlin.de> X-Mailer: git-send-email 1.7.5.4 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: 34378CC3DC63A8F9A5C3A56A10D7316AC9DEF976 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 96 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.70 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315517320-00005A17-99C6D0B0/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [PATCH] Port libnetmd to libusb-1.0 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 21:28:41 -0000 Hi, when libnetmd was first created, the current version of libusb was 0.1, however, the current and supported version of libusb is 1.0. I have therefore made the appropriate changes to the libnetmd source to adapt it to libusb 1.0. After applying the patch, the code compiles fine. However, I haven't been able to fully test the patch yet and therefore send it in for review which is a good idea for such a significant change anyway. Please test! Adrian From glaubitz@physik.fu-berlin.de Thu Sep 08 23:28:48 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1m9P-0008S2-RX>; Thu, 08 Sep 2011 23:28:47 +0200 Received: from mail-forward2.uio.no ([129.240.10.71]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1m9P-0001EC-Ij>; Thu, 08 Sep 2011 23:28:47 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R1m9P-0005bN-Aa for linux-minidisc@lists.fu-berlin.de; Thu, 08 Sep 2011 23:28:47 +0200 Received: from mail-mx1.uio.no ([129.240.10.29]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R1m9P-0005bK-9j; Thu, 08 Sep 2011 23:28:47 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx1.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R1m9O-0002cH-Ew; Thu, 08 Sep 2011 23:28:47 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R1m9O-0008TM-8Y; Thu, 08 Sep 2011 23:28:46 +0200 From: Adrian Glaubitz To: linux-minidisc@lists.fu-berlin.de Date: Thu, 8 Sep 2011 23:28:34 +0200 Message-Id: <1315517314-32134-2-git-send-email-glaubitz@physik.fu-berlin.de> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1315517314-32134-1-git-send-email-glaubitz@physik.fu-berlin.de> References: <1315517314-32134-1-git-send-email-glaubitz@physik.fu-berlin.de> X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: 20BB7C360D5C06288E3F1AF97EC9A642F16FE92B X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 2 total 97 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.71 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315517327-00005A17-11DC8877/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000017, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [PATCH] Port libnetmd from the old libusb-0.1 to the current libusb-1.0. X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 21:28:48 -0000 --- libnetmd/common.c | 33 ++++++++++++----------- libnetmd/common.h | 4 +- libnetmd/libnetmd.c | 23 +++++++++------- libnetmd/libnetmd.h | 2 +- libnetmd/libnetmd.pro | 2 +- libnetmd/netmd_dev.c | 70 +++++++++++++++++++++++------------------------- libnetmd/netmd_dev.h | 4 +- libnetmd/secure.c | 10 ++++--- 8 files changed, 76 insertions(+), 72 deletions(-) diff --git a/libnetmd/common.c b/libnetmd/common.c index a244889..1f7b660 100644 --- a/libnetmd/common.c +++ b/libnetmd/common.c @@ -23,6 +23,7 @@ */ #include +#include #include "common.h" #include "const.h" @@ -41,7 +42,7 @@ @param tries maximum attempts to poll the minidisc @return if error <0, else number of bytes that md wants to send */ -static int netmd_poll(usb_dev_handle *dev, char *buf, int tries) +static int netmd_poll(libusb_device_handle *dev, unsigned char *buf, int tries) { int i; @@ -49,10 +50,10 @@ static int netmd_poll(usb_dev_handle *dev, char *buf, int tries) /* send a poll message */ memset(buf, 0, 4); - if (usb_control_msg(dev, USB_ENDPOINT_IN | USB_TYPE_VENDOR | - USB_RECIP_INTERFACE, 0x01, 0, 0, buf, 4, + if (libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | + LIBUSB_RECIPIENT_INTERFACE, 0x01, 0, 0, buf, 4, NETMD_POLL_TIMEOUT) < 0) { - netmd_log(NETMD_LOG_ERROR, "netmd_poll: usb_control_msg failed\n"); + netmd_log(NETMD_LOG_ERROR, "netmd_poll: libusb_control_transfer failed\n"); return NETMDERR_USB; } @@ -80,11 +81,11 @@ int netmd_exch_message(netmd_dev_handle *devh, unsigned char *cmd, int netmd_send_message(netmd_dev_handle *devh, unsigned char *cmd, const size_t cmdlen) { - char pollbuf[4]; + unsigned char pollbuf[4]; int len; - usb_dev_handle *dev; + libusb_device_handle *dev; - dev = (usb_dev_handle *)devh; + dev = (libusb_device_handle *)devh; /* poll to see if we can send data */ len = netmd_poll(dev, pollbuf, 1); @@ -96,10 +97,10 @@ int netmd_send_message(netmd_dev_handle *devh, unsigned char *cmd, /* send data */ netmd_log(NETMD_LOG_DEBUG, "Command:\n"); netmd_log_hex(NETMD_LOG_DEBUG, cmd, cmdlen); - if (usb_control_msg(dev, USB_ENDPOINT_OUT | USB_TYPE_VENDOR | - USB_RECIP_INTERFACE, 0x80, 0, 0, (char*)cmd, (int)cmdlen, + if (libusb_control_transfer(dev, LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_VENDOR | + LIBUSB_RECIPIENT_INTERFACE, 0x80, 0, 0, cmd, (int)cmdlen, NETMD_SEND_TIMEOUT) < 0) { - netmd_log(NETMD_LOG_ERROR, "netmd_exch_message: usb_control_msg failed\n"); + netmd_log(NETMD_LOG_ERROR, "netmd_exch_message: libusb_control_transfer failed\n"); return NETMDERR_USB; } @@ -109,10 +110,10 @@ int netmd_send_message(netmd_dev_handle *devh, unsigned char *cmd, int netmd_recv_message(netmd_dev_handle *devh, unsigned char* rsp) { int len; - char pollbuf[4]; - usb_dev_handle *dev; + unsigned char pollbuf[4]; + libusb_device_handle *dev; - dev = (usb_dev_handle *)devh; + dev = (libusb_device_handle *)devh; /* poll for data that minidisc wants to send */ len = netmd_poll(dev, pollbuf, NETMD_RECV_TRIES); @@ -122,10 +123,10 @@ int netmd_recv_message(netmd_dev_handle *devh, unsigned char* rsp) } /* receive data */ - if (usb_control_msg(dev, USB_ENDPOINT_IN | USB_TYPE_VENDOR | - USB_RECIP_INTERFACE, pollbuf[1], 0, 0, (char*)rsp, len, + if (libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | + LIBUSB_RECIPIENT_INTERFACE, pollbuf[1], 0, 0, rsp, len, NETMD_RECV_TIMEOUT) < 0) { - netmd_log(NETMD_LOG_ERROR, "netmd_exch_message: usb_control_msg failed\n"); + netmd_log(NETMD_LOG_ERROR, "netmd_exch_message: libusb_control_transfer failed\n"); return NETMDERR_USB; } diff --git a/libnetmd/common.h b/libnetmd/common.h index f3a51bf..8dcff6b 100644 --- a/libnetmd/common.h +++ b/libnetmd/common.h @@ -1,13 +1,13 @@ #ifndef LIBNETMD_COMMON_H #define LIBNETMD_COMMON_H -#include +#include /** Typedef that nearly all netmd_* functions use to identify the USB connection with the minidisc player. */ -typedef usb_dev_handle* netmd_dev_handle; +typedef libusb_device_handle *netmd_dev_handle; /** Function to exchange command/response buffer with minidisc player. diff --git a/libnetmd/libnetmd.c b/libnetmd/libnetmd.c index 432c5a3..0291cbe 100644 --- a/libnetmd/libnetmd.c +++ b/libnetmd/libnetmd.c @@ -22,6 +22,8 @@ * */ +#include + #include "libnetmd.h" #include "utils.h" @@ -58,12 +60,12 @@ struct netmd_pair const* find_pair(int hex, struct netmd_pair const* array) return &unknown_pair; } -static void waitforsync(usb_dev_handle* dev) +static void waitforsync(libusb_device_handle* dev) { - char syncmsg[4]; + unsigned char syncmsg[4]; fprintf(stderr,"Waiting for Sync: \n"); do { - usb_control_msg(dev, 0xc1, 0x01, 0, 0, syncmsg, 0x04, 5000); + libusb_control_transfer(dev, 0xc1, 0x01, 0, 0, syncmsg, 0x04, 5000); } while (memcmp(syncmsg,"\0\0\0\0",4)!=0); } @@ -881,6 +883,7 @@ int netmd_write_disc_header(netmd_dev_handle* devh, minidisc* md) int netmd_write_track(netmd_dev_handle* devh, char* szFile) { int ret = 0; + int transferred = 0; int fd = open(szFile, O_RDONLY); /* File descriptor to omg file */ unsigned char *data = malloc(4096); /* Buffer for reading the omg file */ unsigned char *p = NULL; /* Pointer to index into data */ @@ -925,9 +928,9 @@ int netmd_write_track(netmd_dev_handle* devh, char* szFile) size_t data_size_i; /* the size of the data part, later it will be used to point out the last byte in file */ unsigned int size; unsigned char* buf=NULL; /* A buffer for recieving file info */ - usb_dev_handle *dev; + libusb_device_handle *dev; - dev = (usb_dev_handle *)devh; + dev = (libusb_device_handle *)devh; if(fd < 0) return fd; @@ -1034,7 +1037,7 @@ int netmd_write_track(netmd_dev_handle* devh, char* szFile) netmd_log(NETMD_LOG_DEBUG, "Sending %d bytes to md\n", bytes_to_send); netmd_log_hex(NETMD_LOG_DEBUG, data, bytes_to_send); - ret = usb_bulk_write(dev,0x02, (char*)data, (int)bytes_to_send, 5000); + ret = libusb_bulk_transfer(dev, 0x02, data, (int)bytes_to_send, &transferred, 5000); } /* End while */ if (ret<0) { @@ -1046,7 +1049,7 @@ int netmd_write_track(netmd_dev_handle* devh, char* szFile) /******** End transfer wait for unit ready ********/ fprintf(stderr,"Waiting for Done:\n"); do { - usb_control_msg(dev, 0xc1, 0x01, 0, 0, (char*)size_request, 0x04, 5000); + libusb_control_transfer(dev, 0xc1, 0x01, 0, 0, size_request, 0x04, 5000); } while (memcmp(size_request,"\0\0\0\0",4)==0); netmd_log(NETMD_LOG_DEBUG, "Recieving response: \n"); @@ -1057,7 +1060,7 @@ int netmd_write_track(netmd_dev_handle* devh, char* szFile) return -1; } buf = malloc(size); - usb_control_msg(dev, 0xc1, 0x81, 0, 0, (char*)buf, (int)size, 500); + libusb_control_transfer(dev, 0xc1, 0x81, 0, 0, buf, (int)size, 500); netmd_log_hex(NETMD_LOG_DEBUG, buf, size); free(buf); @@ -1071,11 +1074,11 @@ int netmd_write_track(netmd_dev_handle* devh, char* szFile) /********* End TOC Edit **********/ - ret = usb_control_msg(dev, 0x41, 0x80, 0, 0, (char*)fintoc, 0x19, 800); + ret = libusb_control_transfer(dev, 0x41, 0x80, 0, 0, fintoc, 0x19, 800); fprintf(stderr,"Waiting for Done: \n"); do { - usb_control_msg(dev, 0xc1, 0x01, 0, 0, (char*)size_request, 0x04, 5000); + libusb_control_transfer(dev, 0xc1, 0x01, 0, 0, size_request, 0x04, 5000); } while (memcmp(size_request,"\0\0\0\0",4)==0); return ret; diff --git a/libnetmd/libnetmd.h b/libnetmd/libnetmd.h index cc33d78..bbd001c 100644 --- a/libnetmd/libnetmd.h +++ b/libnetmd/libnetmd.h @@ -32,7 +32,7 @@ #include #include -#include +#include #include "const.h" #include "error.h" diff --git a/libnetmd/libnetmd.pro b/libnetmd/libnetmd.pro index ca93ac9..5c4f6ec 100644 --- a/libnetmd/libnetmd.pro +++ b/libnetmd/libnetmd.pro @@ -7,4 +7,4 @@ DEFINES += G_DISABLE_DEPRECATED=1 PKGCONFIG += HEADERS += common.h const.h error.h libnetmd.h log.h netmd_dev.h playercontrol.h secure.h trackinformation.h utils.h SOURCES += common.c error.c libnetmd.c log.c netmd_dev.c playercontrol.c secure.c trackinformation.c utils.c -LIBS += -lusb -lgcrypt +LIBS += -lusb-1.0 -lgcrypt diff --git a/libnetmd/netmd_dev.c b/libnetmd/netmd_dev.c index 0c0e8b0..9e186b9 100644 --- a/libnetmd/netmd_dev.c +++ b/libnetmd/netmd_dev.c @@ -21,11 +21,14 @@ #include #include #include +#include #include "netmd_dev.h" #include "log.h" #include "const.h" +static libusb_context *ctx = NULL; + /*! list of known vendor/prod id's for NetMD devices */ static struct netmd_devices const known_devices[] = { @@ -76,33 +79,28 @@ static struct netmd_devices const known_devices[] = netmd_error netmd_init(netmd_device **device_list) { - struct usb_bus *bus; - struct usb_device *dev; int count = 0; + ssize_t usb_device_count; + ssize_t i = 0; netmd_device *new_device; + libusb_device **list; + struct libusb_device_descriptor desc; - usb_init(); - - usb_find_busses(); - usb_find_devices(); + libusb_init(&ctx); *device_list = NULL; - for(bus = usb_get_busses(); bus; bus = bus->next) - { - for(dev = bus->devices; dev; dev = dev->next) - { - for(count = 0; (known_devices[count].idVendor != 0); count++) - { - if(dev->descriptor.idVendor == known_devices[count].idVendor - && dev->descriptor.idProduct == known_devices[count].idProduct) - { - new_device = malloc(sizeof(netmd_device)); - new_device->usb_dev = dev; - new_device->link = *device_list; - *device_list = new_device; - } - } - } + + usb_device_count = libusb_get_device_list(NULL, &list); + + for (i = 0; i < usb_device_count; i++) { + libusb_get_device_descriptor(list[i], &desc); + if(desc.idVendor == known_devices[count].idVendor && + desc.idProduct == known_devices[count].idProduct) { + new_device = malloc(sizeof(netmd_device)); + new_device->usb_dev = list[i]; + new_device->link = *device_list; + *device_list = new_device; + } } return NETMD_NO_ERROR; @@ -112,10 +110,10 @@ netmd_error netmd_init(netmd_device **device_list) netmd_error netmd_open(netmd_device *dev, netmd_dev_handle **dev_handle) { int result; - usb_dev_handle *dh; + libusb_device_handle **dh = NULL; - dh = usb_open(dev->usb_dev); - result = usb_claim_interface(dh, 0); + libusb_open(dev->usb_dev, dh); + result = libusb_claim_interface(*dh, 0); if (result == 0) { *dev_handle = (netmd_dev_handle*)dh; @@ -127,13 +125,13 @@ netmd_error netmd_open(netmd_device *dev, netmd_dev_handle **dev_handle) } } -netmd_error netmd_get_devname(netmd_dev_handle* devh, char* buf, size_t buffsize) +netmd_error netmd_get_devname(netmd_dev_handle* devh, unsigned char* buf, size_t buffsize) { int result; - result = usb_get_string_simple((usb_dev_handle *)devh, 2, buf, buffsize); + result = libusb_get_string_descriptor_ascii((libusb_device_handle *)devh, 2, buf, buffsize); if (result < 0) { - netmd_log(NETMD_LOG_ERROR, "usb_get_string_simple failed, %s (%d)\n", strerror(errno), errno); + netmd_log(NETMD_LOG_ERROR, "libusb_get_string_descriptor_asci failed, %s (%d)\n", strerror(errno), errno); buf[0] = 0; return NETMD_USB_ERROR; } @@ -144,15 +142,13 @@ netmd_error netmd_get_devname(netmd_dev_handle* devh, char* buf, size_t buffsize netmd_error netmd_close(netmd_dev_handle* devh) { int result; - usb_dev_handle *dev; - - dev = (usb_dev_handle *)devh; - result = usb_release_interface(dev, 0); - if (result == 0) { - result = usb_close(dev); - } + libusb_device_handle *dev; - if (result < 0) { + dev = (libusb_device_handle *)devh; + result = libusb_release_interface(dev, 0); + if (result == 0) + libusb_close(dev); + else{ return NETMD_USB_ERROR; } @@ -172,4 +168,6 @@ void netmd_clean(netmd_device **device_list) } *device_list = NULL; + + libusb_exit(ctx); } diff --git a/libnetmd/netmd_dev.h b/libnetmd/netmd_dev.h index fba35a3..ba6cea5 100644 --- a/libnetmd/netmd_dev.h +++ b/libnetmd/netmd_dev.h @@ -7,7 +7,7 @@ typedef struct netmd_device { struct netmd_device *link; char name[32]; - struct usb_device *usb_dev; + struct libusb_device *usb_dev; } netmd_device; /** @@ -43,7 +43,7 @@ netmd_error netmd_open(netmd_device *dev, netmd_dev_handle **dev_handle); @param buf Buffer to hold the name. @param buffsize Available size in buf. */ -netmd_error netmd_get_devname(netmd_dev_handle* devh, char* buf, size_t buffsize); +netmd_error netmd_get_devname(netmd_dev_handle* devh, unsigned char* buf, size_t buffsize); /** Closes the usb descriptors. diff --git a/libnetmd/secure.c b/libnetmd/secure.c index c58b1e8..f74e4cd 100644 --- a/libnetmd/secure.c +++ b/libnetmd/secure.c @@ -31,7 +31,7 @@ #include #include -#include +#include #include #include @@ -355,6 +355,7 @@ void netmd_transfer_song_packets(netmd_dev_handle *dev, unsigned char *packet, *buf; size_t packet_size; int error; + int transferred = 0; p = packets; while (p != NULL) { @@ -370,7 +371,7 @@ void netmd_transfer_song_packets(netmd_dev_handle *dev, memcpy(buf + 16, p->data, p->length); /* ... send it */ - error = usb_bulk_write((usb_dev_handle*)dev, 2, (char*)packet, (int)packet_size, 10000); + error = libusb_bulk_transfer((libusb_device_handle*)dev, 2, packet, (int)packet_size, &transferred, 10000); netmd_log(NETMD_LOG_DEBUG, "%d %d\n", packet_size, error); /* cleanup */ @@ -557,9 +558,10 @@ netmd_error netmd_secure_send_track(netmd_dev_handle *dev, netmd_error netmd_secure_real_recv_track(netmd_dev_handle *dev, uint32_t length, FILE *file, size_t chunksize) { uint32_t done = 0; - char *data; + unsigned char *data; int32_t read; netmd_error error = NETMD_NO_ERROR; + int transferred = 0; data = malloc(chunksize); while (done < length) { @@ -567,7 +569,7 @@ netmd_error netmd_secure_real_recv_track(netmd_dev_handle *dev, uint32_t length, chunksize = length - done; } - read = usb_bulk_read((usb_dev_handle*)dev, 0x81, data, (int)chunksize, 10000); + read = libusb_bulk_transfer((libusb_device_handle*)dev, 0x81, data, (int)chunksize, &transferred, 10000); if (read >= 0) { done += (uint32_t)read; -- 1.7.5.4 From linux-minidisc@lists.fu-berlin.de Fri Sep 09 00:33:59 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1nAU-0002TW-W3>; Fri, 09 Sep 2011 00:33:59 +0200 Received: from mail-forward1.uio.no ([129.240.10.70]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1nAU-0006U5-Qw>; Fri, 09 Sep 2011 00:33:58 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R1nAU-0002YK-KP for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 00:33:58 +0200 Received: from mail-mx5.uio.no ([129.240.10.46]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R1nAU-0002YH-Jc for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 00:33:58 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx5.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R1nAU-00067X-4H for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 00:33:58 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R1nAT-0002QG-PL for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 00:33:57 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 976e896aacf1251da928abc623ffb2ebe5226841 X-Git-Newrev: cf781996004a62b98a3df688f1a6376d3bf0124a Message-Id: From: John Paul Adrian Glaubitz Date: Fri, 09 Sep 2011 00:33:57 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: 91C3945ABF631707DF0A9C01178ED4AA1DB904DF X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 98 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.70 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315521238-00005A17-51857CC6/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. cf781996004a62b98a3df688f1a6376d3bf0124a X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 22:33:59 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via cf781996004a62b98a3df688f1a6376d3bf0124a (commit) from 976e896aacf1251da928abc623ffb2ebe5226841 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cf781996004a62b98a3df688f1a6376d3bf0124a Author: Adrian Glaubitz Date: Thu Sep 8 23:19:18 2011 +0200 Port libnetmd from the old libusb-0.1 to the current libusb-1.0. ----------------------------------------------------------------------- Summary of changes: libnetmd/common.c | 33 +++++++++++----------- libnetmd/common.h | 4 +- libnetmd/libnetmd.c | 23 +++++++++------- libnetmd/libnetmd.h | 2 +- libnetmd/libnetmd.pro | 4 +- libnetmd/netmd_dev.c | 71 ++++++++++++++++++++++++------------------------- libnetmd/netmd_dev.h | 4 +- libnetmd/secure.c | 10 ++++--- 8 files changed, 78 insertions(+), 73 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Fri Sep 09 11:53:10 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1xll-0003JO-Ph>; Fri, 09 Sep 2011 11:53:09 +0200 Received: from mail-clifton2.uio.no ([129.240.10.67]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R1xll-0002RA-KY>; Fri, 09 Sep 2011 11:53:09 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R1xlk-0006Ag-MO for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 11:53:08 +0200 Received: from mail-mx3.uio.no ([129.240.10.44]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R1xlk-0006Ad-Ld for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 11:53:08 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx3.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R1xlk-0003ni-9Q for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 11:53:08 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R1xlk-00058m-0T for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 11:53:08 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: cf781996004a62b98a3df688f1a6376d3bf0124a X-Git-Newrev: c0eea8bcdd96e9a82728e93afaf9ff90d7a31e69 Message-Id: From: John Paul Adrian Glaubitz Date: Fri, 09 Sep 2011 11:53:08 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: 49F863A24022C091147DCE49977727A26AC3BA69 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 99 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.67 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315561989-00005A17-2EDFECDE/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. c0eea8bcdd96e9a82728e93afaf9ff90d7a31e69 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 09:53:10 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via c0eea8bcdd96e9a82728e93afaf9ff90d7a31e69 (commit) from cf781996004a62b98a3df688f1a6376d3bf0124a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c0eea8bcdd96e9a82728e93afaf9ff90d7a31e69 Author: Adrian Glaubitz Date: Fri Sep 9 11:52:38 2011 +0200 Build fixes for netmdcli. ----------------------------------------------------------------------- Summary of changes: netmdcli/netmdcli.c | 1 + netmdcli/netmdcli.pro | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Fri Sep 09 15:53:42 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R21WX-0004DP-Cy>; Fri, 09 Sep 2011 15:53:41 +0200 Received: from mail-forward1.uio.no ([129.240.10.70]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R21WX-0001je-7p>; Fri, 09 Sep 2011 15:53:41 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R21WW-0006TO-Sp for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 15:53:40 +0200 Received: from mail-mx4.uio.no ([129.240.10.45]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R21WW-0006TL-Rx for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 15:53:40 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx4.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R21WW-0006GC-FP for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 15:53:40 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R21WW-0002rT-26 for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 15:53:40 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: c0eea8bcdd96e9a82728e93afaf9ff90d7a31e69 X-Git-Newrev: f2b3d9dc751430361c48273f075647d04ab26de0 Message-Id: From: John Paul Adrian Glaubitz Date: Fri, 09 Sep 2011 15:53:40 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: FA65CD8BFCA883128909817E3057F8B4970E5383 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 100 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.70 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315576421-00005A17-DE5133F1/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. f2b3d9dc751430361c48273f075647d04ab26de0 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 13:53:42 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via f2b3d9dc751430361c48273f075647d04ab26de0 (commit) from c0eea8bcdd96e9a82728e93afaf9ff90d7a31e69 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f2b3d9dc751430361c48273f075647d04ab26de0 Author: Adrian Glaubitz Date: Fri Sep 9 15:53:13 2011 +0200 Fix detection algorithm for NetMD devices. ----------------------------------------------------------------------- Summary of changes: libnetmd/netmd_dev.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Fri Sep 09 16:20:33 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R21wW-0005G1-Dx>; Fri, 09 Sep 2011 16:20:32 +0200 Received: from mail-clifton2.uio.no ([129.240.10.67]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R21wW-0005Sn-8m>; Fri, 09 Sep 2011 16:20:32 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R21wV-00065L-Ku for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 16:20:31 +0200 Received: from mail-mx1.uio.no ([129.240.10.29]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R21wV-00065I-K5 for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 16:20:31 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx1.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R21wV-00030e-7o for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 16:20:31 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R21wU-0003i9-V6 for linux-minidisc@lists.fu-berlin.de; Fri, 09 Sep 2011 16:20:31 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: f2b3d9dc751430361c48273f075647d04ab26de0 X-Git-Newrev: a06afd5ac696ef3e209eee2095a58169200d0157 Message-Id: From: John Paul Adrian Glaubitz Date: Fri, 09 Sep 2011 16:20:30 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: C098AEF79E154FD9B56DF4AA201DE94279A08A6B X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 101 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.67 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315578032-00005A17-354507C9/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. a06afd5ac696ef3e209eee2095a58169200d0157 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 14:20:33 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via a06afd5ac696ef3e209eee2095a58169200d0157 (commit) from f2b3d9dc751430361c48273f075647d04ab26de0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a06afd5ac696ef3e209eee2095a58169200d0157 Author: Adrian Glaubitz Date: Fri Sep 9 16:19:43 2011 +0200 Correct pointer dereferencing in netmd_open, fixes segmentation fault in libusb_open. ----------------------------------------------------------------------- Summary of changes: libnetmd/netmd_dev.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From linux-minidisc@lists.fu-berlin.de Mon Sep 12 10:57:09 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R32KC-0008PF-Nw>; Mon, 12 Sep 2011 10:57:08 +0200 Received: from mail-clifton2.uio.no ([129.240.10.67]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R32KC-0005KE-JB>; Mon, 12 Sep 2011 10:57:08 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R32KB-0002AT-VK for linux-minidisc@lists.fu-berlin.de; Mon, 12 Sep 2011 10:57:07 +0200 Received: from mail-mx1.uio.no ([129.240.10.29]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R32KB-0002AQ-UV for linux-minidisc@lists.fu-berlin.de; Mon, 12 Sep 2011 10:57:07 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx1.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R32KB-0000vs-Hn for linux-minidisc@lists.fu-berlin.de; Mon, 12 Sep 2011 10:57:07 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R32KB-0004RT-7U for linux-minidisc@lists.fu-berlin.de; Mon, 12 Sep 2011 10:57:07 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: a06afd5ac696ef3e209eee2095a58169200d0157 X-Git-Newrev: 9a677e71e6d81b545dc5cde26be8bf0fb4f3058e Message-Id: From: John Paul Adrian Glaubitz Date: Mon, 12 Sep 2011 10:57:07 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: 718E13E5A0192E7711205903BCD9A0D92E7E69B9 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 103 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.67 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315817828-00005A17-A1451C15/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 9a677e71e6d81b545dc5cde26be8bf0fb4f3058e X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2011 08:57:09 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 9a677e71e6d81b545dc5cde26be8bf0fb4f3058e (commit) from a06afd5ac696ef3e209eee2095a58169200d0157 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9a677e71e6d81b545dc5cde26be8bf0fb4f3058e Author: Adrian Glaubitz Date: Mon Sep 12 10:56:55 2011 +0200 MacOS build fixes. ----------------------------------------------------------------------- Summary of changes: libnetmd/libnetmd.pro | 2 ++ netmdcli/netmdcli.pro | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From manner.moe@gmx.de Tue Sep 13 09:03:09 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R3N1Q-0000hh-JL>; Tue, 13 Sep 2011 09:03:08 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R3N1Q-0002Tr-Fk>; Tue, 13 Sep 2011 09:03:08 +0200 Received: (qmail invoked by alias); 13 Sep 2011 07:03:07 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp064) with SMTP; 13 Sep 2011 09:03:07 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1+dzCo5RtqdNMQYYFbLxVeCvBj/BuTUfulPDPHObx duDrq6Kg2LdDTv Message-ID: <4E6F002A.6040204@gmx.de> Date: Tue, 13 Sep 2011 09:03:06 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: linux-minidisc@lists.fu-berlin.de Content-Type: multipart/alternative; boundary="------------000709090607050205040001" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.22 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315897388-00005A17-7110B723/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001762, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=HTML_MESSAGE, RATWARE_GECKO_BUILD,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2011 07:03:09 -0000 This is a multi-part message in MIME format. --------------000709090607050205040001 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi, if found some incompatibilities when compiling on windows/mingw32. 1. libnetmd/common.c : sleep() is not defined/implemented I fixed this using windows Sleep() function by adding following lines to common.c #ifdefWIN32/*usewindowsinternalSleep()function*/ #include #define sleep(x) Sleep(x) #endif 2. libnetmd/utils.h and utils.c : "intmin(inta,intb)" is already defined in windows.h I fixed this by defining NOMINMAX to not use the windows function. I just added following line to libnetmd.pro and netmdcli.pro win32:DEFINES += NOMINMAX 3. libnetmd/utils.h : missind definition of ETIMEDOUT in errno.h I fixed this by defining it. #ifdefWIN32/*addmissingdefinitionsforerrnoonwindows*/ #define ETIMEDOUT 70 // Operation timed out #endif 4. libnetmd/secure.c and netmdcli/netmdcli.c : ramdom() is not defined and implemented I fixed this as a "bloody hack" in utils.h using #ifdefWIN32 #include #include static int random(){srand(time(NULL));return rand();}; #endif But i think it?s better to use a rondom number generating function which is available on all platforms, maybe use one from libgcrypt. I?ll send a patch later after we have discussed the random() problem. Regards Thomas --------------000709090607050205040001 Content-Type: text/html; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Hi, if found some incompatibilities when compiling on windows/mingw32.

1. libnetmd/common.c :  sleep() is not defined/implemented
I fixed this using windows Sleep() function by adding following lines to common.c

#ifdef WIN32 /* use windows internal Sleep() function */
    #include <windows.h>
    #define sleep(x) Sleep(x)
#endif

2. libnetmd/utils.h and utils.c :  "int min(int a,int b)" is already defined in windows.h
I fixed this by defining NOMINMAX to not use the windows function.
I just added following line to libnetmd.pro and netmdcli.pro

win32:DEFINES += NOMINMAX

3. libnetmd/utils.h :  missind definition of ETIMEDOUT in errno.h
I fixed this by defining it.

#ifdef WIN32 /* add missing definitions for errno on windows */
    #define ETIMEDOUT 70 // Operation timed out
#endif

4. libnetmd/secure.c and netmdcli/netmdcli.c :  ramdom() is not defined and implemented
I fixed this as a "bloody hack" in utils.h using
#ifdef WIN32
    #include <stdlib.h>
    #include <time.h>
    static int random(){srand(time(NULL));return rand();};
#endif

But i think it´s better to use a rondom number generating function which is available on all platforms, maybe use one from libgcrypt.

I´ll send a patch later after we have discussed the random() problem.

Regards
Thomas



--------------000709090607050205040001-- From Michael.Karcher@fu-berlin.de Tue Sep 13 23:51:21 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R3asy-0001Ub-JT>; Tue, 13 Sep 2011 23:51:20 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R3asy-0005LJ-HE>; Tue, 13 Sep 2011 23:51:20 +0200 Received: from manz-590f1fc0.pool.mediaways.net ([89.15.31.192] helo=[192.168.1.2]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R3asy-0008H7-CO>; Tue, 13 Sep 2011 23:51:20 +0200 From: Michael Karcher To: Thomas Arp Date: Tue, 13 Sep 2011 23:53:50 +0200 In-Reply-To: <4E6F002A.6040204@gmx.de> References: <4E6F002A.6040204@gmx.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.0- Content-Transfer-Encoding: 7bit Message-ID: <1315950831.8613.47.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 89.15.31.192 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315950680-00005A17-83CC994F/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2011 21:51:21 -0000 Am Dienstag, den 13.09.2011, 09:03 +0200 schrieb Thomas Arp: > 1. libnetmd/common.c : sleep() is not defined/implemented > I fixed this using windows Sleep() function by adding following lines > to common.c > > #ifdef WIN32 /* use windows internal Sleep() function */ > #include > #define sleep(x) Sleep(x) > #endif Good start, but not quite. #define sleep(x) Sleep(x*1000) even better: #ifdef WIN32 #include #define msleep(x) Sleep(x) #else #include #define msleep(x) usleep(1000*x) #endif and replace the "sleep(1)" by "msleep(200)". A polling frequency of 1Hz is quite low. I guess sleep was originally used, as there is common belief (even I fell into that trap) that sleep would be portable ANSI C. > 2. libnetmd/utils.h and utils.c : "int min(int a,int b)" is already > defined in windows.h > I fixed this by defining NOMINMAX to not use the windows function. > I just added following line to libnetmd.pro and netmdcli.pro > > win32:DEFINES += NOMINMAX Great, that change is fine. The other alternative would be to rename out min funciton. > 3. libnetmd/utils.h : missind definition of ETIMEDOUT in errno.h > I fixed this by defining it. > #ifdef WIN32 /* add missing definitions for errno on windows */ > #define ETIMEDOUT 70 // Operation timed out > #endif NACK. We are using a libusb 1.0 call here, and the libusb documentation documents "LIBUSB_ERROR_TIMEOUT" as the right value to compare against. Replace ETIMEDOUT by that, don't try to define ETIMEDOUT. > 4. libnetmd/secure.c and netmdcli/netmdcli.c : ramdo) is not defined > and implemented > I fixed this as a "bloody hack" in utils.h using > #ifdef WIN32 > #include > #include > static int random(){srand(time(NULL));return rand();}; > #endif Reseding every time is a real bad idea(tm). It is quite likely that time(NULL) returns the same value on two successive calls (it changes once per second). As we don't care about sniffing, just using rand() in the library should be fine, if the caller didn't srand so be it. In netmdcli.c, add "srand(time(NULL));" to the beginning of main. Then replace random by rand. Regards, Michael Karcher From manner.moe@gmx.de Wed Sep 14 09:06:37 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R3jYL-0005LP-2p>; Wed, 14 Sep 2011 09:06:37 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R3jYK-0005Kf-Up>; Wed, 14 Sep 2011 09:06:37 +0200 Received: (qmail invoked by alias); 14 Sep 2011 07:06:36 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp070) with SMTP; 14 Sep 2011 09:06:36 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1+NE9Bti4mN37vnQAl/IuwoUDbAPvuLu4ANeNZ/Kx vsVb4aYMOfak3w Message-ID: <4E705285.9050502@gmx.de> Date: Wed, 14 Sep 2011 09:06:45 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Michael Karcher , linux-minidisc@lists.fu-berlin.de References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> In-Reply-To: <1315950831.8613.47.camel@localhost> Content-Type: multipart/alternative; boundary="------------010906060004080201050501" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.22 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1315983997-00005A17-DF1BF567/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001017, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=HTML_60_70,HTML_MESSAGE, RATWARE_GECKO_BUILD,SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2011 07:06:38 -0000 This is a multi-part message in MIME format. --------------010906060004080201050501 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 13/09/2011 23:53, schrieb Michael Karcher: >> 4. libnetmd/secure.c and netmdcli/netmdcli.c : ramdo) is not defined >> and implemented >> I fixed this as a "bloody hack" in utils.h using >> #ifdef WIN32 >> #include >> #include >> static int random(){srand(time(NULL));return rand();}; >> #endif > Reseding every time is a real bad idea(tm). It is quite likely that > time(NULL) returns the same value on two successive calls (it changes > once per second). As we don't care about sniffing, just using rand() in > the library should be fine, if the caller didn't srand so be it. > > In netmdcli.c, add "srand(time(NULL));" to the beginning of main. Then > replace random by rand. > > Regards, > Michael Karcher > In netmd.cli the random number is used for creating a nonce in this way: unsigned char hostnonce[8] = { 0 }; unsigned char *buf; uint64_t rand; . . rand = (uint64_t)random(); buf = hostnonce; netmd_copy_quadword_to_buffer(&buf, rand); . . As far as i know random() and rand() are 32bit only. What about using "gcry_create_nonce(unsigned char *buffer, size_t length)" from libgcrypt instead? unsigned char hostnonce[8] = { 0 }; . . gcry_create_nonce(hostnonce, sizeof(hostnonce)); Regards Thomas --------------010906060004080201050501 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Am 13/09/2011 23:53, schrieb Michael Karcher:
4. libnetmd/secure.c and netmdcli/netmdcli.c :  ramdo) is not defined
and implemented
I fixed this as a "bloody hack" in utils.h using
#ifdef WIN32 
#include <stdlib.h>
#include <time.h>
static int random(){srand(time(NULL));return rand();};
#endif
Reseding every time is a real bad idea(tm). It is quite likely that
time(NULL) returns the same value on two successive calls (it changes
once per second). As we don't care about sniffing, just using rand() in
the library should be fine, if the caller didn't srand so be it.

In netmdcli.c, add "srand(time(NULL));" to the beginning of main. Then
replace random by rand.

Regards,
  Michael Karcher

In netmd.cli the random number is used for creating a nonce in this way:
unsigned char hostnonce[8] = { 0 };
unsigned char *buf;
uint64_t rand;
.
.
rand = (uint64_t)random();
buf = hostnonce;
netmd_copy_quadword_to_buffer(&buf, rand);
.
.

As far as i know random() and rand() are 32bit only.
What about using "gcry_create_nonce(unsigned char *buffer, size_t length)" from libgcrypt instead?

unsigned char hostnonce[8] = { 0 };
.
.
gcry_create_nonce(hostnonce, sizeof(hostnonce));

Regards
Thomas
  --------------010906060004080201050501-- From Michael.Karcher@fu-berlin.de Wed Sep 14 19:41:54 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R3tT8-0005W4-5E>; Wed, 14 Sep 2011 19:41:54 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R3tT8-0007Xl-2h>; Wed, 14 Sep 2011 19:41:54 +0200 Received: from manz-590ef7ef.pool.mediaways.net ([89.14.247.239] helo=[192.168.1.2]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R3tT7-0003iF-UA>; Wed, 14 Sep 2011 19:41:54 +0200 From: Michael Karcher To: Thomas Arp Date: Wed, 14 Sep 2011 21:41:46 +0200 In-Reply-To: <4E705285.9050502@gmx.de> References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 7bit Message-ID: <1316029311.5253.1.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 89.14.247.239 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316022114-00005A17-24E82D0F/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.118259, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2011 17:41:54 -0000 Am Mittwoch, den 14.09.2011, 09:06 +0200 schrieb Thomas Arp: > In netmd.cli the random number is used for creating a nonce in this > way: > unsigned char hostnonce[8] = { 0 }; > unsigned char *buf; > uint64_t rand; > . > . > rand = (uint64_t)random(); > buf = hostnonce; > netmd_copy_quadword_to_buffer(&buf, rand); > . > . > > As far as i know random() and rand() are 32bit only. > What about using "gcry_create_nonce(unsigned char *buffer, size_t length)" from libgcrypt instead? > > unsigned char hostnonce[8] = { 0 }; > . > . > gcry_create_nonce(hostnonce, sizeof(hostnonce)); Yes, go that way. Sounds nice, and we already do depend on libgcrypt. Regards, Michael Karcher From manner.moe@gmx.de Wed Sep 14 23:51:11 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R3xMM-0006Pd-66>; Wed, 14 Sep 2011 23:51:10 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R3xML-0005Ac-Vn>; Wed, 14 Sep 2011 23:51:10 +0200 Received: (qmail invoked by alias); 14 Sep 2011 21:51:09 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp008) with SMTP; 14 Sep 2011 23:51:09 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1/sSmEA0JnsMs98vDc3vt1+YLFo+if8/NgOvX6qjW u+q9Mw78vz+Iku Message-ID: <4E7121D0.1000406@gmx.de> Date: Wed, 14 Sep 2011 23:51:12 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Michael Karcher , linux-minidisc@lists.fu-berlin.de References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> In-Reply-To: <1316029311.5253.1.camel@localhost> Content-Type: multipart/mixed; boundary="------------060202030004090100060306" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.22 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316037070-00005A17-B127AC76/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.002365, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2011 21:51:11 -0000 This is a multi-part message in MIME format. --------------060202030004090100060306 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 14/09/2011 21:41, schrieb Michael Karcher: > Am Mittwoch, den 14.09.2011, 09:06 +0200 schrieb Thomas Arp: >> In netmd.cli the random number is used for creating a nonce in this >> way: >> unsigned char hostnonce[8] = { 0 }; >> unsigned char *buf; >> uint64_t rand; >> . >> . >> rand = (uint64_t)random(); >> buf = hostnonce; >> netmd_copy_quadword_to_buffer(&buf, rand); >> . >> . >> >> As far as i know random() and rand() are 32bit only. >> What about using "gcry_create_nonce(unsigned char *buffer, size_t length)" from libgcrypt instead? >> >> unsigned char hostnonce[8] = { 0 }; >> . >> . >> gcry_create_nonce(hostnonce, sizeof(hostnonce)); > Yes, go that way. Sounds nice, and we already do depend on libgcrypt. > > Regards, > Michael Karcher > O.K., here is my patch, please review. Regards Thomas --------------060202030004090100060306 Content-Type: text/plain; name="0001-make-libnetmd-platform-independent-and-make-use-of-l.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-make-libnetmd-platform-independent-and-make-use-of-l.pa"; filename*1="tch" RnJvbSA3OGU4ZTFmYzdjNWNkYWMyNzNhYTFmY2M0YTc0ZmI2ZmVjNGQ0MDc2IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBUaG9tYXMgQXJwIDxtYW5uZXIubW9lQGdteC5kZT4K RGF0ZTogV2VkLCAxNCBTZXAgMjAxMSAyMzo0MzoyMSArMDIwMApTdWJqZWN0OiBbUEFUQ0hd IG1ha2UgbGlibmV0bWQgcGxhdGZvcm0gaW5kZXBlbmRlbnQgYW5kIG1ha2UgdXNlIG9mIGxp YmdjcnlwdAogdG8gZ2VuZXJhdGUgcmFuZG9tIG51bWJlcnMKCi0tLQogbGlibmV0bWQvY29t bW9uLmMgICB8ICAgIDIgKy0KIGxpYm5ldG1kL3NlY3VyZS5jICAgfCAgIDIyICsrKysrKy0t LS0tLS0tLS0tLS0tLS0KIGxpYm5ldG1kL3V0aWxzLmMgICAgfCAgICA5IC0tLS0tLS0tLQog bGlibmV0bWQvdXRpbHMuaCAgICB8ICAgIDUgKysrKy0KIG5ldG1kY2xpL25ldG1kY2xpLmMg fCAgICA2ICstLS0tLQogNSBmaWxlcyBjaGFuZ2VkLCAxMiBpbnNlcnRpb25zKCspLCAzMiBk ZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saWJuZXRtZC9jb21tb24uYyBiL2xpYm5ldG1k L2NvbW1vbi5jCmluZGV4IDFmN2I2NjAuLjdlMDM5ZWQgMTAwNjQ0Ci0tLSBhL2xpYm5ldG1k L2NvbW1vbi5jCisrKyBiL2xpYm5ldG1kL2NvbW1vbi5jCkBAIC02Miw3ICs2Miw3IEBAIHN0 YXRpYyBpbnQgbmV0bWRfcG9sbChsaWJ1c2JfZGV2aWNlX2hhbmRsZSAqZGV2LCB1bnNpZ25l ZCBjaGFyICpidWYsIGludCB0cmllcykKICAgICAgICAgfQogCiAgICAgICAgIGlmIChpID4g MCkgewotICAgICAgICAgICAgc2xlZXAoMSk7CisgICAgICAgICAgICB1c2xlZXAoMjAwMDAw KTsKICAgICAgICAgfQogICAgIH0KIApkaWZmIC0tZ2l0IGEvbGlibmV0bWQvc2VjdXJlLmMg Yi9saWJuZXRtZC9zZWN1cmUuYwppbmRleCBmY2U2MGM1Li5hOTQwZDlkIDEwMDY0NAotLS0g YS9saWJuZXRtZC9zZWN1cmUuYworKysgYi9saWJuZXRtZC9zZWN1cmUuYwpAQCAtMzg1LDE1 ICszODUsNiBAQCB2b2lkIG5ldG1kX3RyYW5zZmVyX3NvbmdfcGFja2V0cyhuZXRtZF9kZXZf aGFuZGxlICpkZXYsCiAgICAgfQogfQogCi11aW50NjRfdCBnZW5lcmF0ZV82NGJpdF9yYW5k b20oKQotewotICAgIHVpbnQ2NF90IGhpZ2gsIGxvdzsKLSAgICBoaWdoID0gKCh1aW50NjRf dClyYW5kb20oKSAmIDB4ZmZmZmZmZmZVKSA8PCAzMlU7Ci0gICAgbG93ID0gKCh1aW50NjRf dClyYW5kb20oKSAmIDB4ZmZmZmZmZmZVKTsKLQotICAgIHJldHVybiBoaWdoICsgbG93Owot fQotCiBuZXRtZF9lcnJvciBuZXRtZF9wcmVwYXJlX3BhY2tldHModW5zaWduZWQgY2hhciog ZGF0YSwgc2l6ZV90IGRhdGFfbGVuZ2h0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIG5ldG1kX3RyYWNrX3BhY2tldHMgKipwYWNrZXRzLAogICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHNpemVfdCAqcGFja2V0X2NvdW50LApAQCAtNDAzLDExICsz OTQsMTEgQEAgbmV0bWRfZXJyb3IgbmV0bWRfcHJlcGFyZV9wYWNrZXRzKHVu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ICAgICAgICAgICAgMHgwMCwgMHgwMCwgMHgwMCwgMHg0OCwgMHhBMiwg MHg4RCwKQEAgLTQ5MSw5ICs0ODksNyBAQCBpbnQgbWFpbihpbnQgYXJnYywgY2hhciogYXJn dltdKQogICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAvKiBleGNoYW5nZSBub25jZXMg Ki8KLSAgICAgICAgICAgIHJhbmQgPSAodWludDY0X3QpcmFuZG9tKCk7Ci0gICAgICAgICAg ICBidWYgPSBob3N0bm9uY2U7Ci0gICAgICAgICAgICBuZXRtZF9jb3B5X3F1YWR3b3JkX3Rv X2J1ZmZlcigmYnVmLCByYW5kKTsKKyAgICAgICAgICAgIGdjcnlfY3JlYXRlX25vbmNlKGhv c3Rub25jZSwgc2l6ZW9mKGhvc3Rub25jZSkpOwogICAgICAgICAgICAgZXJyb3IgPSBuZXRt ZF9zZWN1cmVfc2Vzc2lvbl9rZXlfZXhjaGFuZ2UoZGV2aCwgaG9zdG5vbmNlLCBkZXZub25j ZSk7CiAgICAgICAgICAgICBwdXRzKG5ldG1kX3N0cmVycm9yKGVycm9yKSk7CiAKLS0gCjEu Ny42Lm1zeXNnaXQuMAoK --------------060202030004090100060306-- From Michael.Karcher@fu-berlin.de Thu Sep 15 00:39:29 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R3y76-0008Cg-9o>; Thu, 15 Sep 2011 00:39:28 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R3y76-0001xV-7S>; Thu, 15 Sep 2011 00:39:28 +0200 Received: from manz-590ef7ef.pool.mediaways.net ([89.14.247.239] helo=[192.168.1.2]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R3y76-0002tQ-2d>; Thu, 15 Sep 2011 00:39:28 +0200 From: Michael Karcher To: Thomas Arp Date: Thu, 15 Sep 2011 02:39:29 +0200 In-Reply-To: <4E7121D0.1000406@gmx.de> References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 7bit Message-ID: <1316047170.5253.12.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 89.14.247.239 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316039968-00005A17-EABEFB3E/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000007, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2011 22:39:29 -0000 Am Mittwoch, den 14.09.2011, 23:51 +0200 schrieb Thomas Arp: > O.K., here is my patch, please review. Thanks for your patch. > diff --git a/libnetmd/common.c b/libnetmd/common.c > index 1f7b660..7e039ed 100644 > --- a/libnetmd/common.c > +++ b/libnetmd/common.c > @@ -62,7 +62,7 @@ static int netmd_poll(libusb_device_handle *dev, > unsigned char *buf, int tries) > } > > if (i > 0) { > - sleep(1); > + usleep(200000); > } > } usleep is probably not present in Visual C++, as it is a Unix function. mingw most likely supports it for compatiblity reasons. If the code should be even more portable, do use Sleep on Windows as you initially suggested. > -int min(int a,int b); > +#ifndef min > + #define min(a,b) ((a)<(b)?(a):(b)) > +#endif > + As it seems that utils.h is only included inside libhimd, this is fine. #define'ing min for public headers seems like a bad idea to me. Your patch is fine except for the usleep quirk. I don't know whether we care about non-GNU compilation on Windows, but if we do, we should not use usleep on Windows (as I said up there). Regards, Michael Karcher From manner.moe@gmx.de Thu Sep 15 08:04:17 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R453Y-00006j-EY>; Thu, 15 Sep 2011 08:04:16 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R453Y-00016a-AE>; Thu, 15 Sep 2011 08:04:16 +0200 Received: (qmail invoked by alias); 15 Sep 2011 06:04:15 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp058) with SMTP; 15 Sep 2011 08:04:15 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX19nrpEFCohn9iY9GC3QR9dAHZ0/fDBdSSvn0TbQSg V5049YreV/azq7 Message-ID: <4E719562.8050703@gmx.de> Date: Thu, 15 Sep 2011 08:04:18 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Michael Karcher , linux-minidisc@lists.fu-berlin.de References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> <1316047170.5253.12.camel@localhost> In-Reply-To: <1316047170.5253.12.camel@localhost> Content-Type: multipart/mixed; boundary="------------060207040802040708060406" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.22 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316066656-00005A17-A8572696/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2011 06:04:17 -0000 This is a multi-part message in MIME format. --------------060207040802040708060406 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 15/09/2011 02:39, schrieb Michael Karcher: > Am Mittwoch, den 14.09.2011, 23:51 +0200 schrieb Thomas Arp: >> O.K., here is my patch, please review. > Thanks for your patch. > >> diff --git a/libnetmd/common.c b/libnetmd/common.c >> index 1f7b660..7e039ed 100644 >> --- a/libnetmd/common.c >> +++ b/libnetmd/common.c >> @@ -62,7 +62,7 @@ static int netmd_poll(libusb_device_handle *dev, >> unsigned char *buf, int tries) >> } >> >> if (i> 0) { >> - sleep(1); >> + usleep(200000); >> } >> } > usleep is probably not present in Visual C++, as it is a Unix function. > mingw most likely supports it for compatiblity reasons. If the code > should be even more portable, do use Sleep on Windows as you initially > suggested. > > >> -int min(int a,int b); >> +#ifndef min >> + #define min(a,b) ((a)<(b)?(a):(b)) >> +#endif >> + > As it seems that utils.h is only included inside libhimd, this is fine. > #define'ing min for public headers seems like a bad idea to me. > > Your patch is fine except for the usleep quirk. I don't know whether we > care about non-GNU compilation on Windows, but if we do, we should not > use usleep on Windows (as I said up there). > > Regards, > Michael Karcher > O.K:, i changed this. Regards Thomas --------------060207040802040708060406 Content-Type: text/plain; name="0002-use-os-internal-Sleep-function-on-windows.patch" Content-Transfer-Encoding: base64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wgdW5zaWduZWQgY2hhciAqYnVmLCBpbnQgdHJpZXMpCiAgICAgICAgIH0KIAogICAg ICAgICBpZiAoaSA+IDApIHsKLSAgICAgICAgICAgIHVzbGVlcCgyMDAwMDApOworICAgICAg ICAgICAgbXNsZWVwKDIwMCk7CiAgICAgICAgIH0KICAgICB9CiAKLS0gCjEuNy42Lm1zeXNn aXQuMAoK --------------060207040802040708060406-- From manner.moe@gmx.de Thu Sep 15 20:38:38 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4GpZ-0005eE-Ie>; Thu, 15 Sep 2011 20:38:37 +0200 Received: from mailout-de.gmx.net ([213.165.64.23]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R4GpZ-0001Vx-E0>; Thu, 15 Sep 2011 20:38:37 +0200 Received: (qmail invoked by alias); 15 Sep 2011 18:38:36 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp071) with SMTP; 15 Sep 2011 20:38:36 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1/UJBsh+xTUTF1EF2cGlmmj5bWuOrbilbTRsRpqb6 29Hhp/UeWAJxu/ Message-ID: <4E72463B.3000601@gmx.de> Date: Thu, 15 Sep 2011 20:38:51 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: linux-minidisc@lists.fu-berlin.de Content-Type: multipart/mixed; boundary="------------050507080604000001090204" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.23 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316111917-00005A17-EF358BE0/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] libnetmd: remember model number of detected netmd device X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2011 18:38:38 -0000 This is a multi-part message in MIME format. --------------050507080604000001090204 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi, as netmd_get_devname(..) gets device name from the usb descriptor it is "Net MD Walkman" or "Net MD/HiMD" on most devices. To differentiate them (Sony MZ-N710, Sony MZ-RH1, ..) i made a patch to remember the model number from the known_devices list. So we can show it in our application analogous to the himd detection system in qhimdtransfer. Regards Thomas --------------050507080604000001090204 Content-Type: text/plain; name="0003-remember-model-of-detected-netmd-device-from-known_d.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0003-remember-model-of-detected-netmd-device-from-known_d.pa"; filename*1="tch" >From 9f6874d046e9b7de37c7159cebd430846a02366c Mon Sep 17 00:00:00 2001 From: Thomas Arp Date: Thu, 15 Sep 2011 20:13:37 +0200 Subject: [PATCH 3/3] remember model of detected netmd device from known_devices[] to show it in the application, analogous to the detection system for himd devices in qhimdtransfer --- libnetmd/netmd_dev.c | 85 +++++++++++++++++++++++++------------------------ libnetmd/netmd_dev.h | 2 + netmdcli/netmdcli.c | 1 + 3 files changed, 46 insertions(+), 42 deletions(-) diff --git a/libnetmd/netmd_dev.c b/libnetmd/netmd_dev.c index 0f3f3b0..1a18c7d 100644 --- a/libnetmd/netmd_dev.c +++ b/libnetmd/netmd_dev.c @@ -33,48 +33,48 @@ static libusb_context *ctx = NULL; /*! list of known vendor/prod id's for NetMD devices */ static struct netmd_devices const known_devices[] = { - {0x54c, 0x34}, /* Sony PCLK-XX */ - {0x54c, 0x36}, /* Sony (unknown model) */ - {0x54c, 0x75}, /* Sony MZ-N1 */ - {0x54c, 0x7c}, /* Sony (unknown model) */ - {0x54c, 0x80}, /* Sony LAM-1 */ - {0x54c, 0x81}, /* Sony MDS-JE780/JB980 */ - {0x54c, 0x84}, /* Sony MZ-N505 */ - {0x54c, 0x85}, /* Sony MZ-S1 */ - {0x54c, 0x86}, /* Sony MZ-N707 */ - {0x54c, 0x8e}, /* Sony CMT-C7NT */ - {0x54c, 0x97}, /* Sony PCGA-MDN1 */ - {0x54c, 0xad}, /* Sony CMT-L7HD */ - {0x54c, 0xc6}, /* Sony MZ-N10 */ - {0x54c, 0xc7}, /* Sony MZ-N910 */ - {0x54c, 0xc8}, /* Sony MZ-N710/NE810/NF810 */ - {0x54c, 0xc9}, /* Sony MZ-N510/NF610 */ - {0x54c, 0xca}, /* Sony MZ-NE410/DN430/NF520 */ - {0x54c, 0xeb}, /* Sony MZ-NE810/NE910 */ - {0x54c, 0xe7}, /* Sony CMT-M333NT/M373NT */ - {0x54c, 0x101}, /* Sony LAM-10 */ - {0x54c, 0x113}, /* Aiwa AM-NX1 */ - {0x54c, 0x14c}, /* Aiwa AM-NX9 */ - {0x54c, 0x17e}, /* Sony MZ-NH1 */ - {0x54c, 0x180}, /* Sony MZ-NH3D */ - {0x54c, 0x182}, /* Sony MZ-NH900 */ - {0x54c, 0x184}, /* Sony MZ-NH700/800 */ - {0x54c, 0x186}, /* Sony MZ-NH600/600D */ - {0x54c, 0x188}, /* Sony MZ-N920 */ - {0x54c, 0x18a}, /* Sony LAM-3 */ - {0x54c, 0x1e9}, /* Sony MZ-DH10P */ - {0x54c, 0x219}, /* Sony MZ-RH10 */ - {0x54c, 0x21b}, /* Sony MZ-RH910 */ - {0x54c, 0x21d}, /* Sony CMT-AH10 */ - {0x54c, 0x22c}, /* Sony CMT-AH10 */ - {0x54c, 0x23c}, /* Sony DS-HMD1 */ - {0x54c, 0x286}, /* Sony MZ-RH1 */ - - {0x4dd, 0x7202}, /* Sharp IM-MT880H/MT899H */ - {0x4dd, 0x9013}, /* Sharp IM-DR400/DR410 */ - {0x4dd, 0x9014}, /* Sharp IM-DR80/DR420/DR580 and Kenwood DMC-S9NET */ - - {0, 0} /* terminating pair */ + {0x54c, 0x34, "Sony PCLK-XX"}, + {0x54c, 0x36, "Sony (unknown model)"}, + {0x54c, 0x75, "Sony MZ-N1"}, + {0x54c, 0x7c, "Sony (unknown model)"}, + {0x54c, 0x80, "Sony LAM-1"}, + {0x54c, 0x81, "Sony MDS-JE780/JB980"}, + {0x54c, 0x84, "Sony MZ-N505"}, + {0x54c, 0x85, "Sony MZ-S1"}, + {0x54c, 0x86, "Sony MZ-N707"}, + {0x54c, 0x8e, "Sony CMT-C7NT"}, + {0x54c, 0x97, "Sony PCGA-MDN1"}, + {0x54c, 0xad, "Sony CMT-L7HD"}, + {0x54c, 0xc6, "Sony MZ-N10"}, + {0x54c, 0xc7, "Sony MZ-N910"}, + {0x54c, 0xc8, "Sony MZ-N710/NE810/NF810"}, + {0x54c, 0xc9, "Sony MZ-N510/NF610"}, + {0x54c, 0xca, "Sony MZ-NE410/DN430/NF520"}, + {0x54c, 0xeb, "Sony MZ-NE810/NE910"}, + {0x54c, 0xe7, "Sony CMT-M333NT/M373NT"}, + {0x54c, 0x101, "Sony LAM-10"}, + {0x54c, 0x113, "Aiwa AM-NX1"}, + {0x54c, 0x14c, "Aiwa AM-NX9"}, + {0x54c, 0x17e, "Sony MZ-NH1"}, + {0x54c, 0x180, "Sony MZ-NH3D"}, + {0x54c, 0x182, "Sony MZ-NH900"}, + {0x54c, 0x184, "Sony MZ-NH700/800"}, + {0x54c, 0x186, "Sony MZ-NH600/600D"}, + {0x54c, 0x188, "Sony MZ-N920"}, + {0x54c, 0x18a, "Sony LAM-3"}, + {0x54c, 0x1e9, "Sony MZ-DH10P"}, + {0x54c, 0x219, "Sony MZ-RH10"}, + {0x54c, 0x21b, "Sony MZ-RH910"}, + {0x54c, 0x21d, "Sony CMT-AH10"}, + {0x54c, 0x22c, "Sony CMT-AH10"}, + {0x54c, 0x23c, "Sony DS-HMD1"}, + {0x54c, 0x286, "Sony MZ-RH1"}, + + {0x4dd, 0x7202, "Sharp IM-MT880H/MT899H"}, + {0x4dd, 0x9013, "Sharp IM-DR400/DR410"}, + {0x4dd, 0x9014, "Sharp IM-DR80/DR420/DR580 or Kenwood DMC-S9NET"}, + + {0, 0, NULL} /* terminating pair */ }; @@ -102,6 +102,7 @@ netmd_error netmd_init(netmd_device **device_list) new_device = malloc(sizeof(netmd_device)); new_device->usb_dev = list[i]; new_device->link = *device_list; + new_device->model = known_devices[count].model; *device_list = new_device; } } diff --git a/libnetmd/netmd_dev.h b/libnetmd/netmd_dev.h index ba6cea5..0ccff55 100644 --- a/libnetmd/netmd_dev.h +++ b/libnetmd/netmd_dev.h @@ -7,6 +7,7 @@ typedef struct netmd_device { struct netmd_device *link; char name[32]; + char *model; struct libusb_device *usb_dev; } netmd_device; @@ -16,6 +17,7 @@ typedef struct netmd_device { struct netmd_devices { int idVendor; int idProduct; + char *model; }; /** diff --git a/netmdcli/netmdcli.c b/netmdcli/netmdcli.c index b4e0ee3..5090243 100644 --- a/netmdcli/netmdcli.c +++ b/netmdcli/netmdcli.c @@ -210,6 +210,7 @@ int main(int argc, char* argv[]) return -1; } printf("%s\n", name); + printf("%s\n", netmd->model); netmd_initialize_disc_info(devh, md); printf("Disc Title: %s\n\n", md->groups[0].name); -- 1.7.6.msysgit.0 --------------050507080604000001090204-- From quiqueiii@gmail.com Fri Sep 16 00:07:58 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4K69-0004xi-1W>; Fri, 16 Sep 2011 00:07:57 +0200 Received: from mail-iy0-f182.google.com ([209.85.210.182]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4K68-0001Qh-Qu>; Fri, 16 Sep 2011 00:07:57 +0200 Received: by iadk27 with SMTP id k27so2629840iad.13 for ; Thu, 15 Sep 2011 15:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=U/JqidczPj+b9bIZnc5vYgKsNgVvKbGYR3z2FjywLT4=; b=tu/cB8DCLQaLqqGMZ5/eHXIy0WEWmmU0CR8y/dpAFYKrhidAsadBM+drhFdX+vIoKm YOH9l2kD/HbQ6VL/X56pTp25gouEQD/PgQsV6OaR1Mc8x9ZKZYlfLOREUBpcMyKzAjE7 5aJEW2h4YbeU4xoqxWb33uMReE+HBm6iuw4Ok= MIME-Version: 1.0 Received: by 10.231.50.85 with SMTP id y21mr2664042ibf.72.1316124475655; Thu, 15 Sep 2011 15:07:55 -0700 (PDT) Received: by 10.231.174.19 with HTTP; Thu, 15 Sep 2011 15:07:55 -0700 (PDT) Date: Fri, 16 Sep 2011 00:07:55 +0200 Message-ID: From: Enrique Medina Gremaldos To: linux-minidisc@lists.fu-berlin.de Content-Type: multipart/alternative; boundary=0015176f10d6da084b04ad021bda X-Originating-IP: 209.85.210.182 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316124477-00005A17-51E9DC67/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.156981, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=DNS_FROM_RFC_ABUSE, HTML_00_10, HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2011 22:07:58 -0000 --0015176f10d6da084b04ad021bda Content-Type: text/plain; charset=ISO-8859-1 Hi folks, I've recently bought a pair of used minidisc recorders from ebay. A Mz-ne410 and a Mz-n710, both of them netmd. I have no Windows partition at home, so I've decided to give python-netmd a try. Mz-Ne410 works great, I can download songs from command line and list them. Great! Problem comes with mz-n710 When trying to download a song, some mechanical parts start moving inside recorder, and then word ERROR blinks on LCD and recorder shuts down. Due to its old age, I thought It was caused by a problem with laser calibration or a short circuit with usb ground. Think is, device can record from mic! so, can't be a laser problem. I decided to take another test, and tried to download a track to a blankdisk, and it worked! But only for the first track, downloading a second one causes recorder to complain with generic ERROR message. As I have some good experience with python, tried to debug downloading process, and It seems to get freezed at sendKeyData command. Seems to be part of cryptography mechanism, but i am not good at that. :C The funny thing is that I can reproduce all of that on a Windows environment with SonicStage 4.3 (the only one I could find) !!! Maybe my mz-n710 has a corrupted firmware and all this feedback is useless. At least I can grant mz-ne410 works like a charm. Regards --0015176f10d6da084b04ad021bda Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi folks, I've recently bought a pair of used minidisc recorders from e= bay. A Mz-ne410 and a Mz-n710, both of them netmd. I have no Windows partit= ion at home, so I've decided to give python-netmd a try. Mz-Ne410 works= great, I can download songs from command line and list them. Great! Proble= m comes with mz-n710


When trying to download a song, some mechanical parts start moving = inside recorder, and then word ERROR blinks on LCD and recorder shuts down.= Due to its old age, I thought It was caused by a problem with laser calibr= ation or a short circuit with usb ground. Think is, device can record from = mic! so, can't be a laser problem.

I decided to take another test, and tried to download a track to a blan= kdisk, and it worked! But only for the first track, downloading a second on= e causes recorder to complain with generic ERROR message.

As I have= some good experience with python, tried to debug downloading process, and = It seems to get freezed at sendKeyData command. Seems to be part of cryptog= raphy mechanism, but i am not good at that. :C

The funny thing is that I can reproduce all of that on a Windows enviro= nment with SonicStage 4.3 (the only one I could find) !!!

Maybe my m= z-n710 has a corrupted firmware and all this feedback is useless. At least = I can grant mz-ne410 works like a charm.


Regards

=A0
--0015176f10d6da084b04ad021bda-- From glaubitz@physik.fu-berlin.de Fri Sep 16 14:14:05 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4XIx-0004qL-R5>; Fri, 16 Sep 2011 14:14:03 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4XIx-0006qZ-Op>; Fri, 16 Sep 2011 14:14:03 +0200 Received: from div-8021x-dhcp130.uio.no ([193.157.176.139]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4XIx-0006ea-LF>; Fri, 16 Sep 2011 14:14:03 +0200 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: John Paul Adrian Glaubitz In-Reply-To: Date: Fri, 16 Sep 2011 14:14:01 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> References: To: Enrique Medina Gremaldos X-Mailer: Apple Mail (2.1244.3) X-Originating-IP: 193.157.176.139 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316175243-00005A17-7432AECC/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 12:14:05 -0000 Hi, On Sep 16, 2011, at 12:07 AM, Enrique Medina Gremaldos wrote: > Hi folks, I've recently bought a pair of used minidisc recorders from = ebay. A Mz-ne410 and a Mz-n710, both of them netmd. I have no Windows = partition at home, so I've decided to give python-netmd a try. Mz-Ne410 = works great, I can download songs from command line and list them. = Great! Problem comes with mz-n710 Please use libnetmd/netmdcli instead. We are primarily focussing on = libnetmd now and not so much on python-netmd. Some of the code in python-netmd, especially = the download code is quite hacky, so unexpected results can occur with various = MiniDisc hardware. > When trying to download a song, some mechanical parts start moving = inside recorder, and then word ERROR blinks on LCD and recorder shuts = down. Due to its old age, I thought It was caused by a problem with = laser calibration or a short circuit with usb ground. Think is, device = can record from mic! so, can't be a laser problem. >=20 > I decided to take another test, and tried to download a track to a = blankdisk, and it worked! But only for the first track, downloading a = second one causes recorder to complain with generic ERROR message.=20 I think we have had this issue before. Some recorders need an extra = Reset command to be sent through NetMD, if I remember correctly. I am sure the libnetmd = code does this, but I don't know about python-netmd. As I said, it's quite hacky. > The funny thing is that I can reproduce all of that on a Windows = environment with SonicStage 4.3 (the only one I could find) !!! This is indeed interesting, it should definitely work with SonicStage. = Have you tried recording another track manually over line-in/microphone after the first = NetMD track? > Maybe my mz-n710 has a corrupted firmware and all this feedback is = useless. At least I can grant mz-ne410 works like a charm. I would highly doubt that. Some Walkman had indeed some firmware issues, = but Sony updated the firmware of those devices for free. Or, since you said you bought = the Walkman used, the previous owner messed around with the firmware. However, I rather think = it's a problem with NetMD itself. Please try libnetmd/netmdcli first and report back. Adrian= From glaubitz@physik.fu-berlin.de Fri Sep 16 17:26:01 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4aIi-0003zF-VM>; Fri, 16 Sep 2011 17:26:01 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4aIi-0007tV-RC>; Fri, 16 Sep 2011 17:26:00 +0200 Received: from div-8021x-dhcp130.uio.no ([193.157.176.139]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4aIi-0002NP-Nt>; Fri, 16 Sep 2011 17:26:00 +0200 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=us-ascii From: John Paul Adrian Glaubitz In-Reply-To: <4E719562.8050703@gmx.de> Date: Fri, 16 Sep 2011 17:26:00 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> <1316047170.5253.12.camel@localhost> <4E719562.8050703@gmx.de> To: Thomas Arp X-Mailer: Apple Mail (2.1244.3) X-Originating-IP: 193.157.176.139 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316186760-00005A17-75E1DFC6/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.081148, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: Michael Karcher , linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 15:26:01 -0000 On Sep 15, 2011, at 8:04 AM, Thomas Arp wrote: >> Your patch is fine except for the usleep quirk. I don't know whether we >> care about non-GNU compilation on Windows, but if we do, we should not >> use usleep on Windows (as I said up there). >> > O.K:, i changed this. Before we decide applying the patch, have you actually tested the changes with real hardware? Are you able to upload and download tracks on Windows with the changes? I might also test your changes on Linux and MacOS, but if you just verify the functionality on Windows, I would already be pleased ;). Adrian From Michael.Karcher@fu-berlin.de Fri Sep 16 17:30:00 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4aMa-00048U-1v>; Fri, 16 Sep 2011 17:30:00 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4aMZ-0008LJ-UE>; Fri, 16 Sep 2011 17:29:59 +0200 Received: from p548d22cb.dip.t-dialin.net ([84.141.34.203] helo=[192.168.2.109]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4aMZ-0002di-NQ>; Fri, 16 Sep 2011 17:29:59 +0200 From: Michael Karcher To: John Paul Adrian Glaubitz Date: Fri, 16 Sep 2011 19:30:00 +0200 In-Reply-To: References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> <1316047170.5253.12.camel@localhost> <4E719562.8050703@gmx.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 7bit Message-ID: <1316194202.5253.15.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 84.141.34.203 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316187000-00005A17-281A440C/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000231, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 15:30:00 -0000 Am Freitag, den 16.09.2011, 17:26 +0200 schrieb John Paul Adrian Glaubitz: > >> Your patch is fine except for the usleep quirk. I don't know whether we > >> care about non-GNU compilation on Windows, but if we do, we should not > >> use usleep on Windows (as I said up there). > >> > > O.K:, i changed this. > > Before we decide applying the patch, have you actually tested the > changes with real hardware? Are you able to upload and download > tracks on Windows with the changes? Code looks fine. Alas, I won't get around to test on real hardware until monday evening, too. So if there is a positive "does not unexpectedly break" test result, applying that patch is fine. Thanks for the patch & testing it, Michael Karcher From glaubitz@physik.fu-berlin.de Fri Sep 16 17:32:27 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4aOx-0004FW-4l>; Fri, 16 Sep 2011 17:32:27 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4aOw-0000Ik-Vo>; Fri, 16 Sep 2011 17:32:27 +0200 Received: from div-8021x-dhcp130.uio.no ([193.157.176.139]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4aOw-0002oU-SK>; Fri, 16 Sep 2011 17:32:26 +0200 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=us-ascii From: John Paul Adrian Glaubitz In-Reply-To: <1316194202.5253.15.camel@localhost> Date: Fri, 16 Sep 2011 17:32:24 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> <1316047170.5253.12.camel@localhost> <4E719562.8050703@gmx.de> <1316194202.5253.15.camel@localhost> To: Michael Karcher X-Mailer: Apple Mail (2.1244.3) X-Originating-IP: 193.157.176.139 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316187147-00005A17-C3B15B7C/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.145008, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 15:32:28 -0000 On Sep 16, 2011, at 7:30 PM, Michael Karcher wrote: >> Before we decide applying the patch, have you actually tested the >> changes with real hardware? Are you able to upload and download >> tracks on Windows with the changes? > Code looks fine. Alas, I won't get around to test on real hardware until > monday evening, too. So if there is a positive "does not unexpectedly > break" test result, applying that patch is fine. OK, I'll test the patch later tonight and will apply it once I have confirmed it didn't break anything ;). Adrian From manner.moe@gmx.de Fri Sep 16 17:37:56 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4aUF-0004SL-J6>; Fri, 16 Sep 2011 17:37:55 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R4aUF-0004H2-FL>; Fri, 16 Sep 2011 17:37:55 +0200 Received: (qmail 30824 invoked by uid 0); 16 Sep 2011 15:37:55 -0000 Received: from 217.191.201.97 by www002.gmx.net with HTTP; Fri, 16 Sep 2011 17:37:53 +0200 (CEST) Content-Type: text/plain; charset="utf-8" Date: Fri, 16 Sep 2011 17:37:53 +0200 From: "Thomas Arp" In-Reply-To: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> Message-ID: <20110916153753.194800@gmx.net> MIME-Version: 1.0 References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> To: John Paul Adrian Glaubitz X-Authenticated: #17747474 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX19046ABJO50w8aJMg3JlLngSw49MgSyn7KhGNivO/ cgpOJw7OuCdxG+sf3KOsFk7kfbwJO9WUZdnw== Content-Transfer-Encoding: 8bit X-GMX-UID: PhgafVUCeWUkTmCoZ25nZKgjL0tsZk1Z X-Originating-IP: 213.165.64.22 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316187475-00005A17-D6F435E5/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 15:37:56 -0000 -------- Original-Nachricht -------- > Datum: Fri, 16 Sep 2011 14:14:01 +0200 > Von: John Paul Adrian Glaubitz > An: Enrique Medina Gremaldos > CC: linux-minidisc@lists.fu-berlin.de > Betreff: Re: [linux-minidisc] Presentation and issues with mz-n710 > > The funny thing is that I can reproduce all of that on a Windows > environment with SonicStage 4.3 (the only one I could find) !!! > > This is indeed interesting, it should definitely work with SonicStage. > Have you tried > recording another track manually over line-in/microphone after the first > NetMD > track? > > > Maybe my mz-n710 has a corrupted firmware and all this feedback is > useless. At least I can grant mz-ne410 works like a charm. > > I would highly doubt that. Some Walkman had indeed some firmware issues, > but Sony updated > the firmware of those devices for free. Or, since you said you bought the > Walkman used, the > previous owner messed around with the firmware. However, I rather think > it's a problem > with NetMD itself. > > Please try libnetmd/netmdcli first and report back. > > Adrian As Adrian said, it should definitely work with SonicStage. Please try SonicStage and libnetmd/netmdcli on different minidisc and also test if recording per line in/microphone works. If nothing else works there is a very risky chance to update/repair the players firmware using SonyÂīs PatchWriter Software. I can give you a link to this software if you are interested. But i would only use it as the last chance. If this fails it may damage your firmware completely. If playing works fine iÂīd leave it as it is and use it as a player only. Regards Thomas From glaubitz@physik.fu-berlin.de Fri Sep 16 18:36:35 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4bP0-0006ne-Mf>; Fri, 16 Sep 2011 18:36:34 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4bP0-0000Yh-KY>; Fri, 16 Sep 2011 18:36:34 +0200 Received: from div-8021x-dhcp130.uio.no ([193.157.176.139]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4bP0-0006PI-Gw>; Fri, 16 Sep 2011 18:36:34 +0200 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=us-ascii From: John Paul Adrian Glaubitz In-Reply-To: Date: Fri, 16 Sep 2011 18:36:33 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> <1316047170.5253.12.camel@localhost> <4E719562.8050703@gmx.de> <1316194202.5253.15.camel@localhost> To: John Paul Adrian Glaubitz X-Mailer: Apple Mail (2.1244.3) X-Originating-IP: 193.157.176.139 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316190994-00005A17-79B2E692/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.026696, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: Michael Karcher , linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 16:36:35 -0000 On Sep 16, 2011, at 5:32 PM, John Paul Adrian Glaubitz wrote: >>> Before we decide applying the patch, have you actually tested the >>> changes with real hardware? Are you able to upload and download >>> tracks on Windows with the changes? >> Code looks fine. Alas, I won't get around to test on real hardware = until >> monday evening, too. So if there is a positive "does not unexpectedly >> break" test result, applying that patch is fine. >=20 > OK, I'll test the patch later tonight and will apply it once I have > confirmed it didn't break anything ;). I applied the patch and it actually makes the transfers unreliable on my = MZ-RH10. With Thomas' patch: [glaubitz@z6:linux-minidisc/netmdcli]$ ./netmdcli send LP2.wav Net MD/Hi-MD Raw title: 0;Testdisk//1-15;Naoto Ishida//=20 Disc Title: Testdisk No error No error No error No error No error No error No error netmd_exch_message: netmd_poll failed Unknown Error netmd_exch_message: netmd_poll failed Unknown Error No error No error [glaubitz@z6:linux-minidisc/netmdcli]$=20 Without the patch: [glaubitz@z6:linux-minidisc/netmdcli]$ ./netmdcli send LP2.wav Net MD/Hi-MD Raw title: 0;Testdisk//1-15;Naoto Ishida//=20 Disc Title: Testdisk No error No error No error No error No error No error No error No error No error No error No error [glaubitz@z6:linux-minidisc/netmdcli]$=20 Also, with the patch, transfers are not always successful. I attempted 3 = transfers and only one was successful, however the track information was not set. Track 20 was transferred with the patch applied, Track 21 without the patch (git master). In both cases, the same audio file was transferred as downloaded from [1]. Track 20: UnPROT UNKNOWN - 00:53:79 -=20 Track 21: UnPROT UNKNOWN - 00:53:79 - test The reliability problems definitely occur with the patch only. I suppose it's a timing problem related with the delay changed in the patch in netmd_poll() in libnetmd/common.c Why was that changed? I won't apply the patch unless this is fixed. Adrian [1] http://users.physik.fu-berlin.de/~mkarcher/ATRAC/LP2.wav= From glaubitz@physik.fu-berlin.de Fri Sep 16 18:44:07 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4bWJ-00075O-6P>; Fri, 16 Sep 2011 18:44:07 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4bWJ-0001bn-4S>; Fri, 16 Sep 2011 18:44:07 +0200 Received: from div-8021x-dhcp130.uio.no ([193.157.176.139]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4bWJ-0006pT-1B>; Fri, 16 Sep 2011 18:44:07 +0200 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=us-ascii From: John Paul Adrian Glaubitz In-Reply-To: Date: Fri, 16 Sep 2011 18:44:06 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <093FD856-58FE-44DF-B067-10F5495CACDF@physik.fu-berlin.de> References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> <1316047170.5253.12.camel@localhost> <4E719562.8050703@gmx.de> <1316194202.5253.15.camel@localhost> To: John Paul Adrian Glaubitz X-Mailer: Apple Mail (2.1244.3) X-Originating-IP: 193.157.176.139 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316191447-00005A17-C335FB15/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.036299, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: Michael Karcher , linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 16:44:07 -0000 On Sep 16, 2011, at 6:36 PM, John Paul Adrian Glaubitz wrote: > I applied the patch and it actually makes the transfers unreliable on = my MZ-RH10. >=20 > The reliability problems definitely occur with the patch only. I = suppose > it's a timing problem related with the delay changed in the patch > in netmd_poll() in libnetmd/common.c >=20 > Why was that changed? Ok, changing the delay back to 1000 ms fixes the reliability problems with my MZ-RH10. I see that Michael claimed that 1000 ms delay (translating into 1 Hz polling frequency) is actually too long and should be changed to 200 ms (5 Hz). But why? Adrian= From quiqueiii@gmail.com Fri Sep 16 21:06:16 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4djr-0003v3-RP>; Fri, 16 Sep 2011 21:06:15 +0200 Received: from mail-bw0-f54.google.com ([209.85.214.54]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4djr-0004xf-Ob>; Fri, 16 Sep 2011 21:06:15 +0200 Received: by bkbzs8 with SMTP id zs8so4609088bkb.13 for ; Fri, 16 Sep 2011 12:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=GZsq0pDjpzDPGgxgl+WNEpStSztSkPm8zi4gFOUT+mA=; b=PCsTtwQKJJFfskuKPQdfV/ZNBRabR39+ZibTohO9GYn6yWS0/E8AVpanPr9cZxRZOL n0zkGO/Oyt/E93SbkbCnHNaShpn3UOuWSoVYgSNHsUenvRgauYRwmbmbavSGehHOQqaY jPGzmBcq3mmVq5G1KODnIc0YSSJsI0hWfzcsw= MIME-Version: 1.0 Received: by 10.204.141.12 with SMTP id k12mr606103bku.22.1316199975529; Fri, 16 Sep 2011 12:06:15 -0700 (PDT) Received: by 10.204.78.148 with HTTP; Fri, 16 Sep 2011 12:06:15 -0700 (PDT) In-Reply-To: <20110916153753.194800@gmx.net> References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> <20110916153753.194800@gmx.net> Date: Fri, 16 Sep 2011 21:06:15 +0200 Message-ID: From: Enrique Medina Gremaldos To: linux-minidisc@lists.fu-berlin.de Content-Type: multipart/alternative; boundary=0015175cd5b8fead2504ad13afb7 X-Originating-IP: 209.85.214.54 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316199975-00005A17-F6107B34/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.203192, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=DNS_FROM_RFC_ABUSE, HTML_00_10, HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 19:06:16 -0000 --0015175cd5b8fead2504ad13afb7 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Ok, I did some new tests and verify some others. * Discs are ok, checked with my other unit, Mz-Ne410, I erased several times, added, deleted, and moved tracks. All ok. * Mz-N710 (the problematic one :) ) can add tracks recorded from mic. No matter if the disk is blank or filled with songs. * I got netmdcli from git, compiled and tested, but the result was the same :-( I have to debug more in deep, but seems to fail at same place that python-netmd * I need to check spdif recording, but don't have an optical jack yet. * from netmdcli, I can erase tracks, even protected ones. I bought it for no more than 15=80, no fear to mess with firmware :-D Regards Enrique --0015175cd5b8fead2504ad13afb7 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Ok, I did some new tests and verify some others.

* Discs are ok, che= cked with my other unit, Mz-Ne410, I erased several times, added, deleted, = and moved tracks. All ok.
* Mz-N710 (the problematic one :) ) can add tr= acks recorded from mic. No matter if the disk is blank or filled with songs= .
* I got netmdcli from git, compiled and tested, but the result was the same= :-( I have to debug more in deep, but seems to fail at same place that pyt= hon-netmd
* I need to check spdif recording, but don't have an optic= al jack yet.
* from netmdcli, I can erase tracks, even protected ones.

I bought i= t for no more than 15=80, no fear to mess with firmware :-D


Rega= rds
Enrique
--0015175cd5b8fead2504ad13afb7-- From glaubitz@physik.fu-berlin.de Fri Sep 16 21:08:56 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4dmR-0003zt-So>; Fri, 16 Sep 2011 21:08:55 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4dmR-0003jU-Qs>; Fri, 16 Sep 2011 21:08:55 +0200 Received: from 182.80-203-34.nextgentel.com ([80.203.34.182] helo=[10.0.0.2]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4dmR-000605-NM>; Fri, 16 Sep 2011 21:08:55 +0200 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=windows-1252 From: John Paul Adrian Glaubitz In-Reply-To: Date: Fri, 16 Sep 2011 21:08:54 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <6E8614DC-4D1E-4E6F-8AFC-1E48AA24608B@physik.fu-berlin.de> References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> <20110916153753.194800@gmx.net> To: Enrique Medina Gremaldos X-Mailer: Apple Mail (2.1244.3) X-Originating-IP: 80.203.34.182 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316200135-00005A17-9CF1E259/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000178, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 19:08:56 -0000 On Sep 16, 2011, at 9:06 PM, Enrique Medina Gremaldos wrote: > * I got netmdcli from git, compiled and tested, but the result was the = same :-( I have to debug more in deep, but seems to fail at same place = that python-netmd Can you just paste the output of netmdcli when trying to transfer a = track? It should output some error messages. Adrian From glaubitz@physik.fu-berlin.de Fri Sep 16 22:00:42 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4eaX-000607-74>; Fri, 16 Sep 2011 22:00:41 +0200 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4eaX-00057e-4x>; Fri, 16 Sep 2011 22:00:41 +0200 Received: from squeeze64.physik.fu-berlin.de ([160.45.66.239]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1R4eaW-0000aa-V4 for linux-minidisc@lists.fu-berlin.de; Fri, 16 Sep 2011 22:00:41 +0200 Received: from glaubitz by squeeze64.physik.fu-berlin.de with local (Exim 4.72 #1 (Debian)) id 1R4eaW-0006WZ-U3 for ; Fri, 16 Sep 2011 22:00:40 +0200 Resent-From: John Paul Adrian Glaubitz Resent-Date: Fri, 16 Sep 2011 22:00:40 +0200 Resent-Message-ID: <20110916200040.GA25071@physik.fu-berlin.de> Resent-To: linux-minidisc@lists.fu-berlin.de Received: from deliver1.zedat.fu-berlin.de ([130.133.4.79]) by mbox5.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R4eXj-0006Ty-6e>; Fri, 16 Sep 2011 21:57:47 +0200 Received: from dispatch2.zedat.fu-berlin.de ([130.133.4.71]) by deliver1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R4eXg-0006w9-EY>; Fri, 16 Sep 2011 21:57:44 +0200 Received: from dispatch1.zedat.fu-berlin.de ([130.133.4.70]) by dispatch2.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R4eXd-0002iv-OS>; Fri, 16 Sep 2011 21:57:41 +0200 Received: from inpost1.zedat.fu-berlin.de ([130.133.4.68]) by dispatch1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R4eXc-0006s9-P7>; Fri, 16 Sep 2011 21:57:40 +0200 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by inpost1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R4eXc-0007vp-N5>; Fri, 16 Sep 2011 21:57:40 +0200 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R4eXc-0000a2-Kr>; Fri, 16 Sep 2011 21:57:40 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@physik.fu-berlin.de with smtp (envelope-from ) id <1R4eXc-0004ti-AX>; Fri, 16 Sep 2011 21:57:40 +0200 Received: (qmail invoked by alias); 16 Sep 2011 19:57:40 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp028) with SMTP; 16 Sep 2011 21:57:40 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX18tYzpVo64tK92uy4kKpobbN7ptJ8jxtv/ykyhHlt 6AV74Fp9lx6nww Message-ID: <4E73AA47.6070405@gmx.de> Date: Fri, 16 Sep 2011 21:57:59 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: John Paul Adrian Glaubitz References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> <1316047170.5253.12.camel@localhost> <4E719562.8050703@gmx.de> <1316194202.5253.15.camel@localhost> <093FD856-58FE-44DF-B067-10F5495CACDF@physik.fu-berlin.de> In-Reply-To: <093FD856-58FE-44DF-B067-10F5495CACDF@physik.fu-berlin.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316203060-00005A17-33337324/0-0/0-0 Resent-Sender: John Paul Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316203241-00005A17-90376EA0/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 20:00:42 -0000 Am 16/09/2011 18:44, schrieb John Paul Adrian Glaubitz: > On Sep 16, 2011, at 6:36 PM, John Paul Adrian Glaubitz wrote: > >> I applied the patch and it actually makes the transfers unreliable on my MZ-RH10. >> >> The reliability problems definitely occur with the patch only. I suppose >> it's a timing problem related with the delay changed in the patch >> in netmd_poll() in libnetmd/common.c >> >> Why was that changed? > Ok, changing the delay back to 1000 ms fixes the reliability problems > with my MZ-RH10. > > I see that Michael claimed that 1000 ms delay (translating into 1 Hz > polling frequency) is actually too long and should be changed to > 200 ms (5 Hz). But why? > > Adrian Iīve tested this on 32bit Windows XP and it works fine with my RH1 and NH1 whether delay is set to 1000ms or to 200ms. If 200ms are too short for some type of netmd devices we should leave it at 1000ms. Track titles are set correctly, too. Thomas From manner.moe@gmx.de Fri Sep 16 22:00:49 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4eae-00060Y-VC>; Fri, 16 Sep 2011 22:00:49 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R4eae-00057y-Qo>; Fri, 16 Sep 2011 22:00:48 +0200 Received: (qmail invoked by alias); 16 Sep 2011 20:00:48 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp038) with SMTP; 16 Sep 2011 22:00:48 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1+EB1gvj0OEh1K2evy6ceQXgga3FAUyRqZI+wAKPc RmvBgH3j1SwI2p Message-ID: <4E73AB05.4@gmx.de> Date: Fri, 16 Sep 2011 22:01:09 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: linux-minidisc@lists.fu-berlin.de References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> <1316047170.5253.12.camel@localhost> <4E719562.8050703@gmx.de> <1316194202.5253.15.camel@localhost> <093FD856-58FE-44DF-B067-10F5495CACDF@physik.fu-berlin.de> In-Reply-To: <093FD856-58FE-44DF-B067-10F5495CACDF@physik.fu-berlin.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.22 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316203248-00005A17-14A1875B/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 20:00:49 -0000 Am 16/09/2011 18:44, schrieb John Paul Adrian Glaubitz: > On Sep 16, 2011, at 6:36 PM, John Paul Adrian Glaubitz wrote: > >> I applied the patch and it actually makes the transfers unreliable on my MZ-RH10. >> >> The reliability problems definitely occur with the patch only. I suppose >> it's a timing problem related with the delay changed in the patch >> in netmd_poll() in libnetmd/common.c >> >> Why was that changed? > Ok, changing the delay back to 1000 ms fixes the reliability problems > with my MZ-RH10. > > I see that Michael claimed that 1000 ms delay (translating into 1 Hz > polling frequency) is actually too long and should be changed to > 200 ms (5 Hz). But why? > > Adrian Iīve tested this on 32bit Windows XP and it works fine with my RH1 and NH1 whether delay is set to 1000ms or to 200ms. If 200ms are too short for some type of netmd devices we should leave it at 1000ms. Track titles are set correctly, too. Thomas From quiqueiii@gmail.com Fri Sep 16 22:07:26 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4eh3-0006Fz-D0>; Fri, 16 Sep 2011 22:07:25 +0200 Received: from mail-bw0-f54.google.com ([209.85.214.54]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4eh3-0005f3-9u>; Fri, 16 Sep 2011 22:07:25 +0200 Received: by bkbzs8 with SMTP id zs8so4656666bkb.13 for ; Fri, 16 Sep 2011 13:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=CsPxoCxW6fRAO/mc5Nxt17HCz3V8CcWUrtgDEIujaa0=; b=kshmpjr9WKaleR8J40I5Hc+a3LRdx/GVH0f86Z4S07DBRSspnQ5TryaT1zpefdgZRk +3W6TuFpdreMXWGcn5nMZGjejWO3haEkYqEN/COK6tzsw31KnXkSYS4Uf5BhsNg1CNQh 633P+SAJfVw7BHFBQ+644IPBepelj8yc+CWQY= MIME-Version: 1.0 Received: by 10.204.132.139 with SMTP id b11mr492157bkt.230.1316203645082; Fri, 16 Sep 2011 13:07:25 -0700 (PDT) Received: by 10.204.78.148 with HTTP; Fri, 16 Sep 2011 13:07:25 -0700 (PDT) In-Reply-To: <6E8614DC-4D1E-4E6F-8AFC-1E48AA24608B@physik.fu-berlin.de> References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> <20110916153753.194800@gmx.net> <6E8614DC-4D1E-4E6F-8AFC-1E48AA24608B@physik.fu-berlin.de> Date: Fri, 16 Sep 2011 22:07:25 +0200 Message-ID: From: Enrique Medina Gremaldos To: linux-minidisc@lists.fu-berlin.de Content-Type: multipart/alternative; boundary=001517447e6cb79d9404ad148af5 X-Originating-IP: 209.85.214.54 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316203645-00005A17-4700B330/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.255721, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=DNS_FROM_RFC_ABUSE, HTML_00_10, HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 20:07:26 -0000 --001517447e6cb79d9404ad148af5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable There is no error message: Net MD Walkman Raw title: 0;Alfa//8;// Disc Title: Alfa Command: 00 18 00 08 00 46 f0 03 01 03 81 ff .....F=EF=BF=BD...= =EF=BF=BD=EF=BF=BD Response: 09 18 00 08 00 46 f0 03 01 03 81 00 .....F=EF=BF=BD...= =EF=BF=BD. No error Command: 00 18 00 08 00 46 f0 03 01 03 2b ff 00 01 00 00 .....F=EF=BF=BD...+= =EF=BF=BD.... 01 . Response: 09 18 00 08 00 46 f0 03 01 03 2b 00 00 01 00 00 .....F=EF=BF=BD...+= ..... 01 . No error Command: 00 18 00 08 00 46 f0 03 01 03 80 ff .....F=EF=BF=BD...= =EF=BF=BD=EF=BF=BD Response: 09 18 00 08 00 46 f0 03 01 03 80 00 .....F=EF=BF=BD...= =EF=BF=BD. No error Command: 00 18 00 08 00 46 f0 03 01 03 12 ff 00 48 00 00 .....F=EF=BF=BD....= =EF=BF=BD.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=EF=BF=BD=EF= =BF=BD.=EF=BF=BD=EF=BF=BD=EF=BF=BD=C8=A4. 2b 81 49 ba f0 df 26 9d b7 1d 49 ba f0 df 26 9d +=EF=BF=BDI=EF=BF= =BD=EF=BF=BD=EF=BF=BD&=EF=BF=BD=EF=BF=BD.I=EF=BF=BD=EF=BF=BD=EF=BF=BD&=EF= =BF=BD b7 1d e8 ef 73 45 8d 5b 8b f8 e8 ef 73 45 8d 5b =EF=BF=BD.=EF=BF=BD= =EF=BF=BDsE=EF=BF=BD[=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BDsE=EF=BF=BD[ 8b f8 38 5b 49 36 7b 42 0c 58 =EF=BF=BD=EF=BF=BD8= [I6{B.X Response: 09 18 00 08 00 46 f0 03 01 03 12 01 00 48 00 00 .....F=EF=BF=BD....= ..H.. 00 48 .H No error Command: 00 18 00 08 00 46 f0 03 01 03 20 ff 00 00 00 00 .....F=EF=BF=BD... = =EF=BF=BD.... 00 00 00 6b 8b 45 67 ...k=EF=BF=BDEg Response: 09 18 00 08 00 46 f0 03 01 03 20 00 00 00 00 07 .....F=EF=BF=BD... = ..... 11 92 7e e0 70 bd 1c .=EF=BF=BD~=EF=BF= =BDp=EF=BF=BD. No error Command: 00 18 00 08 00 46 f0 03 01 03 22 ff 00 00 c1 42 .....F=EF=BF=BD..."= =EF=BF=BD..=EF=BF=BDB 99 2d b7 35 37 de 47 0a ca 32 87 c3 04 93 6c a3 =EF=BF=BD-=EF=BF=BD= 57=EF=BF=BDG.=EF=BF=BD2=EF=BF=BD=EF=BF=BD.=EF=BF=BDl=EF=BF=BD e2 89 94 04 ee 1c 75 06 5a 25 7f d9 28 43 =E2=89=94.=EF=BF=BD= .u.Z%=7F=EF=BF=BD(C Response: 09 18 00 08 00 46 f0 03 01 03 22 00 00 00 .....F=EF=BF=BD..."= ... No error No error Command: 00 18 00 08 00 46 f0 03 01 03 28 ff 00 01 00 10 .....F=EF=BF=BD...(= =EF=BF=BD.... 01 ff ff 00 94 02 00 02 d7 f7 02 21 f9 58 .=EF=BF=BD=EF=BF=BD= .=EF=BF=BD...=EF=BF=BD=EF=BF=BD.!=EF=BF=BDX Response: 0f 18 00 08 00 46 f0 03 01 03 28 00 00 01 00 10 .....F=EF=BF=BD...(= ..... 01 00 08 00 94 02 00 02 d7 f7 02 21 f9 58 ....=EF=BF=BD...=EF= =BF=BD=EF=BF=BD.!=EF=BF=BDX ^C The final Ctrl+C is needed, because after blinking ERROR md recorder shuts down and operating system freezes. Any idea? --001517447e6cb79d9404ad148af5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: base64 VGhlcmUgaXMgbm8gZXJyb3IgbWVzc2FnZTo8YnI+PGJyPk5ldCBNRCBXYWxrbWFuPGJyPlJhdyB0 aXRsZTogMDtBbGZhLy84Oy8vIDxicj5EaXNjIFRpdGxlOiBBbGZhPGJyPjxicj5Db21tYW5kOjxi cj4wMCAxOCAwMCAwOCAwMCA0NiBmMCAwMyAwMSAwMyA4MSBmZsKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoCDCoMKgwqAgwqDCoMKgIC4uLi4uRu+/vS4uLu+/ve+/vTxicj5SZXNwb25zZTo8YnI+MDkg MTggMDAgMDggMDAgNDYgZjAgMDMgMDEgMDMgODEgMDDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAg wqDCoMKgIMKgwqDCoCAuLi4uLkbvv70uLi7vv70uPGJyPgpObyBlcnJvcjxicj5Db21tYW5kOjxi cj4wMCAxOCAwMCAwOCAwMCA0NiBmMCAwMyAwMSAwMyAyYiBmZiAwMCAwMSAwMCAwMCDCoMKgwqAg wqDCoMKgIC4uLi4uRu+/vS4uLivvv70uLi4uPGJyPjAxwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgIMKgwqDCoCDCoMKgwqAgLjxicj5SZXNwb25zZTo8YnI+MDkgMTggMDAgMDggMDAg NDYgZjAgMDMgMDEgMDMgMmIgMDAgMDAgMDEgMDAgMDAgwqDCoMKgIMKgwqDCoCAuLi4uLkbvv70u Li4rLi4uLi48YnI+CjAxwqDCoMKgwqDCoMKgwqDCoMKgwqDCo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4uLu+/vS4uLu+/ve+/vS4h 77+9WDxicj5eQzxicj48YnI+VGhlIGZpbmFsIEN0cmwrQyBpcyBuZWVkZWQsIGJlY2F1c2UgYWZ0 ZXIgYmxpbmtpbmcgRVJST1IgbWQgcmVjb3JkZXIgc2h1dHMgZG93biBhbmQgb3BlcmF0aW5nIHN5 c3RlbSBmcmVlemVzLiBBbnkgaWRlYT88YnI+Cg== --001517447e6cb79d9404ad148af5-- From manner.moe@gmx.de Fri Sep 16 22:34:08 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4f6t-0007J8-WD>; Fri, 16 Sep 2011 22:34:08 +0200 Received: from mailout-de.gmx.net ([213.165.64.23]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R4f6t-0007rD-SZ>; Fri, 16 Sep 2011 22:34:07 +0200 Received: (qmail invoked by alias); 16 Sep 2011 20:34:07 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp071) with SMTP; 16 Sep 2011 22:34:07 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX19Y1TZn6sxY3RZbXdDutFEzZGk9HwcKMBDgE+OspH fhtoVjaRBirjqw Message-ID: <4E73B2DD.2030201@gmx.de> Date: Fri, 16 Sep 2011 22:34:37 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: linux-minidisc@lists.fu-berlin.de Content-Type: multipart/alternative; boundary="------------030200010407040100090709" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.23 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316205248-00005A17-B6C99E89/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.011137, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=HTML_30_40,HTML_MESSAGE, RATWARE_GECKO_BUILD,SPF_HELO_PASS,SPF_PASS Subject: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 20:34:08 -0000 This is a multi-part message in MIME format. --------------030200010407040100090709 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi, i accidently used a write protected minidisc and a dics with no space left to test netmd download with netmdcli. The netmdcli send routine does not check if the dics is write prtected or if there is enough space left. In both cases netmd_secure_send_track(...) fails with "unknown error" but the code doesn?t break. It tries to set the disc title to the track number from the variable "uint16_ttrack" which is uninitialized. In my case trying to set the title for track number 52, but there are only 15 tracks on the disc. Also it tries to commit a track which is not written. I think we have to implement some more checking routines before trying to transmit a track: 1. check if disc is write protected 2. calculate the space needed for the track and check if there is enough space left on the disc 3. if netmd_secure_send_track(..) fails, don?t try to set title and commit track, just cleanup/leave secure session and exit Regards Thomas --------------030200010407040100090709 Content-Type: text/html; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Hi,
i accidently used a write protected minidisc and a dics with no space left to test netmd download with netmdcli.
The netmdcli send routine does not check if the dics is write prtected or if there is enough space left.
In both cases netmd_secure_send_track(...) fails with "unknown error" but the code doesn´t break.
It tries to set the disc title to the track number from the variable "uint16_t track" which is uninitialized.
In my case trying to set the title for track number 52, but there are only 15 tracks on the disc.
Also it tries to commit a track which is not written.

I think we have to implement some more checking routines before trying to transmit a track:
1. check if disc is write protected
2. calculate the space needed for the track and check if there is enough space left on the disc
3. if netmd_secure_send_track(..) fails, don´t try to set title and commit track, just cleanup/leave secure session and exit

Regards
Thomas

--------------030200010407040100090709-- From Michael.Karcher@fu-berlin.de Fri Sep 16 22:40:28 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4fD1-0007Wf-Kr>; Fri, 16 Sep 2011 22:40:27 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4fD1-0004p0-J1>; Fri, 16 Sep 2011 22:40:27 +0200 Received: from p548d22cb.dip.t-dialin.net ([84.141.34.203] helo=[192.168.2.109]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4fD1-0002FA-C1>; Fri, 16 Sep 2011 22:40:27 +0200 From: Michael Karcher To: John Paul Adrian Glaubitz Date: Sat, 17 Sep 2011 00:40:33 +0200 In-Reply-To: <093FD856-58FE-44DF-B067-10F5495CACDF@physik.fu-berlin.de> References: <4E6F002A.6040204@gmx.de> <1315950831.8613.47.camel@localhost> <4E705285.9050502@gmx.de> <1316029311.5253.1.camel@localhost> <4E7121D0.1000406@gmx.de> <1316047170.5253.12.camel@localhost> <4E719562.8050703@gmx.de> <1316194202.5253.15.camel@localhost> <093FD856-58FE-44DF-B067-10F5495CACDF@physik.fu-berlin.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 7bit Message-ID: <1316212835.5253.21.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 84.141.34.203 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316205627-00005A17-C476D51E/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] compiling libnetmd and netmdcli on windows X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 20:40:28 -0000 Am Freitag, den 16.09.2011, 18:44 +0200 schrieb John Paul Adrian Glaubitz: > Ok, changing the delay back to 1000 ms fixes the reliability problems > with my MZ-RH10. In that case, please commit with 1000ms. > I see that Michael claimed that 1000 ms delay (translating into 1 Hz > polling frequency) is actually too long and should be changed to > 200 ms (5 Hz). But why? Because 1Hz polling frequency is excessively low. For comparison, the python netmd code uses 100 ms (10Hz), see line 172 of libnetmd.py. Probably some timeout is tied to the number of iterations and needs to be increased by a factor of 5 when the delay length is decreased. In this case, it is NETMD_RECV_TRIES, being 30, resulting in a 30 second timeout. It appears reducing it to 6 seconds by decreasing the poll interval is not a good idea, so (after committing the patch with 1000) trying again with 200 in the sleep duration and 150 for NETMD_RECV_TRIES seems like a good idea. The problem with the 1 Hz polling frequency is that old NetMD units typically miss the first iteration (at least the Sharp IM-MT899 does), so there is a 1 second delay introduced for each command sent to that unit. The RH1 on the other hand manages to reply fast enough on most "simple" NetMD commands, so that the frequency of the polling loop does not matter. From linux-minidisc@lists.fu-berlin.de Fri Sep 16 23:27:48 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4fwq-0000mL-2r>; Fri, 16 Sep 2011 23:27:48 +0200 Received: from mail-clifton1.uio.no ([129.240.10.66]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4fwp-0003DZ-UG>; Fri, 16 Sep 2011 23:27:48 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R4fwp-0005W6-Ix for linux-minidisc@lists.fu-berlin.de; Fri, 16 Sep 2011 23:27:47 +0200 Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R4fwp-0005W3-IB for linux-minidisc@lists.fu-berlin.de; Fri, 16 Sep 2011 23:27:47 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx2.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R4fwp-0002qd-5r for linux-minidisc@lists.fu-berlin.de; Fri, 16 Sep 2011 23:27:47 +0200 Received: from glaubitz by z6 with local (Exim 4.76) (envelope-from ) id 1R4fwo-0006nA-Nb for linux-minidisc@lists.fu-berlin.de; Fri, 16 Sep 2011 23:27:46 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 9a677e71e6d81b545dc5cde26be8bf0fb4f3058e X-Git-Newrev: 46e81cbbd28052067cf0933bf121b1612786447c Message-Id: From: John Paul Adrian Glaubitz Date: Fri, 16 Sep 2011 23:27:46 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: DFCCB7A0F25DDC4CD538257DDBB014C328EDD583 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 105 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.66 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316208468-00005A17-DC942F7E/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 46e81cbbd28052067cf0933bf121b1612786447c X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 21:27:48 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 46e81cbbd28052067cf0933bf121b1612786447c (commit) from 9a677e71e6d81b545dc5cde26be8bf0fb4f3058e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 46e81cbbd28052067cf0933bf121b1612786447c Author: Thomas Arp Date: Fri Sep 16 23:20:37 2011 +0200 Changes to make libnetmd/netmdcli compile on Windows: - use #ifdef to choose proper sleep function - replace random() with gcry_create_nonce() - provide min(a,b) only if not available - use LIBUSB_ERROR_TIMEOUT instead of ETIMEDOUT ----------------------------------------------------------------------- Summary of changes: libnetmd/common.c | 9 ++++++++- libnetmd/secure.c | 22 ++++++---------------- libnetmd/utils.c | 9 --------- libnetmd/utils.h | 5 ++++- netmdcli/netmdcli.c | 6 +----- 5 files changed, 19 insertions(+), 32 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From manner.moe@gmx.de Fri Sep 16 23:30:16 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4fzD-0000tU-7Y>; Fri, 16 Sep 2011 23:30:15 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R4fzD-0003Oy-3l>; Fri, 16 Sep 2011 23:30:15 +0200 Received: (qmail invoked by alias); 16 Sep 2011 21:30:14 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp058) with SMTP; 16 Sep 2011 23:30:14 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX18VS0lafb0V0933fLyiZJ9X8Dlw/V2bemrPQkxaP2 zz+yVlc5NImVNY Message-ID: <4E73C01D.2080703@gmx.de> Date: Fri, 16 Sep 2011 23:31:09 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: linux-minidisc@lists.fu-berlin.de References: <4E73B2DD.2030201@gmx.de> In-Reply-To: <4E73B2DD.2030201@gmx.de> Content-Type: multipart/alternative; boundary="------------030406080307020406080309" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.22 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316208615-00005A17-F8A22487/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.006087, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=HTML_30_40,HTML_MESSAGE, RATWARE_GECKO_BUILD,SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 21:30:16 -0000 This is a multi-part message in MIME format. --------------030406080307020406080309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Am 16/09/2011 22:34, schrieb Thomas Arp: > Hi, > i accidently used a write protected minidisc and a dics with no space > left to test netmd download with netmdcli. > The netmdcli send routine does not check if the dics is write prtected > or if there is enough space left. > In both cases netmd_secure_send_track(...) fails with "unknown error" > but the code doesnīt break. > It tries to set the disc title to the track number from the variable > "uint16_ttrack" which is uninitialized. > In my case trying to set the title for track number 52, but there are > only 15 tracks on the disc. > Also it tries to commit a track which is not written. > > I think we have to implement some more checking routines before trying > to transmit a track: > 1. check if disc is write protected > 2. calculate the space needed for the track and check if there is > enough space left on the disc > 3. if netmd_secure_send_track(..) fails, donīt try to set title and > commit track, just cleanup/leave secure session and exit > I temporarily edited the output messages to check which commands causes errors. Downloading to a write protected disc looks like this: F:\minidisc\linux-minidisc\netmdcli\debug>netmdcli send LP2.wav Net MD/Hi-MD Sony MZ-RH1 Raw title: PEARL JAM ALIVE Disc Title: PEARL JAM ALIVE netmd_secure_leave_session: No error netmd_secure_set_track_protection: No error netmd_secure_enter_session: No error netmd_secure_send_key_data: No error netmd_secure_session_key_exchange: No error netmd_secure_setup_download: No error netmd_prepare_packets: No error netmd_secure_send_track: Command rejected netmd_set_title ("test" to track 52): Not implemented netmd_exch_message: netmd_poll failed netmd_secure_commit_track: Command failed, unknown error netmd_secure_session_key_forget: No error netmd_secure_leave_session: No error So we should break the code on NETMD_COMMAND_FAILED_REJECTED errors. Thomas --------------030406080307020406080309 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Am 16/09/2011 22:34, schrieb Thomas Arp:
Hi,
i accidently used a write protected minidisc and a dics with no space left to test netmd download with netmdcli.
The netmdcli send routine does not check if the dics is write prtected or if there is enough space left.
In both cases netmd_secure_send_track(...) fails with "unknown error" but the code doesn´t break.
It tries to set the disc title to the track number from the variable "uint16_t track" which is uninitialized.
In my case trying to set the title for track number 52, but there are only 15 tracks on the disc.
Also it tries to commit a track which is not written.

I think we have to implement some more checking routines before trying to transmit a track:
1. check if disc is write protected
2. calculate the space needed for the track and check if there is enough space left on the disc
3. if netmd_secure_send_track(..) fails, don´t try to set title and commit track, just cleanup/leave secure session and exit

I temporarily edited the output messages to check which commands causes errors.
Downloading to a write protected disc looks like this:

F:\minidisc\linux-minidisc\netmdcli\debug>netmdcli send LP2.wav
Net MD/Hi-MD
Sony MZ-RH1
Raw title: PEARL JAM ALIVE
Disc Title: PEARL JAM ALIVE

netmd_secure_leave_session: No error
netmd_secure_set_track_protection: No error
netmd_secure_enter_session: No error
netmd_secure_send_key_data: No error
netmd_secure_session_key_exchange: No error
netmd_secure_setup_download: No error
netmd_prepare_packets: No error
netmd_secure_send_track: Command rejected
netmd_set_title ("test" to track 52): Not implemented
netmd_exch_message: netmd_poll failed
netmd_secure_commit_track: Command failed, unknown error
netmd_secure_session_key_forget: No error
netmd_secure_leave_session: No error

So we should break the code on NETMD_COMMAND_FAILED_REJECTED errors.

Thomas


--------------030406080307020406080309-- From manner.moe@gmx.de Sat Sep 17 00:48:36 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4hD1-0003uW-Hj>; Sat, 17 Sep 2011 00:48:35 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R4hD1-0002I9-Dt>; Sat, 17 Sep 2011 00:48:35 +0200 Received: (qmail invoked by alias); 16 Sep 2011 22:48:34 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp056) with SMTP; 17 Sep 2011 00:48:34 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1+Kd84miUiK1zrBORhMR3q41VdBozfaprCY677XyG le3LrEK1VAT/Vw Message-ID: <4E73D242.80506@gmx.de> Date: Sat, 17 Sep 2011 00:48:34 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Enrique Medina Gremaldos , linux-minidisc@lists.fu-berlin.de References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> <20110916153753.194800@gmx.net> <6E8614DC-4D1E-4E6F-8AFC-1E48AA24608B@physik.fu-berlin.de> In-Reply-To: Content-Type: multipart/alternative; boundary="------------090007010702020609050603" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.22 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316213315-00005A17-46C58DF2/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=HTML_40_50,HTML_MESSAGE, RATWARE_GECKO_BUILD,SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 22:48:36 -0000 This is a multi-part message in MIME format. --------------090007010702020609050603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Am 16/09/2011 22:07, schrieb Enrique Medina Gremaldos: > There is no error message: > > No error > Command: > 00 18 00 08 00 46 f0 03 01 03 28 ff 00 01 00 10 .....F?...(?.... > 01 ff ff 00 94 02 00 02 d7 f7 02 21 f9 58 .??.?...??.!?X > Response: > 0f 18 00 08 00 46 f0 03 01 03 28 00 00 01 00 10 .....F?...(..... > 01 00 08 00 94 02 00 02 d7 f7 02 21 f9 58 ....?...??.!?X > ^C > > The final Ctrl+C is needed, because after blinking ERROR md recorder > shuts down and operating system freezes. Any idea? The last command of your log is netmd_secure_send_track(). The values i marked red are place holders for the track number. Normally the first response should show the number of groups (i donīt know exactly, maybe the number of the group to store the track in), the final track number is returned from the device in the 2nd response after transferring the track. Can you please paste the output of "./netmdcli" (without any arguments)? "Raw title: 0;Alfa//8;// " looks a bit confusing to me. Maybe there is something wrong with the group mechanism. Thomas --------------090007010702020609050603 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Am 16/09/2011 22:07, schrieb Enrique Medina Gremaldos:
There is no error message:

No error
Command:
00 18 00 08 00 46 f0 03 01 03 28 ff 00 01 00 10         .....F�...(�....
01 ff ff 00 94 02 00 02 d7 f7 02 21 f9 58               .��.�...��.!�X
Response:
0f 18 00 08 00 46 f0 03 01 03 28 00 00 01 00 10         .....F�...(.....
01 00 08 00 94 02 00 02 d7 f7 02 21 f9 58               ....�...��.!�X
^C

The final Ctrl+C is needed, because after blinking ERROR md recorder shuts down and operating system freezes. Any idea?
The last command of your log is netmd_secure_send_track().  The values i marked red are place holders for the track number.
Normally the first response should show the number of groups (i don´t know exactly, maybe the number of the group to store the track in), the final track number is returned from the device in the 2nd response after transferring the track.
Can you please paste the output of "./netmdcli" (without any arguments)?
"Raw title: 0;Alfa//8;// " looks a bit confusing to me.
Maybe there is something wrong with the group mechanism.

Thomas


--------------090007010702020609050603-- From Michael.Karcher@fu-berlin.de Sat Sep 17 09:33:12 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4pOh-00079P-PX>; Sat, 17 Sep 2011 09:33:11 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4pOh-0002rY-Mc>; Sat, 17 Sep 2011 09:33:11 +0200 Received: from p548d24b5.dip.t-dialin.net ([84.141.36.181] helo=[192.168.2.109]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4pOh-0006ym-FA>; Sat, 17 Sep 2011 09:33:11 +0200 From: Michael Karcher To: Enrique Medina Gremaldos Date: Sat, 17 Sep 2011 11:33:09 +0200 In-Reply-To: References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> <20110916153753.194800@gmx.net> <6E8614DC-4D1E-4E6F-8AFC-1E48AA24608B@physik.fu-berlin.de> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-NVAQEbPyyPE590Z191h3" X-Mailer: Evolution 3.0.2- Message-ID: <1316251999.5253.32.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 84.141.36.181 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316244791-00005A17-29F5C7D1/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 07:33:12 -0000 --=-NVAQEbPyyPE590Z191h3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Freitag, den 16.09.2011, 22:07 +0200 schrieb Enrique Medina Gremaldos: > Command: > 00 18 00 08 00 46 f0 03 01 03 28 ff 00 01 00 10 .....F=EF=BF=BD..= .(=EF=BF=BD.... > 01 ff ff 00 94 02 00 02 d7 f7 02 21 f9 58 .=EF=BF=BD=EF=BF= =BD.=EF=BF=BD...=EF=BF=BD=EF=BF=BD.!=EF=BF=BDX > Response: > 0f 18 00 08 00 46 f0 03 01 03 28 00 00 01 00 10 .....F=EF=BF=BD..= .(..... > 01 00 08 00 94 02 00 02 d7 f7 02 21 f9 58 ....=EF=BF=BD...= =EF=BF=BD=EF=BF=BD.!=EF=BF=BDX > ^C This is the point where the USB transfer mode is changed. All the commands are transferred as USB "control" packets, and here, music data transfer should now start, using USB "bulk" packets. As a different MD recorder works on your system, a problem with the host seems improbable. Furthermore you state that recording works fine from the microphone, so the MD drive is also OK, which indicates a problem with the USB interface of your recorder. There is one thing you could try: Limit the maximum logical packet size to the MD recorder. which is set on line 403 of libnetmd/secure.c. For a start, I would try with 0x3800 instead of 0xffffffff (which essentially means "unlimited"). Sonic Stage uses some value between 0x3800 and 0x3FF0 depending on the codec, as far as I know. If even with small sizes, no numbers are output after the last hex dump, the MD unit does not accept any bulk transfer. If it does output numbers, please paste the output and the total size of the file you are trying to transfer. I'm afraid that I don't know the internals of MD recorders, so I can't tell you whether this is a firmware or a hardware problem. As you are encountering the same problem with Sonic Stage, it most likely is not a known firmware quirk for which there is a workaround, as Sony would have included that workaround into Sonic Stage. Regards, Michael Karcher --=-NVAQEbPyyPE590Z191h3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk50aVUACgkQzhek2R7EicqH9wCeK2tClpOV5RseOKaER39PNfgg knUAn0dD1/lSGBTAkcEZxbIWm/qu9cGr =reL/ -----END PGP SIGNATURE----- --=-NVAQEbPyyPE590Z191h3-- From quiqueiii@gmail.com Sat Sep 17 09:34:27 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4pPu-0007CM-Kf>; Sat, 17 Sep 2011 09:34:26 +0200 Received: from mail-bw0-f54.google.com ([209.85.214.54]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4pPu-0002bQ-I1>; Sat, 17 Sep 2011 09:34:26 +0200 Received: by bkbzs8 with SMTP id zs8so4978894bkb.13 for ; Sat, 17 Sep 2011 00:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=IXkKTiMqcgxvEgPC8Bznbq8T7ZV3rP63vD+aYZMETd0=; b=YVIhORMNvxpjMrF/+w0rTByoxu/9L9TY7Ys0WQfKWUHpFVWnmUgI2u5iMKp7+cfMyU uR17NPI+ZnfRp6Y8F/jpI9lk0h546Q4nW+MwfsQPvEiHa4y+iriCpMbvxROdwUkyZ6QW OUPKSX6JSoYz7z6/8CGyNCxhjpUHh7CVzrtQs= MIME-Version: 1.0 Received: by 10.204.7.199 with SMTP id e7mr180786bke.178.1316244866215; Sat, 17 Sep 2011 00:34:26 -0700 (PDT) Received: by 10.204.78.148 with HTTP; Sat, 17 Sep 2011 00:34:26 -0700 (PDT) In-Reply-To: <4E73D242.80506@gmx.de> References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> <20110916153753.194800@gmx.net> <6E8614DC-4D1E-4E6F-8AFC-1E48AA24608B@physik.fu-berlin.de> <4E73D242.80506@gmx.de> Date: Sat, 17 Sep 2011 09:34:26 +0200 Message-ID: From: Enrique Medina Gremaldos To: linux-minidisc@lists.fu-berlin.de Content-Type: multipart/alternative; boundary=00151750e624b0307d04ad1e2340 X-Originating-IP: 209.85.214.54 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316244866-00005A17-D42F2315/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.205060, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, HTML_10_20, HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS,UPPERCASE_25_50 Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 07:34:27 -0000 --00151750e624b0307d04ad1e2340 Content-Type: text/plain; charset=ISO-8859-1 There is an unnamed song on an unnamed group. This was created when testing mic recording Net MD Walkman Raw title: 0;Alfa//8;// Disc Title: Alfa Track 0: TrPROT UNKNOWN - 04:46:58 - Street Of Dreams Track 1: TrPROT UNKNOWN - 06:41:08 - There Was A Time Track 2: TrPROT UNKNOWN - 05:52:81 - Catcher In The Rye Track 3: TrPROT UNKNOWN - 04:10:10 - Riad N' The Bedouins Track 4: TrPROT UNKNOWN - 06:14:42 - Sorry Track 5: TrPROT UNKNOWN - 05:34:27 - This I Love Track 6: TrPROT UNKNOWN - 06:15:76 - Prostitute Track 7: UnPROT UNKNOWN - 03:25:03 - --Empty Groups-- Group: (null) The protected tracks have been downloaded from my other MD unit, from SonicStage. But I dont undestand why it is capable of downloading a first track. Are discs signed by the device? Regards --00151750e624b0307d04ad1e2340 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable There is an unnamed song on an unnamed group. This was created when testing= mic recording


Net MD Walkman
Raw title: 0;Alfa//8;//
Dis= c Title: Alfa

Track=A0 0: TrPROT UNKNOWN - 04:46:58 - Street Of Drea= ms
Track=A0 1: TrPROT UNKNOWN - 06:41:08 - There Was A Time
Track=A0 2: TrP= ROT UNKNOWN - 05:52:81 - Catcher In The Rye
Track=A0 3: TrPROT UNKNOWN -= 04:10:10 - Riad N' The Bedouins
Track=A0 4: TrPROT UNKNOWN - 06:14:= 42 - Sorry
Track=A0 5: TrPROT UNKNOWN - 05:34:27 - This I Love
Track=A0 6: TrPROT U= NKNOWN - 06:15:76 - Prostitute
Track=A0 7: UnPROT UNKNOWN - 03:25:03 - <= br>
--Empty Groups--
Group: (null)


The protected tracks ha= ve been downloaded from my other MD unit, from SonicStage. But I dont undes= tand why it is capable of downloading a first track. Are discs signed by th= e device?


Regards

--00151750e624b0307d04ad1e2340-- From Michael.Karcher@fu-berlin.de Sat Sep 17 09:38:34 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4pTt-0007Ls-Fu>; Sat, 17 Sep 2011 09:38:33 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4pTt-0003LU-DS>; Sat, 17 Sep 2011 09:38:33 +0200 Received: from p548d24b5.dip.t-dialin.net ([84.141.36.181] helo=[192.168.2.109]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4pTt-0007DW-6P>; Sat, 17 Sep 2011 09:38:33 +0200 From: Michael Karcher To: Thomas Arp Date: Sat, 17 Sep 2011 11:38:32 +0200 In-Reply-To: <4E73C01D.2080703@gmx.de> References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-OuLIYuwdUfe0eniqva3E" X-Mailer: Evolution 3.0.2- Message-ID: <1316252321.5253.38.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 84.141.36.181 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316245113-00005A17-2C1478BC/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 07:38:34 -0000 --=-OuLIYuwdUfe0eniqva3E Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Am Freitag, den 16.09.2011, 23:31 +0200 schrieb Thomas Arp: > netmd_secure_leave_session: No error > netmd_secure_set_track_protection: No error > netmd_secure_enter_session: No error > netmd_secure_send_key_data: No error > netmd_secure_session_key_exchange: No error > netmd_secure_setup_download: No error > netmd_prepare_packets: No error > netmd_secure_send_track: Command rejected > netmd_set_title ("test" to track 52): Not implemented > netmd_exch_message: netmd_poll failed > netmd_secure_commit_track: Command failed, unknown error > netmd_secure_session_key_forget: No error > netmd_secure_leave_session: No error >=20 > So we should break the code on NETMD_COMMAND_FAILED_REJECTED errors. In general, yes. But we should add some exceptions on that: netmd_secure_leave_session is expected to fail if there is no "secured" session available. Recent recorders always indicate success on this command, but you can not count on it. We send that command in the beginning to cancel a previous unterminated session. To make this even more robust, a netmd_secure_session_key_forget command should be added before the leave_session command (errors also ignored). The second thing to consider is that older MD recorders do not implement the "set_track_protection" feature, so a "NOT IMPLEMENTED" error at that stage should also not be treated fatal. When you encounter a "REJECTED" error and abort the transfer, please still terminate the session (session_key_forget and leave_session). Regards, Michael Karcher --=-OuLIYuwdUfe0eniqva3E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk50apgACgkQzhek2R7EicoPdwCdEQzpD9v1kE4lwPDsmGhldaau aegAn2caT6po5G03onha7I14J7y19Wbx =MypG -----END PGP SIGNATURE----- --=-OuLIYuwdUfe0eniqva3E-- From quiqueiii@gmail.com Sat Sep 17 10:43:45 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4qUz-0001KQ-0E>; Sat, 17 Sep 2011 10:43:45 +0200 Received: from mail-bw0-f54.google.com ([209.85.214.54]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4qUy-0000uT-TO>; Sat, 17 Sep 2011 10:43:44 +0200 Received: by bkbzs8 with SMTP id zs8so5009082bkb.13 for ; Sat, 17 Sep 2011 01:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=3rM+7wCifKxXLtFaTsL6SGtZjqIUW98r6TCF5wFOTGM=; b=gtCVUr1h7Dq15MzYIwyT1oOZJ0JE77L9XU5idnhZm2UPWDs0w6jIUtBl56BWaHwf00 Q9NGa32D7fKbXjYkHDZGQIcWG1XXFoxjoUkBGGtFoNli00lZucIZ6Xa3/2ZWcb/CI6Dc Oq0baEGqFMYPWI7PvuwHdPjnY9iOt1hU6VJ2k= MIME-Version: 1.0 Received: by 10.204.132.139 with SMTP id b11mr221995bkt.230.1316249024717; Sat, 17 Sep 2011 01:43:44 -0700 (PDT) Received: by 10.204.78.148 with HTTP; Sat, 17 Sep 2011 01:43:44 -0700 (PDT) In-Reply-To: References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> <20110916153753.194800@gmx.net> <6E8614DC-4D1E-4E6F-8AFC-1E48AA24608B@physik.fu-berlin.de> <4E73D242.80506@gmx.de> Date: Sat, 17 Sep 2011 10:43:44 +0200 Message-ID: From: Enrique Medina Gremaldos To: linux-minidisc@lists.fu-berlin.de Content-Type: multipart/alternative; boundary=001517447e6c8de41b04ad1f1b75 X-Originating-IP: 209.85.214.54 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316249025-00005A17-A5A85B84/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.439154, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=DNS_FROM_RFC_ABUSE, HTML_00_10, HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 08:43:45 -0000 --001517447e6c8de41b04ad1f1b75 Content-Type: text/plain; charset=ISO-8859-1 > There is one thing you could try: Limit the maximum logical packet size It didn't work :C Also, how can this explain device could download a song on a blank disc, but not the following ones!!!??? (either libnetmd or SonicStage). I know It is outdated, but python netmd fails on sendkeyData before data transfer starts. In fact there is no error response, device just displays ERROR and shuts down. According to user manual this message is: "There is an internal malfunction in the system" Just a hack I'm thinking about. It is possible to download multiple tracks on a single session? Regards Enrique --001517447e6c8de41b04ad1f1b75 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
> There is one thing you could try: Limit the maximum logical packet= size

It didn't work :C Also, how can this explain device could = download a song on a blank disc, but not the following ones!!!??? (either l= ibnetmd or SonicStage). I know It is outdated, but python netmd fails on se= ndkeyData before data transfer starts. In fact there is no error response, = device just displays ERROR and shuts down. According to user manual this me= ssage is: "There is an internal malfunction in the system"

Just a hack I'm thinking about. It is possible to download multiple= tracks on a single session?

Regards
Enrique

--001517447e6c8de41b04ad1f1b75-- From linux-minidisc@lists.fu-berlin.de Sat Sep 17 13:49:46 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4tOz-0008BO-98>; Sat, 17 Sep 2011 13:49:45 +0200 Received: from mail-clifton1.uio.no ([129.240.10.66]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4tOz-0002MI-40>; Sat, 17 Sep 2011 13:49:45 +0200 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R4tOy-0005iv-Ki for linux-minidisc@lists.fu-berlin.de; Sat, 17 Sep 2011 13:49:44 +0200 Received: from mail-mx1.uio.no ([129.240.10.29]) by mail-out1.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R4tOy-0005is-Jw for linux-minidisc@lists.fu-berlin.de; Sat, 17 Sep 2011 13:49:44 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx1.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R4tOy-0006r5-7w for linux-minidisc@lists.fu-berlin.de; Sat, 17 Sep 2011 13:49:44 +0200 Received: from mkarcher by z6 with local (Exim 4.76) (envelope-from ) id 1R4tOx-0004LM-S4 for linux-minidisc@lists.fu-berlin.de; Sat, 17 Sep 2011 13:49:43 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 46e81cbbd28052067cf0933bf121b1612786447c X-Git-Newrev: 332edaed148ca64d82f021969781fb9486e73cb8 Message-Id: From: Michael Karcher Date: Sat, 17 Sep 2011 13:49:43 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=3.5, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, TVD_SUBJ_NUM_OBFU_MINFP=3.499, uiobl=NO, uiouri=NO) X-UiO-Spam-Score: sss X-UiO-Scanned: 5A4C4361C6F6FE115CB69AF5B3155FEFB08E13C4 X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 35 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 106 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.66 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316260185-00005A17-8D8B94BA/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 332edaed148ca64d82f021969781fb9486e73cb8 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 11:49:46 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 332edaed148ca64d82f021969781fb9486e73cb8 (commit) from 46e81cbbd28052067cf0933bf121b1612786447c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 332edaed148ca64d82f021969781fb9486e73cb8 Author: Michael Karcher Date: Sat Sep 17 15:36:31 2011 +0200 Use binary mode for audio data files ----------------------------------------------------------------------- Summary of changes: netmdcli/netmdcli.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From Michael.Karcher@fu-berlin.de Sat Sep 17 13:51:54 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4tR3-0008GO-Oc>; Sat, 17 Sep 2011 13:51:53 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4tR3-0002z8-Mk>; Sat, 17 Sep 2011 13:51:53 +0200 Received: from p548d24b5.dip.t-dialin.net ([84.141.36.181] helo=[192.168.2.109]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4tR3-00033L-Fz>; Sat, 17 Sep 2011 13:51:53 +0200 From: Michael Karcher To: Thomas Arp Date: Sat, 17 Sep 2011 13:52:01 +0200 In-Reply-To: <20110917081502.242500@gmx.net> References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> <20110916153753.194800@gmx.net> <6E8614DC-4D1E-4E6F-8AFC-1E48AA24608B@physik.fu-berlin.de> <1316251999.5253.32.camel@localhost> <20110917081502.242500@gmx.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 8bit Message-ID: <1316260322.5253.45.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 84.141.36.181 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316260313-00005A17-83E18BE8/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 11:51:54 -0000 (I put the list back in the recipient list) Am Samstag, den 17.09.2011, 10:15 +0200 schrieb Thomas Arp: > As far as i remember on testing the python scripts, iÂīvehad some > problems downloading a track if it is opened in text mode because of > different line endings. Changing this to open the file in binary mode > should work better, but this depends on how the file was created. In fact, this bug is again in the C code, to be exact, it is line 510 of netmdcli.c, but this bug does not affect Linux systems, just Windows systems. And the *only* correct mode to read a binary file is opening it in binary mode. If the file was created in "text mode", and thus can be read in text mode yielding correct results, the file already is broken by definition. Linux spoils programmers by not making any difference between these modes, so if you develop on Linux, you don't notice bugs like this. The effect of this bug would be that certain files fail to upload reliably, regardless of disk fill level. Anyhow, I just committed the fix for the Problem you mentioned into the git repository. I still expect Enrique to have used netmdcli on Linux or MacOS (as your Windows build fix is only in since short time) where the binary mode makes no difference. Regards, Michael Karcher From Michael.Karcher@fu-berlin.de Sat Sep 17 13:59:09 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4tY4-00006N-Nk>; Sat, 17 Sep 2011 13:59:08 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4tY4-0003kG-LX>; Sat, 17 Sep 2011 13:59:08 +0200 Received: from p548d24b5.dip.t-dialin.net ([84.141.36.181] helo=[192.168.2.109]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4tY4-0003Rj-F6>; Sat, 17 Sep 2011 13:59:08 +0200 From: Michael Karcher To: Enrique Medina Gremaldos Date: Sat, 17 Sep 2011 13:59:16 +0200 In-Reply-To: References: <9A8C4DA2-A1B9-41F9-9505-06A4566AA375@physik.fu-berlin.de> <20110916153753.194800@gmx.net> <6E8614DC-4D1E-4E6F-8AFC-1E48AA24608B@physik.fu-berlin.de> <4E73D242.80506@gmx.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 7bit Message-ID: <1316260757.5253.50.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 84.141.36.181 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316260748-00005A17-FBBB94F6/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] Presentation and issues with mz-n710 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 11:59:09 -0000 Am Samstag, den 17.09.2011, 10:43 +0200 schrieb Enrique Medina Gremaldos: > Just a hack I'm thinking about. It is possible to download multiple > tracks on a single session? Yes, the protocol definitely allows for that, although our tools currently don't. In our C codes, the code that would need to be put into a loop is from line 499 (error = netmd_secure_setup_download(...) ) up to before the /* forget key */ comment in line 534. It seems like the code currently leaks "data", so a "free(data)" might be appropriate. Regards, Michael Karcher From glaubitz@physik.fu-berlin.de Sat Sep 17 20:51:28 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R4zz5-0006py-Om>; Sat, 17 Sep 2011 20:51:27 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R4zz5-00085D-MA>; Sat, 17 Sep 2011 20:51:27 +0200 Received: from 182.80-203-34.nextgentel.com ([80.203.34.182] helo=[10.0.0.3]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R4zz5-0007cb-Hs>; Sat, 17 Sep 2011 20:51:27 +0200 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=windows-1252 From: John Paul Adrian Glaubitz In-Reply-To: <4E73C01D.2080703@gmx.de> Date: Sat, 17 Sep 2011 20:51:25 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> To: Thomas Arp X-Mailer: Apple Mail (2.1244.3) X-Originating-IP: 80.203.34.182 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316285487-00005A17-C53ADE54/0-0/0-0 X-Bogosity: Unsure, tests=bogofilter, spamicity=0.481586, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=ALL_TRUSTED,FU_BOGO_UNSURE Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2011 18:51:28 -0000 On Sep 16, 2011, at 11:31 PM, Thomas Arp wrote: > I temporarily edited the output messages to check which commands = causes errors. > Downloading to a write protected disc looks like this: >=20 > F:\minidisc\linux-minidisc\netmdcli\debug>netmdcli send LP2.wav=20 > Net MD/Hi-MD > Sony MZ-RH1 > Raw title: PEARL JAM ALIVE=20 > Disc Title: PEARL JAM ALIVE >=20 > netmd_secure_leave_session: No error > netmd_secure_set_track_protection: No error (=85) I think it's in general a good idea to append the name of the command to = the error message. Furthermore, we can add an option to control the verbosity of netmdcli, so that by default it doesn't display error information if = everything runs fine. However, before we make any bigger changes to netmdcli/libnetmd, the code will need some further cleanup first. There is some code in = netmdcli which I think should rather go into libnetmd. I was particularly = thinking about the code which sets up the secure session and sends a track to the device. That should probably better go into libnetmd, so we avoid reinventing the wheel over and over again when using libnetmd in other applications. We could then also discuss Thomas' other patch which outputs the NetMD device information in the console messages. Adrian= From Michael.Karcher@fu-berlin.de Sun Sep 18 14:23:56 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R5GPc-0003tu-2P>; Sun, 18 Sep 2011 14:23:56 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R5GPb-0004BD-UQ>; Sun, 18 Sep 2011 14:23:55 +0200 Received: from p548d38ce.dip.t-dialin.net ([84.141.56.206] helo=[192.168.2.109]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R5GPb-0006xW-Nz>; Sun, 18 Sep 2011 14:23:55 +0200 From: Michael Karcher To: John Paul Adrian Glaubitz Date: Sun, 18 Sep 2011 14:24:05 +0200 In-Reply-To: <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 7bit Message-ID: <1316348647.5253.59.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 84.141.56.206 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316348636-00005A17-E6FB6525/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.003182, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2011 12:23:57 -0000 Am Samstag, den 17.09.2011, 20:51 +0200 schrieb John Paul Adrian Glaubitz: > However, before we make any bigger changes to netmdcli/libnetmd, the > code will need some further cleanup first. There is some code in netmdcli > which I think should rather go into libnetmd. I was particularly thinking > about the code which sets up the secure session and sends a track > to the device. That should probably better go into libnetmd, If we are going to refactor the code, we should make it possible to read the input stream on-demand instead of needing the whole track in memory. This is especially important for SP uploads that are transferred as PCM, as the extreme case, a 80 minutes PCM track is nearly 850 megabytes. Transferring the song is not timing critical, so hard disk acess during song transfer should not cause issues. In C, the only method to achieve that would be some kind of call back (in the python code, an effect like this could be obtained by passing an iterator to the send function that creates the packet on-demand) Regards, Michael Karcher From manner.moe@gmx.de Sun Sep 18 17:04:45 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R5IvE-0001IJ-Hz>; Sun, 18 Sep 2011 17:04:44 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R5IvE-0003K1-Dm>; Sun, 18 Sep 2011 17:04:44 +0200 Received: (qmail invoked by alias); 18 Sep 2011 15:04:43 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp022) with SMTP; 18 Sep 2011 17:04:43 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1+dfuVVJkadeg8hV8JBLdpd/nICIXieBCHf64niw6 /okrrTVFf/fDDP Message-ID: <4E7608AA.20008@gmx.de> Date: Sun, 18 Sep 2011 17:05:14 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: John Paul Adrian Glaubitz , linux-minidisc@lists.fu-berlin.de References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> In-Reply-To: <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> Content-Type: multipart/mixed; boundary="------------010105010500020905080607" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.22 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316358284-00005A17-DE1C2A5F/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Benin.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2011 15:04:45 -0000 This is a multi-part message in MIME format. --------------010105010500020905080607 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Am 17/09/2011 20:51, schrieb John Paul Adrian Glaubitz: > However, before we make any bigger changes to netmdcli/libnetmd, the > code will need some further cleanup first. There is some code in netmdcli > which I think should rather go into libnetmd. I was particularly thinking > about the code which sets up the secure session and sends a track > to the device. That should probably better go into libnetmd, so we > avoid reinventing the wheel over and over again when using libnetmd > in other applications. > ... > Adrian As it seems that reading disc flags is generally missing in the current status of libnetmd i first made a small patch to implement this. But you are right. The key generation/exchange mechanism should go into libnetmd. Maybe we should provide something like netmd_start_session() and netmd_end_session() externally which set up and clean a secure session inside libnetmd. Thomas --------------010105010500020905080607 Content-Type: text/plain; name="0001-integrate-reading-disc-flags-in-netmd_initialize_dis.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-integrate-reading-disc-flags-in-netmd_initialize_dis.pa"; filename*1="tch" >From 8d5780c60f4694ce8468dd44e3bc684a09ad010d Mon Sep 17 00:00:00 2001 From: Thomas Arp Date: Sun, 18 Sep 2011 16:25:00 +0200 Subject: [PATCH] integrate reading disc flags in netmd_initialize_disc_info() --- libnetmd/libnetmd.c | 25 +++++++++++++++++++++++++ libnetmd/libnetmd.h | 1 + netmdcli/netmdcli.c | 18 +++++++++++++++++- 3 files changed, 43 insertions(+), 1 deletions(-) diff --git a/libnetmd/libnetmd.c b/libnetmd/libnetmd.c index 0291cbe..6d57ad1 100644 --- a/libnetmd/libnetmd.c +++ b/libnetmd/libnetmd.c @@ -131,6 +131,25 @@ static int request_disc_title(netmd_dev_handle* dev, char* buffer, size_t size) return (int)title_size - 25; } +int request_disc_flags(netmd_dev_handle* dev) +{ + int ret = -1; + unsigned char disc_flags_request[] = {0x00, 0x18, 0x06, 0x01, 0x10, 0x10, + 0x00, 0xff, 0x00, 0x00, 0x01, 0x00, + 0x0b }; + unsigned char flags[14]; + + ret = netmd_exch_message(dev, disc_flags_request, 0x0d, flags); + + if(ret < 0 || flags[7] != 0x10) + { + fprintf(stderr, "request_disc_flags: bad ret code\n"); + return 0; + } + + return flags[13] & 0xff; +} + int netmd_request_track_time(netmd_dev_handle* dev, const uint16_t track, struct netmd_track* buffer) { int ret = 0; @@ -329,6 +348,12 @@ int netmd_initialize_disc_info(netmd_dev_handle* devh, minidisc* md) set_group_data(md, 0, "", 0, 0); } + disc_flags = request_disc_flags(devh); + if (disc_flags & NETMD_DISC_FLAG_WRITE_PROTECTED) + md->writable = 0; + else + md->writable = 1; /* try to use disc as not write protected else if disc flags cannot be read */ + return disc_size; } diff --git a/libnetmd/libnetmd.h b/libnetmd/libnetmd.h index 52f7edb..2becb8e 100644 --- a/libnetmd/libnetmd.h +++ b/libnetmd/libnetmd.h @@ -81,6 +81,7 @@ typedef struct { size_t header_length; struct netmd_group *groups; unsigned int group_count; + int writable; } minidisc; diff --git a/netmdcli/netmdcli.c b/netmdcli/netmdcli.c index 60f1d81..ed43e8b 100644 --- a/netmdcli/netmdcli.c +++ b/netmdcli/netmdcli.c @@ -168,6 +168,13 @@ void retailmac(unsigned char *rootkey, unsigned char *hostnonce, gcry_cipher_close(handle2); } +static void cleanup(minidisc *md, netmd_dev_handle *devh, netmd_device *device_list) +{ + netmd_clean_disc_info(md); + netmd_close(devh); + netmd_clean(&device_list); +} + int main(int argc, char* argv[]) { netmd_dev_handle* devh; @@ -212,7 +219,8 @@ int main(int argc, char* argv[]) printf("%s\n", name); netmd_initialize_disc_info(devh, md); - printf("Disc Title: %s\n\n", md->groups[0].name); + printf("Disc Title: %s\n", md->groups[0].name); + printf("Protection status: %s\n\n", (md->writable ? "writable" : "write protected")); /* by default, log only errors */ netmd_set_log_level(NETMD_LOG_ERROR); @@ -441,6 +449,14 @@ int main(int argc, char* argv[]) unsigned char uuid[8] = { 0 }; unsigned char new_contentid[20] = { 0 }; + /* check if disc is write protected first */ + if(!md->writable) + { + printf("Cannot send track: disc is write protected\n"); + cleanup(md, devh, device_list); + return -1; + } + error = netmd_secure_leave_session(devh); puts(netmd_strerror(error)); -- 1.7.6.msysgit.0 --------------010105010500020905080607-- From manner.moe@gmx.de Sun Sep 18 17:10:08 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R5J0R-0001VQ-Bc>; Sun, 18 Sep 2011 17:10:07 +0200 Received: from mailout-de.gmx.net ([213.165.64.23]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R5J0R-0003n5-7Y>; Sun, 18 Sep 2011 17:10:07 +0200 Received: (qmail invoked by alias); 18 Sep 2011 15:10:06 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp059) with SMTP; 18 Sep 2011 17:10:06 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX19CITIphV5CmSQ0WyFMs3AStWNzcwZsqP7v1f0ZEn rboZ5DlNRtp37N Message-ID: <4E7609EF.3050409@gmx.de> Date: Sun, 18 Sep 2011 17:10:39 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: John Paul Adrian Glaubitz , linux-minidisc@lists.fu-berlin.de References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> <4E7608AA.20008@gmx.de> In-Reply-To: <4E7608AA.20008@gmx.de> Content-Type: multipart/mixed; boundary="------------080604090704020306040608" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.23 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316358607-00005A17-9EDCE2AD/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000109, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2011 15:10:08 -0000 This is a multi-part message in MIME format. --------------080604090704020306040608 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Am 18/09/2011 17:05, schrieb Thomas Arp: > As it seems that reading disc flags is generally missing in the > current status of libnetmd i first made a small patch to implement this. > > Thomas O.K., patch doesnīt work, i forgot to declare a variable. Thomas --------------080604090704020306040608 Content-Type: text/plain; name="0002-forgot-to-declare-variable-disc_flags.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0002-forgot-to-declare-variable-disc_flags.patch" >From 0929883ed1c8f02aa2b038a26fa5a4a1203526c3 Mon Sep 17 00:00:00 2001 From: Thomas Arp Date: Sun, 18 Sep 2011 17:07:41 +0200 Subject: [PATCH 2/2] forgot to declare variable "disc_flags" --- libnetmd/libnetmd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libnetmd/libnetmd.c b/libnetmd/libnetmd.c index 6d57ad1..06dccc4 100644 --- a/libnetmd/libnetmd.c +++ b/libnetmd/libnetmd.c @@ -322,6 +322,7 @@ static void set_group_data(minidisc* md, const int group, const char* const name int netmd_initialize_disc_info(netmd_dev_handle* devh, minidisc* md) { int disc_size = 0; + int disc_flags = 0; char disc[256]; md->group_count = get_group_count(devh); -- 1.7.6.msysgit.0 --------------080604090704020306040608-- From Michael.Karcher@fu-berlin.de Sun Sep 18 17:50:25 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R5JdR-0002vb-9Y>; Sun, 18 Sep 2011 17:50:25 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R5JdR-0007IU-5V>; Sun, 18 Sep 2011 17:50:25 +0200 Received: from p548d38ce.dip.t-dialin.net ([84.141.56.206] helo=[192.168.2.109]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R5JdQ-00019q-VE>; Sun, 18 Sep 2011 17:50:25 +0200 From: Michael Karcher To: Thomas Arp Date: Sun, 18 Sep 2011 17:50:34 +0200 In-Reply-To: <4E7608AA.20008@gmx.de> References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> <4E7608AA.20008@gmx.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 7bit Message-ID: <1316361036.5253.63.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 84.141.56.206 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316361025-00005A17-FFA9F59F/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000008, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2011 15:50:26 -0000 Am Sonntag, den 18.09.2011, 17:05 +0200 schrieb Thomas Arp: > The key generation/exchange mechanism should go into > libnetmd. Maybe we should provide something like netmd_start_session() > and netmd_end_session() externally which set up and clean a secure > session inside libnetmd. Indeed it should. If you are going to implement that, you might want to take a look at the MDSession object in netmd/libnetmd.py. While I don't want to imply this is for sure the best way to design the interface, at least that interface seemed to work out quite nicely for the downloadhack script and gave the impression that will work for more complex implementations, too. Regards, Michael Karcher From manner.moe@gmx.de Tue Sep 20 22:53:06 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R67JR-0004sA-DU>; Tue, 20 Sep 2011 22:53:05 +0200 Received: from mailout-de.gmx.net ([213.165.64.23]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R67JR-0007tQ-5V>; Tue, 20 Sep 2011 22:53:05 +0200 Received: (qmail invoked by alias); 20 Sep 2011 20:53:04 -0000 Received: from dslb-088-070-045-233.pools.arcor-ip.net (EHLO [192.168.2.100]) [88.70.45.233] by mail.gmx.net (mp045) with SMTP; 20 Sep 2011 22:53:04 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1/uqIAcz2runLh/wtdBhaJA6s7Bqa+c713xO9NT1R eqf7zqOe6gXDNV Message-ID: <4E78FEA6.8080604@gmx.de> Date: Tue, 20 Sep 2011 22:59:18 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Michael Karcher , linux-minidisc@lists.fu-berlin.de References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> <4E7608AA.20008@gmx.de> <1316361036.5253.63.camel@localhost> In-Reply-To: <1316361036.5253.63.camel@localhost> Content-Type: multipart/mixed; boundary="------------070206010003020502020409" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.23 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316551985-00005A17-F66E1A36/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Gabun.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2011 20:53:06 -0000 This is a multi-part message in MIME format. --------------070206010003020502020409 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 18/09/2011 17:50, schrieb Michael Karcher: > Am Sonntag, den 18.09.2011, 17:05 +0200 schrieb Thomas Arp: >> The key generation/exchange mechanism should go into >> libnetmd. Maybe we should provide something like netmd_start_session() >> and netmd_end_session() externally which set up and clean a secure >> session inside libnetmd. > Indeed it should. If you are going to implement that, you might want to > take a look at the MDSession object in netmd/libnetmd.py. While I don't > want to imply this is for sure the best way to design the interface, at > least that interface seemed to work out quite nicely for the > downloadhack script and gave the impression that will work for more > complex implementations, too. > > Regards, > Michael Karcher > O.K., these are my changes until yet, Please take a look at it. Thomas --------------070206010003020502020409 Content-Type: text/plain; name="0001-move-key-exchange-mechanism-from-netmdcli-to-libnetm.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-move-key-exchange-mechanism-from-netmdcli-to-libnetm.pa"; filename*1="tch" RnJvbSAzYTVkMGZhMGY3OWQ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B4MDYsIDB4YzIsIDB4MmIsIDB4ODEsCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAweDQ5LCAweGJhLCAweGYwLCAweGRmLCAweDI2LCAweDlk LCAweGI3LCAweDFkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgMHg0OSwgMHhiYSwgMHhmMCwgMHhkZiwgMHgyNiwgMHg5ZCwgMHhiNywgMHgxZH07CisK K3N0YXRpYyBjb25zdCB1bnNpZ25lZCBjaGFyIGVrYl9zaWduYXR1cmVbXSA9IHsweGU4LCAw eGVmLCAweDczLCAweDQ1LCAweDhkLCAweDViLCAweDhiLCAweGY4LAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZTgsIDB4ZWYsIDB4NzMsIDB4 NDUsIDB4OGQsIDB4NWIsIDB4OGIsIDB4ZjgsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgMHgzOCwgMHg1YiwgMHg0OSwgMHgzNiwgMHg3YiwgMHg0 MiwgMHgwYywgMHg1OH07CisKK3N0YXRpYyB1bnNpZ25lZCBjaGFyIHJvb3RrZXlbXSA9IHsw eDEzLCAweDM3LCAweDEzLCAweDM3LCAweDEzLCAweDM3LCAweDEzLCAweDM3LAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTMsIDB4MzcsIDB4MTMsIDB4MzcsIDB4 MTMsIDB4MzcsIDB4MTMsIDB4Mzd9OworCitzdGF0aWMgdm9pZCBidWlsZF9la2IobmV0bWRf ZWtiICpla2IsIG5ldG1kX2tleWNoYWluICprZXljaGFpbiwgbmV0bWRfa2V5Y2hhaW4gKm5l eHQpCit7CisgICAgc2l6ZV90IGRvbmU7CisKKyAgICAvKiBidWlsZCBla2IgKi8KKyAgICBl a2ItPmlkID0gMHgyNjQyMjY0MjsKKyAgICBla2ItPmRlcHRoID0gOTsKKyAgICBla2ItPnNp Z25hdHVyZSA9IG1hbGxvYyhzaXplb2YoZWtiX3NpZ25hdHVyZSkpOworICAgIG1lbWNweShl a2ItPnNpZ25hdHVyZSwgZWtiX3NpZ25hdHVyZSwgc2l6ZW9mKGVrYl9zaWduYXR1cmUpKTsK KworICAgIC8qIGJ1aWxkIGVrYiBrZXkgY2hhaW4gKi8KKyAgICBla2ItPmNoYWluID0gTlVM TDsKKyAgICBmb3IgKGRvbmUgPSAwOyBkb25lIDwgc2l6ZW9mKGVrYl9jaGFpbik7IGRvbmUr PTE2VSkKKyAgICB7CisgICAgICAgIG5leHQgPSBtYWxsb2Moc2l6ZW9mKG5ldG1kX2tleWNo YWluKSk7CisgICAgICAgIGlmIChla2ItPmNoYWluID09IE5VTEwpIHsKKyAgICAgICAgICAg IGVrYi0+Y2hhaW4gPSBuZXh0OworICAgICAgICB9CisgICAgICAgIGVsc2UgeworICAgICAg ICAgICAga2V5Y2hhaW4tPm5leHQgPSBuZXh0OworICAgICAgICB9CisgICAgICAgIG5leHQt Pm5leHQgPSBOVUxMOworCisgICAgICAgIG5leHQtPmtleSA9IG1hbGxvYygxNik7CisgICAg ICAgIG1lbWNweShuZXh0LT5rZXksIGVrYl9jaGFpbiArIGRvbmUsIDE2KTsKKworICAgICAg ICBrZXljaGFpbiA9IG5leHQ7CisgICAgfQorfQorCitzdGF0aWMgdm9pZCBla2JfY2xlYW51 cChuZXRtZF9la2IgKmVrYiwgbmV0bWRfa2V5Y2hhaW4gKmtleWNoYWluLCBuZXRtZF9rZXlj aGFpbiAqbmV4dCkKK3sKKyAgICBmcmVlKGVrYi0+c2lnbmF0dXJlKTsKKyAgICBrZXljaGFp biA9IGVrYi0+Y2hhaW47CisgICAgd2hpbGUgKGtleWNoYWluICE9IE5VTEwpIHsKKyAgICAg ICAgbmV4dCA9IGtleWNoYWluLT5uZXh0OworICAgICAgICBmcmVlKGtleWNoYWluLT5rZXkp OworICAgICAgICBmcmVlKGtleWNoYWluKTsKKyAgICAgICAga2V5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c3Npb24gKnNlc3Npb24sIGNvbnN0IGNo YXIgKmZpbGUsIGNvbnN0IGNoYXIgKnRpdGxlKQoreworICAgIEZJTEUgKmY7CisgICAgbmV0 bWRfZXJyb3IgZXJyb3I7CisgICAgbmV0bWRfbG9nbGV2ZWwgbGV2ZWw7CisgICAgbmV0bWRf dHJhY2tfcGFja2V0cyAqcGFja2V0cyA9IE5VTEw7CisgICAgc2l6ZV90IHBhY2tldF9jb3Vu dCA9IDA7CisgICAgc3RydWN0IHN0YXQgc3RhdF9idWY7CisgICAgdW5zaWduZWQgY2hhciAq ZGF0YTsKKyAgICBzaXplX3QgZGF0YV9zaXplOworICAgIHNpemVfdCBmcmFtZXMgPSAwOwor ICAgIHVpbnQxNl90IHRyYWNrOworICAgIHVuc2lnbmVkIGNoYXIgdXVpZFs4XSA9IHsgMCB9 OworICAgIHVuc2lnbmVkIGNoYXIgbmV3X2NvbnRlbnRpZFsyMF0gPSB7IDAgfTsKKyAgICB1 bnNpZ25lZCBjaGFyIGtla1tdID0geyAweDE0LCAweGUzLCAweDgzLCAweDRlLCAweGUyLCAw eGQzLCAweGNjLCAweGE1IH07CisgICAgdW5zaWduZWQgY2hhciBjb250ZW50aWRbXSA9IHsg MHgwMSwgMHgwRiwgMHg1MCwgMHgwMCwgMHgwMCwgMHgwNCwgMHgwMCwgMHgwMCwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwLCAweDQ4LCAweEEyLCAweDhELCAw eDNFLCAweDFBLCAweDNCLCAweDBDLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDB4NDQsIDB4QUYsIDB4MmYsIDB4YTAgfTsKKworICAgIGlmKCFzZXNzaW9uLT5hY3Rp dmUpCisgICAgeworICAgICAgICBuZXRtZF9sb2coTkVUTURfTE9HX0VSUk9SLCAiTmV0TUQg c2Vzc2lvbiBub3QgaW5pdGlhbGl6ZWQgXG4iKTsKKyAgICAgICAgcmV0dXJuIE5FVE1EX1NF U1N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pOworICAgIGlmKGVycm9yKQorICAgICAgICByZXR1cm4gTkVU TURfU0VTU0lPTl9UUkFOU0ZFUl9GQUlMRUQ7CisKKyAgICAvKiBzZW5kIHRvIGRldmljZSAq LworICAgIGVycm9yID0gbmV0bWRfc2VjdXJlX3NlbmRfdHJhY2soc2Vzc2lvbi0+ZGV2aCwg TkVUTURfV0lSRUZPUk1BVF9MUDIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBORVRNRF9ESVNLRk9STUFUX0xQMiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGZyYW1lcywgcGFja2V0cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHBhY2tldF9jb3VudCwgc2Vzc2lvbi0+c2Vzc2lvbmtleSwKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZ0cmFjaywgdXVpZCwgbmV3X2NvbnRlbnRp ZCk7CisgICAgbGV2ZWwgPSAoZXJyb3IgPyBORVRNRF9MT0dfRVJST1IgOiBORVRNRF9MT0df REVCVUcpOworICAgIG5ldG1kX2xvZyhsZXZlbCwgIm5ldG1kX3NlY3VyZV9zZW5kX3RyYWNr OiAlc1xuIiwgbmV0bWRfc3RyZXJyb3IoZXJyb3IpKTsKKworICAgIC8qIGNsZWFudXAgKi8K KyAgICBuZXRtZF9jbGVhbnVwX3BhY2tldHMoJnBhY2tldHMpOworCisgICAgaWYoZXJyb3Ip CisgICAgICAgIHJldHVybiBORVRNRF9TRVNTSU9OX1RSQU5TRkVSX0ZBSUxFRDsKKworICAg IC8qIHNldCB0aXRsZSAqLworICAgIG5ldG1kX2xvZyhORVRNRF9MT0dfREVCVUcsICJOZXcg VHJhY2s6ICVkXG4iLCB0cmFjayk7CisgICAgbmV0bWRfY2FjaGVfdG9jKHNlc3Npb24tPmRl dmgpOworICAgIGlmKCFuZXRtZF9zZXRfdGl0bGUoc2Vzc2lvbi0+ZGV2aCwgdHJhY2ssIHR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ICAgICBjID0gZ2V0b3B0KGFyZ2MsIGFyZ3YsICJ2 Iik7CiAgICAgICAgIGlmIChjID09IC0xKSB7CiAgICAgICAgICAgICBicmVhazsKICAgICAg ICAgfQogICAgICAgICBzd2l0Y2ggKGMpIHsKLSAgICAgICAgY2FzZSAndCc6Ci0gICAgICAg ICAgICBuZXRtZF9zZXRfbG9nX2xldmVsKE5FVE1EX0xPR19BTEwpOworICAgICAgICBjYXNl ICd2JzoKKyAgICAgICAgICAgIGwgPSBhcmd2W29wdGluZF1bMF07CisgICAgICAgICAgICBz d2l0Y2ggKGwpIHsKKyAgICAgICAgICAgIGNhc2UgJzAnIDoKKyAgICAgICAgICAgICAgICBu ZXRtZF9zZXRfbG9nX2xldmVsKE5FVE1EX0xPR19OT05FKTsKKyAgICAgICAgICAgICAgICBi cmVhazsKKyAgICAgICAgICAgIGNhc2UgJzEnIDoKKyAgICAgICAgICAgICAgICBuZXRtZF9z ZXRfbG9nX2xldmVsKE5FVE1EX0xPR19FUlJPUik7CisgICAgICAgICAgICAgICAgYnJlYWs7 CisgICAgICAgICAgICBjYXNlICcyJyA6CisgICAgICAgICAgICAgICAgbmV0bWRfc2V0X2xv Z19sZXZlbChORVRNRF9MT0dfV0FSTklORyk7CisgICAgICAgICAgICAgICAgYnJlYWs7Cisg ICAgICAgICAgICBjYXNlICczJyA6CisgICAgICAgICAgICAgICAgbmV0bWRfc2V0X2xvZ19s ZXZlbChORVRNRF9MT0dfREVCVUcpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAg ICAgICAgY2FzZSAnNCcgOgorICAgICAgICAgICAgICAgIG5ldG1kX3NldF9sb2dfbGV2ZWwo TkVUTURfTE9HX0FMTCk7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBk ZWZhdWx0OgorICAgICAgICAgICAgICAgIGZwcmludGYoc3RkZXJyLCAiVW5rbm93biB2ZXJi b3NpdHkgbGV2ZWwgJyVpJ1xuIiwgbCk7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAg ICAgICAgICB9CiAgICAgICAgICAgICBicmVhazsKICAgICAgICAgZGVmYXVsdDoKICAgICAg ICAgICAgIGZwcmludGYoc3RkZXJyLCAiVW5rbm93biBvcHRpb24gJyVjJ1xuIiwgYyk7CkBA IC0yMzQsOCArMjMyLDggQEAgaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqIGFyZ3ZbXSkKICAg ICB9CiAKICAgICAvKiB1cGRhdGUgYXJndiBhbmQgYXJnYyBhZnRlciBwYXJzaW5nIG9wdGlv bnMgKi8KLSAgICBhcmd2ID0gJmFyZ3Zbb3B0aW5kIC0gMV07Ci0gICAgYXJnYyAtPSAob3B0 aW5kIC0gMSk7CisgICAgYXJndiA9ICZhcmd2W29wdGluZF07CisgICAgYXJnYyAtPSAob3B0 aW5kKTsKIAogICAgIC8qIHBhcnNlIGNvbW1hbmRzICovCiAgICAgaWYoYXJnYyA+IDEpCkBA IC00MDUsMTM5ICs0MDMsMTQgQEAgaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqIGFyZ3ZbXSkK ICAgICAgICAgICAgIGZjbG9zZShmKTsKICAgICAgICAgfQogICAgICAgICBlbHNlIGlmIChz dHJjbXAoInNlbmQiLCBhcmd2WzFdKSA9PSAwKSB7Ci0gICAgICAgICAgICBuZXRtZF9lcnJv ciBlcnJvcjsKLSAgICAgICAgICAgIG5ldG1kX2VrYiBla2I7Ci0gICAgICAgICAgICB1bnNp Z25lZCBjaGFyIGNoYWluW10gPSB7MHgyNSwgMHg0NSwgMHgwNiwgMHg0ZCwgMHhlYSwgMHhj YSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0LCAweGY5LCAw eDk2LCAweGJkLCAweGM4LCAweGE0LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDB4MDYsIDB4YzIsIDB4MmIsIDB4ODEsIDB4NDksIDB4YmEsCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhmMCwgMHhkZiwgMHgyNiwgMHg5ZCwgMHhi NywgMHgxZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ5LCAw eGJhLCAweGYwLCAweGRmLCAweDI2LCAweDlkLAotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDB4YjcsIDB4MWR9OwotICAgICAgICAgICAgdW5zaWduZWQgY2hhciBz aWduYXR1cmVbXSA9IHsweGU4LCAweGVmLCAweDczLCAweDQ1LCAweDhkLCAweDViLAotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDhiLCAweGY4LCAweGU4 LCAweGVmLCAweDczLCAweDQ1LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAweDhkLCAweDViLCAweDhiLCAweGY4LCAweDM4LCAweDViLAotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ5LCAweDM2LCAweDdiLCAweDQy LCAweDBjLCAweDU4fTsKLSAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgcm9vdGtleVtdID0g ezB4MTMsIDB4MzcsIDB4MTMsIDB4MzcsIDB4MTMsIDB4MzcsCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAweDEzLCAweDM3LCAweDEzLCAweDM3LCAweDEzLCAw eDM3LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMywgMHgz NywgMHgxMywgMHgzN307Ci0gICAgICAgICAgICBuZXRtZF9rZXljaGFpbiAqa2V5Y2hhaW47 Ci0gICAgICAgICAgICBuZXRtZF9rZXljaGFpbiAqbmV4dDsKLSAgICAgICAgICAgIHNpemVf dCBkb25lOwotICAgICAgICAgICAgdW5zaWduZWQgY2hhciBob3N0bm9uY2VbOF0gPSB7IDAg fTsKLSAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgZGV2bm9uY2VbOF0gPSB7IDAgfTsKLSAg ICAgICAgICAgIHVuc2lnbmVkIGNoYXIgc2Vzc2lvbmtleVs4XSA9IHsgMCB9OwotICAgICAg ICAgICAgdW5zaWduZWQgY2hhciBrZWtbXSA9IHsgMHgxNCwgMHhlMywgMHg4MywgMHg0ZSwg MHhlMiwgMHhkMywgMHhjYywgMHhhNSB9OwotICAgICAgICAgICAgdW5zaWduZWQgY2hhciBj b250ZW50aWRbXSA9IHsgMHgwMSwgMHgwRiwgMHg1MCwgMHgwMCwgMHgwMCwgMHgwNCwKLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAsIDB4MDAsIDB4 MDAsIDB4NDgsIDB4QTIsIDB4OEQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAweDNFLCAweDFBLCAweDNCLCAweDBDLCAweDQ0LCAweEFGLAotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyZiwgMHhhMCB9OwotICAg ICAgICAgICAgbmV0bWRfdHJhY2tfcGFja2V0cyAqcGFja2V0cyA9IE5VTEw7Ci0gICAgICAg ICAgICBzaXplX3QgcGFja2V0X2NvdW50ID0gMDsKLSAgICAgICAgICAgIHN0cnVjdCBzdGF0 IHN0YXRfYnVmOwotICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqZGF0YTsKLSAgICAgICAg ICAgIHNpemVfdCBkYXRhX3NpemU7Ci0KLSAgICAgICAgICAgIHVpbnQxNl90IHRyYWNrOwot ICAgICAgICAgICAgdW5zaWduZWQgY2hhciB1dWlkWzhdID0geyAwIH07Ci0gICAgICAgICAg ICB1bnNpZ25lZCBjaGFyIG5ld19jb250ZW50aWRbMjBdID0geyAwIH07Ci0KLSAgICAgICAg ICAgIGVycm9yID0gbmV0bWRfc2VjdXJlX2xlYXZlX3Nlc3Npb24oZGV2aCk7Ci0gICAgICAg ICAgICBwdXRzKG5ldG1kX3N0cmVycm9yKGVycm9yKSk7Ci0KLSAgICAgICAgICAgIGVycm9y ID0gbmV0bWRfc2VjdXJlX3NldF90cmFja19wcm90ZWN0aW9uKGRldmgsIDB4MDEpOwotICAg ICAgICAgICAgcHV0cyhuZXRtZF9zdHJlcnJvcihlcnJvcikpOwotCi0gICAgICAgICAgICBl cnJvciA9IG5ldG1kX3NlY3VyZV9lbnRlcl9zZXNzaW9uKGRldmgpOwotICAgICAgICAgICAg cHV0cyhuZXRtZF9zdHJlcnJvcihlcnJvcikpOwotCi0gICAgICAgICAgICAvKiBidWlsZCBl a2IgKi8KLSAgICAgICAgICAgIGVrYi5pZCA9IDB4MjY0MjI2NDI7Ci0gICAgICAgICAgICBl a2IuZGVwdGggPSA5OwotICAgICAgICAgICAgZWtiLnNpZ25hdHVyZSA9IG1hbGxvYyhzaXpl b2Yoc2lnbmF0dXJlKSk7Ci0gICAgICAgICAgICBtZW1jcHkoZWtiLnNpZ25hdHVyZSwgc2ln bmF0dXJlLCBzaXplb2Yoc2lnbmF0dXJlKSk7Ci0KLSAgICAgICAgICAgIC8qIGJ1aWxkIGVr YiBrZXkgY2hhaW4gKi8KLSAgICAgICAgICAgIGVrYi5jaGFpbiA9IE5VTEw7Ci0gICAgICAg ICAgICBmb3IgKGRvbmUgPSAwOyBkb25lIDwgc2l6ZW9mKGNoYWluKTsgZG9uZSs9MTZVKQot ICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIG5leHQgPSBtYWxsb2Moc2l6ZW9mKG5l dG1kX2tleWNoYWluKSk7Ci0gICAgICAgICAgICAgICAgaWYgKGVrYi5jaGFpbiA9PSBOVUxM KSB7Ci0gICAgICAgICAgICAgICAgICAgIGVrYi5jaGFpbiA9IG5leHQ7Ci0gICAgICAgICAg ICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICBr ZXljaGFpbi0+bmV4dCA9IG5leHQ7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAg ICAgIG5leHQtPm5leHQgPSBOVUxMOwotCi0gICAgICAgICAgICAgICAgbmV4dC0+a2V5ID0g bWFsbG9jKDE2KTsKLSAgICAgICAgICAgICAgICBtZW1jcHkobmV4dC0+a2V5LCBjaGFpbiAr IGRvbmUsIDE2KTsKLQotICAgICAgICAgICAgICAgIGtleWNoYWluID0gbmV4dDsKLSAgICAg ICAgICAgIH0KKyAgICAgICAgICAgIG5ldG1kX3Nlc3Npb24gc2Vzc2lvbjsKIAotICAgICAg ICAgICAgZXJyb3IgPSBuZXRtZF9zZWN1cmVfc2VuZF9rZXlfZGF0YShkZXZoLCAmZWtiKTsK LSAgICAgICAgICAgIHB1dHMobmV0bWRfc3RyZXJyb3IoZXJyb3IpKTsKLQotICAgICAgICAg ICAgLyogY2xlYW51cCAqLwotICAgICAgICAgICAgZnJlZShla2Iuc2lnbmF0dXJlKTsKLSAg ICAgICAgICAgIGtleWNoYWluID0gZWtiLmNoYWluOwotICAgICAgICAgICAgd2hpbGUgKGtl eWNoYWluICE9IE5VTEwpIHsKLSAgICAgICAgICAgICAgICBuZXh0ID0ga2V5Y2hhaW4tPm5l eHQ7Ci0gICAgICAgICAgICAgICAgZnJlZShrZXljaGFpbi0+a2V5KTsKLSAgICAgICAgICAg ICAgICBmcmVlKGtleWNoYWluKTsKLSAgICAgICAgICAgICAgICBrZXljaGFpbiA9IG5leHQ7 CisgICAgICAgICAgICBpZihuZXRtZF9kb3dubG9hZF9wb3NzaWJsZShkZXZoLCBhcmd2WzJd LCBORVRNRF9XSVJFRk9STUFUX0xQMikpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg ICAgaWYoIW5ldG1kX3N0YXJ0X3Nlc3Npb24oJnNlc3Npb24sIGRldmgpKQorICAgICAgICAg ICAgICAgICAgICBuZXRtZF9zZW5kX3RyYWNrKCZzZXNzaW9uLCBhcmd2WzJdLCAidGVzdCIp OworICAgICAgICAgICAgICAgIG5ldG1kX2xlYXZlX3Nlc3Npb24oJnNlc3Npb24pOwogICAg ICAgICAgICAgfQotCi0gICAgIC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cywgJnBhY2tldF9j b3VudCwga2VrKTsKLSAgICAgICAgICAgIHB1dHMobmV0bWRfc3RyZXJyb3IoZXJyb3IpKTsK LQotICAgICAgICAgICAgLyogc2VuZCB0byBkZXZpY2UgKi8KLSAgICAgICAgICAgIGVycm9y ID0gbmV0bWRfc2VjdXJlX3NlbmRfdHJhY2soZGV2aCwgTkVUTURfV0lSRUZPUk1BVF9MUDIs Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5FVE1EX0RJ U0tGT1JNQVRfTFAyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoZGF0YV9zaXplIC0gNjApIC8gMTkyLCBwYWNrZXRzLAotICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWNrZXRfY291bnQsIHNlc3Npb25rZXks Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZ0cmFjaywg dXVpZCwgbmV3X2NvbnRlbnRpZCk7Ci0gICAgICAgICAgICBwdXRzKG5ldG1kX3N0cmVycm9y KGVycm9yKSk7Ci0KLSAgICAgICAgICAgIC8qIGNsZWFudXAgKi8KLSAgICAgICAgICAgIG5l dG1kX2NsZWFudXBfcGFja2V0cygmcGFja2V0cyk7Ci0KLSAgICAgICAgICAgIC8qIHNldCB0 aXRsZSAqLwotICAgICAgICAgICAgbmV0bWRfbG9nKE5FVE1EX0xPR19ERUJVRywgIk5ldyBU cmFjazogJWRcbiIsIHRyYWNrKTsKLSAgICAgICAgICAgIG5ldG1kX2NhY2hlX3RvYyhkZXZo KTsKLSAgICAgICAgICAgIG5ldG1kX3NldF90aXRsZShkZXZoLCB0cmFjaywgInRlc3QiKTsK LSAgICAgICAgICAgIG5ldG1kX3N5bmNfdG9jKGRldmgpOwotCi0gICAgICAgICAgICAvKiBj b21taXQgdHJhY2sgKi8KLSAgICAgICAgICAgIGVycm9yID0gbmV0bWRfc2VjdXJl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zYWdlcyAoREVGQVVMVCkiKTsKKyAgICBwdXRzKCIgICAgICAgICAgICAg ICAgIDIgLSBkaXNwbGF5IHdhcm5pbmcgbWVzc2FnZXMiKTsKKyAgICBwdXRzKCIgICAgICAg ICAgICAgICAgIDMgLSBkaXNwbGF5IG90aGVyIGRlYnVnIG1lc3NhZ2VzIik7CisgICAgcHV0 cygiICAgICAgICAgICAgICAgICA0IC0gZW5hYmxlIHRyYWNpbmcgb2YgVVNCIGNvbW1hbmQg YW5kIHJlc3BvbnNlIGRhdGEiKTsKICAgICBwdXRzKCJDb21tYW5kczoiKTsKICAgICBwdXRz KCJyZW5hbWUgIyA8c3RyaW5nPiAtIHJlbmFtZSB0cmFjayAjIHRvIDxzdHJpbmc+IHRyYWNr IG51bWJlcnMgYXJlIG9mZiBieSBvbmUgKGllIHRyYWNrIDEgaXMgMCkiKTsKICAgICBwdXRz KCJtb3ZlICMxICMyIC0gbWFrZSB0cmFjayAjMSB0cmFjayAjMiIpOwotLSAKMS43LjYubXN5 c2dpdC4wCgo= --------------070206010003020502020409-- From Michael.Karcher@fu-berlin.de Thu Sep 22 22:02:17 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R6pTJ-0000nH-2C>; Thu, 22 Sep 2011 22:02:13 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R6pTJ-0000Ly-07>; Thu, 22 Sep 2011 22:02:13 +0200 Received: from manz-590f0dca.pool.mediaways.net ([89.15.13.202] helo=[192.168.1.2]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R6pTI-0003lf-RF>; Thu, 22 Sep 2011 22:02:12 +0200 From: Michael Karcher To: Thomas Arp Date: Thu, 22 Sep 2011 22:02:30 +0200 In-Reply-To: <4E78FEA6.8080604@gmx.de> References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> <4E7608AA.20008@gmx.de> <1316361036.5253.63.camel@localhost> <4E78FEA6.8080604@gmx.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 7bit Message-ID: <1316721751.5253.96.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 89.15.13.202 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316721733-00005A17-56C62B19/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2011 20:02:17 -0000 Am Dienstag, den 20.09.2011, 22:59 +0200 schrieb Thomas Arp: > Am 18/09/2011 17:50, schrieb Michael Karcher: > > Am Sonntag, den 18.09.2011, 17:05 +0200 schrieb Thomas Arp: > >> The key generation/exchange mechanism should go into > >> libnetmd. Maybe we should provide something like netmd_start_session() > >> and netmd_end_session() externally which set up and clean a secure > >> session inside libnetmd. > > Indeed it should. If you are going to implement that, you might want to > > take a look at the MDSession object in netmd/libnetmd.py. While I don't > > want to imply this is for sure the best way to design the interface, at > > least that interface seemed to work out quite nicely for the > > downloadhack script and gave the impression that will work for more > > complex implementations, too. > > > > Regards, > > Michael Karcher > > > O.K., these are my changes until yet, Please take a look at it. Thanks for your efforts. Some comments follow. Adding a trace debug level seems like a good idea. > while (1) { > - c = getopt(argc, argv, "t"); > + c = getopt(argc, argv, "v"); > if (c == -1) { > break; > } > switch (c) { > - case 't': > - netmd_set_log_level(NETMD_LOG_ALL); > + case 'v': > + l = argv[optind][0]; Please do it correctly. Your new option "v" expects an argument, so it must be "v:" instead of "v" in the option list. If you fix that, you will find that "argv[optind]" does not point where you expect it to point to, because argv[optind] is what getopt is going to process next, and if getopt knows that the number after "-v" belongs to "-v", optind will be past the debug level. Instead use "optarg" which points to the argument of the current option. > - argv = &argv[optind - 1]; > - argc -= (optind - 1); > + argv = &argv[optind]; > + argc -= (optind); This hunk breaks the option parsing in case there is no -v option. In fact, this is just a work-around due to your earlier mis-use of getopt. If you fix the errors pointed out in the previous paragraph, this change is unneeded. > --- a/libnetmd/secure.c > +++ b/libnetmd/secure.c > @@ -372,7 +372,7 @@ void netmd_transfer_song_packets(netmd_dev_handle *dev, > > /* ... send it */ > error = libusb_bulk_transfer((libusb_device_handle*)dev, 2, packet, (int)packet_size, &transferred, 10000); > - netmd_log(NETMD_LOG_DEBUG, "%d %d\n", packet_size, error); > + netmd_log(NETMD_LOG_DEBUG, "Packets transferred: %d %s\n", packet_size, strerror(error)); > > /* cleanup */ > free(packet); This is not going to work as you expect. libusb error codes are not compatible with strerror, and a libusb_strerror function does not (yet) exist. Just output the error code number for now. See http://www.libusb.org/ticket/102 and http://libusb.6.n5.nabble.com/libusb-102-Support-the-libusb-strerror-function-td3555193.html for background information. I don't think net_get_disc_flags and netmd_get_recording_paramters really belong into session.c. For net_get_disc_flags, I am quite sure that putting it next to the disk and group info functions (that is in libnetmd.c) is the most sensible solution. For netmd_get_recording_parameters, I would suggest to use playercontrol.c with the prospective of adding a "record from analog input" command, too. AFAIK this command exists. You might want to factor out this pattern: > + error = netmd_secure_enter_session(session->devh); > + level = (error ? NETMD_LOG_ERROR : NETMD_LOG_DEBUG); > + netmd_log(level, "netmd_secure_enter_session: %s\n", netmd_strerror(error)); > + if(error) > + return NETMD_SESSION_FAILED; to just read if(netmd_log_check(netmd_secure_enter_session(session->devh), "netmd_secure_enter_session")) return NETMD_SESSION_FAILED; with a function netmd_log_check remaining to be written. I don't think "parsing (chopping the header)" the sound file to download and doing the data transfer in the same function is a great idea. Thus I propose to not have > + /* read source */ > + stat(file, &stat_buf); > + data_size = (size_t)stat_buf.st_size; > + data = malloc(data_size); > + f = fopen(file, "rb"); > + fseek(f, 60, SEEK_CUR); > + fread(data, data_size - 60, 1, f); > + fclose(f); > + frames = (data_size - 60) / 192; > + > + error = netmd_prepare_packets(data, data_size-60, &packets, &packet_count, kek); > + level = (error ? NETMD_LOG_ERROR : NETMD_LOG_DEBUG); > + netmd_log(level, "netmd_prepare_packets: %s\n", netmd_strerror(error)); > + if(error) > + return NETMD_SESSION_TRANSFER_FAILED; inside netmd_send_track, but have it in a separate function netmd_read_track instead (which may or may not be a part of libnetmd). That function should also determine the codec of the file. The same applies to netmd_download_possible which also implies that the data you are going to send *has* to be in a named file, so you can't do a check like this if you just know you are going to receive 3.2MB data via HTTP streaming. As libnetmd is a general-purpose library, in my oppinion the download mechanism should depend on the type of the data source as less as possible. Currently, I'm having a design in mind where you have a netmd_audio_file_open function that determines codec and frame count and packet layout (currently the code is using one packet only, which we could keep for now), puts that into a netmd_data_source structure together with a "read" callback that reads one packet worth of data. It's the job of the "open" function to decide how the data is packetized. Why do you add a netmd_receive_track function stub to session.c? We already have a corecctly working track receiption code in secure.c, and track receiption does not make use of encryption at all, so we don't need to mess with sessions to receive tracks. Anyhow, the design of the interface is not something that needs to be done with this patch, on the other hand, the error checking needs to go in. So from my point of view, there is no serious reason not to commit your code if you fix the argument handling, remove the bad strerror invocation and drop the pointless "receive in session" stub. Remaining issues can be fixed later. (or discussed to not get "fixed" at all) Your code has been tested to work on the Sony MZ-RH1 and the Sharp IM-MT899. Regards, Michael Karcher From manner.moe@gmx.de Fri Sep 23 20:14:07 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R7AGC-0000Rc-T6>; Fri, 23 Sep 2011 20:14:05 +0200 Received: from mailout-de.gmx.net ([213.165.64.23]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R7AGC-0006Ot-Lf>; Fri, 23 Sep 2011 20:14:04 +0200 Received: (qmail invoked by alias); 23 Sep 2011 18:14:03 -0000 Received: from dslc-082-083-130-197.pools.arcor-ip.net (EHLO [192.168.2.100]) [82.83.130.197] by mail.gmx.net (mp011) with SMTP; 23 Sep 2011 20:14:03 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1+e69ZyhkOeG7SKRnc2UwBSJEQrx+6FOcXU5DvbUu kv0hWrNHTHVZH8 Message-ID: <4E7CCDBE.1070301@gmx.de> Date: Fri, 23 Sep 2011 20:19:42 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Michael Karcher , linux-minidisc@lists.fu-berlin.de References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> <4E7608AA.20008@gmx.de> <1316361036.5253.63.camel@localhost> <4E78FEA6.8080604@gmx.de> <1316721751.5253.96.camel@localhost> In-Reply-To: <1316721751.5253.96.camel@localhost> Content-Type: multipart/mixed; boundary="------------010902040504030504020207" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.23 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316801645-00005A17-CE40E5D1/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000275, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Algerien.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2011 18:14:08 -0000 This is a multi-part message in MIME format. --------------010902040504030504020207 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 22/09/2011 22:02, schrieb Michael Karcher: > You might want to factor out this pattern: >> + error = netmd_secure_enter_session(session->devh); >> + level = (error ? NETMD_LOG_ERROR : NETMD_LOG_DEBUG); >> + netmd_log(level, "netmd_secure_enter_session: %s\n", netmd_strerror(error)); >> + if(error) >> + return NETMD_SESSION_FAILED; > to just read > > if(netmd_log_check(netmd_secure_enter_session(session->devh), > "netmd_secure_enter_session")) > return NETMD_SESSION_FAILED; > > with a function netmd_log_check remaining to be written. > O.K., sounds good. As some functions might produce logs of NETMD_LOG_WARNING type on errors i also added netmd_loglevel as a parameter to netmd_log_check() to set the correct loglevel for this function. > Why do you add a netmd_receive_track function stub to session.c? We > already have a corecctly working track receiption code in secure.c, ... This seems not to work correctly on windows. Download with SonicStage and the python scripts work fine, but if i try netmdcli i got following: F:\minidisc\netmdcli\debug>netmdcli -v 3 recv 12 test.wav Net MD/Hi-MD . . 52 49 46 46 .... (writing wav header) /* works fine */ . . 0,0% 0,0% 0,0% 0,0% 0,0% 0,0% 0,0% 0,0% 0,0% 0,0% 0,0% 0,0% 0,0% ^C F:\minidisc\netmdcli\debug> My RH1 stuck showing "standby", i had to break the code and remove/reinsert the disc got get access to it. This was when trying to recieve the LP2.wav test file i successfully downloaded before. But i am working on finding the error. > So from my point of view, there is no serious reason not to commit > your code if you fix the argument handling, remove the bad strerror > invocation and drop the pointless "receive in session" stub. Remaining > issues can be fixed later. (or discussed to not get "fixed" at all) > > Your code has been tested to work on the Sony MZ-RH1 and the Sharp > IM-MT899. > > Regards, > Michael Karcher > I fixed this in the attached patch. Thomas --------------010902040504030504020207 Content-Type: text/plain; name="0002-fixed-option-parsing-in-netmdcli-fixed-log-message-i.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0002-fixed-option-parsing-in-netmdcli-fixed-log-message-i.pa"; filename*1="tch" RnJvbSA0MWI1MjMyYzJiMTQ5OWMzMjQzZThkNTZhZWM1Y2MxOWY3YTY5ODIyIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBUaG9tYXMgQXJwIDxtYW5uZXIubW9lQGdteC5kZT4K RGF0ZTogRnJpLCAyMyBTZXAgMjAxMSAxOTozMDo1NCArMDIwMApTdWJqZWN0OiBbUEFUQ0gg Mi8yXSBmaXhlZCBvcHRpb24gcGFyc2luZyBpbiBuZXRtZGNsaSwgZml4ZWQgbG9nIG1lc3Nh Z2UgaW4KIG5ldG1kX3RyYW5zZmVyX3NvbmdfcGFja2V0cywgcmVtb3ZlZCB1bm5lZWRlZAog bmV0bWRfcmVjaWV2ZV90cmFjayBmdW5jdGlvbiBpbiBzZXNzaW9uLmMsIGltcGxlbWVudGVk CiBuZXRtZF9sb2dfY2hlY2sgZnVuY3Rpb24sIG1vdmVkIHNvbWUgZnVuY3Rpb25zIGluc2lk ZQogbGlibmV0bWQgc291cmNlIGFuZCBoZWFkZXIgZmlsZXMKCi0tLQogbGlibmV0bWQvbGli bmV0bWQuYyAgICAgIHwgICAxOSArKysrKysKIGxpYm5ldG1kL2xpYm5ldG1kLmggICAgICB8 ICAgIDkgKysrCiBsaWJuZXRtZC9sb2cuYyAgICAgICAgICAgfCAgIDEwICsrKwogbGlibmV0 bWQvbG9nLmggICAgICAgICAgIHwgICAxMyArKysrCiBsaWJuZXRtZC9wbGF5ZXJjb250cm9s LmMgfCAgIDM1ICsrKysrKysrKysrCiBsaWJuZXRtZC9wbGF5ZXJjb250cm9sLmggfCAgICA5 ICsrKwogbGlibmV0bWQvc2VjdXJlLmMgICAgICAgIHwgICAgMiArLQogbGlibmV0bWQvc2Vz c2lvbi5jICAgICAgIHwgIDE1MiArKysrKysrKysrKystLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tCiBsaWJuZXRtZC9zZXNzaW9uLmggICAgICAgfCAgIDI4IC0tLS0tLS0t LQogbmV0bWRjbGkvbmV0bWRjbGkuYyAgICAgIHwgICAgOCArLQogMTAgZmlsZXMgY2hhbmdl ZCwgMTM5IGluc2VydGlvbnMoKyksIDE0NiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9s aWJuZXRtZC9saWJuZXRtZC5jIGIvbGlibmV0bWQvbGlibmV0bWQuYwppbmRleCBiZWJhN2Jk Li5iNDA0MGE3IDEwMDY0NAotLS0gYS9saWJuZXRtZC9saWJuZXRtZC5jCisrKyBiL2xpYm5l dG1kL2xpYm5ldG1kLmMKQEAgLTI4OSw2ICsyODksMjUgQEAgc3RhdGljIHZvaWQgc2V0X2dy b3VwX2RhdGEobWluaWRpc2MqIG1kLCBjb25zdCBpbnQgZ3JvdXAsIGNvbnN0IGNoYXIqIGNv bnN0IG5hbWUKICAgICByZXR1cm47CiB9CiAKK2ludCBuZXRtZF9nZXRfZGlzY19mbGFncyhu ZXRtZF9kZXZfaGFuZGxlKiBkZXYpCit7CisgICAgaW50IHJldCA9IC0xOworICAgIHVuc2ln bmVkIGNoYXIgZGlzY19mbGFnc19yZXF1ZXN0W10gPSB7MHgwMCwgMHgxOCwgMHgwNiwgMHgw MSwgMHgxMCwgMHgxMCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDB4MDAsIDB4ZmYsIDB4MDAsIDB4MDAsIDB4MDEsIDB4MDAsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBiICB9OworICAgIHVuc2lnbmVkIGNo YXIgcmVzcG9uc2VbMTRdOworCisgICAg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VRNRF9OT19FUlJPUjsKIH0KKwordWludDE2X3QgbmV0bWRfZ2V0X3JlY29yZGlu Z19wYXJhbWV0ZXJzKG5ldG1kX2Rldl9oYW5kbGUgKmRldikKK3sKKyAgICBpbnQgcmV0ID0g LTE7CisgICAgY2hhciAqZW5jOworICAgIHVuc2lnbmVkIGNoYXIgcmVjX3BhcmFtX3JlcXVl c3RbXSA9IHsweDAwLCAweDE4LCAweDA5LCAweDgwLCAweDAxLCAweDAzLCAweDMwLCAweDg4 LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxLCAweDAw LCAweDMwLCAweDg4LCAweDA1LCAweDAwLCAweDMwLCAweDg4LAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAweDA3LCAweDAwLCAweGZmLCAweDAwLCAweDAw LCAweDAwLCAweDAwLCAweDAwfTsKKyAgICB1bnNpZ25lZCBjaGFyIHJlc3BvbnNlWzM4XTsK KworICAgIHJldCA9IG5ldG1kX2V4Y2hfbWVzc2FnZShkZXYsIHJlY19wYXJhbV9yZXF1ZXN0 LCAweDE4LCByZXNwb25zZSk7CisgICAgaWYocmV0IDwgMCB8fCByZXNwb25zZVswXSAhPSBO RVRNRF9TVEFUVVNfQUNDRVBURUQpCisgICAgeworICAgICAgICBuZXRtZF9sb2coTkVUTURf TE9HX1dBUk5JTkcsICJuZXRtZF9nZXRfcmVjb3JkaW5nX3BhcmFtZXRlcnMgZmFpbGVkXG4i KTsKKyAgICAgICAgcmV0dXJuIDA7CisgICAgfQorCisgICAgLyogZm9sbG93aW5nIHN3aXRj aCBjYXNlIGNsYXVzZSBub3QgcmVhbGx5IG5lZWRlZCwganVzdCBmb3IgZGVidWcgb3V0cHV0 ICovCisgICAgc3dpdGNoIChyZXNwb25zZVszNF0pIHsKKyAgICBjYXNlIE5FVE1EX0VOQ09E SU5HX1NQIDoKKyAgICAgICAgZW5jID0gKChyZXNwb25zZVszNV0gJiAxKSA/ICJTUCB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9nKGxldmVsLCAibmV0 bWRfcHJlcGFyZV9wYWNrZXRzOiAlc1xuIiwgbmV0bWRfc3RyZXJyb3IoZXJyb3IpKTsKLSAg ICBpZihlcnJvcikKKyAgICBpZihuZXRtZF9sb2dfY2hlY2sobmV0bWRfcHJlcGFyZV9wYWNr ZXRzKGRhdGEsIGRhdGFfc2l6ZS02MCwgJnBhY2tldHMsICZwYWNrZXRfY291bnQsIGtlayks CisgICAgICAgICAgICAgICAgICAgICAgIE5FVE1EX0xPR19FUlJPUiwKKyAgICAgICAgICAg ICAgICAgICAgICAgIm5ldG1kX3ByZXBhcmVfcGFja2V0cyIpKQogICAgICAgICByZXR1cm4g TkVUTURfU0VTU0lPTl9UUkFOU0ZFUl9GQUlMRUQ7CiAKICAgICAvKiBzZW5kIHRvIGRldmlj ZSAqLwotICAgIGVycm9yID0gbmV0bWRfc2VjdXJlX3NlbmRfdHJhY2soc2Vzc2lvbi0+ZGV2 aCwgTkVUTURfV0lSRUZPUk1BVF9MUDIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBORVRNRF9ESVNLRk9STUFUX0xQMiwKLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGZyYW1lcywgcGFja2V0cywKLSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHBhY2tldF9jb3VudCwgc2Vzc2lvbi0+c2Vzc2lvbmtleSwKLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZ0cmFjaywgdXVpZCwgbmV3X2NvbnRl bnRpZCk7Ci0gICAgbGV2ZWwgPSAoZXJyb3IgPyBORVRNRF9MT0dfRVJST1IgOiBORVRNRF9M T0dfREVCVUcpOwotICAgIG5ldG1kX2xvZyhsZXZlbCwgIm5ldG1kX3NlY3VyZV9zZW5kX3Ry YWNrOiAlc1xuIiwgbmV0bWRfc3RyZXJyb3IoZXJyb3IpKTsKLQotICAgIC8qIGNsZWFudXAg Ki8KLSAgICBuZXRtZF9jbGVhbnVwX3BhY2tldHMoJnBhY2tldHMpOwotCi0gICAgaWYoZXJy b3IpCisgICAgaWYobmV0bWRfbG9nX2NoZWNrKG5ldG1kX3NlY3VyZV9zZW5kX3RyYWNrKHNl c3Npb24tPmRldmgsIE5FVE1EX1dJUkVGT1JNQVRfTFAyLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBORVRNRF9ESVNLRk9STUFUX0xQMiwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWVzLCBw YWNrZXRzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBwYWNrZXRfY291bnQsIHNlc3Npb24tPnNlc3Npb25rZXksCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZ0cmFjaywgdXVpZCwgbmV3X2NvbnRl bnRpZCksCisgICAgICAgICAgICAgICAgICAgICAgIE5FVE1EX0xPR19FUlJPUiwKKyAgICAg ICAgICAgICAgICAgICAgICAgIm5ldG1kX3NlY3VyZV9zZW5kX3RyYWNrIikpCisgICAgewor ICAgICAgICBuZXRtZF9jbGVhbnVwX3BhY2tldHMoJnBhY2tldHMpOwogICAgICAgICByZXR1 cm4gTkVUTURfU0VTU0lPTl9UUkFOU0ZFUl9GQUlMRUQ7CisgICAgfQorCisgICAgbmV0bWRf Y2xlYW51cF9wYWNrZXRzKCZwYWNrZXRzKTsKIAogICAgIC8qIHNldCB0aXRsZSAqLwogICAg IG5ldG1kX2xvZyhORVRNRF9MT0dfREVCVUcsICJOZXcgVHJhY2s6ICVkXG4iLCB0cmFjayk7 CkBAIC0zNDQsMTkgKzI3NiwxMyBAQCBuZXRtZF9lcnJvciBuZXRtZF9zZW5kX3RyYWNrKG5l dG1kX3Nlc3Npb24gKnNlc3Npb24sIGNvbnN0IGNoYXIgKmZpbGUsIGNvbnN0IGNoYQogICAg IG5ldG1kX3N5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bmV0bWRjbGkvbmV0bWRjbGkuYwpAQCAtMTk3LDEz ICsxOTcsMTMgQEAgaW50IG1haW4oaW50IGFyZ2MsIGNoYXIqIGFyZ3ZbXSkKIAogICAgIC8q IHBhcnNlIG9wdGlvbnMgKi8KICAgICB3aGlsZSAoMSkgewotICAgICAgICBjID0gZ2V0b3B0 KGFyZ2MsIGFyZ3YsICJ2Iik7CisgICAgICAgIGMgPSBnZXRvcHQoYXJnYywgYXJndiwgInY6 Iik7CiAgICAgICAgIGlmIChjID09IC0xKSB7CiAgICAgICAgICAgICBicmVhazsKICAgICAg ICAgfQogICAgICAgICBzd2l0Y2ggKGMpIHsKICAgICAgICAgY2FzZSAndic6Ci0gICAgICAg ICAgICBsID0gYXJndltvcHRpbmRdWzBdOworICAgICAgICAgICAgbCA9IG9wdGFyZ1swXTsK ICAgICAgICAgICAgIHN3aXRjaCAobCkgewogICAgICAgICAgICAgY2FzZSAnMCcgOgogICAg ICAgICAgICAgICAgIG5ldG1kX3NldF9sb2dfbGV2ZWwoTkVUTURfTE9HX05PTkUpOwpAQCAt MjMyLDggKzIzMiw4IEBAIGludCBtYWluKGludCBhcmdjLCBjaGFyKiBhcmd2W10pCiAgICAg fQogCiAgICAgLyogdXBkYXRlIGFyZ3YgYW5kIGFyZ2MgYWZ0ZXIgcGFyc2luZyBvcHRpb25z ICovCi0gICAgYXJndiA9ICZhcmd2W29wdGluZF07Ci0gICAgYXJnYyAtPSAob3B0aW5kKTsK KyAgICBhcmd2ID0gJmFyZ3Zbb3B0aW5kIC0gMV07CisgICAgYXJnYyAtPSAob3B0aW5kIC0g MSk7CiAKICAgICAvKiBwYXJzZSBjb21tYW5kcyAqLwogICAgIGlmKGFyZ2MgPiAxKQotLSAK MS43LjYubXN5c2dpdC4wCgo= --------------010902040504030504020207-- From manner.moe@gmx.de Fri Sep 23 21:26:18 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R7BO5-00032q-Kq>; Fri, 23 Sep 2011 21:26:17 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with smtp (envelope-from ) id <1R7BO5-00062z-G4>; Fri, 23 Sep 2011 21:26:17 +0200 Received: (qmail invoked by alias); 23 Sep 2011 19:26:16 -0000 Received: from dslc-082-083-130-197.pools.arcor-ip.net (EHLO [192.168.2.100]) [82.83.130.197] by mail.gmx.net (mp058) with SMTP; 23 Sep 2011 21:26:16 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX1/Rp78KF0fR6/UlUrGRmElrU0nOup45pV6IY+/ubL /0merucjS8XH6c Message-ID: <4E7CDEC0.5050402@gmx.de> Date: Fri, 23 Sep 2011 21:32:16 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Michael Karcher , linux-minidisc@lists.fu-berlin.de References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> <4E7608AA.20008@gmx.de> <1316361036.5253.63.camel@localhost> <4E78FEA6.8080604@gmx.de> <1316721751.5253.96.camel@localhost> In-Reply-To: <1316721751.5253.96.camel@localhost> Content-Type: multipart/alternative; boundary="------------050704050603000709010408" X-Y-GMX-Trusted: 0 X-Originating-IP: 213.165.64.22 X-ZEDAT-Hint: A X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316805977-00005A17-ACDAECB3/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.003129, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Burundi.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=HTML_MESSAGE, RATWARE_GECKO_BUILD,SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2011 19:26:18 -0000 This is a multi-part message in MIME format. --------------050704050603000709010408 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 22/09/2011 22:02, schrieb Michael Karcher: > Why do you add a netmd_receive_track function stub to session.c? We > already have a corecctly working track receiption code in secure.c Are you sure that it is working correctly? This is the main code for the bulk transfer in netmd_secure_real_recv_track(...) : . . . read=libusb_bulk_transfer((libusb_device_handle*)dev,0x81,data,(int)chunksize,&transferred,10000); if (read >= 0) { done += (uint32_t)read; fwrite(data, (uint32_t)read, 1, file); . . . read is the return code fromlibusb_bulk_transfer. So if return code is 0 which means no error, data size of 0 will be written to the file and 0 will be added to the "done" variable. We have to use the variable "transferred" to check the data size. So the code must look like this: read=libusb_bulk_transfer((libusb_device_handle*)dev,0x81,data,(int)chunksize,&transferred,10000); if (read >= 0) { done += (uint32_t)transferred; fwrite(data, (uint32_t)transferred, 1, file); This works, please change this. I do not make a patch because i am working on other changes and do not want to rebase yet. Thomas --------------050704050603000709010408 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Am 22/09/2011 22:02, schrieb Michael Karcher:
Why do you add a netmd_receive_track function stub to session.c? We already have a corecctly working track receiption code in secure.c

Are you sure that it is working correctly?
This is the main code for the bulk transfer in netmd_secure_real_recv_track(...) :
.
.
.
read = libusb_bulk_transfer((libusb_device_handle*)dev, 0x81, data, (int)chunksize, &transferred, 10000);
        if (read >= 0) {
            done += (uint32_t)read;
            fwrite(data, (uint32_t)read, 1, file);
.
.
.

read is the return code from libusb_bulk_transfer. So if return code is 0 which means no error, 
data size of 0 will be written to the file and 0 will be added to the "done" variable.
We have to use the variable "transferred" to check the data size. So the code must look like this:

read = libusb_bulk_transfer((libusb_device_handle*)dev, 0x81, data, (int)chunksize, &transferred, 10000);
        if (read >= 0) {
            done += (uint32_t)transferred;
            fwrite(data, (uint32_t)transferred, 1, file);

This works, please change this. I do not make a patch because i am working on other changes and do not want to rebase yet.

Thomas


--------------050704050603000709010408-- From glaubitz@physik.fu-berlin.de Fri Sep 23 21:32:59 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R7BUY-0003Gh-DV>; Fri, 23 Sep 2011 21:32:58 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R7BUY-0004xI-7x>; Fri, 23 Sep 2011 21:32:58 +0200 Received: from 182.80-203-34.nextgentel.com ([80.203.34.182] helo=[10.0.0.3]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R7BUY-0006uF-44>; Fri, 23 Sep 2011 21:32:58 +0200 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=us-ascii From: John Paul Adrian Glaubitz In-Reply-To: <4E7CDEC0.5050402@gmx.de> Date: Fri, 23 Sep 2011 21:32:57 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <0AC09EA1-437B-4E37-84AA-3078F26EE3BD@physik.fu-berlin.de> References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> <4E7608AA.20008@gmx.de> <1316361036.5253.63.camel@localhost> <4E78FEA6.8080604@gmx.de> <1316721751.5253.96.camel@localhost> <4E7CDEC0.5050402@gmx.de> To: Thomas Arp X-Mailer: Apple Mail (2.1244.3) X-Originating-IP: 80.203.34.182 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316806378-00005A17-E3CB601D/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.016827, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: Michael Karcher , linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2011 19:32:59 -0000 On Sep 23, 2011, at 9:32 PM, Thomas Arp wrote: > read is the return code from=20 > libusb_bulk_transfer. So if return code is 0 which means no error,=20 > data size of 0 will be written to the file and 0 will be added to the = "done" variable. > We have to use the variable "transferred" to check the data size. So = the code must look like this: >=20 > read =3D libusb_bulk_transfer((libusb_device_handle*)dev, 0x81, data, = (int)chunksize, &transferred, 10000); > if (read >=3D 0) { > done +=3D (uint32_t)transferred; > fwrite(data, (uint32_t)transferred, 1, file > ); >=20 > This works, please change this. I do not make a patch because i am = working on other changes and do not want to rebase yet. Good point, thanks for finding this. I'm actually the one to blame for = this change. It's a result of the porting from libusb 0.0.1 to 1.0.0. I verified downloads = to work, but not uploads, since I don't have an MZ-RH1 lying around here. You're definitely right. I guess uploads didn't work before your fix then? (They shouldn't ;)). Adrian From linux-minidisc@lists.fu-berlin.de Fri Sep 23 21:59:31 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R7BuE-0004FI-5s>; Fri, 23 Sep 2011 21:59:30 +0200 Received: from mail-forward2.uio.no ([129.240.10.71]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R7BuE-0000hK-1C>; Fri, 23 Sep 2011 21:59:30 +0200 Received: from exim by mail-out2.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1R7BuD-0007iR-Lz for linux-minidisc@lists.fu-berlin.de; Fri, 23 Sep 2011 21:59:29 +0200 Received: from mail-mx3.uio.no ([129.240.10.44]) by mail-out2.uio.no with esmtp (Exim 4.75) (envelope-from ) id 1R7BuD-0007iO-LF for linux-minidisc@lists.fu-berlin.de; Fri, 23 Sep 2011 21:59:29 +0200 Received: from div-8021x-dhcp077.uio.no ([193.157.176.86] helo=z6) by mail-mx3.uio.no with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R7BuD-0004Sd-A6 for linux-minidisc@lists.fu-berlin.de; Fri, 23 Sep 2011 21:59:29 +0200 Received: from mkarcher by z6 with local (Exim 4.76) (envelope-from ) id 1R7BuC-0007dn-V2 for linux-minidisc@lists.fu-berlin.de; Fri, 23 Sep 2011 21:59:29 +0200 To: linux-minidisc@lists.fu-berlin.de Content-Type: text/plain; charset=utf-8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 332edaed148ca64d82f021969781fb9486e73cb8 X-Git-Newrev: 2385a9b763d740b0e9a5bccd2d298b4f943ac152 Message-Id: From: Michael Karcher Date: Fri, 23 Sep 2011 21:59:28 +0200 X-UiO-Spam-info: not spam, SpamAssassin (score=0.0, required=5.0, autolearn=disabled, FSL_HELO_NON_FQDN_1=0.001, HELO_NO_DOMAIN=0.001, uiobl=NO, uiouri=NO) X-UiO-Scanned: F4454A3FB6B39E44C044366D58CBDFFDE865044F X-UiO-SPAM-Test: remote_host: 193.157.176.86 spam_score: 0 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 108 max/h 3 blacklist 0 greylist 0 ratelimit 0 X-Originating-IP: 129.240.10.71 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316807970-00005A17-32C21C56/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Botsuana.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none Subject: [linux-minidisc] [commit] Linux utilities to deal with Sony Minidisc Walkman branch master updated. 2385a9b763d740b0e9a5bccd2d298b4f943ac152 X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2011 19:59:31 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Linux utilities to deal with Sony Minidisc Walkman". The branch, master has been updated via 2385a9b763d740b0e9a5bccd2d298b4f943ac152 (commit) from 332edaed148ca64d82f021969781fb9486e73cb8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2385a9b763d740b0e9a5bccd2d298b4f943ac152 Author: Michael Karcher Date: Fri Sep 23 21:47:51 2011 +0200 Fix upload Thanks to Thomas Arp for reporting the bug and suggesting a fix. ----------------------------------------------------------------------- Summary of changes: libnetmd/secure.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- Linux utilities to deal with Sony Minidisc Walkman From glaubitz@physik.fu-berlin.de Fri Sep 23 22:00:16 2011 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R7Bux-0004I2-D6>; Fri, 23 Sep 2011 22:00:15 +0200 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R7Bux-0000nD-B5>; Fri, 23 Sep 2011 22:00:15 +0200 Received: from squeeze64.physik.fu-berlin.de ([160.45.66.239]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1R7Bux-0006Js-4G for linux-minidisc@lists.fu-berlin.de; Fri, 23 Sep 2011 22:00:15 +0200 Received: from glaubitz by squeeze64.physik.fu-berlin.de with local (Exim 4.72 #1 (Debian)) id 1R7Bux-0000yi-37 for ; Fri, 23 Sep 2011 22:00:15 +0200 Resent-From: John Paul Adrian Glaubitz Resent-Date: Fri, 23 Sep 2011 22:00:15 +0200 Resent-Message-ID: <20110923200015.GA3754@physik.fu-berlin.de> Resent-To: linux-minidisc@lists.fu-berlin.de Received: from deliver1.zedat.fu-berlin.de ([130.133.4.79]) by mbox5.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R7BsW-00060Z-I1>; Fri, 23 Sep 2011 21:57:44 +0200 Received: from dispatch2.zedat.fu-berlin.de ([130.133.4.71]) by deliver1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R7BsU-0008VJ-QO>; Fri, 23 Sep 2011 21:57:42 +0200 Received: from dispatch1.zedat.fu-berlin.de ([130.133.4.70]) by dispatch2.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R7BsO-0002mF-HL>; Fri, 23 Sep 2011 21:57:36 +0200 Received: from inpost1.zedat.fu-berlin.de ([130.133.4.68]) by dispatch1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R7BsM-00046F-Rp>; Fri, 23 Sep 2011 21:57:34 +0200 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by inpost1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R7BsM-0002qr-Pi>; Fri, 23 Sep 2011 21:57:34 +0200 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by outpost1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@zedat.fu-berlin.de with esmtp (envelope-from ) id <1R7BsM-0007RJ-NX>; Fri, 23 Sep 2011 21:57:34 +0200 Received: from mailout-de.gmx.net ([213.165.64.22]) by relay1.zedat.fu-berlin.de (Exim 4.69) for glaubitz@physik.fu-berlin.de with smtp (envelope-from ) id <1R7BsM-0000Wn-Ju>; Fri, 23 Sep 2011 21:57:34 +0200 Received: (qmail invoked by alias); 23 Sep 2011 19:57:34 -0000 Received: from dslc-082-083-130-197.pools.arcor-ip.net (EHLO [192.168.2.100]) [82.83.130.197] by mail.gmx.net (mp040) with SMTP; 23 Sep 2011 21:57:34 +0200 X-Authenticated: #17747474 X-Provags-ID: V01U2FsdGVkX183CuNW5Z43hhWSc0BvF42xVmR6M0x/yWfXoLVyJn jcIccwT8M3FduX Message-ID: <4E7CE61D.6030604@gmx.de> Date: Fri, 23 Sep 2011 22:03:41 +0200 From: Thomas Arp User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: John Paul Adrian Glaubitz References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> <4E7608AA.20008@gmx.de> <1316361036.5253.63.camel@localhost> <4E78FEA6.8080604@gmx.de> <1316721751.5253.96.camel@localhost> <4E7CDEC0.5050402@gmx.de> <0AC09EA1-437B-4E37-84AA-3078F26EE3BD@physik.fu-berlin.de> In-Reply-To: <0AC09EA1-437B-4E37-84AA-3078F26EE3BD@physik.fu-berlin.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316807854-00005A17-47D482C9/0-0/0-0 Resent-Sender: John Paul Adrian Glaubitz X-Originating-IP: 160.45.64.218 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316808015-00005A17-799EB7A3/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=RATWARE_GECKO_BUILD, SPF_HELO_PASS,SPF_PASS Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2011 20:00:16 -0000 Am 23/09/2011 21:32, schrieb John Paul Adrian Glaubitz: > On Sep 23, 2011, at 9:32 PM, Thomas Arp wrote: > >> read is the return code from >> libusb_bulk_transfer. So if return code is 0 which means no error, >> data size of 0 will be written to the file and 0 will be added to the "done" variable. >> We have to use the variable "transferred" to check the data size. So the code must look like this: >> >> read = libusb_bulk_transfer((libusb_device_handle*)dev, 0x81, data, (int)chunksize,&transferred, 10000); >> if (read>= 0) { >> done += (uint32_t)transferred; >> fwrite(data, (uint32_t)transferred, 1, file >> ); >> >> This works, please change this. I do not make a patch because i am working on other changes and do not want to rebase yet. > Good point, thanks for finding this. I'm actually the one to blame for this change. It's > a result of the porting from libusb 0.0.1 to 1.0.0. I verified downloads to work, but > not uploads, since I don't have an MZ-RH1 lying around here. > > You're definitely right. > > I guess uploads didn't work before your fix then? (They shouldn't ;)). > > Adrian > Yes, uploads didnīt work before. But there seems to be another bug. vlc does not play the uploaded LP2 test track, an uploaded SP track plays fine in vlc. Maybe there is incompatible/incorrect data in the wav header? wav header and audio data seems to be stored correctly. Thomas From Michael.Karcher@fu-berlin.de Fri Sep 23 22:04:14 2011 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]) by list1.zedat.fu-berlin.de (Exim 4.69) for linux-minidisc@lists.fu-berlin.de with esmtp (envelope-from ) id <1R7Byn-0004Rr-V9>; Fri, 23 Sep 2011 22:04:14 +0200 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1R7Byn-00089V-Sq>; Fri, 23 Sep 2011 22:04:13 +0200 Received: from manz-d933e1c9.pool.mediaways.net ([217.51.225.201] helo=[192.168.1.2]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1R7Byn-0008VG-OB>; Fri, 23 Sep 2011 22:04:13 +0200 From: Michael Karcher To: Thomas Arp Date: Fri, 23 Sep 2011 22:04:10 +0200 In-Reply-To: <4E7CDEC0.5050402@gmx.de> References: <4E73B2DD.2030201@gmx.de> <4E73C01D.2080703@gmx.de> <35FF911D-A6D4-424F-A426-EEDDBECAFCD9@physik.fu-berlin.de> <4E7608AA.20008@gmx.de> <1316361036.5253.63.camel@localhost> <4E78FEA6.8080604@gmx.de> <1316721751.5253.96.camel@localhost> <4E7CDEC0.5050402@gmx.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.2- Content-Transfer-Encoding: 7bit Message-ID: <1316808254.4512.2.camel@localhost> Mime-Version: 1.0 X-Originating-IP: 217.51.225.201 X-purgate: clean X-purgate-type: clean X-purgate-ID: 151147::1316808253-00005A17-033F83C3/0-0/0-0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.248821, version=1.2.2 X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.0.4 on Dschibuti.ZEDAT.FU-Berlin.DE X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED Cc: linux-minidisc@lists.fu-berlin.de Subject: Re: [linux-minidisc] "netmdcli send" does not break on errors X-BeenThere: linux-minidisc@lists.fu-berlin.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: Mailing list for the linux-minidisc project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2011 20:04:14 -0000 Am Freitag, den 23.09.2011, 21:32 +0200 schrieb Thomas Arp: > Am 22/09/2011 22:02, schrieb Michael Karcher: > > Why do you add a netmd_receive_track function stub to session.c? We > > already have a corecctly working track receiption code in secure.c > Are you sure that it is working correctly? It once was working correctly, as Adrian alread said. > We have to use the variable "transferred" to check the data size. So > the code must look like this: Thanks for the report and the fix. It is committed in 2385a9b. Regards, Michael Karcher