From owner-freebsd-hackers@freebsd.org Fri Oct 27 11:59:26 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0263E41D60 for ; Fri, 27 Oct 2017 11:59:26 +0000 (UTC) (envelope-from kevans91@ksu.edu) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0077.outbound.protection.outlook.com [104.47.38.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2963B1FBD for ; Fri, 27 Oct 2017 11:59:24 +0000 (UTC) (envelope-from kevans91@ksu.edu) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ksu.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Kw/mv1ype7P0sdmWnkBjWRFPkU0YmBpMNJ4fqWURGio=; b=TWUugXxvAravqg2m/cBhr1nmuUZpI6bzeY23GwbFcIgpdkstdWFNqOFmBjK1PMfUMyV1VGauaV//MOR4tiqjHr0io36ZWYmxW/QEndAW4Y9jzMYbkZ2MoywA3deKJQGuYU6Wbm358+OhAXqbEoRLsyjT8/os6bfehLqMVUMhEgA= Received: from BN3PR05CA0021.namprd05.prod.outlook.com (10.174.64.31) by SN1PR05MB1965.namprd05.prod.outlook.com (10.162.132.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.3; Fri, 27 Oct 2017 11:59:21 +0000 Received: from BL2NAM02FT025.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::200) by BN3PR05CA0021.outlook.office365.com (2603:10b6:400::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.197.4 via Frontend Transport; Fri, 27 Oct 2017 11:59:21 +0000 Authentication-Results: spf=pass (sender IP is 129.130.18.151) smtp.mailfrom=ksu.edu; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=bestguesspass action=none header.from=ksu.edu; Received-SPF: Pass (protection.outlook.com: domain of ksu.edu designates 129.130.18.151 as permitted sender) receiver=protection.outlook.com; client-ip=129.130.18.151; helo=ome-vm-smtp2.campus.ksu.edu; Received: from ome-vm-smtp2.campus.ksu.edu (129.130.18.151) by BL2NAM02FT025.mail.protection.outlook.com (10.152.77.151) with Microsoft SMTP Server id 15.20.156.4 via Frontend Transport; Fri, 27 Oct 2017 11:59:21 +0000 Received: from calypso.engg.ksu.edu (calypso.engg.ksu.edu [129.130.43.181]) by ome-vm-smtp2.campus.ksu.edu (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id v9RBxKYY018674 for ; Fri, 27 Oct 2017 06:59:21 -0500 Received: by calypso.engg.ksu.edu (Postfix, from userid 110) id BD17124834E; Fri, 27 Oct 2017 06:59:20 -0500 (CDT) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) by calypso.engg.ksu.edu (Postfix) with ESMTPA id 8DDC324834F for ; Fri, 27 Oct 2017 06:59:18 -0500 (CDT) Received: by mail-io0-f182.google.com with SMTP id j17so12147536iod.5 for ; Fri, 27 Oct 2017 04:59:18 -0700 (PDT) X-Gm-Message-State: AMCzsaVaEnrmS7I5s4W5KMHxFtl7pXqK7j0l006//qfKUT6R7HKwKU1J HE6YTz5ARx7YwIdBZVHC2OtA0ifJ6rJ5l5mxyn0= X-Google-Smtp-Source: ABhQp+RDzVgQFRqsULdDaaKNCWSH/QWL2ix/fW9uTlO3mhbFA0fVruPE6zbmVZt1UdTh429aXZE8bd+mgl8yLv1j4B8= X-Received: by 10.107.27.7 with SMTP id b7mr266880iob.136.1509105557209; Fri, 27 Oct 2017 04:59:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.23.129 with HTTP; Fri, 27 Oct 2017 04:59:16 -0700 (PDT) Received: by 10.107.23.129 with HTTP; Fri, 27 Oct 2017 04:59:16 -0700 (PDT) In-Reply-To: References: From: Kyle Evans Date: Fri, 27 Oct 2017 06:59:16 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: We do serial differently. To: Zaphod Beeblebrox CC: FreeBSD Hackers X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:129.130.18.151; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(376002)(39860400002)(2980300002)(438002)(24454002)(199003)(189002)(93886005)(5660300001)(229853002)(106466001)(786003)(246002)(478600001)(316002)(16586007)(42186006)(8676002)(2950100002)(88552002)(61266001)(2906002)(55446002)(53546010)(45336002)(59536001)(8576002)(305945005)(106002)(46386002)(512874002)(54206008)(356003)(498394004)(95326003)(9686003)(54356999)(50986999)(189998001)(8936002)(76176999)(1411001)(90966002)(61726006)(3480700004)(75432002)(236005)(5890100001)(86362001)(4326008)(84326002)(6246003)(93516999)(6862004)(55456009); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR05MB1965; H:ome-vm-smtp2.campus.ksu.edu; FPR:; SPF:Pass; PTR:ip-18-151.net.ksu.edu; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT025; 1:hrwTLvCNQuq7cTNGA0INlcDOL8Gx1FE4JyZdpowWXdVnqWD1+2IX1XKb3cty7/HOkRY9qg7qIM+jow2q9asuMGphTEhJhEP/hR9tOOdHRssEZ1fjwVklhzVDQ/DnkvpT X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d53c4417-68bc-4bf9-ee24-08d51d3228f9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:SN1PR05MB1965; X-Microsoft-Exchange-Diagnostics: 1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grjjTTnIT9aXCJbAsQ1H9NKX8RDJ7Z9IPTH3WCJgQWbieuPVGe+89oNMPiUU0YVZcLNS4TjUuphLJiE6qv9+WxG8mAIm00Yzoc0191/xyIdBr2nP3pEMNZ4E2M5otx56MJu92FHfvm5AaVAKuFkqzoEHVBYz7Wv/6rJbesv+pbaCPySTzSN+EV58BSLxDPqRlDxR6wUDWPUCg2GnkHhlWW7Jg/gvKTJ/sWqI6RbpklkMMfDlDmzXd4vV6bB2p97RcEqGnkPI0fBQ/HvdZ21kJ1gWl5Dn0pmjtG2m94BmaafhHbTuGd0Mv8CVG3+HCnK4NVfCfUmAPAkE/D3MOfim+c8gfna390rUTKa3XyJWGvAg9yu36V/FPlVNNGwF+4zajBe+OgPmRV8Lk7NwcM/cl9q0mJ2GQU9fqg6BuEpWnAUSHYvbJUdqljpWjno2qnbLgaRuVHJ1R1uD06NLcrIHvwymQhcm/2FeG9sPNNqghM9tR+ X-Exchange-Antispam-Report-Test: UriScan:(112903893386949)(21532816269658); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(3231020)(93006095)(93004095)(3002001)(6041248)(20161123558100)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR05MB1965; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR05MB1965; X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1965; 4:CwCyqf+CN/rHtlmG+V9v9ZEW2qHzelKbK4nB26SVENb898uMwQ7vmCqBkoRGZLyKN4pcitosx83cHg756wYJgjKtOU3LEzdXi2tex4EmrtoIaIqEA7zZQZMMKXuaWLJYhF/xYgKSJ2k7Rj+Voukwy76KaHGwCNnoWeEJWY1Cmew2DltYj11IULYhgHTDRSi+d8KTMC13AHPCS+ncxc83dwEACTnUTIT1gyF9Oym3Ix5y3673gwYspASD8Gb2hRmOihnQ98QuHsqtWNzzutNYLJRW1nf2A0iISSMs4MJxkoofy2kNz0XZ0XR38QniJTNkYRtM3GU/xK1YwzXeNo/akzKLUEEtuJIQF3ltvscyOfg= X-Forefront-PRVS: 0473A03F3F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR05MB1965; 23:Eu2n4Q+NgQLLnVZzZKw09uMhllGsdgduRb45CBop8?= =?us-ascii?Q?o3UTW+MIlroYMt9+E1DLsAqqVey4f07+p13n2EHE30n9PVtfUgZL7/8rDuQ0?= =?us-ascii?Q?CHojGLeGRmpFPX+UiU3aqHLA5B6ioLE3+TD3FxIBVNjOJhqALHI1fvJkY2ZD?= =?us-ascii?Q?wdiFcO+2BtdZdINEufUOz0y4Gxl5YYiuZSIeWRBrsRtA9vq16VNEcBUVL+79?= =?us-ascii?Q?fAQeS8PWeFx/mGLmZ7VuLUnzc9G8Gcr3J4RXgWNhuOaylh8PMZKcbvroEiH1?= =?us-ascii?Q?Fh0u+o0mGqFZt+9SJu5VpME7xNnSLVhVp7j2SxYKpKFjyuSgqWliU2gv7s3N?= =?us-ascii?Q?V/6OYQY4LADNJw8OfHHVsRZm5UhmxlAIyqmWNq5rrY2CPpew6g37XOCMtN2i?= =?us-ascii?Q?7cGmi6TXaseqSHtkoV5xj+hChf3PYo6vlo4L88B8f7ZrxZ9zWWL8imTTxn79?= =?us-ascii?Q?f6wjkqbGPsBvBfj33Qp9VK18dextRGpzww4vUXOF+kPXbuzdq1ZO024+dvmK?= =?us-ascii?Q?yMiKdUhbHduDYjX5FXPLw3M+S+w1c+5Io4t9+LbWdBTka68TDGxFGvf5/fc1?= =?us-ascii?Q?Snv5TZbdOmU0oYHqaVto3Y0QVSUHLPudRIoTfaogLkqIiLQnkDuF9y4I73fg?= =?us-ascii?Q?FV6NPc4u4/tBolDi6KCv4L4bU2bYVvKHQRav2mRAXHu2CqPlHxeGt9HUdFi6?= =?us-ascii?Q?vp4uNnAn+f890KE5pqAUgczISEALEUtl0iAZfhx2MBlhEhgPxex3fAL41FS1?= =?us-ascii?Q?m2E5tBwM9gICPSfpJZAIksP+MYQNHR442M/f7VhbQYOdDFQWKd25MV2MqljG?= =?us-ascii?Q?rkLvyosW051NZRzj8XfGIWOyj6bbU2fU88O9GFf3stfjCFrW1vGeMwFx9Er6?= =?us-ascii?Q?9AV6m1QRZY3wthRzUOTxwZSF1DvBmzJWhG/p/sjKZYxQUWA4ADxaoLSn40Bj?= =?us-ascii?Q?Xg+pAvx4rHeUFX07KR8sVvVcIz889K9aGUT2AN6e6i6OSqy3uG1SCIBms8R+?= =?us-ascii?Q?NkIVmE6pkwjvDU8SC8HzAwHL76XmJdiXjRbMT654DzSI4kC5jZPa1SrRE26b?= =?us-ascii?Q?4w36ybmOjQisHzpbLpFS8jGq3YhftBtbWIGNVhC/xlXInN9FM/Hs3tf6Dpvk?= =?us-ascii?Q?nCOGKWUPTJHTNGq1Uc0pv9R5hOtru0wGZmamm8v83Uvyc3kq+Z7x6XUz0ET5?= =?us-ascii?Q?v9B15MAPzaH+06mk5fwJDosJ7NM4GgyrcFZkXUnVbLR9VqRwZK44+HIJfjWa?= =?us-ascii?Q?z2NyhBicHunH+gZvMbgouheh7TgcphgWXnRzzBdgYK17yOkRADeNbg0oGGoz?= =?us-ascii?B?Zz09?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1965; 6:sRjW5VdkQlz5zQHEP+ghaBNxMgTGqf770ifDqFbCnce4vZVDaH07pXD3DQ1ItHnRWg81Aq9ZTpK5sgFknKZoEF+DJ5cfHtZho1GWHeNx+KbgSRzljwRVUYjU3RWDof3c9JhWPqXBj2oTakLqCv0+wzdrxOvb6JeetrlLXBnyS8UMbvOReAUNmC9CQp0wLOvvBepmO26HLKhLRH4PSUjjOEe0ewh1ClrK+TUGHTesTnZbqFpgy7oGWmaKnIlMMGR8EH3iMdig9GxtAkxq1C/AABZJ/cflZqrwbM0/QpaNi2stpPfx412BusRtp48g/FLsr5yFJwO5jjVu0+akzWPNL40qPt8saC6y6x0SCSWyIQg=; 5:fVlelmTUuOB3+dR/pAvow4I1Iuo4CoqGvTRryTYqAisx+WpUzlov+/btW4zZLqR9nAGoG78bL0AlpFQfywoLlSDxZ01Pt6ikW1X+y5W+EHcvAzKY2AgLY+/BqZUXuIbXQZZy0FOm3mEsrUXl2rxgswEVyNeyHL+YRqRBBYTs8Pc=; 24:Ng+uXHXJYDohnWxwZD+p+YWFNpJVnaTVuf4qUwLu6mmXYX9syzxMY4KSAld1Y7On6YqVXO9vI0KAERZIaXuLxLamyq3nGDdEf0JOeZmKCpI=; 7:vjnH9UM2yeV0bHczlhRXlJkZhFAlyx+ccZXxDbnzgrtcbQxgvpy7/24vuBlBy76A7ihTFHERx/6JdtDVRoUri+Kh1PsC8so1uwNjr1EvavjESIsrZj45dWBwhvUJTgrdxPs9DtmVPQx7kGtHdAXcjr1taC2aeAMN5xZnILq7g0TybsgwXM7uYQ6tU9SftDj3ZpNaduUMVCqFe2JOhgAxhkS27y12YiM1QkawFLCT86V5qrOX2+PlhGnUzQILScwv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR05MB1965; 20:Yh5S+X6E3t2bXDRQlBqgNPaXmv3IK69Iq2l03Uci8+FNge9sLvtxvV08bX/xvozN9xStN1bBSsUGNtpK8/YZeNrzUF6n1fijPi3YYqHOgwkIkREnf3jZ1B0EM19EgBcw9AQ21oho23jKb6wR1DAhHSGVmDQmKA7D643uuRVU5bM= X-OriginatorOrg: ksu.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2017 11:59:21.3956 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d53c4417-68bc-4bf9-ee24-08d51d3228f9 X-MS-Exchange-CrossTenant-Id: d9a2fa71-d67d-4cb6-b541-06ccaa8013fb X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d9a2fa71-d67d-4cb6-b541-06ccaa8013fb; Ip=[129.130.18.151]; Helo=[ome-vm-smtp2.campus.ksu.edu] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR05MB1965 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Oct 2017 11:59:27 -0000 What happens if you just invoke printcore directly, like the example script in the printrun readme? Pronterface has got to be doing something not-entirely-sane here. The reset should always coincide with the port being open()d, and it should behave like the Arduino IDE and cu(1) do. The mega doesn't really have any crazy requirements just to function properly. On Oct 26, 2017 11:46 PM, "Zaphod Beeblebrox" wrote: OK. I played with this all again ... a bit. Firstly, when I run "arduino" (the IDE) ... the arduino board resets immediately (I can tell this because it has an LCD screen attached). But when I run pronterface, it doesn't reset until 5 seconds (roughly) after pronterface exits. I tried adding a hardcoded setDTR(0) or setDTR(1) near this code ... but it doesn't seem to make any palpable difference. On Wed, Oct 25, 2017 at 1:11 PM, Kyle Evans wrote: > On Wed, Oct 25, 2017 at 11:43 AM, Kyle Evans wrote: > >> On Wed, Oct 25, 2017 at 11:34 AM, Zaphod Beeblebrox >> wrote: >> >>> On Mon, Oct 23, 2017 at 9:45 AM, Kyle Evans wrote: >>> >>>> Hi, >>>> >>>> Are you able to connect to it otherwise (w/ cu or friends) and issue, >>>> say, an M105 manually? >>>> >>> >>> yes. With CU I can connect, it resets, then I can issue an "M105" >>> and it parrots back some status. >>> >> >> Ok, cool, that's expected and sounds like Pronterface is doing something >> it shouldn't be. >> >> I'll poke at it a little bit more- last I checked, it didn't look like it >> was doing anything too crazy with pyserial and I've got a working OctoPrint >> (w/ pyserial) setup, so I know that works to some extent. >> >> > For the sake of argument, can you try applying the following patch [1] to > printrun? I don't see a need to be toggling DTR here, and that might narrow > things down a little bit. > > [1] > diff --git a/printrun/printcore.py b/printrun/printcore.py > index b54e750..fd531c3 100644 > --- a/printrun/printcore.py > +++ b/printrun/printcore.py > @@ -218,11 +218,6 @@ class printcore(): > parity = PARITY_ODD) > self.printer.close() > self.printer.parity = PARITY_NONE > - try: #this appears not to work on many platforms, so > we're going to call it but not care if it fails > - self.printer.setDTR(dtr); > - except: > - #self.logError(_("Could not set DTR on this > platform")) #not sure whether to output an error message > - pass > self.printer.open() > except SerialException as e: > self.logError(_("Could not connect to %s at baudrate > %s:") % (self.port, self.baud) + > > >