Difference between -q and -i

103 views
Skip to first unread message

Łukasz Sobkowiak

unread,
May 20, 2013, 6:04:50 AM5/20/13
to digi...@googlegroups.com
Hi to all

When I do:
/usr/bin/digitemp_DS9097 -i -s /dev/ttyS0 -a -o "%.2C"

I got:
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Turning off all DS2409 Couplers

Searching the 1-Wire LAN
288A6264040000A9 : DS18B20 Temperature Sensor
ROM #0 : 288A6264040000A9
23.75
And it is OK

when I do:
/usr/bin/digitemp_DS9097 -q -s /dev/ttyS0 -a -o "%.2C"

i have "null". If I log in as root it gives me temp. ttyS0 and digitemp has 777 rights to them. I need to run -q on other user as well as on root. Is it possible?

Brian C. Lane

unread,
May 20, 2013, 9:21:30 AM5/20/13
to digi...@googlegroups.com
What does ~/.digitemprc look like? Does it have the serial number in it?
I don't see anything wrong with your example, that should work just fine
as long as the serial number is correct. You don't need to include the
serial port after -i, that is stored in the .digitemprc file as well but
shouldn't hurt.

And don't set permissions to 0777 that lets anyone on your system
overwrite your files. Executables should be 0755.

--
http://www.brianlane.com

Jason Sipula

unread,
May 20, 2013, 11:20:51 AM5/20/13
to digi...@googlegroups.com
I could be wrong, but I think because it uses direct low-level hardware access, it must be using Root permissions (or sudo). I've seen this with a lot of direct hardware manipulation things such as operating the GPIO pins on the Raspberry Pi, etc. Just my 2 cents.... 




--
You received this message because you are subscribed to the Google Groups "DigiTemp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to digitemp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Brian C. Lane

unread,
May 20, 2013, 12:12:05 PM5/20/13
to digi...@googlegroups.com
On Mon, May 20, 2013 at 08:20:51AM -0700, Jason Sipula wrote:
> I could be wrong, but I think because it uses direct low-level hardware
> access, it must be using Root permissions (or sudo). I've seen this with a
> lot of direct hardware manipulation things such as operating the GPIO pins
> on the Raspberry Pi, etc. Just my 2 cents....

No, it is using the serial port, just not in the way you would expect so
permissions should be the same as normal usage.

--
http://www.brianlane.com

Jason Sipula

unread,
May 20, 2013, 1:42:33 PM5/20/13
to digi...@googlegroups.com
Ah, thanks for the clarification Brian!
Reply all
Reply to author
Forward
0 new messages