Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

freebsd-questions Digest, Vol 305, Issue 14

1 view
Skip to first unread message

freebsd-ques...@freebsd.org

unread,
Apr 11, 2010, 8:00:21 AM4/11/10
to freebsd-...@freebsd.org
Send freebsd-questions mailing list submissions to
freebsd-...@freebsd.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
or, via email, send a message with subject or body 'help' to
freebsd-ques...@freebsd.org

You can reach the person managing the list at
freebsd-que...@freebsd.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-questions digest..."


Today's Topics:

1. anybody else miss the seattle group? (Gary Kline)
2. Re: reliable rs-232 (Ian Smith)
3. Auto update (Jos Chrispijn)
4. Re: Auto update (andrew clarke)
5. Re: Auto update (Doug Hardie)
6. Re: Auto update (Jos Chrispijn)
7. Re: Auto update (Jos Chrispijn)
8. Re: reliable rs-232 (Pegasus Mc Cleaft)
9. Re: [RESOLVED, for now] Re: USB Powered Speakers
(Chris Whitehouse)
10. Re: Auto update (Ed Jobs)
11. Re: [NOT RESOLVED][RESOLVED, for now] Re: USB Powered
Speakers (Programmer In Training)
12. Re: Mixer Settings For Audacity (Programmer In Training)
13. Re: Mixer Settings For Audacity (Polytropon)
14. Re: USB Powered Speakers (Nikolaj Thygesen)
15. Re: Mixer Settings For Audacity (Programmer In Training)
16. Gambas on amd64 uses non-amd64 dependancy (Gene)


----------------------------------------------------------------------

Message: 1
Date: Sat, 10 Apr 2010 20:37:24 -0700
From: Gary Kline <kl...@thought.org>
Subject: anybody else miss the seattle group?
To: FreeBSD Mailing List <freebsd-...@FreeBSD.ORG>
Message-ID: <20100411033...@thought.org>
Content-Type: text/plain; charset=us-ascii

For anyone who lives here in metro-Seattle and who misses the Seattle
BSD Users Group, attending the local Linux group, GSLUG, filled that
empty spot.

I almost didn't go to the April get together because the topic involved
embedded systems; it sounded a bit boring. It was just the opposite.
--A parenthetical note is that while none of us is getting any younger or
less bald, it was nice to see some of my fellow geeks with some gray
hairs,... :-)

-g


--
Gary Kline kl...@thought.org http://www.thought.org Public Service Unix
http://jottings.thought.org http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

------------------------------

Message: 2
Date: Sun, 11 Apr 2010 14:24:15 +1000 (EST)
From: Ian Smith <smi...@nimnet.asn.au>
Subject: Re: reliable rs-232
To: Grzegorz Daniluk <li...@o2.pl>
Cc: freebsd-...@freebsd.org
Message-ID: <2010041113...@sola.nimnet.asn.au>
Content-Type: TEXT/PLAIN; charset=US-ASCII

In freebsd-questions Digest, Vol 305, Issue 13, Message: 2
On Sat, 10 Apr 2010 15:41:33 +0200 Grzegorz Daniluk <li...@o2.pl> wrote:
> Hi everybody,
> I have a question regarding rs-232 under FreeBSD.
> I need to write an application for FreeBSD to operate an industrial
> controller via rs-232. The trick is that it should have very good long
> term stability (reliably operation over years). It should be able to
> detect and correct (e.g by reconfiguration of rs-232 port parameters)
> when rs-232 hangs or changes its transmission parameters as a result of
> electrical interference/disturbances etc. First thought is to simply
> close and reopen rs-232 port every given time interval, so even if
> something 'strange' happens the failure would be fixed after finite time
> period. But maybe there is smarter way of doing that. Maybe some special
> fault-tolerant rs-232 kernel drivers ?
> Any help appreciated, maybe someone has other helpful advieces regarding
> reliable rs-232 programming ini general ?

RS-232 is inherently as reliable as the devices you're talking with, the
protocols you're using for communication and the (lack of) interference
from noise on cable/s in the environment you're operating in. Even in
very adverse (noisy) conditions, I've never found any need to close and
reopen ports to reinitialise hardware on freeBSD, back to version 2.2.

If a byte of data is corrupted, it's just corrupted; I don't know of any
conditions (given electrical signals within specification) that could
cause a tty or uart port to require re-initialisation. So it comes down
to detection of any transmission errors, either byte-by-byte using say
parity bits, or by protocol (eg CRC) if using packet-oriented data
transmission, and physical prevention of errors by such as shielded
cables, avoiding earth loops between computer and device/s and so on.

Perhaps you could provide a few more details about how the industrial
controller is talked to, at what baudrate, cable length, software or
hardware handshaking (eg CTS/RTS &/or DTR/DSR) and whether byte-by-byte
or using packet protocols, and such? Is the communication two-way?

cheers, Ian

(please CC me; I'm subscribed to the -digest which can take a while)


------------------------------

Message: 3
Date: Sun, 11 Apr 2010 08:14:48 +0200
From: Jos Chrispijn <ker...@webrz.net>
Subject: Auto update
To: freebsd-...@FreeBSD.org
Message-ID: <4BC168D8...@webrz.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Can someone tell me if there is a way of generating an email on the
moment that someone logs in to my FreeBSD server? The mail part
(phpmail) will be easy; I don't know yet how to trigger and pass
parameter to this script or redirect info to a file (that I then send by
email). Thanks.

Jos Chrispijn


------------------------------

Message: 4
Date: Sun, 11 Apr 2010 16:27:34 +1000
From: andrew clarke <ma...@ozzmosis.com>
Subject: Re: Auto update
To: Jos Chrispijn <ker...@webrz.net>
Cc: freebsd-...@FreeBSD.org
Message-ID: <20100411062...@ozzmosis.com>
Content-Type: text/plain; charset=us-ascii

On Sun 2010-04-11 08:14:48 UTC+0200, Jos Chrispijn (ker...@webrz.net) wrote:

> Can someone tell me if there is a way of generating an email on the
> moment that someone logs in to my FreeBSD server?

By which method? SSH?


------------------------------

Message: 5
Date: Sun, 11 Apr 2010 00:41:01 -0700
From: Doug Hardie <bc...@lafn.org>
Subject: Re: Auto update
To: Jos Chrispijn <ker...@webrz.net>
Cc: freebsd-...@freebsd.org
Message-ID: <F02E5989-F279-4059...@lafn.org>
Content-Type: text/plain; charset=us-ascii


On 10 April 2010, at 23:14, Jos Chrispijn wrote:

> Can someone tell me if there is a way of generating an email on the moment that someone logs in to my FreeBSD server? The mail part (phpmail) will be easy; I don't know yet how to trigger and pass parameter to this script or redirect info to a file (that I then send by email). Thanks.

A cheesy way to do that is to use a popen ("tail -f /var/log/auth.log", "r") and then read that. It will give you every login regardless of ssh, telnet etc. You could then generate the emails from that. I have no idea just how resource intensive this might be. You would also have to ensure it got started by rc during boot.

------------------------------

Message: 6
Date: Sun, 11 Apr 2010 11:27:43 +0200
From: Jos Chrispijn <ker...@webrz.net>
Subject: Re: Auto update
To: andrew clarke <ma...@ozzmosis.com>
Cc: freebsd-...@FreeBSD.org
Message-ID: <4BC1960F...@webrz.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed


On 11-4-2010 8:27, andrew clarke wrote:
> By which method? SSH?
>

Yes, sorry I didn't mention that. If possible on both SSH and otherwise.

Thanks,
Jos


------------------------------

Message: 7
Date: Sun, 11 Apr 2010 11:32:27 +0200
From: Jos Chrispijn <ker...@webrz.net>
Subject: Re: Auto update
To: Doug Hardie <bc...@lafn.org>
Cc: freebsd-...@freebsd.org
Message-ID: <4BC1972B...@webrz.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed


On 11-4-2010 9:41, Doug Hardie wrote:
> A cheesy way to do that is to use a popen ("tail -f
> /var/log/auth.log", "r") and then read that. It will give you every
> login regardless of ssh, telnet etc. You could then generate the
> emails from that. I have no idea just how resource intensive this
> might be. You would also have to ensure it got started by rc during
> boot._______________________________________________

In order to find out if someone logged in, I should then first copy
auth.log to auth2.log, and do a compare and then do the tail trick. Have
to cron that every half a minute.
I would like to know if there is something that is alterted on the
moment that someone logs on thus forcing evt. your tail suggestion

thanks,
Jos Chrispijnj


------------------------------

Message: 8
Date: Sun, 11 Apr 2010 09:53:39 +0000
From: Pegasus Mc Cleaft <k...@mthelicon.com>
Subject: Re: reliable rs-232
To: freebsd-...@freebsd.org
Message-ID: <20100411095...@mthelicon.com>
Content-Type: Text/Plain; charset="iso-8859-2"

On Saturday 10 April 2010 13:41:33 Grzegorz Daniluk wrote:
> Hi everybody,
> I have a question regarding rs-232 under FreeBSD.
> I need to write an application for FreeBSD to operate an industrial
> controller via rs-232. The trick is that it should have very good long
> term stability (reliably operation over years). It should be able to
> detect and correct (e.g by reconfiguration of rs-232 port parameters)
> when rs-232 hangs or changes its transmission parameters as a result of
> electrical interference/disturbances etc. First thought is to simply
> close and reopen rs-232 port every given time interval, so even if
> something 'strange' happens the failure would be fixed after finite time
> period. But maybe there is smarter way of doing that. Maybe some special
> fault-tolerant rs-232 kernel drivers ?
> Any help appreciated, maybe someone has other helpful advieces regarding
> reliable rs-232 programming ini general ?

Hi Grzegorz,

I dont think you are going to find anything that is classified as
fault
tolerant RS-232. My experience with 232 in industrial environments has been
met with various levels of success. In small controlled conditions it works
OK, but you are limited to speed and distance. Further, the single ended
nature of 232 and the high input impedance of the receivers make it not the
best choice for electrical interference rejection. If you have control of the
electrical specifications, you might be better off using RS-422 as it is
designed differentially and with a low impedance, so it works well in
electrically nasty environments. All the better if you can opto-isolate the
line drivers/receivers on the transmission line side of the interface.

In one application, I designed a RS-232 to fibre-optic interface using
S/Pdif transceivers and a 555 as a PWM generator/detector. This worked
wonderfully for electrical isolation between the PC and the CNC motion
controller I was interfacing to. I have seen similar things sold as a ready
made brick that you could just plug in and use.

Making the machine and PC "Fail to a safe condition" is not something
you
should design into the rs-232 interface directly, in my opinion. You should
have a upper layer protocol bouncing between the two points and if this
protocol times-out, then you should assume the interface of the remote device
has failed and take action in your software (on both sides). In the case of
the fibre connection, I added in addition to the protocol checks, a carrier
detect circuit where if the link failed between the two machines, it dropped
out a relay that was wired to the E-Stop circuit.

I hope some of this is helpfull...

Peg


------------------------------

Message: 9
Date: Sun, 11 Apr 2010 11:06:44 +0100
From: Chris Whitehouse <cwh...@onetel.com>
Subject: Re: [RESOLVED, for now] Re: USB Powered Speakers
To: Programmer In Training <p...@joseph-a-nagy-jr.us>
Cc: freebsd-...@freebsd.org
Message-ID: <4BC19F34...@onetel.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Programmer In Training wrote:
> On 04/09/10 21:04, per...@pluto.rain.com wrote:
>> Programmer In Training <p...@joseph-a-nagy-jr.us> wrote:
>>
>>> I'm thinking I'm just going to wait until Tuesday and get a brand
>>> new pair of wall-powered speakers. This hassle is NOT worth it ...
>> If "speakers on USB 2.0 card, all else on 1.x builtins" doesn't
> <snip>
>
> Despite the steadily degrading nature of the builtins, they are working
> for the keyboard with speakers on the card and so far (aside from some
> initial issues) they seem to be working just fine. For now. I'm still
> getting a new pair of speakers. Now I'm not so keen on getting some of
> those USB gadgets from ThinkGeek. ):
It's probably too late to suggest it now but it did occur to me a very
cheap and easy way to get around the original problem might be to
replace the keyboard with a PS/2 keyboard :P (if your computer has a
PS/2 port).

Chris


------------------------------

Message: 10
Date: Sun, 11 Apr 2010 13:17:36 +0300
From: Ed Jobs <olor...@gmail.com>
Subject: Re: Auto update
To: freebsd-...@freebsd.org
Message-ID: <201004111317....@gmail.com>
Content-Type: text/plain; charset="us-ascii"

On Sunday 11 of April 2010 12:32, Jos Chrispijn wrote:
> In order to find out if someone logged in, I should then first copy
> auth.log to auth2.log, and do a compare and then do the tail trick. Have
> to cron that every half a minute.
> I would like to know if there is something that is alterted on the
> moment that someone logs on thus forcing evt. your tail suggestion
>
> thanks,
> Jos Chrispijnj

you could try using syslog to do that. check the man page of syslog.conf, and
search for "auth." you could then populate a file with the successful logins
as they happen

--
Real programmers don't document. If it was hard to write, it should be hard to
understand.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100411/cea9d82d/attachment-0001.pgp

------------------------------

Message: 11
Date: Sun, 11 Apr 2010 05:46:15 -0500
From: Programmer In Training <p...@joseph-a-nagy-jr.us>
Subject: Re: [NOT RESOLVED][RESOLVED, for now] Re: USB Powered
Speakers
To: freebsd-...@freebsd.org
Message-ID: <4BC1A877...@joseph-a-nagy-jr.us>
Content-Type: text/plain; charset="iso-8859-1"

On 04/11/10 05:06, Chris Whitehouse wrote:
<snip>
> It's probably too late to suggest it now but it did occur to me a very
> cheap and easy way to get around the original problem might be to
> replace the keyboard with a PS/2 keyboard :P (if your computer has a
> PS/2 port).

PS/2 ports do not work at all, otherwise I wouldn't bother with USB.

Also, problem resurfaced after about 2 hours of listening to music. I
wound up having to shut down PC all night because no matter what I did,
keyboard would go wonky on me.

--
Yours In Christ,

PIT
Emails are not formal business letters, whatever businesses may want.
Original content copyright under the OWL http://owl.apotheon.org
Please do not CC me. If I'm posting to a list it is because I am subscribed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100411/1fbd7ebc/signature-0001.pgp

------------------------------

Message: 12
Date: Sun, 11 Apr 2010 05:54:40 -0500
From: Programmer In Training <p...@joseph-a-nagy-jr.us>
Subject: Re: Mixer Settings For Audacity
To: Dima Panov <flu...@Fluffy.Khv.RU>, FreeBSD Questions
<freebsd-...@freebsd.org>
Message-ID: <4BC1AA70...@joseph-a-nagy-jr.us>
Content-Type: text/plain; charset="iso-8859-1"

On 04/11/10 01:36, Dima Panov wrote:
>>>>>>> G'day, Programmer In Training!
>>>>>>> On Sat, Apr 10, 2010 at 20:58:46 -0500, You wrote:
>
>> OK, I've read the mixer man page, the mic is set as recording source,
>> yet even with mic playback and (apparent) sensitivity to max, I barely
>> get anything recorded using Audacity. Am I missing something? Do I need
>> to use mixer -s =rec mic (I set it with mixer -S =rec, though it seems
>> either one does the same thing).
<snip>
> Try to use monitor as record source. (mixer =rec monitor)
> At least for my laptops it's required to provide my microphone to skype.

Same thing, barely any pickup by the mic.
--
Yours In Christ,

PIT
Emails are not formal business letters, whatever businesses may want.
Original content copyright under the OWL http://owl.apotheon.org
Please do not CC me. If I'm posting to a list it is because I am subscribed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100411/9b208fd6/signature-0001.pgp

------------------------------

Message: 13
Date: Sun, 11 Apr 2010 13:00:35 +0200
From: Polytropon <fre...@edvax.de>
Subject: Re: Mixer Settings For Audacity
To: Programmer In Training <p...@joseph-a-nagy-jr.us>
Cc: FreeBSD Questions <freebsd-...@freebsd.org>
Message-ID: <20100411130035....@edvax.de>
Content-Type: text/plain; charset=US-ASCII

On Sun, 11 Apr 2010 05:54:40 -0500, Programmer In Training <p...@joseph-a-nagy-jr.us> wrote:
> Same thing, barely any pickup by the mic.

Is the microphone working, and is it compatible with
the connector (condenser / dynamic)? Does it provide
a sufficient output level, maybe to be tested with
other equipment? Just an idea - because I recently
had a similar problem with a partially defective
microphone. :-)


--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


------------------------------

Message: 14
Date: Sun, 11 Apr 2010 13:01:17 +0200
From: Nikolaj Thygesen <maili...@diamondbox.dk>
Subject: Re: USB Powered Speakers
To: Programmer In Training <p...@joseph-a-nagy-jr.us>
Cc: FreeBSD Questions <freebsd-...@freebsd.org>
Message-ID: <4BC1ABFD...@diamondbox.dk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Programmer In Training wrote:
> On 04/09/10 10:15, Brodey Dover wrote:
>
>> "Apr 8 22:30:16 heaven kernel: usb_alloc_device:1624: getting device
>> descriptor at addr 3 failed, USB_ERR_IOERROR!"
>>
>> exactly! That is what is causing the issues. From what I can see, it
>> is like it was explained before. The OS has chosen to play nice and
>> request that the speakers are disabled.
>>
>> The power requirements will not affect the system until the speakers
>> are producing sound. In other words, the system will only draw UP to
>> the power input rating while in operation. At idle, I'd wager they may
>> only use 1/10 of its power rating for the idle ICs and a power LED.
>>
> <snip>
>
> Only it's not the speakers that have their operation interrupted, JUST
> the keyboard (not even the mouse is affected).
>
>
Hi,

I don't know if my issue is related to the one debated in this
thread, but I just recently bought myself a pair of externally (regular
power supply; no USB power) powered speakers, that plug into the sound
card as usual, but when the speakers are powered up or down, my USB
mouse disappears for a few seconds! It happens every time, and the mouse
has its resoution reset. It's no big deal to me, but I'm a bit puzzled
as to how the simple sound card connection could reset a USB connection.
I'm not trying to hijack this thread, just thought the issues might
be related.


br - N :o)

------------------------------

Message: 15
Date: Sun, 11 Apr 2010 06:24:07 -0500
From: Programmer In Training <p...@joseph-a-nagy-jr.us>
Subject: Re: Mixer Settings For Audacity
To: FreeBSD Questions <freebsd-...@freebsd.org>
Message-ID: <4BC1B157...@joseph-a-nagy-jr.us>
Content-Type: text/plain; charset="iso-8859-1"

On 04/11/10 06:00, Polytropon wrote:
> On Sun, 11 Apr 2010 05:54:40 -0500, Programmer In Training <p...@joseph-a-nagy-jr.us> wrote:
>> Same thing, barely any pickup by the mic.
>
> Is the microphone working, and is it compatible with

Yes

> the connector (condenser / dynamic)? Does it provide

Yes

> a sufficient output level, maybe to be tested with

Yes

> other equipment? Just an idea - because I recently

Was on a Windoze box with an Audigy 2 sound card, worked like a dream.

> had a similar problem with a partially defective
> microphone. :-)

I'm using the builtin C-Media sound card (for some reason FreeBSD
doesn't want to detect my SB Audigy even with the km loaded for it) The
mic is a Creative boom mic (I call them boom mics, just your standard
desktop fair).

Audacity (and Skype) both picked up the mic very, very well using mic as
rec source on my parents Windoze box (XP SP3). I'd like to keep
everything on here (though the latest version of Audacity (1.3.x)
supports flac output while what's in ports (1.2.4b4. I updated ports
like two days ago) doesn't so I just might use their computer if I can't
get my mic working here).

--
Yours In Christ,

PIT
Emails are not formal business letters, whatever businesses may want.
Original content copyright under the OWL http://owl.apotheon.org
Please do not CC me. If I'm posting to a list it is because I am subscribed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100411/5f48e863/signature-0001.pgp

------------------------------

Message: 16
Date: Sun, 11 Apr 2010 06:51:23 -0500
From: "Gene" <fb...@brightstar.bomgardner.net>
Subject: Gambas on amd64 uses non-amd64 dependancy
To: FreeBSD-...@freebsd.org
Message-ID: <2010041111...@brightstar.bomgardner.net>
Content-Type: text/plain; charset=iso-8859-1

Hi Again.

I was installing the lang/gambas port. It uses math/ldouble as a dependancy.
Problem is, ldouble refuses to install saying

===> ldouble-0.1_2 is only for i386 sparc64, while you are running amd64.

Anyone know a way around this?

Thanks in adance.

IHN,
Gene

--
To everything there is a season,
And a time to every purpose under heaven.

------------------------------


End of freebsd-questions Digest, Vol 305, Issue 14
**************************************************

0 new messages