Author Topic: OS2AHCI interface?  (Read 18397 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #30 on: April 16, 2020, 08:15:16 pm »
Hi Pete!

...Glad you got PMsmartctl running although why it should need to be on an exception list of some sort I have no idea...

Oh, the need to toss your app into an exception list is not at all driven by the app itself. X-it is a handy little utility that tosses things like the little arrow up/down icon onto each and every window. That allows you to collapse a whole window into just the title bar. It has a pile of other things as well, such as folder freshes, sorting, etc. For that reason - since it interacts with each particular window - it may at times hit an app which does NOT like this. In such cases the said app may act weirdly, or not run at all. Well, in your case that's exactly what was hapenning. Once I tossed it onto the X-it list that prevented X-it from attempting to hi-jack your apps title bar.

...PMsmartctl simply shows whatever "smartctl --scan" finds. If the DVD shows as PATA then it is being reported as PATA by the smartctl output. My guess is a SATA DVD connected to a SATA controller port but using the PATA (danis506) driver could be the cause of that. In which case, for the purposes of both smartctl and the OS, it is considered a PATA drive...

Hmm, good point, so here is the 'smartctl --scan' output:

Code: [Select]
[G:\]smartctl --scan
ahci0 -d ata # ahci0, ATA device
hd0 -d ata # hd0, ATA device
ahci1 -d ata # ahci1, ATA device
ahci2 -d ata # ahci2, ATA device

You will note that the three hard-drive storage devices are all on a AHCI controller, while the DVD is on the IDE controller.

That means:
1) AHCI - supported by OS2AHCI driver
2) IDE - supported by DANIS506 driver

You are right though, based on what comes back here you simply can not tell what type of a device any of these are. This was a good reminder of what smartctl produces. I have a long time ago switched to running the monitoring through smartd (daemon mode) and logging all outputs to my NAS box.

But...looking further into smartctl I found the following: issuing the '--identify' parameter will in fact tell you whether a given device is an ATA (hard-drive storage) or ATAPI (device reader), following 'smartctl --identify hd0' gives:

Code: [Select]
smartctl 7.0 (build date Oct 19 2019) [i386-pc-os2-emx] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== ATA IDENTIFY DATA ===
Word     Bit     Value   Description

   0      -     0x85c0   General configuration
   0     15          1   Device identifier: 0 = ATA, 1 = ATAPI
   0     12:8     0x05   ATAPI: Command set: 0x05 = CD/DVD
   0      7          1   Removable media device [OBS-8]
   0      6:5      0x2   ATAPI: DRQ after PACKET cmd: 0x0 = 3ms, 0x2 = 50us
...

The following are two key pieces of info:

1)    0     15          1   Device identifier: 0 = ATA, 1 = ATAPI
2)    0      7          1   Removable media device [OBS-8]

Now...do you want to get into this level of pre-processing before your window comes up with the mapping of the devices into logical groupings though?...sure enough that app is quickly transforming into a storage device quasi-sysinfo type of a thing..but it would rock!!!

Also, the above is just a front end section, but further on at the very tail-end of the output you will find the following:

Code: [Select]
...
222      -     0x101f   Transport major version number
222     15:12     0x1   Transport: 0x0 = Parallel, 0x1 = Serial, 0xe = PCIe
222      4          1   Reserved    | SATA 2.6
222      3          1   Reserved    | SATA 2.5
222      2          1   Reserved    | SATA II: Extensions
222      1          1   ATA/ATAPI-7 | SATA 1.0a
222      0          1   ATA8-APT    | ATA8-AST
...

And in this case you can actually tell whether it's a Parallel, Serial or even PCIe device.

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #31 on: April 20, 2020, 09:03:42 pm »
Hi Dariusz

I knew I had bumped into the X-it problem somewhere before but had to dig up a copy of USBcfg readme to check. When I first released USBcfg someone reported a problem starting USBcfg which turned out to be X-it related.

Not knowing X-it myself I wonder why there is a problem with USBcfg and PMsmartcl. What the 2 apps have in common is that they are both developed using WDSibyl and, probably more to the point, both use a non-resizeable window with only Minimise and Close icons. I suspect X-it is not able to add it's icon to this type of window.

Out of Interest: Why is your SATA DVD connected to a SATA Adapter but using the IDE driver rather than AHCI?

Thanks for pointing out the smartctl '--identify' option, not sure how I missed it before, now added to PMsmartcl options also added code for choosing a Text Editor, should be releasing an update soon - just need to work out a bit more code.

Not sure about developing "a storage device quasi-sysinfo type of a thing" though...


Regards

Pete

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #32 on: April 21, 2020, 01:17:53 am »
I suspect X-it is not able to add it's icon to this type of window.

Xit has a feature called an exception list, containing the names of programs that Xit should not perform its title bar functions on.

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #33 on: April 21, 2020, 11:15:29 am »
Hi Sean

Yes, my question is: What do the apps that need to go on the X-it exception list have in common? - I suspect it may be the window type ie a non-resizeable window with only Minimise and Close icons.


Regards

Pete

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #34 on: April 22, 2020, 12:04:45 am »
Hi All

Tweaked PMsmartctl a little:- 

Interface modifications:
  Added a Help button
  Added the "Identify" Radio Button to the Show Information options
  Added option allowing user to select preferred Text Editor
Added a Help file
Modified readme.txt

I have attached PMsmartctlBetaV0.2 for testing.


Regards

Pete

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #35 on: April 22, 2020, 05:43:40 am »
Hey Pete!

Hi All

Tweaked PMsmartctl a little:- 
...
I have attached PMsmartctlBetaV0.2 for testing.
...

Nice, works great here, thank you!

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #36 on: April 22, 2020, 06:06:03 pm »
Hey Pete!

Hi All

Tweaked PMsmartctl a little:- 
...
I have attached PMsmartctlBetaV0.2 for testing.
...

Nice, works great here, thank you!

Hi Pete, I like what you have done.  There is one small matter.  In the text boxes, one cannot delete or backspace on the text.  One has to use the browse button to select the locations. One canot manually enter the exe location or editor location.  Maybe have a checkbox listing default editor is EPM.exe.  Uncheck and the box to select another editor becomes available.  However, it is much appreciated what you have done. It does do everything you intended it to do.  What I suggest is just a suggestion and nothing more. Thanks!
« Last Edit: April 22, 2020, 07:29:39 pm by David Graser »

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #37 on: April 22, 2020, 07:59:55 pm »
Hi David

The entryfields for smartctl.exe and Text Editor force the user to use the file dialog to locate the required app - much better than having a "support issue" due to a user typo  :-)

However, as I plan to use the app in an article to illustrate building applications with WDSibyl I will be making the full source code available. You will then be able to change the behaviour of the entryfields - and anything else - to suit your way of doing things.

Sorry I do not have a time frame for this but bear with me for a few weeks.

Regards

Pete

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #38 on: April 23, 2020, 12:47:11 am »
Hi Pete,

Thanks for the editor selection, using EPM I can select mono font and get a well formatted display.

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: OS2AHCI interface?
« Reply #39 on: April 23, 2020, 02:35:48 pm »
Hi ivan

Glad it meets with your approval  :-)

Pete