DS9490R USB problem with linux..no sensors found

480 views
Skip to first unread message

Oguzhan Kayhan

unread,
Oct 14, 2014, 4:42:13 AM10/14/14
to digi...@googlegroups.com
Hello,
I was using a homemade serial one-wire adapter on my desktop ubuntu for a long time.. aftaer having a hardware problem , i switched to another pc with only usb ports on it.
And had to buy a  DS9490R USB dongle to continue using one-wire network.

For a few months it worked fine.. But suddenly it stopped working..
I removed all sensors on it and and left only a single 1820 on it.. but no luck.. it just scans the network, founds usb adapter  but found no sensors connected.
I thought the adapter failed working.

Anyway.. A few days ago i connected the adapter to my windows desktop and maxim software found all sensors connected without an issue..

I tested the usb connection on my linux server with other usb devices and all seem to be working fine. So its not an usb issue either..It even able to use mobile harddrives.. So not a power issue either on usb i guess

WHen i plug i got the following message on dmesg logs.


[ 2636.684205] usb 1-3.3: new full-speed USB device number 18 using ehci-pci
[ 2636.792838] usb 1-3.3: New USB device found, idVendor=04fa, idProduct=2490
[ 2636.792848] usb 1-3.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0


I have the following entries in modules blacklist either.
#for digitemp
blacklist ds2490
blacklist ds9490r

I connected the sensor in both parasytic and non-parasytic mode.. But no luck in linux (both way works in windows desktop)

Any advice??


PS: I am using 3.6.0 version of digitemp.


Oguzhan Kayhan

unread,
Oct 14, 2014, 3:57:24 PM10/14/14
to digi...@googlegroups.com
An update..
I installed owfs on same ubuntu server and it can detect the sensors and read fine.
So whats wrong with the digitemp?
A kernel issue?

I am using ubuntu 3.13.0-34-generic

14 Ekim 2014 Salı 11:42:13 UTC+3 tarihinde Oguzhan Kayhan yazdı:

de...@desto.org

unread,
Oct 14, 2014, 5:54:55 PM10/14/14
to digi...@googlegroups.com

I believe there is a fault with digitemp v3.6.0 and the USB dongle.  v3.6.0 does not properly clear a buffer... leading to unpredictable functioning.

 

I've modified the code a bit...  v3.6.0_DRJ

...reliably uses the DS2490

...supports the HobbyBoard 4ch Hub.

...allows "nested" hubs

...allows for some a timing tweek... I used while searching for the USB problem... tweek remain and should be harmless

 

In order to run the github code link you will also need to install libusb-1.0

You will need to re-initialize your .digitemprc, as the file format has changed.

 

Here is a link to the code:

https://github.com/desto-kluger/digitemp

 

If you want to modify the code and only fix the USB dongle problem... here is what you need to do:

 

add "memset(buffer,0,0x20);" to near the top of userial/ds2490/usblnk.c owTouchReset()

What I found is that the DS2490 would not always report back 32 bytes of data, and the buffer not being cleared would cause unpredictable behavior.  I should look to see if there is another 16 bytes coming.... but I haven't had the time yet.

 

I am running digitemp on Debian, Ubuntu, and Mint... beaglebone, i5, and ??? using DS2490 and mostly temperature and humidity sensors.  Before the mod mentioned above, by running the code multiple times I could eventually get it to see the sensors... and while reading the sensors it would go through fits of not seeing any...

The modded code has been running flawlessly for a long stretch... I have not witnessed a missed reading!

 

I am also using DTgraph.

 

One last note... because this code allows for "nested" hubs, the -i or -w will take a long time... the code has to ensure that every possible avenue has been turned off before mapping the network.... run it and let it run for several minutes.  I hope to improve it's search feedback in the near future.

 

 

-dusty

--
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/d/optout.

Oguzhan Kayhan

unread,
Oct 15, 2014, 2:55:37 AM10/15/14
to digi...@googlegroups.com
Thats perfectly working...
Thanks a lot..

Just connected 2 test probes and it successfully initialized them . Probably i will be having my hobbyboard 4ch next week and i will able to test it with this also.
Let you know the results..

;)


So sad the original package doesnt get such updates anymore.These changes should definitely be added to the code.  


15 Ekim 2014 Çarşamba 00:54:55 UTC+3 tarihinde kluger yazdı:

Tom

unread,
Oct 17, 2014, 10:04:21 AM10/17/14
to digi...@googlegroups.com

Hey Dusty,

 

I installed all of the libusb* packages

Downloaded, unzipped and tried to compile your code.

 

Received the following.

 

[root@kahuna digitemp-master]# make ds9097u

gcc -I./src -I./userial -O2 -Wall  -DLINUX   -c -o src/digitemp.o src/digitemp.c

src/digitemp.c: In function `main:

src/digitemp.c:2591:7: error: `sensor_list undeclared (first use in this function)

   if( sensor_list.roms != NULL )

       ^

src/digitemp.c:2591:7: note: each undeclared identifier is reported only once for each function it appears in

src/digitemp.c:2594:7: error: `couplerDS_top undeclared (first use in this function)

   if( couplerDS_top != NULL )

       ^

src/digitemp.c:2595:4: warning: implicit declaration of function `free_coupler_ds2409 [-Wimplicit-function-declaration]

    free_coupler_ds2409(1);

    ^

make: *** [src/digitemp.o] Error 1

[root@kahuna digitemp-master]#

 

What am I missing? I am running Fedora 20, kernel 3.16.4 on an Intel x86_64.

 

Tom

de...@desto.org

unread,
Oct 17, 2014, 5:41:41 PM10/17/14
to digi...@googlegroups.com, digi...@googlegroups.com

Hello Tom,

 

There is a chance I broke the ds9097u.  Maybe next week I can look into fixing this.

Try using v3.6.0, unless you need support for the Hobby Board 4ch hub or would like nested hubs.

Here is a link to Brian Lanes v3.6.0: https://github.com/bcl/digitemp

 

If you want to use the ds2490... run make for that.

 

I have not yet tried my code on Fedora 20 or making for the ds9097.  I should have done that! Sorry.

 

Again... probably the errors you are seeing are due to something I changed in Brian's code.

 

-dusty

 

-----Original Message-----

de...@desto.org

unread,
Oct 19, 2014, 1:48:08 PM10/19/14
to digi...@googlegroups.com, digi...@googlegroups.com

Tom,

 

I may have repaired the HobbyBoard / nested hub code.

 

https://github.com/desto-kluger/digitemp

 

I do not have a ds9097u, and so I can not test the code, but it should now compile for you.

If you have the time, try it out and let me know how it goes.

 

Again, this code is only needed if you want:

   HobbyBoard 4ch Hub support

   Nested hub support

   DS2490 working

 

-desto

Reply all
Reply to author
Forward
0 new messages