UWP App GpioController.GetDefault() always returns null











up vote
1
down vote

favorite












What can be the reason that in my App GpioController.GetDefault() always returns null? The app is running on a RPI3b (as other Apps have done before.... never ran into this?!)



var gpioController = GpioController.GetDefault();
// gpio controller is null ... why?!
ServiceContainer.Instance.Register(new IO(gpioController));;









share|improve this question


























    up vote
    1
    down vote

    favorite












    What can be the reason that in my App GpioController.GetDefault() always returns null? The app is running on a RPI3b (as other Apps have done before.... never ran into this?!)



    var gpioController = GpioController.GetDefault();
    // gpio controller is null ... why?!
    ServiceContainer.Instance.Register(new IO(gpioController));;









    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      What can be the reason that in my App GpioController.GetDefault() always returns null? The app is running on a RPI3b (as other Apps have done before.... never ran into this?!)



      var gpioController = GpioController.GetDefault();
      // gpio controller is null ... why?!
      ServiceContainer.Instance.Register(new IO(gpioController));;









      share|improve this question













      What can be the reason that in my App GpioController.GetDefault() always returns null? The app is running on a RPI3b (as other Apps have done before.... never ran into this?!)



      var gpioController = GpioController.GetDefault();
      // gpio controller is null ... why?!
      ServiceContainer.Instance.Register(new IO(gpioController));;






      c# uwp gpio






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 7 '17 at 13:42









      bas

      7,51594896




      7,51594896
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          Found the issue. It was in Windows IoT configuration itself. There is a "default controller driver" in the devices tab. It was set to a DMA driver. Changing it to "Inbox driver" and rebooting the Pi solved the problem.






          share|improve this answer




























            up vote
            1
            down vote













            If you want to use the DMA driver which offers better performances, you need to activate/declare it to the API before querying the GpioControleler



            // This needs the following capabilities
            // <iot:Capability Name="lowLevelDevices" />
            // <DeviceCapability Name="109b86ad-f53d-4b76-aa5f-821e2ddf2141"/>
            if (LightningProvider.IsLightningEnabled)
            {
            LowLevelDevicesController.DefaultProvider = LightningProvider.GetAggregateProvider();
            }

            var gpioController = GpioController.GetDefault();
            // gpioController is valid


            See Lightning Providers
            for more details






            share|improve this answer





















              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46097961%2fuwp-app-gpiocontroller-getdefault-always-returns-null%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              3
              down vote



              accepted










              Found the issue. It was in Windows IoT configuration itself. There is a "default controller driver" in the devices tab. It was set to a DMA driver. Changing it to "Inbox driver" and rebooting the Pi solved the problem.






              share|improve this answer

























                up vote
                3
                down vote



                accepted










                Found the issue. It was in Windows IoT configuration itself. There is a "default controller driver" in the devices tab. It was set to a DMA driver. Changing it to "Inbox driver" and rebooting the Pi solved the problem.






                share|improve this answer























                  up vote
                  3
                  down vote



                  accepted







                  up vote
                  3
                  down vote



                  accepted






                  Found the issue. It was in Windows IoT configuration itself. There is a "default controller driver" in the devices tab. It was set to a DMA driver. Changing it to "Inbox driver" and rebooting the Pi solved the problem.






                  share|improve this answer












                  Found the issue. It was in Windows IoT configuration itself. There is a "default controller driver" in the devices tab. It was set to a DMA driver. Changing it to "Inbox driver" and rebooting the Pi solved the problem.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 7 '17 at 13:59









                  bas

                  7,51594896




                  7,51594896
























                      up vote
                      1
                      down vote













                      If you want to use the DMA driver which offers better performances, you need to activate/declare it to the API before querying the GpioControleler



                      // This needs the following capabilities
                      // <iot:Capability Name="lowLevelDevices" />
                      // <DeviceCapability Name="109b86ad-f53d-4b76-aa5f-821e2ddf2141"/>
                      if (LightningProvider.IsLightningEnabled)
                      {
                      LowLevelDevicesController.DefaultProvider = LightningProvider.GetAggregateProvider();
                      }

                      var gpioController = GpioController.GetDefault();
                      // gpioController is valid


                      See Lightning Providers
                      for more details






                      share|improve this answer

























                        up vote
                        1
                        down vote













                        If you want to use the DMA driver which offers better performances, you need to activate/declare it to the API before querying the GpioControleler



                        // This needs the following capabilities
                        // <iot:Capability Name="lowLevelDevices" />
                        // <DeviceCapability Name="109b86ad-f53d-4b76-aa5f-821e2ddf2141"/>
                        if (LightningProvider.IsLightningEnabled)
                        {
                        LowLevelDevicesController.DefaultProvider = LightningProvider.GetAggregateProvider();
                        }

                        var gpioController = GpioController.GetDefault();
                        // gpioController is valid


                        See Lightning Providers
                        for more details






                        share|improve this answer























                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          If you want to use the DMA driver which offers better performances, you need to activate/declare it to the API before querying the GpioControleler



                          // This needs the following capabilities
                          // <iot:Capability Name="lowLevelDevices" />
                          // <DeviceCapability Name="109b86ad-f53d-4b76-aa5f-821e2ddf2141"/>
                          if (LightningProvider.IsLightningEnabled)
                          {
                          LowLevelDevicesController.DefaultProvider = LightningProvider.GetAggregateProvider();
                          }

                          var gpioController = GpioController.GetDefault();
                          // gpioController is valid


                          See Lightning Providers
                          for more details






                          share|improve this answer












                          If you want to use the DMA driver which offers better performances, you need to activate/declare it to the API before querying the GpioControleler



                          // This needs the following capabilities
                          // <iot:Capability Name="lowLevelDevices" />
                          // <DeviceCapability Name="109b86ad-f53d-4b76-aa5f-821e2ddf2141"/>
                          if (LightningProvider.IsLightningEnabled)
                          {
                          LowLevelDevicesController.DefaultProvider = LightningProvider.GetAggregateProvider();
                          }

                          var gpioController = GpioController.GetDefault();
                          // gpioController is valid


                          See Lightning Providers
                          for more details







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 11 at 20:53









                          Vincent

                          2,99411627




                          2,99411627






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46097961%2fuwp-app-gpiocontroller-getdefault-always-returns-null%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Bressuire

                              Vorschmack

                              Quarantine