Re: Port devel/arduino serial port problems [SOLVED]
On Thu, 14 Mar 2013 14:59:12 +, Arthur Chance wrote: > 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. Remember that this group isn't _that_ new, it has its own "historical value". :-) Furthermore, if you consider PPPoE, what are you actually doing? You're _dialing_ (not with a phone number, not even through the serial port, but utilizing means of PPP) with your modem connected by an Ethernet cable. This mechanism also requires root privileges, except you are in the "dialer" group. :-) http://www.freebsd.org/doc/faq/serial.html > (As does using /var/spool/lock - isn't that > what /dev/cuaU0.lock is for?) No, those are actual devices, see "man 4 uart" for details. The subtree /var/spool is primarily used for things like mail and printer subsystems. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Port devel/arduino serial port problems [SOLVED]
On 03/14/13 13:08, Warren Block wrote: On Thu, 14 Mar 2013, Polytropon wrote: On Thu, 14 Mar 2013 08:48:22 +, 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. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Port devel/arduino serial port problems [SOLVED]
On Thu, 14 Mar 2013, Polytropon wrote: On Thu, 14 Mar 2013 08:48:22 +, 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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Port devel/arduino serial port problems [SOLVED]
On Thu, 14 Mar 2013 08:48:22 +, 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). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Port devel/arduino serial port problems [SOLVED]
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? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Port devel/arduino serial port problems
I'm trying to get devel/arduino working. Plugging in the USB cable to the Arduino creates /dev/cuaU0* and /dev/ttyU0* and I'm manually changing them to mode 666 while trying to get started so should be able to access them as my normal user. However, the Tools => Serial Port menu item in the Arduino IDE is always greyed out, and whatever I set serial.port to in ~/.arduino/preferences.txt when trying to upload a sketch I always get the error message Serial port '' not found. Any hints and clues would be very welcome. My system is 9.1-RELEASE-p1 and amd64 pkg info arduino shows arduino-1.0.3_1,1 Open-source electronics prototyping platform My /dev with the Arduino plugged in and a chmod a+rw done suitably: fileserver# ls -l /dev/{cua,tty}U* crw-rw-rw- 1 uucp operator0, 242 Mar 13 21:24 /dev/cuaU0 crw-rw-rw- 1 uucp operator0, 243 Mar 13 21:24 /dev/cuaU0.init crw-rw-rw- 1 uucp operator0, 244 Mar 13 21:24 /dev/cuaU0.lock crw-rw-rw- 1 root wheel 0, 239 Mar 13 21:24 /dev/ttyU0 crw-rw-rw- 1 root wheel 0, 240 Mar 13 21:24 /dev/ttyU0.init crw-rw-rw- 1 root wheel 0, 241 Mar 13 21:24 /dev/ttyU0.lock ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Serial Port Problems (Solved)
On Fri, 2007-03-16 at 11:16 -0400, David Robillard wrote: > That being said, I checked /usr/src/libexec/getty/main.c to find out > how to recreate your fix. But I'm not a huge C programmer, so I tried > other ways to solve this. I submitted a bug report and patch, but it has not been accepted yet. I'm not even sure that it has been reviewed. I'll attach my patch to this message. > That brought me to gettytab(5) which says that the "de" field controls > the "delay secs and flush input before writing first prompt" as the > man page puts it. This puts a delay before the first prompt but not the prompts after entering a null login name or other invalid input. It could help if you were having problems with garbled output all the time not just after invalid input. If that is the case, you probably need to set de and use my patch. Dan --- libexec/getty/main.c.orig Tue Mar 6 15:55:35 2007 +++ libexec/getty/main.cTue Mar 6 15:58:06 2007 @@ -295,6 +295,8 @@ /* remove any noise */ (void)tcflush(STDIN_FILENO, TCIOFLUSH); } + if (!first_sleep) + sleep(1); first_sleep = 0; setttymode(0); @@ -376,6 +378,7 @@ continue; if (name[0] == '-') { puts("user names may not start with '-'."); + oflush(); continue; } if (!(upper || lower || digit)) { ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Serial Port Problems (Solved)
On Thu, 2007-03-01 at 15:27 -0600, Dan D Niles wrote: If I disconnect and come back later (sometimes), or if I hit return without entering a login name (always) it starts spitting out junk like: nooo~:Woo{;>6(|uww~now~nou})|t}}t9- I found a solution, although I'm not sure why it works. When you just hit enter getty goes back to the beginning of its loop. This also happens if you enter a name starting with "-" or consisting of just spaces. These also causes the output to become garbled. At the beginning of the loop it calls setttymode(0). If I insert a sleep(1) before this call, everything works correctly. If I insert the sleep after that, the output still gets garbled. Like I said, I don't know why it works, but it does. I don't think a short delay is unreasonable after entering invalid or no information. I am going to submit a PR with a patch. I have the same behavior as you do on some machines here. But I originally thought it was caused by the (old) serial port card I used to build a serial console server. The card is an EasyIO PCI 8-port card from Stallion Technologies as suggested by Gregory Bond's article "Console Server" from http://www.freebsd.org/doc/en_US.ISO8859-1/articles/console-server/index.html (BTW, don't buy this card today because it's driver was not ported from FreeBSD 4.x to neither 5.x nor 6.x.) That being said, I checked /usr/src/libexec/getty/main.c to find out how to recreate your fix. But I'm not a huge C programmer, so I tried other ways to solve this. That brought me to gettytab(5) which says that the "de" field controls the "delay secs and flush input before writing first prompt" as the man page puts it. So I changed a test machine's gettytab default entry from: default:\ :cb:ce:ck:lc:fd#1000:im=\r\n%h (%t)\r\n\r\n:sp#1200:\ :if=/etc/issue: To: default:\ :cb:ce:ck:lc:fd#1000:im=\r\n%h (%t)\r\n\r\n:sp#1200:\ :if=/etc/issue:de=2: And restarted (not sure if a reboot is necessary here?). I had to fiddle a bit with the delay, but it did help. HTH, David -- David Robillard UNIX systems administrator & Oracle DBA CISSP, RHCE & Sun Certified Security Administrator Montreal: +1 514 966 0122 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Serial Port Problems (Solved)
On Thu, 2007-03-01 at 15:27 -0600, Dan D Niles wrote: > If I disconnect and come back later > (sometimes), or if I hit return without entering a login name (always) > it starts spitting out junk like: > > nooo~:Woo{;>6(|uww~now~nou})|t}}t9- I found a solution, although I'm not sure why it works. When you just hit enter getty goes back to the beginning of its loop. This also happens if you enter a name starting with "-" or consisting of just spaces. These also causes the output to become garbled. At the beginning of the loop it calls setttymode(0). If I insert a sleep(1) before this call, everything works correctly. If I insert the sleep after that, the output still gets garbled. Like I said, I don't know why it works, but it does. I don't think a short delay is unreasonable after entering invalid or no information. I am going to submit a PR with a patch. Dan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Serial Port Problems
Dan D Niles wrote: More Dell 2950 woes. I use serial ports to manage my FreeBSD machines remotely. I've never had any problems until now. I've installed FreeBSD 6.2 on a Dell 2950. The install goes without problems over the serial port. After the reboot, I get the typical: FreeBSD/i386 (test.host.net) (ttyd0) login: and I can log in just fine. If I disconnect and come back later (sometimes), or if I hit return without entering a login name (always) it starts spitting out junk like: nooo~:Woo{;>6(|uww~now~nou})|t}}t9- I can log in blind, but everything is scrambled. Here is what I see after logging in: nooo~:ro}Zqsswv~?Nmswtl~:t|}}msr 1115?;5>:3ontt}}t=Koy{{oo| t(kk)19;??2077t|mefvwgSWdproogw~/Koy{{oo| t(kk)17?=,1998<,199;?=99>>,1998<,199<,1999=,199;>,19;?,199==* t| merwggo~wsoot|meuowws{}}ofccmmoo~oio.lllr{oo| wsrwen/NvwegSWd.>?WMMESWe({_]p#3::fv{ijkon1331;:5?;30uUWc227?_wmooometovwegSWe-Jggvwesweokoogtugkikcmlswupv|,puesweuwwet|mefogrwwwsg?oo swgww{}taev{{mwsaonuuteuuedewrsuuannomu}oonforlllrwmmeswwsaswo* auth|ttz?/wnvwegSWnowo~mesww/--amwyycoow}|tt|meeWSUUaswgw}ooo* forywrrwmmessfo{swtassi}wwspteuuedfvwuuuo~}/oo t|mehiefoookaondfGQqdgw}mo~wsasweauz?/wwnvwegFnowo/aonl-* amooogw}|ht|meaimmooglm{ww,conbgeswesskmedbbggto* h|tz?/wwnvwegSowowessko/. fft|medoocdm{wvrwu}oonhis* eeoniowumlmel,hm}wweamoawwmmcnmefomutuemon/ws{iswoogo/Kofyusw|llhiwweaaquuwwonorpronmmm,lmeswetukoet|meuutuutooojuomm-mg/,amooogw}taoyrwmmwwo~tewrmmwssggw,aedemmimli}}kss quuww}oontot|hquuww}oosFvwewWnowgmmimmoogi{w~. iofyuasngisrwihfvwegSWgwsdm{sw{ylmyu|,pueswerwggwrtotuehimwz??-omo}lpqggo. iofyuswenotfgiaw}|hmmoumlpqew,t}yue`mmonmoo//[ummyylouwwes{{{ow|ll89)torwmmo~vrt|meiowumlmuonaonmkoonoowuu}oonuu}mm}}.eem}t/ouwoootdoockiooget|i{slooonaonoogmmon/~uwww# If I exit things go back to normal until I disconnect for a while or hit return without a login name. I tried loading an older FreeBSD to see if it was a hardware issue or a FreeBSD issue, but my disks (mfi) aren't supported. It seems like the speed of the tty is getting out of sync. HELP! Any ideas? Thanks, Dan We have some PE2950's setup with serial consoles using IPMI over LAN. If you set the port in the BIOS to com2 and 57600 bps then you should be able to use ipmitool to access the console. If you set the device hints correctly you will be able to have FreeBSD use this port as a serial console. Tom Tom ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Serial Port Problems
On Thu, 01 Mar 2007 15:27:19 -0600, in sentex.lists.freebsd.questions you wrote: > >More Dell 2950 woes. > >I use serial ports to manage my FreeBSD machines remotely. I've never >had any problems until now. I've installed FreeBSD 6.2 on a Dell 2950. > >The install goes without problems over the serial port. After the >reboot, I get the typical: > >FreeBSD/i386 (test.host.net) (ttyd0) > >login: > >and I can log in just fine. If I disconnect and come back later >(sometimes), or if I hit return without entering a login name (always) >it starts spitting out junk like: > I get similar strange results as well on Server Works BIOS based machines. I usually talk to them through a pm25. For me, I have to make sure flow control is off on both ends (no software, no hardware). Also, login gets confused if you start with an enter for some reason. I can generally recover from this seemingly hung state with a bunch of CTRL+d's. Not sure if it will help you, but the symptons are somewhat like what I see. Whats odd is that it all works just fine from the loader prompt and if I boot into single user mode. But soon as getty/login take over, its very picky. ---Mike Mike Tancsa, Sentex communications http://www.sentex.net Providing Internet Access since 1994 [EMAIL PROTECTED], (http://www.tancsa.com) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Serial Port Problems
On Fri, 2007-03-02 at 01:33 -0800, Ted Mittelstaedt wrote: > - Original Message - > From: "Dan D Niles" <[EMAIL PROTECTED]> > To: > Sent: Thursday, March 01, 2007 1:27 PM > Subject: Serial Port Problems > > > > > > More Dell 2950 woes. > > > > I use serial ports to manage my FreeBSD machines remotely. I've never > > had any problems until now. I've installed FreeBSD 6.2 on a Dell 2950. > > > > The install goes without problems over the serial port. After the > > reboot, I get the typical: > > > > FreeBSD/i386 (test.host.net) (ttyd0) > > > > login: > > > > and I can log in just fine. If I disconnect and come back later > > (sometimes), or if I hit return without entering a login name (always) > > it starts spitting out junk like: > > > > Get a cheapie pci serial port card, plug it in, and see if it works any > better > > Ted I use console redirection to have access to the BIOS over the serial port. Can I redirect console output to a pci card? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Serial Port Problems
- Original Message - From: "Dan D Niles" <[EMAIL PROTECTED]> To: Sent: Thursday, March 01, 2007 1:27 PM Subject: Serial Port Problems > > More Dell 2950 woes. > > I use serial ports to manage my FreeBSD machines remotely. I've never > had any problems until now. I've installed FreeBSD 6.2 on a Dell 2950. > > The install goes without problems over the serial port. After the > reboot, I get the typical: > > FreeBSD/i386 (test.host.net) (ttyd0) > > login: > > and I can log in just fine. If I disconnect and come back later > (sometimes), or if I hit return without entering a login name (always) > it starts spitting out junk like: > Get a cheapie pci serial port card, plug it in, and see if it works any better Ted ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Serial Port Problems
More Dell 2950 woes. I use serial ports to manage my FreeBSD machines remotely. I've never had any problems until now. I've installed FreeBSD 6.2 on a Dell 2950. The install goes without problems over the serial port. After the reboot, I get the typical: FreeBSD/i386 (test.host.net) (ttyd0) login: and I can log in just fine. If I disconnect and come back later (sometimes), or if I hit return without entering a login name (always) it starts spitting out junk like: nooo~:Woo{;>6(|uww~now~nou})|t}}t9- I can log in blind, but everything is scrambled. Here is what I see after logging in: nooo~:ro}Zqsswv~?Nmswtl~:t|}}msr 1115?;5>:3ontt}}t=Koy{{oo| t(kk)19;??2077t|mefvwgSWdproogw~/Koy{{oo| t(kk)17?=,1998<,199;?=99>>,1998<,199<,1999=,199;>,19;?,199==* t| merwggo~wsoot|meuowws{}}ofccmmoo~oio.lllr{oo| wsrwen/NvwegSWd.>?WMMESWe({_]p#3::fv{ijkon1331;:5?;30uUWc227?_wmooometovwegSWe-Jggvwesweokoogtugkikcmlswupv|,puesweuwwet|mefogrwwwsg?oo swgww{}taev{{mwsaonuuteuuedewrsuuannomu}oonforlllrwmmeswwsaswo* auth|ttz?/wnvwegSWnowo~mesww/--amwyycoow}|tt|meeWSUUaswgw}ooo* forywrrwmmessfo{swtassi}wwspteuuedfvwuuuo~}/oo t|mehiefoookaondfGQqdgw}mo~wsasweauz?/wwnvwegFnowo/aonl-* amooogw}|ht|meaimmooglm{ww,conbgeswesskmedbbggto* h|tz?/wwnvwegSowowessko/. fft|medoocdm{wvrwu}oonhis* eeoniowumlmel,hm}wweamoawwmmcnmefomutuemon/ws{iswoogo/Kofyusw|llhiwweaaquuwwonorpronmmm,lmeswetukoet|meuutuutooojuomm-mg/,amooogw}taoyrwmmwwo~tewrmmwssggw,aedemmimli}}kss quuww}oontot|hquuww}oosFvwewWnowgmmimmoogi{w~. iofyuasngisrwihfvwegSWgwsdm{sw{ylmyu|,pueswerwggwrtotuehimwz??-omo}lpqggo. iofyuswenotfgiaw}|hmmoumlpqew,t}yue`mmonmoo//[ummyylouwwes{{{ow|ll89)torwmmo~vrt|meiowumlmuonaonmkoonoowuu}oonuu}mm}}.eem}t/ouwoootdoockiooget|i{slooonaonoogmmon/~uwww# If I exit things go back to normal until I disconnect for a while or hit return without a login name. I tried loading an older FreeBSD to see if it was a hardware issue or a FreeBSD issue, but my disks (mfi) aren't supported. It seems like the speed of the tty is getting out of sync. HELP! Any ideas? Thanks, Dan ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: serial port problems
On Wed, 18 Sep 2002 23:15:39 -0400 <[EMAIL PROTECTED]> wrote: > Hi, > > My machines lock up whenever I access the com1 > ports. One machine is a desktop gateway & the other a thinkpad 600E. > The lockup is complete, including the second hand on the xclock > display. > > Both machines running 4.6. > > Suggestions? > > Thanks. Kent Sounds a little like an IRQ/IO conflict. Is this an onboard serial port? If it is an onboard serial port, do you have any other "COM" devices installed in the machine - such an an internal modem? Nathan To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
serial port problems
Hi, My machines lock up whenever I access the com1 ports. One machine is a desktop gateway & the other a thinkpad 600E. The lockup is complete, including the second hand on the xclock display. Both machines running 4.6. Suggestions? Thanks. Kent To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message