Menu

#13 USB not working on FreeBSD.

open
nobody
5
2015-03-30
2006-05-24
Fred Cohen
No

I'm having trouble talking to oww using DS9490 on
FreeBSD 6.0.

FreeBSD is detecting the adapter:
ugen0: vendor 0x04fa product 0x2490, rev 1.00/0.02, addr 2

owwnogui is finding the adapter.

It looks like it's not able to find any of the devices
attached to the 1-wire bus.

I'm using libusb-0.1.12

Are there any suggestions for troubleshooting this
problem? As far as I can tell, the linux code should
be portable.

I've add some additional messages in various parts of
the code:

usb_os_find_devices: Found /dev/ugen0 on /dev/usb0
usb_control_msg: 128 6 512 0 0xbfbfe598 8 1000
usb_control_msg: 128 6 512 0 0x8073200 129 1000
bus/device idVendor/idProduct
Looking at each USB bus.
/dev/usb0//dev/ugen0 04FA/2490
Found DS2490 device #0 at /dev/usb0//dev/ugen0
Looking at each USB bus.
Looking at each USB bus.
Looking at each USB bus.
Looking at each USB bus.
USB error: usb_clear_halt called, unimplemented on BSD
USB error: usb_clear_halt called, unimplemented on BSD
USB error: usb_clear_halt called, unimplemented on BSD
AdapterRecover - DS2490Detect
usb_control_msg: 64 0 0 0 0x0 0 5000
usb_control_msg: 64 1 19 0 0x0 0 5000
usb_control_msg: 64 1 27 64 0x0 0 5000
usb_control_msg: 64 2 0 1 0x0 0 5000
DS2490ShortCheck
Returning true from DS2490GetStatus: bufferlength=16
owTouchReset_DS9490: port=0
usb_control_msg: 64 1 2123 1 0x0 0 5000
DS2490ShortCheck
Returning true from DS2490GetStatus: bufferlength=32
DS2490ShortCheck: result register #=0 value = 2
DS2490ShortCheck: SH bit (0x02)
DS2490ShortCheck: result register #=1 value = 0
DS2490ShortCheck: result register #=2 value = 0
DS2490ShortCheck: result register #=3 value = 64
DS2490ShortCheck: result register #=4 value = 5
DS2490ShortCheck: result register #=5 value = 4
DS2490ShortCheck: result register #=6 value = 4
DS2490ShortCheck: result register #=7 value = 0
DS2490ShortCheck: result register #=8 value = 32
DS2490ShortCheck: result register #=9 value = 75
DS2490ShortCheck: SH bit (0x02)
DS2490ShortCheck: result register #=10 value = 8
DS2490ShortCheck: result register #=11 value = 0
DS2490ShortCheck: result register #=12 value = 0
DS2490ShortCheck: result register #=13 value = 0
DS2490ShortCheck: result register #=14 value = 0
DS2490ShortCheck: result register #=15 value = 0
DS2490ShortCheck: Empty Bus detect
DS2490ShortCheck: Empty Bus detect
owTouchReset_DS9490 Ok
owNext_DS9490: portnum=0 do_reset=1 alarm_only=0
owNext_DS9490: attempting reset
owTouchReset_DS9490: port=0
usb_control_msg: 64 1 2123 1 0x0 0 5000
DS2490ShortCheck
Returning true from DS2490GetStatus: bufferlength=32
DS2490ShortCheck: result register #=0 value = 2
DS2490ShortCheck: SH bit (0x02)
DS2490ShortCheck: result register #=1 value = 0
DS2490ShortCheck: result register #=2 value = 0
DS2490ShortCheck: result register #=3 value = 64
DS2490ShortCheck: result register #=4 value = 5
DS2490ShortCheck: result register #=5 value = 4
DS2490ShortCheck: result register #=6 value = 4
DS2490ShortCheck: result register #=7 value = 0
DS2490ShortCheck: result register #=8 value = 32
DS2490ShortCheck: result register #=9 value = 75
DS2490ShortCheck: SH bit (0x02)
DS2490ShortCheck: result register #=10 value = 8
DS2490ShortCheck: result register #=11 value = 0
DS2490ShortCheck: result register #=12 value = 0
DS2490ShortCheck: result register #=13 value = 0
DS2490ShortCheck: result register #=14 value = 0
DS2490ShortCheck: result register #=15 value = 0
DS2490ShortCheck: Empty Bus detect
DS2490ShortCheck: Empty Bus detect
owTouchReset_DS9490 Ok
owNext_DS9490: no parts found on 1-wire

Discussion

  • Fred Cohen

    Fred Cohen - 2006-05-24

    Logged In: YES
    user_id=917719

    Here's the debug log from the startup.

    24, 11:29:44 [startup (startup)] setup_oww_un_name:
    /tmp/oww_trx_un
    24, 11:29:44 [startup (startup)] Thermometer 1: 1.000000
    0.000000 0.000000 0.000000
    24, 11:29:44 [startup (startup)] Anemometer: 1.000000
    0.000000 0.000000 0.000000
    24, 11:29:44 [startup (startup)] GPC0 0 0
    24, 11:29:44 [startup (startup)] GPC1 0 0
    24, 11:29:44 [startup (startup)] GPC2 0 0
    24, 11:29:44 [startup (startup)] GPC3 0 0
    24, 11:29:44 [startup (startup)] GPC4 0 0
    24, 11:29:44 [startup (startup)] GPC5 0 0
    24, 11:29:44 [startup (startup)] GPC6 0 0
    24, 11:29:44 [startup (startup)] GPC7 0 0
    24, 11:29:44 [startup (startup)] prog_state startup -> startup
    24, 11:29:44 [startup (startup)] null_event: startup
    24, 11:29:44 [startup (startup)] next_smtest 1
    24, 11:29:44 [startup (startup)] now 74
    24, 11:29:44 [startup (startup)] state_machine: startup
    24, 11:29:44 [startup (startup)] applctn_startup_finished.
    Debug to "/tmp/oww-debug"
    24, 11:29:44 [startup (startup)] Interactive? No
    24, 11:29:44 [port_ok (startup)] prog_state startup -> port_ok
    24, 11:29:44 [port_ok (startup)] Unable to claim LOCAL port
    /tmp/oww_trx_un. Perhaps another task claimed it already?
    24, 11:29:44 [port_ok (startup)] Unable to claim LOCAL port
    /tmp/oww_txtserve. Perhaps another task claimed it already?
    24, 11:29:44 [port_ok (startup)] state_machine: port_ok
    24, 11:29:44 [port_ok (startup)] owAcquireEx: com = USB
    24, 11:29:45 [port_ok (startup)] devices_portnum_var = 0x600
    24, 11:29:45 [port_ok (startup)] owAcquireEx OK
    24, 11:29:45 [port_ok (startup)] Thermometer 1: 1.000000
    0.000000 0.000000 0.000000
    24, 11:29:45 [port_ok (startup)] Anemometer: 1.000000
    0.000000 0.000000 0.000000
    24, 11:29:45 [port_ok (startup)] devices_search_and_add(0x1f, 1)
    24, 11:29:45 [port_ok (startup)] End of devices_search_and_add
    24, 11:29:45 [port_ok (startup)] devices_search_and_add(0x0, 0)
    24, 11:29:45 [port_ok (startup)] End of devices_search_and_add
    24, 11:29:45 [port_ok (startup)] Summary
    24, 11:29:45 [port_ok (startup)] Vane switch(0) > search list -1
    24, 11:29:45 [port_ok (startup)] Vane ADC(1) > search list -1
    24, 11:29:45 [port_ok (startup)] Anemometer(2) > search list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 0 (N)(3) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 1 (NE)(4) >
    search list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 2 (E)(5) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 3 (SE)(6) >
    search list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 4 (S)(7) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 5 (SW)(8) >
    search list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 6 (W)(9) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 7 (NW)(10) >
    search list -1
    24, 11:29:45 [port_ok (startup)] Rain gauge1(11) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 1(12) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 2(13) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 3(14) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 4(15) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 5(16) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 6(17) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 7(18) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 8(19) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Humidity 1(20) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 2(21) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 3(22) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 4(23) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 5(24) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 6(25) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 7(26) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 8(27) > search list -1
    24, 11:29:45 [port_ok (startup)] Barometer 1(28) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 2(29) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 3(30) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 4(31) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 5(32) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 6(33) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 7(34) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 8(35) > search
    list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 1(36) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 2(37) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 3(38) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 4(39) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 5(40) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 6(41) >
    search list -1
    24, 11:29:44 [startup (startup)] setup_oww_un_name:
    /tmp/oww_trx_un
    24, 11:29:44 [startup (startup)] Thermometer 1: 1.000000
    0.000000 0.000000 0.000000
    24, 11:29:44 [startup (startup)] Anemometer: 1.000000
    0.000000 0.000000 0.000000
    24, 11:29:44 [startup (startup)] GPC0 0 0
    24, 11:29:44 [startup (startup)] GPC1 0 0
    24, 11:29:44 [startup (startup)] GPC2 0 0
    24, 11:29:44 [startup (startup)] GPC3 0 0
    24, 11:29:44 [startup (startup)] GPC4 0 0
    24, 11:29:44 [startup (startup)] GPC5 0 0
    24, 11:29:44 [startup (startup)] GPC6 0 0
    24, 11:29:44 [startup (startup)] GPC7 0 0
    24, 11:29:44 [startup (startup)] prog_state startup -> startup
    24, 11:29:44 [startup (startup)] null_event: startup
    24, 11:29:44 [startup (startup)] next_smtest 1
    24, 11:29:44 [startup (startup)] now 74
    24, 11:29:44 [startup (startup)] state_machine: startup
    24, 11:29:44 [startup (startup)] applctn_startup_finished.
    Debug to "/tmp/oww-debug"
    24, 11:29:44 [startup (startup)] Interactive? No
    24, 11:29:44 [port_ok (startup)] prog_state startup -> port_ok
    24, 11:29:44 [port_ok (startup)] Unable to claim LOCAL port
    /tmp/oww_trx_un. Perhaps another task claimed it already?
    24, 11:29:44 [port_ok (startup)] Unable to claim LOCAL port
    /tmp/oww_txtserve. Perhaps another task claimed it already?
    24, 11:29:44 [port_ok (startup)] state_machine: port_ok
    24, 11:29:44 [port_ok (startup)] owAcquireEx: com = USB
    24, 11:29:45 [port_ok (startup)] devices_portnum_var = 0x600
    24, 11:29:45 [port_ok (startup)] owAcquireEx OK
    24, 11:29:45 [port_ok (startup)] Thermometer 1: 1.000000
    0.000000 0.000000 0.000000
    24, 11:29:45 [port_ok (startup)] Anemometer: 1.000000
    0.000000 0.000000 0.000000
    24, 11:29:45 [port_ok (startup)] devices_search_and_add(0x1f, 1)
    24, 11:29:45 [port_ok (startup)] End of devices_search_and_add
    24, 11:29:45 [port_ok (startup)] devices_search_and_add(0x0, 0)
    24, 11:29:45 [port_ok (startup)] End of devices_search_and_add
    24, 11:29:45 [port_ok (startup)] Summary
    24, 11:29:45 [port_ok (startup)] Vane switch(0) > search list -1
    24, 11:29:45 [port_ok (startup)] Vane ADC(1) > search list -1
    24, 11:29:45 [port_ok (startup)] Anemometer(2) > search list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 0 (N)(3) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 1 (NE)(4) >
    search list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 2 (E)(5) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 3 (SE)(6) >
    search list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 4 (S)(7) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 5 (SW)(8) >
    search list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 6 (W)(9) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Wind vane 7 (NW)(10) >
    search list -1
    24, 11:29:45 [port_ok (startup)] Rain gauge1(11) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 1(12) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 2(13) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 3(14) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 4(15) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 5(16) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 6(17) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 7(18) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Thermometer 8(19) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Humidity 1(20) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 2(21) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 3(22) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 4(23) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 5(24) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 6(25) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 7(26) > search list -1
    24, 11:29:45 [port_ok (startup)] Humidity 8(27) > search list -1
    24, 11:29:45 [port_ok (startup)] Barometer 1(28) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 2(29) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 3(30) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 4(31) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 5(32) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 6(33) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 7(34) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Barometer 8(35) > search
    list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 1(36) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 2(37) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 3(38) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 4(39) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 5(40) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 6(41) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 7(42) >
    search list -1
    24, 11:29:45 [port_ok (startup)] TAI8570 writer 8(43) >
    search list -1
    24, 11:29:45 [port_ok (startup)] GP Counter 1(44) > search
    list -1
    24, 11:29:45 [port_ok (startup)] GP Counter 2(45) > search
    list -1
    24, 11:29:45 [port_ok (startup)] GP Counter 3(46) > search
    list -1
    24, 11:29:45 [port_ok (startup)] GP Counter 4(47) > search
    list -1
    24, 11:29:45 [port_ok (startup)] GP Counter 5(48) > search
    list -1
    24, 11:29:45 [port_ok (startup)] GP Counter 6(49) > search
    list -1
    24, 11:29:45 [port_ok (startup)] GP Counter 7(50) > search
    list -1
    24, 11:29:45 [port_ok (startup)] GP Counter 8(51) > search
    list -1
    24, 11:29:45 [port_ok (startup)] Solar 1(52) > search list -1
    24, 11:29:45 [port_ok (startup)] Solar 2(53) > search list -1
    24, 11:29:45 [port_ok (startup)] Solar 3(54) > search list -1
    24, 11:29:45 [port_ok (startup)] Solar 4(55) > search list -1
    24, 11:29:45 [port_ok (startup)] LCD 1(56) > search list -1
    24, 11:29:45 [port_ok (startup)] LCD 2(57) > search list -1
    24, 11:29:45 [port_ok (startup)] LCD 3(58) > search list -1
    24, 11:29:45 [port_ok (startup)] LCD 4(59) > search list -1
    24, 11:29:45 [port_ok (startup)] Branch A(60) > search list -1
    24, 11:29:45 [port_ok (startup)] Branch B(61) > search list -1
    24, 11:29:45 [port_ok (startup)] Branch C(62) > search list -1
    24, 11:29:45 [port_ok (startup)] Branch D(63) > search list -1
    24, 11:29:45 [port_ok (startup)] Branch E(64) > search list -1
    24, 11:29:45 [port_ok (startup)] Branch F(65) > search list -1
    24, 11:29:45 [port_ok (startup)] Branch G(66) > search list -1
    24, 11:29:45 [port_ok (startup)] Branch H(67) > search list -1
    24, 11:29:45 [port_ok (startup)] Branch I(68) > search list -1
    24, 11:29:45 [port_ok (startup)] Purge Vane ADC
    24, 11:29:45 [port_ok (startup)] Purge Anemometer
    24, 11:29:45 [port_ok (startup)] Purge Thermometer 1
    24, 11:29:45 [port_ok (startup)] Checking weather station:
    "Anemometer" not found
    24, 11:29:45 [port_ok (startup)] Checking weather station:
    wind vane not found
    24, 11:29:45 [port_ok (startup)] FindWeatherStation returned 1
    24, 11:29:45 [ready (port_ok)] prog_state port_ok -> ready
    24, 11:29:45 [ready (port_ok)] 1-wire Error: No Devices
    found on 1-Wire Network
    24, 11:29:45 [ready (port_ok)] 1-wire Error: Failed to
    initialize system resource
    24, 11:29:45 [ready (port_ok)] 1-wire Error: 1-Wire is shorted
    24, 11:29:45 [ready (port_ok)] 1-wire Error: No Devices
    found on 1-Wire Network
    24, 11:29:45 [ready (port_ok)] 1-wire Error: Failed to
    initialize system resource
    24, 11:29:45 [ready (port_ok)] 1-wire Error: 1-Wire is shorted
    24, 11:29:45 [ready (port_ok)] 1-wire Error: Failed to
    initialize system resource
    24, 11:29:45 [ready (port_ok)] 1-wire Error: 1-Wire is shorted
    24, 11:29:45 [ready (port_ok)] state_machine: ready

     
  • Fred Cohen

    Fred Cohen - 2006-05-24

    Logged In: YES
    user_id=917719

    One last thing.. I also have a DS9097U serial adapter
    attached to the same system which works just fine with the OWW.

     
  • Fred Cohen

    Fred Cohen - 2006-06-02

    Logged In: YES
    user_id=917719

    I've done some more homework on this problem. I still can't
    pinpoint the problem, but it occurs not only in this
    software, but in the Dallas PDK. It responds the same way
    on latest official releases of FreeBSD 6, OpenBSD and NetBSD.

    It does not appear to be hardware related. The same
    response occurs on various PCs.

    At the moment I'm stuck.. it's either a kernel issue or libusb.