No fowsr data transfer

46 views
Skip to first unread message

Doug Crompton

unread,
Sep 10, 2015, 1:14:37 AM9/10/15
to fowsr
It looks like this group is kind of dead but hopefully someone reads it. I emailed Josch directly but thought I would repeat here in case anyone had some ideas.

 I have been running fowsr for years on a PC with suse 7.x. It has worked fine.

 Recently I ported it over to an Odroid C1+  running Archlinux  - It compiled fine and appears to run but I get no data back.

 fowsr -b returns all 0's.  If I move the USB back to the suse box it works fine. So the problem does not appear to be with the ws2000.

Compiling with gcc 4.9.2.  usblib and usblib compat installed.

Do you have any ideas what might be wrong? Are there any other tests I can run?

I also plan to try it on a raspberry Pi 2.

Has anyone got this going on an Odroid?   3.10.80-8-ARCH

core/libusb 1.0.19-1 [installed]
    Library that provides generic access to USB devices
extra/libusb-compat 0.1.5-1 [installed]

Nosey Nick

unread,
Sep 10, 2015, 9:19:51 PM9/10/15
to fowsr
On Thursday, September 10, 2015 at 1:14:37 AM UTC-4, Doug Crompton wrote:
 fowsr -b returns all 0's.  If I move the USB back to the suse box it works fine. So the problem does not appear to be with the ws2000.

Have you tried running with -v3c EG fowsr -c -v3c ?
If "strace fowsr -c -v3c" is an option, that might give even more clues, but tends to be a bit spewey and sometimes misleading
Sometimes it turns out to be NOT a USB problem, but related to permissions / accessibility of the fowsr.dat cache file

Beyond that, I'd probably be adding extra printf() statements to the code and seeing what the ACTUAL USB frames look like   :-/

Nick
-- not officially a fowsr developer, but just another hacker   :-)


Doug Crompton

unread,
Sep 11, 2015, 12:45:41 AM9/11/15
to fowsr
Thanks Nick ... Here is some more info I pulled tonight. I did compile the old wwsr program and it does work so this must be something screwy in the fowsr code. I changed the path for WORKPATH and printed it out.to make sure it was right as you will see in the output below.

I mark them working and non working systems. The non working is the Odroid but as you can see it does return the data in wwsr. I will have to do a dummy write to a file in fowsr to see if there is something about the file permissions. I always run these as root and the file permissions are set for root.


NON WORKING SYSTEM -

fowsr.src]# ./fowsr -c
Work Directory - /tmp/fowsr/
Log Directory - /tmp/fowsr/%s.log
/tmp/fowsr/fowsr.dat

usb_interrupt_read failed (-110) whithin CUSB_read_block(0000,...)
CWS_Read: wrong current_pos=0x0000
libusb: warning [libusb_exit] application left some devices open

./fowsr -b
Work Directory - /tmp/fowsr/
Log Directory - /tmp/fowsr/%s.log
/tmp/fowsr/fowsr.dat000268D4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
000268E4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
000268F4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026904 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026914 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026924 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026934 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026944 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026954 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026964 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026974 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026984 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
00026994 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
000269A4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
000269B4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................
000269C4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................

 ./wwsr -a
Reading last updated record from device
Last saved values:
224:            interval:                   5
225:            indoor humidity            34
228:            outdoor humidity           40
226 227:        indoor temperature         26.6
229 230:        outdoor temperature        35.7
233:            wind speed                  0.0
234:            wind gust                   0.0
236:            wind direction             SE
238 239:        rain?                       2.1
237:            rain - ??                   3.0
248:            rain1                      21
                rain2                      30
235:            other 1                     0
239:            other 2                     0
231 232:        pressure(hPa)            1004.6
                Current history pos:     3e20

Current values:
240:            Since last save:            2min
241:            indoor humidity            40
244:            outdoor humidity           99
242 243:        indoor temperature         27.4
245 246:        outdoor temperature        20.5
249:            wind speed                  0.3
250:            wind gust                   0.7
252:            wind direction             NW
254 255:        rain? this is always zero     2.1
253:            rain - 24h?                 3.0
254:            rain1                      21
                rain2                      30
251:            other 1                     0
255:            other 2                     0
247 248:        pressure(hPa)             996.0
                Current history pos:      c70

WORKING SYSTEM -

./wwsr -a
Reading last updated record from device
Last saved values:
224:            interval:                   5
225:            indoor humidity            34
228:            outdoor humidity           40
226 227:        indoor temperature         26.6
229 230:        outdoor temperature        35.7
233:            wind speed                  0.0
234:            wind gust                   0.0
236:            wind direction             SE
238 239:        rain?                       2.1
237:            rain - ??                   3.0
248:            rain1                      21
                rain2                      30
235:            other 1                     0
239:            other 2                     0
231 232:        pressure(hPa)            1004.6
                Current history pos:     3e20

Current values:
240:            Since last save:            3min
241:            indoor humidity            36
244:            outdoor humidity           99
242 243:        indoor temperature         27.4
245 246:        outdoor temperature        20.5
249:            wind speed                  0.3
250:            wind gust                   0.7
252:            wind direction             NW
254 255:        rain? this is always zero     2.1
253:            rain - 24h?                 3.0
254:            rain1                      21
                rain2                      30
251:            other 1                     0
255:            other 2                     0
247 248:        pressure(hPa)             995.9
                Current history pos:        0


fowsr -b
0805E300 | 00 00 00 00 __ __ __ __ __ __ __ __ __ __ __ __ | ....
usb_set_debug: Setting debugging level to 1 (on)
usb_get_driver_np returned -61
0804E300 | 55 AA FF FF FF FF FF FF 00 00 00 00 00 00 00 00 | U�..............
0804E310 | 05 47 08 2D 09 00 00 00 85 00 00 F0 0F 00 70 67 | .G.-....�..�..pg
0804E320 | 24 27 E6 26 00 00 00 00 00 00 01 15 09 10 22 59 | $'�&.........."Y
0804E330 | 41 23 A8 02 40 01 46 2D 5C 03 8C 00 A8 02 40 01 | A#�.@.F-\.�.�.@.
0804E340 | F4 01 8C 00 00 0C 13 0B 00 0C 13 0B 00 70 00 00 | �.�..........p..
0804E350 | DF 00 00 04 00 C5 00 12 00 00 00 00 00 00 00 00 | �....�..........
0804E360 | 00 00 61 0A 63 0A 3B 01 CC 00 74 01 4A 81 74 01 | ..a.c.;.�.t.J�t.
0804E370 | 93 81 18 01 68 81 54 28 FE 24 AE 28 76 25 11 03 | ��..h�T(�$�(v%..
0804E380 | 3A 03 9D 02 7E 09 EE 11 91 1D C6 3F 00 13 04 04 | :.�.~.�.�.�?....
0804E390 | 12 53 14 02 22 18 42 12 09 28 02 56 13 11 24 19 | .S..".B..(.V..$.
0804E3A0 | 45 12 09 28 14 40 12 10 30 20 44 13 07 18 15 34 | E..(.@..0.D....4
0804E3B0 | 12 10 23 14 53 13 07 18 15 34 12 10 23 14 53 14 | ..#.S....4..#.S.
0804E3C0 | 07 15 11 30 15 02 20 04 13 15 02 28 10 55 12 10 | ...0.......(.U..
0804E3D0 | 29 20 42 13 11 29 23 32 12 10 29 20 42 12 12 25 | ).B..)#2..).B..%
0804E3E0 | 11 03 10 06 18 20 43 15 06 05 07 20 15 04 21 02 | ......C.......!.
0804E3F0 | 17 15 06 21 23 03 15 06 30 12 12 15 08 21 00 35 | ...!#...0....!.5
0805E304 | 00 00 00 00 __ __ __ __ __ __ __ __ __ __ __ __ | ....
failed to release interface: 0
failed to close interface: 0


Doug Crompton

unread,
Sep 11, 2015, 10:50:38 AM9/11/15
to fowsr
OK - PROBLEM FIXED!

Like was mentioned in many of the posts and I should have listened to is to remove the battery from the WX display wait and reinsert.  Why this worked I don't know because another computer read it fine the way it was. For that reason one would not suspect you would have to do that.

Also the directory define's at the beginning of the fowsr.c code are a little screwy.  Because I am using an Odroid running from an SD card I wanted all writes in a tmp file system. I have /var/log defined as a tmp file system. The problem was that fowsr wanted to put the fowsr.dat file in /var not /var/log or /var/log/fowsr.  I commented out all the defines and just added one line to put it where I wanted it.

  #define WORKPATH "/var/log/fowsr/"

I also added two lines in main to show the actual path -

  printf("Work Directory - %s\n",WORKPATH);
  printf("Log Directory - %s\n",LOGPATH);

Now everything is stored in /var/log/fowsr

I know fowsr is meant to work across several platforms but the tests for that don't seem to work right. When compiling it did say "for all others" but it seems to want to use the define for openwrt for WORKPATH directory.

So the bottom line is if you are having problem reset the WX display by removing the battery!
 



Reply all
Reply to author
Forward
0 new messages