From owner-freebsd-hackers@freebsd.org Thu Oct 26 22:43:40 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 D0CEEE548C5 for ; Thu, 26 Oct 2017 22:43:40 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5617B6C663 for ; Thu, 26 Oct 2017 22:43:40 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by mail-wm0-x22a.google.com with SMTP id m72so326938wmc.1 for ; Thu, 26 Oct 2017 15:43:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DbiW1SlmTdmF5l4Gt5cBD21o/j72CLVRZk9TqxTbBMk=; b=PnkII1qyrxBP3ArtVKyUobEFuXLRY/hDW3ff7X/fhymc29TxK1v9qZ0IEbQMRpRYBq GZDSnFDdXx5jRuNqrWCWO2cL7pu7o/YwdsGolWR4K7B5xLPSvgHEpRnhm4OlEYx/9X/r +3FCGRRiMWr2l6lgY0+esW8elouC8qWzEUmaClHWxlZtAVl3vuo0A2k/plPrKEZdQBTB 06NicinlMW1TPP47LegK0udMorqXrXqUe/+Uku91+arz/zt/PmW2xFtSPYYd3JZwew4y A3keEmX2TvxUNNNopTYUFrUBLvLz9s1ZSSCwF3/vJaz3f8R4ov+PfcE0nl894oyV4szK yp9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DbiW1SlmTdmF5l4Gt5cBD21o/j72CLVRZk9TqxTbBMk=; b=Vg0MNbYna3q9vsHFQdkVT0j1F5HHsjgaHJlLaCZjjpEuEYPlPPpRZPDuyF4dqhZA5O CmTUpS5xYmPDwFcB6nCuPcVuKdPU+orsWqeEjSBta+RkKWs+M4Y46yMTp5nCEqdszhgs f/N8dWtiIF309kSPkOaaqnaLvukKl4lg3ZOo+J21P9xFsVhxV1KM12AkTbIYyiGou59o h9HYnLt8goJEU9knXgkrpF8SIhJqVgk3dpHrjKnMwVr0xPjVE07/4N4TXFfws30QTEMW TwC8V95hCoVX1CstJTxHUri36UXzwPWnxVaHPAG7gWKEYr2KqCUi2yVwDIYuGzjiMJcz qSlg== X-Gm-Message-State: AMCzsaU4/4sDiaKbkEA1cJZIV61CMJXfLmcHySlrEQa96/uw8oRUUiLd cwyasNYsGcHICwcAU3GQ0bKJhUgy+eC34SIW5w== X-Google-Smtp-Source: ABhQp+Rc+Z/V0Ij/IjFtW4Uis+dsj5+/oHG892rDaW5f5tNidDjxeNT382qe9jqqKYWxVuJ5RQPdYtV5J+H9qeUh3T0= X-Received: by 10.80.137.91 with SMTP id f27mr28835843edf.18.1509057818694; Thu, 26 Oct 2017 15:43:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.189.139 with HTTP; Thu, 26 Oct 2017 15:43:38 -0700 (PDT) In-Reply-To: References: From: Zaphod Beeblebrox Date: Thu, 26 Oct 2017 18:43:38 -0400 Message-ID: Subject: Re: We do serial differently. To: Kyle Evans Cc: FreeBSD Hackers 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: Thu, 26 Oct 2017 22:43:40 -0000 Since this didn't work, is the problem maybe (rather) that the application is opening and closing the port too fast (continually resetting the arduino) rather than this? 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) + > > >