Overclock.net banner

1 - 20 of 56 Posts

·
Registered
Joined
·
114 Posts
Discussion Starter #1
It's a long shot, but has anyone managed to get Aquaero 5 working in Linux?

My experience so far (Ubuntu 12:04):

Official software does not compile (duh ... 6 years since the last update)

Code from https://github.com/lynix/aerotools/ does not compile either (no libraries/headers)

Once I install missing packages (fortunately, libusb-1.0 is available via apt-get), it still does not compile. Did someone change the command-line syntax of gcc in the last few years so that it ignores -l options passed before the list of input files?

Hacked the makefile. Got it to compile and to link. It does not find the device. Problem solved by replacing the hardcoded device ID 0c70:f0b0 (Aquaero 4) with 0c70:f001 (Aquaero 5).

Now it finds the device, but it does not get past the call to libusb_set_configuration(). By default, it'll try again after the timeout, but the value of the timeout is set to 200 seconds. Besides, waiting does not help. dmesg displays multiple warning messages: "interface 1 claimed by usbhid while 'aerocli' sets config #1" Looks like the device is forcibly taken over by the usbhid driver. Problem solved by calling libusb_detach_kernel_driver(handle, 1); libusb_detach_kernel_driver(handle, 2);

After jumping through these hoops, one might hope that it would finally work, but no ... now I get a timeout in libusb_interrupt_transfer(). And this one feels like a change in the device protocol. But it's 5 AM and I'm too sleepy to investigate.

Google is not helpful. Am I the first person ever to get this far?
 

·
Registered
Joined
·
114 Posts
Discussion Starter #2
Making some progress. I'll leave some notes here, if I don't get around to putting an aquaero 5 compatible tool on sourceforge or something, maybe someone else will find this useful.

Starting point:

https://github.com/lynix/aerotools/

Change the device PID:

#define AQ_USB_PID 0xf001

Change the endpoint (using interface #3 instead of #1):

#define AQ_USB_ENDP 0x83

Change the retry delay (bugfix):

#define AQ_USB_RETRY_DELAY 2

Change the packet size:

#define AQ_USB_READ_LEN 659

Most of the remaining #define's must be changed too, the packet format is very different and it has to be reverse engineered. As far as I can tell, there are (at least) 8 temperature sensor fields starting at 0x67 (2 bytes each, divide by 100.0, unlike Aquaero 4 where you divide by 10.0); and a number of fan RPM sensor fields, a bit further down.

In Aquaero 4 there were temperature sensor name / fan name fields; If they are still there in the packet in Aquaero 5, it's not obvious where they are.
 

·
Premium Member
Joined
·
8,040 Posts
Quote:
Originally Posted by hamster3null View Post

Making some progress. I'll leave some notes here, if I don't get around to putting an aquaero 5 compatible tool on sourceforge or something, maybe someone else will find this useful.
That's very considerate of you
smile.gif


I'm afraid I can't be of any help as I don't own any Aquaero products. But it sounds like you know what you're doing so I really don't think I could offer any additional assistance anyway.
 

·
Registered
Joined
·
114 Posts
Discussion Starter #4
Quote:
Originally Posted by Plan9 View Post

That's very considerate of you
smile.gif
This thread already comes up as the first hit for "'aquaero 5 linux" query both in Google and Bing. I'm sure someone will be looking for this information sooner or later.
 

·
Premium Member
Joined
·
8,040 Posts
Quote:
Originally Posted by hamster3null View Post

This thread already comes up as the first hit for "'aquaero 5 linux" query both in Google and Bing. I'm sure someone will be looking for this information sooner or later.
Oh totally. I spend half my working life surfing forums looking for solutions to various Linux / UNIX faults so I appreciate people who do update threads like you are
thumb.gif
 

·
Registered
Joined
·
36 Posts
Quote:
Originally Posted by hamster3null View Post

This thread already comes up as the first hit for "'aquaero 5 linux" query both in Google and Bing. I'm sure someone will be looking for this information sooner or later.
That's how I found it
wink.gif


I just noticed a post on the Aquacomputer english forum that they are planning to release an SDK and docs supporting the Aquaero 5 toward the end of the year, but it looks like we are on our own until then.

What have you been using to inspect the USB communication between Aquasuite the Aquaero 5? I haven't found much that works on Win7 x86_64...
 

·
Registered
Joined
·
114 Posts
Discussion Starter #7
I wasn't doing that. I was just looking at packets in Linux and checking what happens if I plug in or unplug different sensors. E.g. if the temperature sensor #1 is unplugged, I see two bytes 0x7F 0xFF at position 0x67, but if it's plugged in, I see numbers that look like temperature readings in the same place.
 

·
Registered
Joined
·
36 Posts
Quote:
Originally Posted by hamster3null View Post

I wasn't doing that. I was just looking at packets in Linux and checking what happens if I plug in or unplug different sensors. E.g. if the temperature sensor #1 is unplugged, I see two bytes 0x7F 0xFF at position 0x67, but if it's plugged in, I see numbers that look like temperature readings in the same place.
Good deal. It sounds like you have already got your setup polling the device, and just need to decipher the returned payload. Do have an equivalent of the aerotools memory_map.txt to capture your deciphering progress?

I still have a little bit of hardware hacking to do before I can hook up my Aquaero 5 to my CentOS 6.3-based Linux box, but would be happy to help once it is online.
 

·
Registered
Joined
·
36 Posts
I am sorry for reviving this thread but I just purchase one hoping to make it work on Linux.
Has anybody made progress?
Has anybody try to use the software under wine?

Take care.
 

·
Registered
Joined
·
36 Posts
Unfortunately I have had a wee setback with my hardware build and won't have my Aquaero 5 online and attached to my Linux box quite as soon as I had hoped. I hope the OP has had more success with their protocol deciphering efforts than I have had in mine
rolleyes.gif
 

·
Registered
Joined
·
114 Posts
Discussion Starter #13
Sadly, I was swamped with a ton of other things and I had no time to work on aquaero.

I hope to get further results by next weekend.
 

·
Registered
Joined
·
36 Posts
Hi hamster3null,

I finally have my Aquaero5 XT back in hand after being repaired by Aquacomputer and after the addition of an USB isolator have it attached to my CentOS 6.x box.

I made the define changes recommended in post #2 of this thread to libaquaero.h, as well as a slight enhancement to the changes referenced in post #1 by tweaking aq_dev_init in libaquaero.c with the following:

Code:

Code:
/* detach kernel driver */
        if (libusb_kernel_driver_active(handle, 0)) {
                i = libusb_detach_kernel_driver(handle, 0);
                if (i != 0 && i != LIBUSB_ERROR_NOT_FOUND) {
                        *err = aq_strcat("failed to detach kernel driver: ",
                                        aq_libusb_strerr(i));
                        libusb_close(handle);
                        return -1;
                }
        }
        /* detach kernel driver 1 (Aquaero 5 )*/
        if (libusb_kernel_driver_active(handle, 1)) {
                i = libusb_detach_kernel_driver(handle, 1);
                if (i != 0 && i != LIBUSB_ERROR_NOT_FOUND) {
                        *err = aq_strcat("failed to detach kernel driver 1: ",
                                        aq_libusb_strerr(i));
                        libusb_close(handle);
                        return -1;
                }
        }
        /* detach kernel driver 2 (Aquaero 5)*/
        if (libusb_kernel_driver_active(handle, 2)) {
                i = libusb_detach_kernel_driver(handle, 2);
                if (i != 0 && i != LIBUSB_ERROR_NOT_FOUND) {
                        *err = aq_strcat("failed to detach kernel driver 2: ",
                                        aq_libusb_strerr(i));
                        libusb_close(handle);
                        return -1;
                }
        }
I can now run aerocli and get raw data with aerocli -d, but have only just started analyzing the results.
 

·
Registered
Joined
·
36 Posts
For anyone interested in helping decipher the payload, here is a dump:

Code:

Code:
--------- 0  1  2  3  4  5  6  7   8  9  a  b  c  d  e  f
00000000  01 05 a7 9f 4d 03 f5 ff  ff ff ff 04 03 00 65 15 
00000010  e0 00 00 10 2e 00 00 14  c5 03 00 00 02 00 00 00 
00000020  00 00 05 a7 9f 4d 07 00  00 02 0a 00 ff ff 00 27 
00000030  10 0f a0 13 88 00 00 00  00 00 00 00 00 00 00 09 
00000040  be 0f f9 0f f9 0f f9 0f  fa 0f f9 0f f9 0f f8 0c  
00000050  7a 01 83 0c 66 00 27 0c  76 00 27 0c 5e 00 27 07 
00000060  b8 07 a6 06 9a 05 d8 0b  2e 7f ff 7f ff 7f ff 7f 
00000070  ff 7f ff 7f ff 7f ff 7f  ff 7f ff 7f ff 7f ff 7f  
00000080  ff 7f ff 7f ff 7f ff 7f  ff 7f ff 7f ff 7f ff 7f  
00000090  ff 7f ff 7f ff 7f ff 7f  ff 7f ff 7f ff 7f ff 7f  
000000a0  ff 7f ff 7f ff 7f ff 7f  ff 7f ff 7f ff 7f ff 7f  
000000b0  ff 7f ff 7f ff 7f ff 7f  ff 7f ff 7f ff 7f ff 0d  
000000c0  94 0d 94 0d 75 0d 75 7f  ff 7f ff 7f ff 7f ff 7f 
000000d0  ff 7f ff 7f ff 7f ff 0d  e8 7f ff 7f ff 7f ff 7f 
000000e0  ff 7f ff 7f ff 7f ff 00  00 04 87 00 00 00 00 00  
000000f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
00000100  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
00000110  00 00 00 00 00 00 00 ff  ff 7f ff 7f ff 00 00 00  
00000120  00 7f ff ff ff 7f ff 7f  ff 00 00 00 00 7f ff ff  
00000130  ff 7f ff 7f ff 00 00 00  00 7f ff ff ff 7f ff 7f 
00000140  ff 00 00 00 00 7f ff 00  00 00 00 00 00 00 00 7f  
00000150  ff 7f ff 7f ff 7f ff 7f  ff 7f ff 7f ff 7f ff 7f  
00000160  ff 7f ff 7f ff 7f ff 0d  ac 0a 1c 27 10 04 ad 00 
00000170  b8 00 00 27 10 04 a6 00  00 00 00 27 10 04 ac 00  
00000180  00 00 00 27 10 04 a3 00  00 00 00 27 10 00 00 00  
00000190  00 00 00 27 10 00 00 00  00 00 00 27 10 00 00 00  
000001a0  00 00 00 27 10 00 00 00  00 00 00 27 10 00 00 00  
000001b0  00 00 00 27 10 00 00 00  00 00 00 27 10 00 00 00  
000001c0  00 00 00 27 10 00 00 00  00 02 ff ff ff ff ff ff  
000001d0  ff 02 ff ff ff ff ff ff  ff 00 00 13 cc 27 10 00  
000001e0  00 00 00 00 00 00 00 00  00 80 00 00 00 00 00 00  
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000210  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 27 
00000220  10 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  
00000230  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000240  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000260  00 13 cc 27 10 00 00 00  00 00 00 00 00 00 00 00  
00000270  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000280  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000290  00 00 00                                          
00000293
Everything is left at system defaults, with a single temperature sensor on temp sensor port 1, and a single fan on fan port 1. The serial number has been replaced with ff ff - ff ff.

0x67 is definitely the start of the temperature sensors (it appears there may be support for 44), and 0xBF is the start of the VRM temperature sensors for the fans (12 supported).
 

·
Registered
Joined
·
36 Posts
Here is my progress on deciphering the memory map for firmware version 1027:

Code:

Code:
HID input report 1
payload length: 659 Bytes

offset          type    value           description
-------------------------------------------------------
0x000           int8                    HID report ID (0x01)
0x001           int32   current_time    Time in seconds since 1/1/2009 00:00:00 UTC

0x007           int16   serial_major    S/N prefix
0x009           int16   serial_minor    S/N suffix
0x00b           int16   firmware_version        Firmware version
0x00d           int16   bootloader_version      Bootloader version
0x00f           int16   hardware_version        Hardware version

0x011           int32   uptime          Time in seconds since last restart
0x015           int32   total_time      Time in seconds since firmware update?

0x067           int16   temp1   Internal temp sensor 1
0x069           int16   temp2   Internal temp sensor 2
0x06b           int16   temp3   Internal temp sensor 3
0x06d           int16   temp4   Internal temp sensor 4
0x06f           int16   temp5   Internal temp sensor 5
0x071           int16   temp6   Internal temp sensor 6
0x073           int16   temp7   Internal temp sensor 7
0x075           int16   temp8   Internal temp sensor 8

0x077           int16   temp9   External (aquabus?) temp sensor 9
0x079           int16   temp10  External (aquabus?) temp sensor 10
0x07b           int16   temp11  External (aquabus?) temp sensor 11 
0x07d           int16   temp12  External (aquabus?) temp sensor 12
0x07f           int16   temp13  External (aquabus?) temp sensor 13
0x081           int16   temp14  External (aquabus?) temp sensor 14
0x083           int16   temp15  External (aquabus?) temp sensor 15
0x085           int16   temp16  External (aquabus?) temp sensor 16

0x087           int16   temp17  External (aquabus?) temp sensor 17
0x089           int16   temp18  External (aquabus?) temp sensor 18
0x08b           int16   temp19  External (aquabus?) temp sensor 19
0x08d           int16   temp20  External (aquabus?) temp sensor 20      
0x08f           int16   temp21  External (aquabus?) temp sensor 21
0x091           int16   temp22  External (aquabus?) temp sensor 22
0x093           int16   temp23  External (aquabus?) temp sensor 23
0x095           int16   temp24  External (aquabus?) temp sensor 24

0x097           int16   temp25  External (aquabus?) temp sensor 25
0x099           int16   temp26  External (aquabus?) temp sensor 26
0x09b           int16   temp27  External (aquabus?) temp sensor 27
0x09d           int16   temp28  External (aquabus?) temp sensor 28
0x09f           int16   temp29  External (aquabus?) temp sensor 29
0x0a1           int16   temp30  External (aquabus?) temp sensor 30
0x0a3           int16   temp31  External (aquabus?) temp sensor 31
0x0a5           int16   temp32  External (aquabus?) temp sensor 32

0x0a7           int16   temp33  External (aquabus?) temp sensor 33
0x0a9           int16   temp34  External (aquabus?) temp sensor 34
0x0ab           int16   temp35  External (aquabus?) temp sensor 35
0x0ad           int16   temp36  External (aquabus?) temp sensor 36
0x0af           int16   temp37  External (aquabus?) temp sensor 37
0x0b1           int16   temp38  External (aquabus?) temp sensor 38
0x0b3           int16   temp39  External (aquabus?) temp sensor 39
0x0b5           int16   temp40  External (aquabus?) temp sensor 40

0x0b7           int16   temp41  External (aquabus?) temp sensor 41
0x0b9           int16   temp42  External (aquabus?) temp sensor 42
0x0bb           int16   temp43  External (aquabus?) temp sensor 43
0x0bd           int16   temp44  External (aquabus?) temp sensor 44

0x0bf           int16   fan1 vrm_temp   Internal fan VRM temp 1
0x0c1           int16   fan2 vrm_temp   Internal fan VRM temp 2
0x0c3           int16   fan3 vrm_temp   Internal fan VRM temp 3
0x0c5           int16   fan4 vrm_temp   Internal fan VRM temp 4

0x0c7           int16   fan5 vrm_temp   External (aquabus?) fan VRM temp 5
0x0c9           int16   fan6 vrm_temp   External (aquabus?) fan VRM temp 6
0x0cb           int16   fan7 vrm_temp   External (aquabus?) fan VRM temp 7
0x0cd           int16   fan8 vrm_temp   External (aquabus?) fan VRM temp 8
0x0cf           int16   fan9 vrm_temp   External (aquabus?) fan VRM temp 9
0x0d1           int16   fan10 vrm_temp  External (aquabus?) fan VRM temp 10
0x0d3           int16   fan11 vrm_temp  External (aquabus?) fan VRM temp 11
0x0d5           int16   fan12 vrm_temp  External (aquabus?) fan VRM temp 12

0x0d7           int16   cpu1_temp       Internal CPU temp1 
0x0d9           int16   cpu2_temp       External CPU temp2?
0x0db           int16   cpu3_temp       External CPU temp3?
0x0dd           int16   cpu4_temp       External CPU temp4? 
0x0df           int16   cpu5_temp       External CPU temp5? 
0x0e1           int16   cpu6_temp       External CPU temp6? 
0x0e3           int16   cpu7_temp       External CPU temp7? 
0x0e5           int16   cpu8_temp       External CPU temp8?

0x0fb           int16   flow1           Internal flow sensor 1
0x0fd           int16   flow2           Internal flow sensor 2
0x0ff           int16   flow3           External flow sensor 3
0x101           int16   flow4           External flow sensor 4
0x103           int16   flow5           External flow sensor 5
0x105           int16   flow6           External flow sensor 6
0x107           int16   flow7           External flow sensor 7
0x109           int16   flow8           External flow sensor 8
0x10b           int16   flow9           External flow sensor 9
0x10d           int16   flow10          External flow sensor 10
0x10f           int16   flow11          External flow sensor 11
0x111           int16   flow12          External flow sensor 12
0x113           int16   flow13          External flow sensor 13
0x115           int16   flow14          External flow sensor 14

0x167           int16                   Min display current reading?

0x169           int16   fan1 rpm        Internal fan 1 RPM
0x16b           int16   fan1 duty_cycle Internal fan 1 Duty cycle
0x16d           int16   fan1 voltage    Internal fan 1 Voltage
0x16f           int16   fan1 current    Internal fan 1 VRM current

0x171           int16   fan2 rpm        Internal fan 2 RPM
0x173           int16   fan2 duty_cycle Internal fan 2 Duty cycle
0x175           int16   fan2 voltage    Internal fan 2 Voltage
0x177           int16   fan2 current    Internal fan 2 VRM current

0x179           int16   fan3 rpm        Internal fan 3 RPM
0x17b           int16   fan3 duty_cycle Internal fan 3 Duty cycle
0x17d           int16   fan3 voltage    Internal fan 3 Voltage
0x17f           int16   fan3 current    Internal fan 3 VRM current

0x181           int16   fan4 rpm        Internal fan 4 RPM
0x183           int16   fan4 duty_cycle Internal fan 4 Duty cycle
0x185           int16   fan4 voltage    Internal fan 4 Voltage
0x187           int16   fan4 current    Internal fan 4 VRM current

0x189           int16   fan5 rpm        External (aquabus) fan 5 RPM
0x18b           int16   fan5 duty_cycle External (aquabus) fan 5 Duty cycle
0x18d           int16   fan5 voltage    External (aquabus) fan 5 Voltage
0x18f           int16   fan5 current    External (aquabus) fan 5 VRM current

0x191           int16   fan6 rpm        External (aquabus) fan 6 RPM
0x193           int16   fan6 duty_cycle External (aquabus) fan 6 Duty cycle
0x195           int16   fan6 voltage    External (aquabus) fan 6 Voltage
0x197           int16   fan6 current    External (aquabus) fan 6 VRM current

0x199           int16   fan7 rpm        External (aquabus) fan 7 RPM
0x19b           int16   fan7 duty_cycle External (aquabus) fan 7 Duty cycle
0x19d           int16   fan7 voltage    External (aquabus) fan 7 Voltage
0x19f           int16   fan7 current    External (aquabus) fan 7 VRM current

0x1a1           int16   fan8 rpm        External (aquabus?) fan 8 RPM
0x1a3           int16   fan8 duty_cycle External (aquabus?) fan 8 Duty cycle
0x1a5           int16   fan8 voltage    External (aquabus?) fan 8 Voltage
0x1a7           int16   fan8 current    External (aquabus?) fan 8 VRM current

0x1a9           int16   fan9 rpm        External (aquabus?) fan 9 RPM
0x1ab           int16   fan9 duty_cycle External (aquabus?) fan 9 Duty cycle
0x1ad           int16   fan9 voltage    External (aquabus?) fan 9 Voltage
0x1af           int16   fan9 current    External (aquabus?) fan 9 VRM current

0x1b1           int16   fan10 rpm       External (aquabus?) fan 10 RPM
0x1b3           int16   fan10 duty_cycle        External (aquabus?) fan 10 Duty cycle
0x1b5           int16   fan10 voltage   External (aquabus?) fan 10 Voltage
0x1b7           int16   fan10 current   External (aquabus?) fan 10 VRM current

0x1b9           int16   fan11 rpm       External (aquabus?) fan 11 RPM
0x1bb           int16   fan11 duty_cycle        External (aquabus?) fan 11 Duty cycle
0x1bd           int16   fan11 voltage   External (aquabus?) fan 11 Voltage
0x1bf           int16   fan11 current   External (aquabus?) fan 11 VRM current

0x1c1           int16   fan12 rpm       External (aquabus?) fan 12 RPM
0x1c3           int16   fan12 duty_cycle        External (aquabus?) fan 12 Duty cycle
0x1c5           int16   fan12 voltage   External (aquabus?) fan 12 Voltage
0x1c7           int16   fan12 current   External (aquabus?) fan 12 VRM current
This post will be updated when more is learned, and the latest version can always be found here.
 

·
Registered
Joined
·
36 Posts
Quote:
Originally Posted by 1nfinit0 View Post

wow good job! Awesome progress!
Thanks for the kudos.

Another possibly discovery which I hope to be able to prove tonight is that the fan stats start at 0x167, but are grouped similarly to how the aquastreams were on the Aquaero4. From the dump provided above, the following extract would be for Fan 1 (there appears to be space for a total of 12):

Code:

Code:
0d ac 0a 1c 27 10 04 ad
0d ac = 3500 => 3500/100 = 35.00 (mA)
0a 1c = 2588 (RPM)
27 10 = 10000 => 10000/100 = 100.00 (duty cycle)
04 ad = 1197 => 1197/100 = 11.97V
 

·
Registered
Joined
·
36 Posts
Quote:
Originally Posted by JinTu View Post

Another possibly discovery which I hope to be able to prove tonight is that the fan stats start at 0x167, but are grouped similarly to how the aquastreams were on the Aquaero4. From the dump provided above, the following extract would be for Fan 1 (there appears to be space for a total of 12):

Code:

Code:
0d ac 0a 1c 27 10 04 ad
0d ac = 3500 => 3500/100 = 35.00 (mA)
0a 1c = 2588 (RPM)
27 10 = 10000 => 10000/100 = 100.00 (duty cycle)
04 ad = 1197 => 1197/100 = 11.97V
All but the current was confirmed during this evening's testing (I dropped the max duty cycle to 50 and saw a proportionate reduction in the voltage and RPM matching what was on the front panel). Unfortunately my test fan draws too little current to confirm the value (<50mA)
 
1 - 20 of 56 Posts
Top