It is currently Thu Mar 28, 2024 10:40 am

All times are UTC - 7 hours [ DST ]

Recent News:



Post new topic Reply to topic  [ 121 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 9  Next
Author Message
PostPosted: Tue Apr 20, 2010 12:09 pm 
Offline
Newbie
Newbie

Joined: Tue Oct 06, 2009 1:05 pm
Posts: 5
Thanks: 0
Thanked: 0 time in 0 post
Awesome work you guys. I'm going to try to install Debian without the VGA cable by using this method http://www.sgvulcan.com/installing-debi ... -only-ssh/. Would it be possible to make the EX485 drive LEDs function as activity LEDs?


Top
 Profile  
Thanks  

Attention Guest: Remove this ad by Registering with the MediaSmartServer.net Forums. It's Free!
PostPosted: Thu Apr 22, 2010 2:44 pm 
Offline
.5TB storage
.5TB storage

Joined: Thu Apr 01, 2010 5:52 am
Posts: 11
Thanks: 3
Thanked: 6 times in 2 posts
adaptation wrote:
What I've been wondering is why the wnas.sys driver is not more generic. Version I have specifically looks for the IHR9 chipset, and all of the I/Os are hard coded. Complicating deployment, and means that you'd have to recompile a new driver for hardware changes.

I'd be interested if someone could give me a copy of the H340 driver to see what the differences are. I've attached the ex485's version to this post.


I attached my version of the WNAS.sys driver (for h340).

Unfortunately, I didn't have the time yet to compare both drivers. Aren't the Leds of the EX485 all connected to the Southbridge directly?

@davebc: If you want to install another os on the nas I would strongly suggest to get a cheap graphics card (I got mine for 15EUR off ebay). This makes the whole installation process a lot easier since without that you have to switch the first boot device to external usb (for the CDROM) which can be very tricky...

Attachment:
WNAS.sys_h340.zip [8.24 KiB]
Downloaded 805 times


Top
 Profile  
Thanks  
PostPosted: Sat Apr 24, 2010 10:35 pm 
Offline
.5TB storage
.5TB storage

Joined: Fri Nov 27, 2009 7:33 pm
Posts: 14
Thanks: 3
Thanked: 13 times in 7 posts
Thanks. That driver is pretty much identical to the ex485's and just hard coded for the H340. There are slight differences where more sanity checking is occurring, but overall it's exactly the same driver. Curious... perhaps it is part of a Windows Home Server development package?

and yes. All of the EX485s LEDs are directly connected to the IHR9.

-

Not sure if you are still having problems with the HDD LED control. But given that the driver is pretty much the same as the ex485, finding and deciphering that routine wasn't much of a problem:

Individual HDD LEDs are controlled by a function starting around .text:00013B72. It is passed in two arguments - LED and state. Where the LED is offset by 0x8001, and the state by 0x6011. Which is weird. Although I found constants for those in some .net disassembly of the HP interface. So they look like they are passed in like that from user-land.

LED state comprises of four combinations of red/blue on/off.

Another function is then invoked twice to turn on/off the requested blue/red LEDs. That function starts around .text:00012574 with two parameters; the address and whether to set(2) or clr(1) the bit.

LED addresses:
0x56 - blue 0
0x52 - blue 1
0x50 - blue 2
0x14 - blue 3

0x57 - red 0
0x53 - red 1
0x51 - red 2
0x11 - red 3

First nibble is the GP runtime register, and the second is the bit.
reg = GP1 + (ADDR >> 4) - 1
mask = 1 << (ADDR & 0xF)

where GP1 is at 0x4B in the runtime registers of the SCH5127.

From my quick analysis of the near identical disassembly (and your earlier comments). I've updated my code to try and support the H340. Although I don't have much confidence as it is completely untested.

In any case I hope this helps.


Top
 Profile  
Thanks  
The following user would like to thank adaptation for this post
steffl
PostPosted: Sat Apr 24, 2010 10:46 pm 
Offline
.5TB storage
.5TB storage

Joined: Fri Nov 27, 2009 7:33 pm
Posts: 14
Thanks: 3
Thanked: 13 times in 7 posts
davebc wrote:
Would it be possible to make the EX485 drive LEDs function as activity LEDs?

It's possible, but it would be very tricky, and I've just spent a large amount of my time stopping it from blinking in the first place...


Top
 Profile  
Thanks  
PostPosted: Tue Jun 01, 2010 11:58 am 
Offline
Newbie
Newbie

Joined: Sat Oct 17, 2009 11:39 pm
Posts: 8
Thanks: 4
Thanked: 1 time in 1 post
adaptation wrote:
From my quick analysis of the near identical disassembly (and your earlier comments). I've updated my code to try and support the H340. Although I don't have much confidence as it is completely untested.

In any case I hope this helps.

I get a segmentation fault when I attempt to run this -- same happens with or without the leds-h340.ko module loaded:

# sudo ./mediasmartserverd
Found: Acer Aspire easyStore H340
Segmentation fault

Any ideas?


Top
 Profile  
Thanks  
PostPosted: Tue Jun 01, 2010 2:19 pm 
Offline
Newbie
Newbie

Joined: Tue Jun 01, 2010 1:40 pm
Posts: 2
Thanks: 2
Thanked: 3 times in 1 post
I have managed to get mediasmartserverd working on my H340 running Fedora 12. The patch to make it work is attached to this posting. It is almost working out of the box, really great work by adaptation, thank you very much!

The patch fixes an issue with the ioperms concerning the GP registers for the HDD LEDs (the reason for the segmentation faults reported by dazealex). There also seem to be some slight differences in the way the LEDs are wired: The blue and red system LEDs seem to be interchanged, and the harddisk LEDs do the opposite of what they are told (switch on when told to switch off, and the other way round).

The mediasmartserverd and the leds-340 kernel module live happily together at the same time on my machine. So it is now possible to control all LEDs (except network and HDD activity) on the H340 (mediasmartserverd is missing control of the USB and power LEDs, which can be controlled by the kernel module).

Again, thanks a lot for the great work! Very much appreciated!


Attachments:
acer-h340.patch.txt [2.92 KiB]
Downloaded 964 times
Top
 Profile  
Thanks  
The following user would like to thank steffl for this post
adaptation, dazealex, yakuza
PostPosted: Wed Jun 02, 2010 9:52 pm 
Offline
.5TB storage
.5TB storage

Joined: Fri Nov 27, 2009 7:33 pm
Posts: 14
Thanks: 3
Thanked: 13 times in 7 posts
Thanks steffl. I've applied your patch to the bitbucket repository. Although I swapped the LED mappings for OUT_SYSTEM_BLUE and OUT_SYSTEM_RED rather than muck with the conditionals.

I'm also glad you solved this so quickly :)


Top
 Profile  
Thanks  
PostPosted: Fri Jun 04, 2010 12:31 am 
Offline
Newbie
Newbie

Joined: Tue Jun 01, 2010 1:40 pm
Posts: 2
Thanks: 2
Thanked: 3 times in 1 post
adaptation wrote:
Thanks steffl. I've applied your patch to the bitbucket repository. Although I swapped the LED mappings for OUT_SYSTEM_BLUE and OUT_SYSTEM_RED rather than muck with the conditionals.

Yes, I admit my patch was not so clean, I was happy enough I got it going in the first place :) Thank you.

Does anybody have an idea how to detect button presses of the USB backup button on the H340? I think that's the only thing missing to complete H340 hardware support on Linux. (Does the HP server also have this button?)


Top
 Profile  
Thanks  
PostPosted: Sat Jun 12, 2010 4:11 pm 
Offline
Newbie
Newbie

Joined: Sat Jun 12, 2010 4:07 pm
Posts: 5
Thanks: 0
Thanked: 0 time in 0 post
Thanks, installed it on my Acer and it works!

Yes, the USB pressing would be nice.

Also, is it just me, or does the LED lights on the right not work properly? OD hard drive is on the bottom (1), and add-on hard drive is on top (4), yet only light 3 is on. Thoughts?


Top
 Profile  
Thanks  
PostPosted: Mon Jul 05, 2010 6:55 am 
Offline
Newbie
Newbie

Joined: Mon Jul 05, 2010 6:47 am
Posts: 1
Thanks: 0
Thanked: 0 time in 0 post
Hi all, sorry to barge in like this...I'm coming at this from the opposite direction (kinda). I have Windows 7 x64 on my H340...since WHS is based on Server 2003, the driver that comes with the box isn't compatible with 7.

I think you can guess my next question...is there a 7 x64 driver to get the front LEDs working? The LEDs for the drives aren't working, but primarily, what I'd like to do is turn down the brightness of the LEDs that do come on.

Disclaimer: I've done *very* little work with drivers eons ago and I'm quite rusty, so having a plain C sample for how to interface with it would be a heck of a bonus. I'm guessing I can't be the only one who got rid of WHS but stuck with some Windows version...


Top
 Profile  
Thanks  
PostPosted: Sun Jul 11, 2010 8:54 am 
Offline
Newbie
Newbie

Joined: Sun Jul 11, 2010 8:36 am
Posts: 5
Thanks: 1
Thanked: 0 time in 0 post
Hi,
I installed mediasmartserverd on my H340 running Debian Linux 2.6.32-2-686 and it works just fine.
However, only the upper two of the 4 disk lights are going on. I have 4 drives in it, controlled by md (3TB RAID 5, 1TB RAID1).

When I ran it says:
Code:
demtestdingens:~/mediasmartserverd# ./mediasmartserverd --debug -v -v
LedHpEx48X: Device 0x86
Found: Acer Aspire easyStore H340
ADDED: '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.0/host6/target6:0:0/6:0:0:0' (scsi)
 scsi_host: '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.0/host6' (scsi)

 scsi_host_parent: '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-8/1-8:1.0' (usb)

ADDED: '/sys/devices/pci0000:00/0000:00:1f.2/host2/target2:0:0/2:0:0:0' (scsi)
 scsi_host: '/sys/devices/pci0000:00/0000:00:1f.2/host2' (scsi)
 scsi_host_parent: '/sys/devices/pci0000:00/0000:00:1f.2' (pci)
 sysnum: 2
ADDED: '/sys/devices/pci0000:00/0000:00:1f.2/host3/target3:0:0/3:0:0:0' (scsi)
 scsi_host: '/sys/devices/pci0000:00/0000:00:1f.2/host3' (scsi)
 scsi_host_parent: '/sys/devices/pci0000:00/0000:00:1f.2' (pci)
 sysnum: 3
ADDED: '/sys/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0' (scsi)
 scsi_host: '/sys/devices/pci0000:00/0000:00:1f.2/host4' (scsi)
 scsi_host_parent: '/sys/devices/pci0000:00/0000:00:1f.2' (pci)
 sysnum: 4
ADDED: '/sys/devices/pci0000:00/0000:00:1f.2/host5/target5:0:0/5:0:0:0' (scsi)
 scsi_host: '/sys/devices/pci0000:00/0000:00:1f.2/host5' (scsi)
 scsi_host_parent: '/sys/devices/pci0000:00/0000:00:1f.2' (pci)
 sysnum: 5


If I run with --xmas, all lights turn on. So I assume a glitch with "sysnum"? H340 contains an additional Flashdisk and I have installed an U320-SCSI controller for my DLT2 tape.
Shall I customize it somhow? Can you give me directions?

Thanks a lot for the stuff and best regards,
Mülly


Top
 Profile  
Thanks  
PostPosted: Mon Aug 09, 2010 10:50 am 
Offline
Newbie
Newbie

Joined: Mon Aug 09, 2010 10:06 am
Posts: 1
Thanks: 0
Thanked: 0 time in 0 post
Hi,

i read this forum for weeks and found lots of useful information here. I own a H340 and would really like to use the LEDs. unfortunally i have some trouble compile the sources with my Openfiler distribution. Ok but step by step:

I installed everything needed for "make"

conary update gcc
conary update libtool
conary update glib
conary update glib:devel
conary update glibc
conary update glibc:devel
conary update automake
conary update autoconf
conary update pkgconfig

Compiling works - i try to compile Midnight Commander and it works.

1. when i compile "leds-h340-0.2" everything seems to work at least i get a leds-h430.ko at the end.
output:
Code:
[root@mediaserver leds-h340-0.2]# make
make -C /lib/modules/2.6.29.6-0.24.smp.gcc3.4.x86.i686/build SUBDIRS=/opt/mediasmartserver/leds-h340-0.2 modules
make[1]: Entering directory `/lib/modules/2.6.29.6-0.24.smp.gcc3.4.x86.i686/build'
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "led_classdev_unregister" [/opt/mediasmartserver/leds-h340-0.2/leds-h340.ko] undefined!
WARNING: "led_classdev_register" [/opt/mediasmartserver/leds-h340-0.2/leds-h340.ko] undefined!
make[1]: Leaving directory `/lib/modules/2.6.29.6-0.24.smp.gcc3.4.x86.i686/build'
[root@mediaserver leds-h340-0.2]#


2. insmod finally don't work for me
Code:
[root@mediaserver leds-h340-0.2]# insmod leds-h340.ko
insmod: error inserting 'leds-h340.ko': -1 Unknown symbol in module


I think my problem is some missing file(s) regarding this led_classdev but I don't know how to fix it. Compiling the source on my ubuntu machine works fine but I need it for Openfiler.

The second driver cannot be compiled in Openfiler:
Code:
[root@mediaserver mediasmartserverd]# make
rm *.o mediasmartserverd core -f
g++ -Wall -O2 -o device_monitor.o -c src/device_monitor.cpp
make: g++: Command not found
make: *** [device_monitor.o] Error 127


after

Code:
conary update gcc-c++


i got:
Quote:
[root@mediaserver mediasmartserverd]# make
rm *.o mediasmartserverd core -f
g++ -Wall -O2 -o device_monitor.o -c src/device_monitor.cpp
In file included from src/device_monitor.h:34,
from src/device_monitor.cpp:32:
src/led_control_base.h:34:22: tr1/memory: No such file or directory
In file included from src/device_monitor.h:34,
from src/device_monitor.cpp:32:
src/led_control_base.h:58: error: `size_t' has not been declared
src/led_control_base.h:58: error: ISO C++ forbids declaration of `led_idx' with no type
src/led_control_base.h:75: error: `std::tr1' has not been declared
src/led_control_base.h:75: error: expected init-declarator before '<' token
src/led_control_base.h:75: error: expected `,' or `;' before '<' token
In file included from src/device_monitor.cpp:32:
src/device_monitor.h:48: error: expected `,' or `...' before '&' token
src/device_monitor.h:48: error: ISO C++ forbids declaration of `LedControlPtr' with no type
src/device_monitor.h:60: error: `LedControlPtr' does not name a type
src/device_monitor.cpp:40:21: libudev.h: No such file or directory
src/device_monitor.cpp: In destructor `DeviceMonitor::~DeviceMonitor()':
src/device_monitor.cpp:53: error: `udev_unref' undeclared (first use this function)
src/device_monitor.cpp:53: error: (Each undeclared identifier is reported only once for each function it appears in.)
src/device_monitor.cpp:54: error: `udev_monitor_unref' undeclared (first use this function)
src/device_monitor.cpp: At global scope:
src/device_monitor.cpp:59: error: expected `,' or `...' before '&' token
src/device_monitor.cpp:59: error: ISO C++ forbids declaration of `LedControlPtr' with no type
src/device_monitor.cpp: In member function `void DeviceMonitor::Init(int)':
src/device_monitor.cpp:60: error: `leds_' undeclared (first use this function)
src/device_monitor.cpp:60: error: `leds' undeclared (first use this function)
src/device_monitor.cpp:63: error: `udev_new' undeclared (first use this function)
src/device_monitor.cpp:67: error: `udev_monitor_new_from_netlink' undeclared (first use this function)
src/device_monitor.cpp:71: error: `udev_monitor_filter_add_match_subsystem_devtype' undeclared (first use this function)
src/device_monitor.cpp:79: error: `udev_monitor_enable_receiving' undeclared (first use this function)
src/device_monitor.cpp: In member function `void DeviceMonitor::Main()':
src/device_monitor.cpp:89: error: `udev_monitor_get_fd' undeclared (first use this function)
src/device_monitor.cpp:109: error: `std::tr1' has not been declared
src/device_monitor.cpp:109: error: `shared_ptr' undeclared (first use this function)
src/device_monitor.cpp:109: error: expected primary-expression before '>' token
src/device_monitor.cpp:109: error: `udev_monitor_receive_device' undeclared (first use this function)
src/device_monitor.cpp:109: error: `udev_device_unref' undeclared (first use this function)
src/device_monitor.cpp:109: error: `device' undeclared (first use this function)
src/device_monitor.cpp:111: error: `udev_device_get_action' undeclared (first use this function)
src/device_monitor.cpp:120: error: `udev_device_get_syspath' undeclared (first use this function)
src/device_monitor.cpp:120: error: `udev_device_get_subsystem' undeclared (first use this function)
src/device_monitor.cpp: In member function `void DeviceMonitor::deviceAdded_(udev_device*)':
src/device_monitor.cpp:130: error: `udev_device_get_syspath' undeclared (first use this function)
src/device_monitor.cpp:130: error: `udev_device_get_subsystem' undeclared (first use this function)
src/device_monitor.cpp: In member function `void DeviceMonitor::deviceRemove_(udev_device*)':
src/device_monitor.cpp:137: error: `udev_device_get_syspath' undeclared (first use this function)
src/device_monitor.cpp:137: error: `udev_device_get_subsystem' undeclared (first use this function)
src/device_monitor.cpp: In member function `void DeviceMonitor::deviceChanged_(udev_device*, bool)':
src/device_monitor.cpp:145: error: `udev_device_get_parent_with_subsystem_devtype' undeclared (first use this function)
src/device_monitor.cpp:148: error: `udev_device_get_syspath' undeclared (first use this function)
src/device_monitor.cpp:148: error: `udev_device_get_subsystem' undeclared (first use this function)
src/device_monitor.cpp:151: error: `udev_device_get_parent' undeclared (first use this function)
src/device_monitor.cpp:158: error: `udev_device_get_sysnum' undeclared (first use this function)
src/device_monitor.cpp:165: error: `leds_' undeclared (first use this function)
src/device_monitor.cpp: In member function `void DeviceMonitor::enumDevices_()':
src/device_monitor.cpp:174: error: `std::tr1' has not been declared
src/device_monitor.cpp:174: error: `shared_ptr' undeclared (first use this function)
src/device_monitor.cpp:174: error: `udev_enumerate' undeclared (first use this function)
src/device_monitor.cpp:174: error: `udev_enumerate_new' undeclared (first use this function)
src/device_monitor.cpp:174: error: `udev_enumerate_unref' undeclared (first use this function)
src/device_monitor.cpp:174: error: `dev_enum' undeclared (first use this function)
src/device_monitor.cpp:177: error: `udev_enumerate_add_match_property' undeclared (first use this function)
src/device_monitor.cpp:178: error: `udev_enumerate_scan_devices' undeclared (first use this function)
src/device_monitor.cpp:181: error: `udev_list_entry' undeclared (first use this function)
src/device_monitor.cpp:181: error: `list_entry' undeclared (first use this function)
src/device_monitor.cpp:181: error: `udev_enumerate_get_list_entry' undeclared (first use this function)
src/device_monitor.cpp:182: error: `udev_list_entry_get_next' undeclared (first use this function)
src/device_monitor.cpp:184: error: `std::tr1' has not been declared
src/device_monitor.cpp:184: error: expected primary-expression before '>' token
src/device_monitor.cpp:186: error: `udev_enumerate_get_udev' undeclared (first use this function)
src/device_monitor.cpp:187: error: `udev_list_entry_get_name' undeclared (first use this function)
src/device_monitor.cpp:188: error: `udev_device_new_from_syspath' undeclared (first use this function)
src/device_monitor.cpp:189: error: `udev_device_unref' undeclared (first use this function)
src/device_monitor.cpp:189: error: `device' undeclared (first use this function)
make: *** [device_monitor.o] Error 1


Does anyone sucessfully compiled the sources in Openfiler or can anyone help me compiling these very useful drivers for my Openfiler.


Thanks for the great work! Hope I get it running.


Top
 Profile  
Thanks  
PostPosted: Sat Aug 21, 2010 12:40 pm 
Offline
.5TB storage
.5TB storage

Joined: Fri Nov 27, 2009 7:33 pm
Posts: 14
Thanks: 3
Thanked: 13 times in 7 posts
SuNSHiNe78 wrote:
src/led_control_base.h:34:22: tr1/memory: No such file or directory

You either need the c++ standard libraries, or a newer version of them which includes tr1. With Ubuntu they are provided in the libstdc++6-dev package.


Top
 Profile  
Thanks  
PostPosted: Sat Aug 21, 2010 1:18 pm 
Offline
.5TB storage
.5TB storage

Joined: Fri Nov 27, 2009 7:33 pm
Posts: 14
Thanks: 3
Thanked: 13 times in 7 posts
muelly2 wrote:
If I run with --xmas, all lights turn on. So I assume a glitch with "sysnum"?

sysnum is assumed to match up with the appropriate hard drive bay. I see that vinhdizzo has the same problem.

Try modifying the Set method in led_acerh340.h to offset the sysnum:

Code:
virtual void Set( int led_type, size_t led_idx, bool state ) {
   led_idx -= 2; // <- add this line
   if ( led_idx >= MAX_HDD_LEDS ) return;
   
   if ( led_type & LED_BLUE ) setGpRegsLvl_( ioLedBlue_(led_idx), state );
   if ( led_type & LED_RED  ) setGpRegsLvl_( ioLedRed_(led_idx),  state );
}


Can you also please verify the LED mappings by using the --light-show argument:
Code:
# blue LEDs descending (top to bottom)
sudo ./mediasmartserverd --brightness 9 --light-show 2

# red LEDs descending (top to bottom)
sudo ./mediasmartserverd --brightness 9 --light-show 6


Where the ordering is controlled by that same header file (see the mapping for LEDs enum)


Top
 Profile  
Thanks  
PostPosted: Thu Aug 26, 2010 7:49 am 
Offline
Newbie
Newbie

Joined: Thu Aug 26, 2010 7:48 am
Posts: 1
Thanks: 0
Thanked: 0 time in 0 post
Please try to bring this driver upstream into the generic linux kernel.


Top
 Profile  
Thanks  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 121 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 9  Next

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group