1-Wire Linux Help needed...

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Homercidal

Licensed Sensual Massage Therapist.
HBT Supporter
Joined
Feb 10, 2008
Messages
33,269
Reaction score
5,708
Location
Reed City, MI
I'm trying to install a DS9490 USB adapter in my Slackware 13 server install and I'm having problems.

I've installed OWFS succesfully on a laptop running some other distro (I think Ubuntu...)

This one is giving trouble.

I know enough about Slackware and Linux to get some basic servers running, but it usually takes a bit of work and time.

If anyone has more familiarity with Linux and wants to give some help, I sure could use it. I'll post what I know so far and see where that can take us.
 
Starting owserver looks fine.

When I start the owfs I get a Cannot open USB Bus Master error

followed by a No valid 1-wire buses found.

Seems I saw some debugging options somewhere. See if I can dig that up.
 
Getting back to basics, I powered down the machine and powered back up. After inserting the DS9490R adapter, I performed an LSUSB and got:

Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


So the system is recognizing that the adapter is plugged in.
 
It's been over a year since I messed with this stuff. I used my bus pirate from dangerousprototypes to verify that my home made DS9097 was working (serial, not USB) and I don't know if the following will help, but it's all my notes from the project as far as the linux end goes, I was setting up a temp sensor to a small linux box that could be remotely monitored via snmp (would have one of these boxes in each data closet at about 250 office locations and centrally monitor all their closet temperatures)

install Digitemp
install snmpd
vi /etc/group
add "snmp" to "dialout" group
create a digitemp.conf file, eg:
/usr/bin/digitemp_DS9097 -i -c /etc/digitemp.conf -s /dev/ttyS0

create perl script /usr/local/bin/temperature.pl, eg:
#!/usr/bin/perl

$warn = 82.0;
$crit = 87.0;

$output = `/usr/bin/digitemp_DS9097 -q -c /etc/digitemp.conf -t 0 -o 3`;

if($output =~ /^\d+\t([\d\.]+)/) {
$temp0 = $1 + 0;
if($temp0 >= $crit) {
print "CRIT Room temperature is ${temp0}F (>= ${crit}F)\n";
exit 1;
} elsif($temp0 >= $warn) {
print "WARN Room temperature is ${temp0}F (>= ${warn}F)\n";
exit 2;
} else {
print "OK Room temperature is ${temp0}F|temp0=${temp0}\n";
exit 0;
}
} else {
print "Cannot find probe!\n";
exit 1;
}



or:
#!/usr/bin/perl

$output = `/usr/bin/digitemp_DS9097 -q -c /etc/digitemp.conf -t 0 -o 3`;

if($output =~ /^\d+\t([\d\.]+)/) {
$temp0 = $1 + 0;
print "${temp0}\n";
exit 0;
} else {
print "Cannot find probe!\n";
exit 1;
}




add:
exec temperature /usr/local/bin/temperature.pl
to:
/etc/snmp/snmpd.conf
change:
rocommunity public 127.0.0.1
to:
rocommunity public

restart snmpd


switch to another host, verify working:
snmpwalk -v 1 testbox.test.com -c public extTable


can change log level of snmpd:
vi /etc/sysconfig/net-snmp
change:
SNMPD_LOGLEVEL="d"
to:
SNMPD_LOGLEVEL="i"
 
Thanks, I'm not sure that's going to help. The USB part is what is going wrong I think.

I've used this before in another distro, plus this is a server install that a friend put together that I am inheriting to replace my server that died.

In fact, I'm really wasting my time on this since I'll never use this machine to 1-wire stuff. I really need to get the webmail interface working on this and put it in production.

I think I'll try again on another box tomorrow. I just don't know enough about linux to make it over this hump right now.
 
AFAIK, owfs has to be started by a root level user, so I start mine in a boot script.
It's really no more than 'owfs -F -u -m /mnt/1wire --allow_other'
-F for Fahrenheit
-u for USB
-m points to mount location
--allow_other lets non-root users interact with the mount location

Other than that, I think you either would have to look into fuse options or udev rules...

EDIT: This is on an Ubuntu box, so may not help.
 
have you considered an arduino? i've used one pretty easily with the 1-wire sensors and am able to query the temp via serial (usb -> serial). I've never used that usb part. if you want i can give you some of the code that i have. the libraries make it really easy to use now.
 
I am going to get an arduino, more for the fun of learning to program a micro, than for replacing the 1-wire device.

This is the first time I've not gotten it to work. I've run it on three windows machines using LogTemp, and 2 other Linux machines.

As a matter of fact, I still have the laptop at home that I can play with. I just thought it should be pretty easy to get it working with this machine. It was more to just keep in touch with it than anything.

I think FUSE is working, and there doesn't seem to be anything in the udev rules for this (well, I actually added some this past reboot). They say slackware support it in the kernel, but I don't know what's going on. It's possible my friend did not compile this kernel with support. I think he tends to compile his own.

Whatever. I will probably end up using this on the laptop or the older desktop I have in the garage so no point in continuing to get frustrated. I have actual work I should be doing.
 
might just be slackware ;) jk
uf000404.gif


Actually, I brought my laptop in today to play with and I noticed that I also had slackware installed on that. I thought it was Ubuntu server, but I was wrong.

It's even running 13.0.0.0, so it's not that old.
 
And...


My laptop drive decided to give up today. Just got the click of death, and a subsequent reboot failed.

Hopefully I did not throw out all of my small 2.5" HDDs.
 
If you haven't found the answer by 11 or so I will look this over. Got to pay attention to SWMBO till then
 
I think the problem you are encountering is related to a kernel module that gets loaded for the USB module that interferes with owfs. Before starting owserver, you need to unload the module (as root): modprobe -r ds9490r
 
Check /var/log/messages for error messages. Your USB bus controller might be on the way to Spain.

And...


My laptop drive decided to give up today. Just got the click of death, and a subsequent reboot failed.

Hopefully I did not throw out all of my small 2.5" HDDs.
 
I think the problem you are encountering is related to a kernel module that gets loaded for the USB module that interferes with owfs. Before starting owserver, you need to unload the module (as root): modprobe -r ds9490r

Is this the same command as "rmmod ds9490R"? Cause I tried that and it said there was no module. I even tried with without the r.
 
I probably won't have much time to play today. Went to install a Network card in one of our CNC machines, and the intermittent boot problem he had decided to be permanent. So call in the experts. And another CNC is getting an upgrade on it's computer, so I have to configure the serial ports and test it.

Shouldn't take too long, but then something else will pop up.
 
Homercidal said:
Is this the same command as "rmmod ds9490R"? Cause I tried that and it said there was no module. I even tried with without the r.

Yeah, pretty much.
Since that didn't help, can you post the output of the following commands after connecting the USB device:
lsmod
lsusb
dmesg
 

Latest posts

Back
Top