Prev: Driver for sending/receiving IP packets to/from dial-up connec
Next: ifdtest2 issue: GetOverlappedResult
From: Dev on 8 Apr 2010 21:08 Hi, After reading the above messages I thought one of you might have had a driver developed and count on your experience. I am trying to read and write to a slave device on SMbus on windows 7 OS. Can anyone suggest me best approch and a sample to start with? I have gone through the MSDN documentation on SMB bus but I read through different mesaage boards that windows has class driver(smbclass.sys) and host controller (smbhc.sys)drivers which would work only for ATI chipset. My initial assumption was to write a client driver to access the SMbus device. Now I am not sure how to proceed further since there is no class driver for the VIA chipset. Can anyone help me how to proceed further? Thanks, vbkr eruffin wrote: One thing I don't undertsand is why there is no mechanism in Windowsto 13-Sep-08 One thing I don't undertsand is why there is no mechanism in Windows to synchronize access to the SMBus and I2C Buses. Firmware can be written to gain exclusive access to the buses. Would think some form of scheduling is all that would be in order. Make an SMBus request and when available the access is granted. Do not understand why such access is not available in device drivers. Bascially just want to query devices and issue commands, not attempting to process data, thus, accesses should be infrequent. Previous Posts In This Thread: On Tuesday, September 02, 2008 2:40 PM Ed wrote: SMBus Support in Windows XP In the Windows DDK there is mention of support for SMBus and references therein to Microsoft system drivers smbclass.sys and smbhc.sys. I can find no reference on the web or on any systems related to these drivers. Will they exist at some future time? Intel provides an SMBus device driver which they provide no documentation for coding on their website. Please correct me if wrong here. Have seen references to utilize the SMBus specification (1999) for API related information. Is the Intel driver supporting the SMBus specification? Would like to be able to detect and enumerate the devices attached to the SMBus as well as query information from them including battery information. Thank you, Ed R On Tuesday, September 02, 2008 6:04 PM Pavel A. wrote: The controller is part of ICH and it's description should besomewhere in ICH The controller is part of ICH and it's description should be somewhere in ICH manuals. The WinXP in-box Intel SMBus driver is only a placeholder, to avoid showing unknown device in dev. manager. What about batteries and other devices on SMB, they obviously are proprietary of system integrators, you need to know their bus addresses and commands. AFAIK, SMB does not have PnP style enumeration. --PA Ed R wrote: On Monday, September 08, 2008 8:59 AM Ed wrote: Might there be any sample DDK SMBus code available? Might there be any sample DDK SMBus code available? Does not appear to be anything specific in the DDK. Perhaps available at another location? If not, could anyone recommend a sample driver to start from? See many references to KDMF and SMBus in developer comments but have not seen any code aside from SMBus specification which is does not utilize the KDMF approach. Thank you, Ed R "Pavel A." wrote: On Tuesday, September 09, 2008 4:25 PM Pavel A. wrote: Yep...Windows devs talk a lot, but don't share any code. Yep...Windows devs talk a lot, but do not share any code. Not like the nice Linux folks. --PA On Tuesday, September 09, 2008 5:02 PM Ray Trent wrote: Last I heard, it's generally just a bad idea to do what the poster is asking. Last I heard, it's generally just a bad idea to do what the poster is asking. The BIOS owns that bus (and the I2C bus(es), and perhaps a few other stateful buses), and there's no synchronization mechanism available except for a few well-defined and limited interfaces that are kind-of documented (mostly in the ACPI space). Therefore you risk interrupting a transfer in progress, potentially changing its address to somewhere that doesn't expect that transfer. So perhaps people aren't sharing simply because they don't have anything to share. Pavel A. wrote: -- Ray On Tuesday, September 09, 2008 5:31 PM Pavel A. wrote: ok, you see? ok, you see? even when Windows devs reply, they usually utter: "you shouldn't do this" or "nobody in their sane mind want this" or "tell us the name of your product so we'll avoid it", etc. Not a nice kind they are. --PA "Ray Trent" <rat(a)nospam.nospam> wrote in message news:eSsLT9rEJHA.3408(a)TK2MSFTNGP04.phx.gbl... On Wednesday, September 10, 2008 4:25 PM Ray Trent wrote: Re: SMBus Support in Windows XP I take your point, but I was more trying to say: "If you ask how to write code that breaks stuff, it's entirely possible that the friendly, knowledgeable, and wise people of this newsgroup don't have examples to provide, simply because they don't write code that breaks stuff." I'd be happy to share if I had such a thing, but AFAIK it's impossible to do safely (in the general case) so I never have put in the effort to write one. That said, if anyone *does* have a safe general way of using the SMBUS or I2C bus on a PC, please share! :-) Pavel A. wrote: -- Ray On Thursday, September 11, 2008 10:20 AM Ed wrote: Will review the ACPI Control Method Evaluation Reference and not pursuethe Will review the ACPI Control Method Evaluation Reference and not pursue the SMBus approach then. Could you recommend a sample driver assuming one is provided in the DDK or available at some other location? Go KMDF or WDM? Basically, would like to communicate with devices on the SMBus be they batteries, smart battery chargers, or any other proprietary hardware. Thank you, Ed R "Ray Trent" wrote: On Thursday, September 11, 2008 11:34 AM Ed wrote: Upon further review of the DDK's there exist two samples. Upon further review of the DDK's there exist two samples. Older DDK there exists acpisim which does not appear in the lastest 2008 DDK. Not sure what reason was for not carrying it forward to the 2008 DDK. In 2008 DDK there exists WMIACPI sample. The referenced wmiacpi.sys driver does not exist on my Windows XP SP2 workstation so am concerned this approach may not be viable. The sample states support for Vista and XP and am strictly looking at XP but once again the wmiacpi.sys driver is not present on my XP SP2 system. Would either of these drivers make for a good sample or is there something else available? Thank you, Ed R "Ed R" wrote: On Saturday, September 13, 2008 8:07 AM eruffin wrote: One thing I don't undertsand is why there is no mechanism in Windowsto One thing I don't undertsand is why there is no mechanism in Windows to synchronize access to the SMBus and I2C Buses. Firmware can be written to gain exclusive access to the buses. Would think some form of scheduling is all that would be in order. Make an SMBus request and when available the access is granted. Do not understand why such access is not available in device drivers. Bascially just want to query devices and issue commands, not attempting to process data, thus, accesses should be infrequent. Submitted via EggHeadCafe - Software Developer Portal of Choice A Framework to Animate WPF and Silverlight Pages Similar to the PowerPoint Slides http://www.eggheadcafe.com/tutorials/aspnet/7390a840-dd39-4c35-9940-c7354940d878/a-framework-to-animate-wp.aspx |