# Mst sdk api

**URL:** <https://forums.developer.nvidia.com/t/mst-sdk-api/254534>\
**Category:** Firmware Tools\
**Created:** [May 26, 2023, 9:31am UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534 "2023-05-26T09:31:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimax.main](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dimax.main](https://forums.developer.nvidia.com/u/dimax.main)\
**Post date:** [May 26, 2023, 9:31am UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534/1 "2023-05-26T09:31:20Z")

</div>

Hi.  
Where can I find the API for the mst package (mtcr library)?  
I’m fine if you will point me the git project for mst tools like i2c  
Thanks.

---

<div class="post-metadata">

**Author:** ![sribhargavid](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sribhargavid/32/367020_2.png) [@sribhargavid](https://forums.developer.nvidia.com/u/sribhargavid)\
**Post date:** [May 26, 2023, 10:35pm UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534/2 "2023-05-26T22:35:56Z")

</div>

Hello @dimax.main,

You can refer to the official GitHub repository of the mstflint project, the mstflint project provides tools and libraries for managing and configuring Mellanox devices, including the mst package.

You can find the mstflint project on GitHub using the following link:

> **[GitHub - Mellanox/mstflint: Mstflint - an open source version of MFT (Mellanox...](https://github.com/Mellanox/mstflint)**
>
> Mstflint - an open source version of MFT (Mellanox Firmware Tools)

Hope this answers your question.

Regards,  
Bhargavi

---

<div class="post-metadata">

**Author:** ![dimax.main](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dimax.main](https://forums.developer.nvidia.com/u/dimax.main)\
**Post date:** [May 27, 2023, 8:44am UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534/3 "2023-05-27T08:44:29Z")

</div>

Thanks.  
It helped a bit but it has nothing about the mtusb device or i2c access.

Anyway I managed to build my application using WinMFT SDK.  
But I still have an issue with opening a mtusb device, although I know that device is connected and mst status can see it:  
My application name is sprutm. I placed it into the WinMFT folder. I run command shell as Administrator:

 ![image.png](https://global.discourse-cdn.com/nvidia/original/3X/6/3/633bae5382f68fc3c0d905fb109cfea1f3d9cf87.png)

What do you think can be an issue?  
I believe it is something with security on Windows.  
Let me know if you need more details.  
Thanks. Regards.

---

<div class="post-metadata">

**Author:** ![dimax.main](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dimax.main](https://forums.developer.nvidia.com/u/dimax.main)\
**Post date:** [June 2, 2023, 4:02am UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534/4 "2023-06-02T04:02:24Z")

</div>

Hello.  
Any updates here? We can not move forward with our development without your help.  
Thanks.

---

<div class="post-metadata">

**Author:** ![dwaxman](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dwaxman](https://forums.developer.nvidia.com/u/dwaxman)\
**Post date:** [June 2, 2023, 4:25am UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534/5 "2023-06-02T04:25:33Z")

</div>

App refers to the device linux path.

Try only mtusb-1 without /dev/mst.

---

<div class="post-metadata">

**Author:** ![dimax.main](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dimax.main](https://forums.developer.nvidia.com/u/dimax.main)\
**Post date:** [June 4, 2023, 7:06pm UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534/6 "2023-06-04T19:06:10Z")

</div>

Thanks but it does not help. From what I can see both ways are supported but for none works:

 ![image](https://global.discourse-cdn.com/nvidia/original/4X/6/9/1/691748d12b2bdd54584247597625917d657da180.png)

---

<div class="post-metadata">

**Author:** ![dimax.main](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dimax.main](https://forums.developer.nvidia.com/u/dimax.main)\
**Post date:** [June 4, 2023, 7:10pm UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534/7 "2023-06-04T19:10:30Z")

</div>

Because I still can’t find any reference on how to use MFT package with mtusb-1 I’m not sure that below code is correct:

```auto
    /* Open device */
    mf = mopen( config.mdev );
    if( !mf )
    {
        failed( errno, "Can't open %s : %s", config.mdev, strerror(errno) );
    }

```

Also it is strange that errno is not set.

---

<div class="post-metadata">

**Author:** ![dwaxman](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dwaxman](https://forums.developer.nvidia.com/u/dwaxman)\
**Post date:** [June 4, 2023, 11:47pm UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534/8 "2023-06-04T23:47:34Z")

</div>

Can you please scan the mtusb device?

mlxi2c -d \<mtusb\_dev\> scan

---

<div class="post-metadata">

**Author:** ![dimax.main](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dimax.main](https://forums.developer.nvidia.com/u/dimax.main)\
**Post date:** [June 6, 2023, 11:03am UTC](https://forums.developer.nvidia.com/t/mst-sdk-api/254534/9 "2023-06-06T11:03:05Z")

</div>

Hi. I run it with MTUSB-1 connected to USB but not connected to the Mellanox board.

 ![image](https://global.discourse-cdn.com/nvidia/original/4X/f/6/d/f6dedaddd13afbc176672315a3cb284e14024c4d.png)

But I do not understand how it can help.  
My issue is not on i2c side. I can not open mtusb device with mopen. mopen fails without errno update but returns a zero file descriptor.
