From owner-freebsd-questions@FreeBSD.ORG Thu Mar 14 14:59:17 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 34B63998 for ; Thu, 14 Mar 2013 14:59:17 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from blue.qeng-ho.org (blue.qeng-ho.org [217.155.128.241]) by mx1.freebsd.org (Postfix) with ESMTP id AE0C229D for ; Thu, 14 Mar 2013 14:59:15 +0000 (UTC) Received: from fileserver.home.qeng-ho.org (localhost [127.0.0.1]) by fileserver.home.qeng-ho.org (8.14.5/8.14.5) with ESMTP id r2EExCIk041906; Thu, 14 Mar 2013 14:59:13 GMT (envelope-from freebsd@qeng-ho.org) Message-ID: <5141E5C0.2040606@qeng-ho.org> Date: Thu, 14 Mar 2013 14:59:12 +0000 From: Arthur Chance User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130309 Thunderbird/17.0.4 MIME-Version: 1.0 To: Warren Block Subject: Re: Port devel/arduino serial port problems [SOLVED] References: <5140F60B.20106@qeng-ho.org> <51418ED6.7000400@qeng-ho.org> <20130314133348.fdbdc755.freebsd@edvax.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Polytropon , FreeBSD-Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2013 14:59:17 -0000 On 03/14/13 13:08, Warren Block wrote: > On Thu, 14 Mar 2013, Polytropon wrote: > >> On Thu, 14 Mar 2013 08:48:22 +0000, Arthur Chance wrote: >>> On 03/13/13 21:56, Arthur Chance wrote: >>>> I'm trying to get devel/arduino working.[snip] >>> >>> I shouldn't work 13 hour days. Now I've had some sleep, I've spotted >>> what I missed last night. The underlying code from comms/rxtx is trying >>> to create a lock file in /var/spool/lock and that is only writeable by >>> user uucp and group dialer. Given that I have absolutely no serial >>> devices (or ports) on this box apart from the Arduino when it's plugged >>> in, can anyone see any problems with making the lock directory world >>> writeable? >> >> Simply add your user (or the account the program is running >> under) to the "dialer" group. This has been a common method >> to allow users to access dialing programs (which were reserved >> for root use without this group addition). > > This is also mentioned when the Arduino port is installed: > > To allow serial port locking, add your user to the dialer group: > pw usermod myuser -G dialer Warren and Polytropon, thanks. I realised that this morning and added myself to dialer. I'd originally thought the requirement for dialler group was simply to access /dev/cuaU0 and wrote a devd.conf file to set that as mode 666. It was only after catching up with my sleep I thought of lock files. However, my point was a little more general than just fixing this specific access problem - many desktop machines these days don't have serial lines or any need for dialer programs, and adding yet another group to an ever increasing list just so that I can talk to an Arduino seems a little redundant. (As does using /var/spool/lock - isn't that what /dev/cuaU0.lock is for?) For anyone else thinking of playing with Arduinos on FreeBSD, this bug http://www.freebsd.org/cgi/query-pr.cgi?pr=163749 in avrdude bit me (on a 9.1-RELEASE-p1 amd64 machine, talking to an Arduino Uno R3). The second patch (patch-arduino.c) fixed the problem, but it's a shame it's not included in the port 14 months after it was submitted.