From owner-freebsd-arm@freebsd.org Fri Feb 9 15:54:46 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ADD4F0E048 for ; Fri, 9 Feb 2018 15:54:46 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 240096A0DC for ; Fri, 9 Feb 2018 15:54:46 +0000 (UTC) (envelope-from ian@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id D5976F0E026; Fri, 9 Feb 2018 15:54:45 +0000 (UTC) Delivered-To: arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3011F0E025 for ; Fri, 9 Feb 2018 15:54:45 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E1966A0DB for ; Fri, 9 Feb 2018 15:54:44 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 86c8052a-0db1-11e8-91c6-33ffc249f3e8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 86c8052a-0db1-11e8-91c6-33ffc249f3e8; Fri, 09 Feb 2018 15:54:36 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w19FsYUr026910; Fri, 9 Feb 2018 08:54:34 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1518191674.32585.136.camel@freebsd.org> Subject: Re: solved, was Re: serial on neopi neo From: Ian Lepore To: Daniel Braniss , "freebsd-arm@freebsd.org" Date: Fri, 09 Feb 2018 08:54:34 -0700 In-Reply-To: <421A858F-AC30-4BE5-8641-E7C8DDDA0493@cs.huji.ac.il> References: <0291231B-F939-4EB9-BD20-AD32B8E768D2@cs.huji.ac.il> <421A858F-AC30-4BE5-8641-E7C8DDDA0493@cs.huji.ac.il> Content-Type: text/plain; charset="windows-1251" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2018 15:54:46 -0000 On Fri, 2018-02-09 at 12:28 +0200, Daniel Braniss wrote: > > > > > On 9 Feb 2018, at 12:02, Daniel Braniss > > wrote: > > > > > > > > > > > > On 8 Feb 2018, at 17:30, Daniel Braniss > > > wrote: > > > > > > hi, > > > after fiddling with the dts file (with the help from Milo), I got > > > 2 serial ports to work(apart from the /dev/ttyu0), > > > but not together! ie, if i try each one individually all is ok, > > > but once I open both of them, only > > > /dev/ttyu1 works, /dev/ttyu2 hangs (i have yet to see if its the > > > output or input) > > > > > > any ideas? > > I have! > > > > I’m using the ‘what i thought’ unused pins (CTS/RTS) to drive some > > leds! > > > > I do set, via tcsetattr(3) to ignore these (ie no modem, no flow > > control) but it seems the driver is ignoring this. > > how can I tell the serial/uart to ignore them? > was sent out too early! > > doing a cfmakeraw(3) is what screwed me up! > now all is ok! That's strange, because I was about to reply to the prior mail suggesting you start with a cfmakeraw() before tcsetattr().  I always start with makeraw then set just the things I want, like:     tcgetattr(fd, &t);     cfmakeraw(&t);     t.c_iflag &= ~(IXON | IXOFF | IXANY);     t.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS);     t.c_cflag |= CLOCAL | CREAD | CS8;     cfsetspeed(&t, whatever);     tcwriteattr(fd, TCSANOW, &t); -- Ian