Windows based I2C Read/Write Working Example using AAEON framework DLL?

NoelStephens
NoelStephens New Member Posts: 25
I have been combing through the forums looking for all of the various posts to examples of code and libraries used to access the AAEON framework libraries in order to access I2C devices on Windows 10. So far, it would *seem* that there is no Windows platform (to date) that has any example (pre-compiled binaries and/or source code) on accessing I2C devices.
The only examples I have found show how to turn a GPIO pin from a low to high state (or vice versa) but nothing that shows *any* I2C functionality working on an UP2 board (or any Up board).

Is this a known issue? If so, is there *any* time frame on getting it working under *any* version of Windows 10/Server 2016/IoT Core?

Very familiar with I2C communication, have a UWP application that communicates to several I2C devices in 10ms to 100ms intervals (reading and/or writing) and is verified working/stable running on RPI2&3 with Windows IoT Core.

We are most interested in getting the Windows 10 or Windows Server 2016 (what is running currently on our UP2Board) I2C communication working.
Have already installed the AAEON framework and am successfully communicating to the general framework calls (i.e. get board info etc), can change the state of GPIO pins, but cannot get any I2C devices that we have in our lab to be seen with the current drivers plus the AAEON framework install.

Any ETA, links to beta drivers/examples, or the like that might help rectify this issue (unless it is just a known issue and still not working) would be greatly appreciated... been waiting awhile for this functionality so I can show how awesome the UpBoard is vs. other similar devices in the market place. :)

Comments

  • NoelStephens
    NoelStephens New Member Posts: 25
    Just checking back to see if there is any news on the fix for I2C communication on Windows 10 x64 OS? Have not tried Windows 10 IoT Core because we would like to stay at 64 bit as well as utilize other features normal Win 10 provides that Win 10 IoT Core does not.

    I have posted in several forums hoping to get some form of response from *anyone* who might have some clue as to when this issue will be resolved, and if it is... please post information on what the fix is and where to download any needed BIOS updates and/or drivers.

    This is for the UpBoard (not UpBoard^2).

    Even a quick response giving a non-committal response in ETA would be appreciated...really any response would be appreciated.
  • eduncan911
    eduncan911 Administrator, Moderator Posts: 157 admin
    edited October 2017
    Have you installed the "Dummy" drivers as part of the latest Windows 10 Drivers package? It it listed as Step 4 in the drivers download.

    Also, have you seen this thread?

    https://up-community.org/forum/ms-windows/777-gpio-on-windows-10

    If I find some time, I'll try to wipe one of my boards and move onto Windows 10 testing. It won't be until next week or two though.

    Eric Duncan - UP Evangelist - My thoughts are of my own free will

    Answered? Please remember to mark the posted answered to highlight it for future visitors!

  • NoelStephens
    NoelStephens New Member Posts: 25
    Hi Eric,
    Thanks for your reply, but this is an issue that I think Asus/AAEON/the makers of Up-Board products are aware of and have claimed there would be a BIOS update to fix.

    The dummy driver that you nstall in step 4 is only a temporary driver that doe nothing but makes one of the devices on the UpBoard not show up as an "?" unknown device in the device manager.

    The GPIO works fine... but the I2C bus cannot be accessed for two reasons:
    1.) The working example based on the source discussed in the link you provided incorrectly uses IntPtrs for both read and write calls defined as links to calls into the aaeon dll file that is "part of the sdk". (i.e. this file handles com between user mode and kernel mode calls)
    2.) Once I did fix the pinvoke calls to I2C based on the included header files, it no longer "wipes the buffer used to received or send data via i2C" (i.e. as in if you call the I2C read or write methods it no longer turns the IntPtr into a "null reference" but returns "nothing" on read and does nothing upon writing (based on several tests I have done).
    3.) Made sure that the I2C0 is selected and not GPIO within the BIOS.
    4.) Evidently it works using Windows IoT Core (i.e. the BSP used to build Windows IoT core has the proper drivers for this, or this is what has been said as I have yet to replace my x64 bios with the x32 bios as the entire point behind the Up Board (for our purposes) was to have an x64 application that ran on Windows 10 (Windows IoT is 32bit)

    Since the 4th step requires you to remove the Signing restrictions (i.e. BCDEdit -set TESTSIGNING OFF) to install a "dummy driver" (that does nothing but makes the device in question not show up as an unknown device), I can only assume that they have run into the same issue that we ran into with x64bit drivers under Windows 10:
    You *must sign any* x64 driver with a valid cross signing certificate and registered/valid code signing certificate when compiling and using *any x64 bit driver* under Windows 10 (since before version 1511) even if it is a debug driver. It is either that one device (which in one place in the forum someone mentioned it wasn't used under Windows 10 and was just a cosmetic fix)...or they are waiting on the process one goes through to get a code signing certificate that can be used for drivers (which wouldn't make sense either because the GPIO works fine).

    From all of my tests and various forum entries between the "UpBoard" area and the Windows 10 area, it would appear that I2C communication for the UpBoard under any version of Windows 10 other than Windows 10 IoT Core "is and has been broken since they released the first UpBoard".

    So, this is why I have been posting frequently here and why I am getting a bit "nervous" that they are far from a fix for this...as if it was not a "hardware related issue"...one would think that they would have posted a working driver that included the ability to communicate to the I2C bus...

    If you do get a chance to test one of your boards, I would be interested in your results... remember I2C does not work...GPIO does work...under any version of Windows 10 other than Windows IoT core.

    Will test with the dummy driver installed again, but I am fairly certain that this driver "does nothing" (it is less than 1k in code which is about enough to register a driver that basically does nothing).

    Let me know if you find anything different!

    Cheers
  • John Kattenhorn
    John Kattenhorn New Member Posts: 1
    Hi,

    We are also very interested to see the I2C issue resolved within Windows.

    We are currently using a Raspberry Pi / Windows IoT Core for our devices but we need more CPU power in order to release new functionality.

    Regards

    John
  • dsreddy1989
    dsreddy1989 New Member Posts: 1

    Hi,

    Did anyone implement the I2C protocol on Aaeon Com-express module?
    How to use the I2C device on windows 10 platform

    Thank you and regards,

    Reddy

  • Feng
    Feng New Member Posts: 1

    Hi all,

    I also use pwm/GPIO/usetocomport, it work work successfully with aaeonEAPI.dll.
    but i2c/spi/UART pin in windows 10 is fail.
    I would like to also use i2c/spi/UART pin in windows 10.
    Does someone share example code with aaeonEAPI.dll in C#?

  • karlhm761
    karlhm761 New Member Posts: 6

    I know this is an old thread but has anyone had any success using UP4000 with I2C in Windows 10 64?

    with regards to using the IO pins with aaeonEAPI.dll in C#, I have code attached if anyone can find it useful. Includes multithreaded pin monitoring, notification events and debounce.

  • HarryChiu
    HarryChiu New Member Posts: 170 ✭✭✭
    edited July 29

    Hi @karlhm761

    Please refer to the link. There are some source code of DIO, I2C...etc.
    https://github.com/aaeonaeu/win-demo-apps

    Windows needs to install the upframework.
    https://downloads.up-community.org/download/up-sdk-for-windows-10-and-windows-iot/

    Best Regards,
    Harry Chiu

Privacy Policy