Command not found when running sudo ./configure && make for libhid

Hi,

I’m on step 1.2.3 of installing ConsoleWD for Raspberry Pi Setup Instructions and am struggling with the make of libhid.

[i]1.2 install libhid

1.2.1 download from http://alioth.debian.org/frs/?group_id=30451.
It is placed into your home folder

1.2.2 modify in the downloaded folder libhid/test/lshid.c line 41
Reads now:
len = ((unsigned long)custom);
modify that one line and add the extra two lines:
//len = ((unsigned long)custom);
len = len;
custom = custom;

1.2.3 When you are in that folder in a terminal window
sudo ./configure && make
at the end you will get an error 2 in the make part, ignore that
sudo make install
this finishes without errors[/i]

I’ve edited the lshid.c in ~/Downloads/libhid-0.2.16/test and am now trying to run:

sudo ./configure && make

But I get the error:

sudo: ./configure: command not found

~/Downloads/libhid-0.2.16 $ ls -lai
total 1508
130459 drwxr-xr-x 11 pi pi 4096 Jan 8 18:08 .
151139 drwxr-xr-x 3 pi pi 4096 Jan 8 18:08 …
130461 -rw-r–r-- 1 pi pi 269841 Jan 8 18:08 aclocal.m4
130463 -rw-r–r-- 1 pi pi 144 Jan 8 18:08 AUTHORS
151546 -rw-r–r-- 1 pi pi 7183 Jan 8 18:08 ChangeLog
151547 -rw-r–r-- 1 pi pi 43668 Jan 8 18:08 config.guess
151548 -rw-r–r-- 1 pi pi 2441 Jan 8 18:08 config.h.in
151549 -rw-r–r-- 1 pi pi 32151 Jan 8 18:08 config.sub
151550 -rw-r–r-- 1 pi pi 793686 Jan 8 18:08 configure
151551 -rw-r–r-- 1 pi pi 3894 Jan 8 18:08 configure.ac
151552 -rw-r–r-- 1 pi pi 18002 Jan 8 18:08 COPYING
151566 drwxr-xr-x 2 pi pi 4096 Jan 8 18:08 debian
151553 -rw-r–r-- 1 pi pi 15936 Jan 8 18:08 depcomp
151581 drwxr-xr-x 4 pi pi 4096 Jan 8 18:08 doc
151586 drwxr-xr-x 2 pi pi 4096 Jan 8 18:08 hidparser
151594 drwxr-xr-x 2 pi pi 4096 Jan 8 18:08 include
151554 -rw-r–r-- 1 pi pi 9498 Jan 8 18:08 INSTALL
151555 -rw-r–r-- 1 pi pi 9233 Jan 8 18:08 install-sh
151556 -rw-r–r-- 1 pi pi 196440 Jan 8 18:08 ltmain.sh
151602 drwxr-xr-x 2 pi pi 4096 Jan 8 18:08 m4
151557 -rw-r–r-- 1 pi pi 1552 Jan 8 18:08 Makefile.am
151558 -rw-r–r-- 1 pi pi 1803 Jan 8 18:08 Makefile.debian
151559 -rw-r–r-- 1 pi pi 26467 Jan 8 18:08 Makefile.in
151560 -rw-r–r-- 1 pi pi 11014 Jan 8 18:08 missing
151561 -rw-r–r-- 1 pi pi 0 Jan 8 18:08 NEWS
151621 drwxr-xr-x 2 pi pi 4096 Jan 8 18:08 pkgconfig
151562 -rw-r–r-- 1 pi pi 4142 Jan 8 18:08 py-compile
151563 -rw-r–r-- 1 pi pi 4972 Jan 8 18:08 README
151564 -rw-r–r-- 1 pi pi 587 Jan 8 18:08 README.licence
290548 drwxr-xr-x 2 pi pi 4096 Jan 8 18:08 src
290565 drwxr-xr-x 2 pi pi 4096 Jan 8 18:08 swig
290576 drwxr-xr-x 2 pi pi 4096 Jan 8 18:10 test
151565 -rw-r–r-- 1 pi pi 5131 Jan 8 18:08 TODO
pi@raspberrypi:~/Downloads/libhid-0.2.16 $

Thanks and sorry for being so dim.

have you tested to see if consolewd runs without needing to do all this anyway?
(make sure to copy the files in the deploy folder to /usr/local/lib/ and /usr/lib/ using sudo cp

I haven’t no.

I was being a good boy and going through the instructions.

Will give it a bash just now.

Ok. That’s looking better and it is running but I don’t seem to be getting a clientraw.txt file created.

This is what I have output to the console:

****Weather Display vers WD_console_13.0****
If use this program,then please consider sending a PayPal donation to [email protected] (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
WMR100 opened OK
data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
data read length ->50
 FF FF 30 60 00 00 0E 13 08 01 12 00 CC 00 FF FF 00 46 E6 13 FA 23 5C 02 FF FF 00 48 0B 0C 29 90 02 00 10 2A 01 FF FF 00 42 00 B9 00 2E 46 00 00 20 8F
send PC ready result 1
data read length ->1
send PC ready result 1

I chose the WMR100 as I have a WMR180 (Weather station type=232).
The red light on the OS USB receiver is a solid red so is connected to my base unit.

It does show that raw data is arriving so that is one thing

Excellent. I wasn’t 100% sure if that was what the output was telling me but assumed that a data read ->1 was good news.

Any idea why my clientraw.txt isn’t being created?

I have /home/pi/Downloads/consolewdfiles/ set to 777 recursively but I’m not seeing any clientraw.txt or anything in /logfiles and no errors to screen.

Thanks for your help. It is appreciated.

For some reason console WD is not picking up the data correctly
You should see it decode the data into readable data
Is the barometer working correct

Hi,

I have wind speed & direction working on my external sensor. No temp/humidity or rainfall as the sensors are broken.

Baromter on the WMR180 base unit is working correctly and it was working on Windows and uploading to Wunderground earlier today before I switched over to consoleWD.

Hope that helps.

No working temp/ hum sensor will be the problem

Ok. thanks. I have one on order. Hopefully it should be here in the next few days.

In the meantime. I logged in this morning and the console is showing

data read length ->50
 FF FF 30 60 00 00 39 08 09 01 12 00 ED 00 FF FF 00 46 D9 13 ED 23 42 02 FF FF 00 48 0C 0C 18 80 01 00 10 09 01 FF FF 00 42 00 91 00 30 28 00 00 20 4B
send PC ready result 1
data read length ->1
send PC ready result 1
data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
**** doing minute routines now 08:58:03
**** updating clientraw extra files
**** updating data logs

And I also now have the following:

pi@raspberrypi:~/consolewdfiles $ ls -lai
total 43868
130454 drwxrwxrwx  5 pi   pi       4096 Jan  9 03:05 .
150887 drwxr-xr-x 22 pi   pi       4096 Jan  9 08:56 ..
151679 -rw-r--r--  1 root root     1802 Jan  9 08:05 clientrawdaily.txt
151513 -rw-r--r--  1 root root     2616 Jan  9 08:58 clientrawextra.txt
151511 -rw-r--r--  1 root root     2092 Jan  9 08:58 clientrawhour.txt
151509 -rw-r--r--  1 root root      608 Jan  9 02:06 clientraw.txt

And clientraw.txt contains the following:

12345 0.0 0.0 0 13.0 0 1013.0 0.0 0.0 0.0 0.000 0.000 16.9 46 0.0 3 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 02 06 05 My_station-02:06:05 0 0 9 1 0 0 0 0 0 0 0 13.0 10.8 13.0 13.0 3 Dry 0.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0 0.0 5356.0 9/1/2018 10.8 10.8 13.0 13.0 0.0 0 0 0 0 0 0 0 0 0 0 13.0 13.0 13.0 13.0 13.0 13.0 13.0 13.0 13.0 13.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 13.0 13.0 13.0 0.0 0 --- --- 0 0 0 0.0 0.0 0 0 0 0 0 0.0 16.9 16.9 12.0 1013.0 1013.0 0 00:00:00 00:00:00 12.0 12.0 0.0 0.0 0 2018 2018 -1 0 0 0 0 0 0 0 0 0 0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 101 !!CWD_console_13.0!! 

So things are looking up!

Just to add.

I restarted consolewd and it stopped updating these files. Tried restarting several times and nothing.

I then edited my config.txt and removed the space between the equals sign and the values for Wunderground (I know, silly me) restarted and it started uploading to Wunderground! It also showed that it was updating the extra files.

151653 -rwxrwxrwx  1 pi   pi       5562 Jan  9 11:02 wdconsole.ini
151631 -rwxrwxrwx  1 pi   pi       3808 Jan  9 11:02 config.txt
151677 -rw-r--r--  1 root root      210 Jan  9 10:42 extravpdata.txt
151513 -rw-r--r--  1 root root     2564 Jan  9 10:42 clientrawextra.txt
151511 -rw-r--r--  1 root root     2092 Jan  9 10:42 clientrawhour.txt
151678 -rw-r--r--  1 root root      369 Jan  9 10:40 cronwudata.txt
151509 -rw-r--r--  1 root root      625 Jan  9 10:32 clientraw.txt
151679 -rw-r--r--  1 root root     1802 Jan  9 08:05 clientrawdaily.txt

Stopped and added FTP details to my server and restarted and now nothing again. Took out the FTP details I had just added and still nothing, no uploading to wunderground or updating of the client files.

Nothing else has changed and I’m back to

Data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
data read length ->50
 FF FF 30 60 00 00 00 0B 09 01 12 00 B7 00 FF FF 00 46 D7 13 EB 23 3E 02 FF FF 00 48 0B 0C 0E E0 00 00 10 5D 01 FF FF 10 42 00 A0 00 30 32 00 00 20 74
send PC ready result 1
data read length ->1
send PC ready result 1

Will continue to investigate.

This is what Wunderground shows: https://www.wunderground.com/personal-weather-station/dashboard?ID=ISCOTTIS5#history

Another update (sorry).

I reset the USB hub and as soon as I did I started to get different results in the console and things are looking up again.

**** doing minute routines now 11:25:01
**** updating clientraw extra files
**** updating data logs
updating wunderground
Sending WU data now
updating records to ini file
WU data to send http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?ID=ISCOTTIS5&PASSWORD=WU9bh73xa&dateutc=2018-01-09+11%3A26%3A01&winddir=000&windspeedmph=0&windgustmph=0&humidity=0&tempf=55.4&rainin=0.00&baromin=29.914&dewptf=122.0&weather=&clouds=&dailyrainin=0.00&solarradiation=0.0&UV=0.0&softwaretype=WeatherDisplay%3AWD_console_13.0&action=updateraw
Wunderground data send Ok 11:25:03
data read length ->50
 FF FF 30 60 00 00 19 0B 09 01 12 00 D0 00 FF FF 00 46 D7 13 EB 23 3E 02 FF FF 00 48 0C 0C 0D D0 00 00 10 4D 01 FF FF 10 42 00 AC 00 2F 3C 00 00 20 89

Must leave it alone now… :wink:

But I can’t. So I edited the config file to enable FTP again and restarted consolewd and again it didn’t work.

Reset the hub/base station connection and it is working again. Seems I have an issue with consolewd not seeing the hub/base station if stopped and restarted.

Could this be because of the issue I had with ./configure && make for libhid or is it something else?

On further inspection I found that my station wasn’t reporting the current pressure to Wunderground correctly. I had a look using the parser at https://www.tnetweather.com/wdparserold/?p=wdparserold and it was showing an old out of date value.

My new outdoor temp/hygro sensor has arrived and upon restarting consolewd I see the same issue. It isn’t updating the .txt files.

I’ve pulled the usb hub from the Pi and put it back into my PC to test and everything is working correctly and I am updating to wunderground as well.

Interestingly, once I pulled the usb hub from the Pi I see this in my console:

data read length ->-1
USBWrite Write Erro Broken pipeUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWrite Write Erro No such deviceUSBWritsend PC ready result 19
data read length ->-1
send PC ready result 19

So it can see the hub, knows when it isn’t connected, says it is getting data but either isn’t, or does but it is incorrect.

restarting consolewd shows:

Weather Display vers WD_console_13.0
If use this program,then please consider sending a PayPal donation to [email protected] (Brian Hamilton)
to help with costs, and support, thanks!
www.weather-display.com
Cannot connect to station: Device or resource busy
WMR100 opened OK

EDIT (again):

I revisited the sudo ./configure && make issue I was having and after a bit of googling I found that if I use

sh configure && make 

It works.

So, now I have the following in my console:

send PC ready result 1
Current data 16:21:06: Temperature= 1.7 Windspeed =0.0 Gustspeed =0.0 Direction =0 Humidity=79 Barometer=1013.0 Daily Rain=0.0

The temp and humidity are as expected as is the timestamp but the barometer is wrong. It should be around 1000. Also there is a wind blowing, not always but often enough that I would expect some wind to show.

My Weather Station is a WMR180 and I set it in the config file to type=232 which is as per the WMR100. I did this because in the Windows version the WMR180 selection was the same as the 100. Is this correct?

Also, if I run a lsusb it shows the station is reporting as a WMRS200.

pi@raspberrypi:~ $ lsusb
Bus 001 Device 004: ID 0fde:ca01 Oregon Scientific WMRS200 weather station
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I’m now at a loss. Anyone got any ideas? is there any further info i can provide that will help fault find?

Thanks again.

I would need to add some debug code re the barometer
When I get. Back tomorrow

Thank you very much. Although there is no hurry as I can run it fine on my Windows desktop, it’s just that I’m impatient when I get my teeth into something even if its taken months to start in the first place.

It looks as though it isn’t just the barometer that is wrong. The windspeed, Gustspeed and Direction were all showing as 0 but as soon as I plugged it back into Windows I started getting values for these. Rain will be 0 as I don’t have a sensor for that yet.

So Time, temp and humidity were correct.

Current data 16:21:06:
Temperature= 1.7
Windspeed =0.0
Gustspeed =0.0
Direction =0
Humidity=79
Barometer=1013.0
Daily Rain=0.0

Hi
I am back now
so can work on adding some more debug code if you like

Hi,

that would be great thanks.

I’ve tested again on the Pi and I am definitely not getting:

Windspeed
Gustspeed
Direction

as these are all 0 values.

And the Barometer reading is incorrect compared to what I see on the Windows version and the weather station base station.

The temperature and Humidity are correct

This is what I see in the console:

data read length ->15
 01 FF FF 00 42 C1 29 00 62 28 00 00 20 D6 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
temperature found, sensor # 0
Temperature data found
Baro Data OK
send PC ready result 1
Current data 08:49:41: Temperature= 4.1 Windspeed =0.0 Gustspeed =0.0 Direction =0 Humidity=98 Barometer=1013.0 Daily Rain=0.0
data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
data read length ->-1
send PC ready result 1
**** doing minute routines now 08:50:03
**** updating clientraw extra files
**** updating data logs
cronftpreal: no process found

and this is the contents of my clientraw.txt file uploaded to my FTP server

12345 0.0 0.0 0 4.1 98 1013.0 0.0 0.0 0.0 0.000 0.000 0.0 0 0.0 3 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 08 51 40 Innerleithen-08:51:40 0 0 12 1 0 0 0 0 0 0 0 4.1 3.0 13.0 1.5 3 Dry 0.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0 3.8 118.4 12/1/2018 10.8 -1.1 13.0 1.5 0.0 0 0 0 0 0 0 0 0 0 0 13.0 13.0 6.1 1.5 1.5 1.7 1.7 1.7 1.7 2.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 13.0 1.5 4.1 0.0 0 --- --- 0 0 0 0.0 0.0 0 0 0 0 0 0.0 18.3 0.0 3.2 1013.0 1013.0 0 00:00:00 00:00:00 12.0 -0.1 3.8 -1.9 0 2018 2018 -1 1 -1 0 0 0 0 0 0 0 0 0 0 0.0 0.0 0.0 4.0 0.0 0.0 0.0 98 78 !!CWD_console_13.0!! 

I just wanted to point out that although you suggested I wouldn’t need to, I was able install libhid, but I haven’t installed libusb as per the Pi install instructions. I did though copy all the files from consolewdfiles/deploy to the systemfolders .

[i]1.3 install libusb

1.3.1 download from http://www.libusb.org/

1.3.2 in a terminal-window go into that folder and type
sudo ./configure --prefix=/usr --disable-static && make
at the end you will get an error 1, ignore those
sudo make install
this finishes without errors

            • this finishes the first step[/i]

If I can provide any further information please say. And I will of course be chucking a donation your way as this program is fab and I really appreciate your help.

it looks like for you, its not passing the CRC error checks, etc
you could try carrying on with installing and configuring libusb

it does work for others with a wmr100 (and it does work OK here too)

That’s encouraging. I will continue with installing libusb and then if I have no luck, see if I can grab a working iso of someones server and use that instead.

EDIT

AFAIK libusb is installed already

sudo apt-get install libusb-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libusb-dev is already the newest version (2:0.1.12-30).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Just to note. The “ConsoleWD for Raspberry Pi Setup Instructions” instructions at: HOWTO: ConsoleWD for Raspberry Pi Setup Instructions - Old version need to be updated as the url to obtain libusb is incorrect.

“libusb is a cross-platform user-mode library that provides access to USB devices. The project website is at libusb.info. The old project site libusb.org should not be used.”

Ok.

I’ve installed the image created by Peter (https://www.weather-watch.com/smf/index.php?action=profile;u=31636) and am still seeing the same issue.

Temp is reading correctly
Humidity is reading correctly
Windspeed is 0
Gustspeed is 0
Baromter is showing 1013.0

As before. All these sensors worked correctly on my Windows version of WD.

data read length ->50
 FF FF 30 60 00 00 0B 12 0D 01 12 00 CD 00 FF FF 00 46 E2 13 F6 03 34 02 FF FF 00 48 08 0C 0B B0 00 00 20 37 01 FF FF 00 42 00 BD 00 31 50 00 00 20 A0
send PC ready result 1
data read length ->15
 01 FF FF 00 42 C1 9A 00 5C 8C 00 00 20 A5 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
temperature found, sensor # 0
Temperature data found
Baro Data OK
send PC ready result 1
Current data : Temperature= 14.4 Windspeed =0.0 Gustspeed =0.0 Direction =0 Humidity=92 Barometer=1013.0 Daily Rain=0.0

Just noticed. I’ve got an WMR180 not a 100.

I select the 100 in consolewd as that is what I select in the Windows version.

Is this perhaps the issue? The 180 isn’t actually supported in consolewd?