GithubHelp home page GithubHelp logo

npm i mraa fails about meta-intel-edison HOT 3 OPEN

jessewriter avatar jessewriter commented on July 22, 2024
npm i mraa fails

from meta-intel-edison.

Comments (3)

htot avatar htot commented on July 22, 2024 3

Hi @jessewriter I don't know exactly what npn i mraa does. But libmraa and and libupm can still be built by Yocto (see recipe here. To make mraa work with python you need the python bindings (enabled by default), and for nodejs the nodejs bindings (disabled by default), the recipe says:

# Note: 'nodejs' is disabled by default because the bindings
# generation currently fails with nodejs (>v7.x).

With mraa and nodejs bindings, I am not sure it would work correctly (haven't tried for a long time). Reason is, some pinmuxing is done by the edison layer using debugfs, which was not supported by newer kernels. However I believe @andy-shev mentioned this support may have been reinstated in the kernel. Also gpio pin configuration should now be done using libgpiod, and has been implemented in mraa for some platforms, but not edison. Specifically this file may need work to get your code working (and hasn't been touched for a long time):
https://github.com/eclipse/mraa/commits/master/src/x86/intel_edison_fab_c.c
But serial port should work and you could get pinmux working either through debufs or acpi tables and with that your code might work.

Personally, I gave up on this. We are building now like 400 iio drivers for Edison as modules for the linux kernel. Likely your devices are covered, but as nobody bothered to make a mraa translation layer your code may need significant changes.

Hard to say what needs to be done though, I have an example on a TSL2561 light sensor here with mraa :https://edison-fw.github.io/meta-intel-edison/4.5-mraa-upm.html#example-using-upm-and-mraa-on-the-tsl2561 and using acpi / kernel / libiio here https://edison-fw.github.io/meta-intel-edison/4.6-libiio.html. That might give an idea of the work.

from meta-intel-edison.

andy-shev avatar andy-shev commented on July 22, 2024

@htot, there is official debugfs file for that for somewhile. But I highly recommend to forget about MRAA. Noone should use it.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/pinctrl/pinmux.c?id=6199f6becc869d30ca9394ca0f7a484bf9d598eb

from meta-intel-edison.

htot avatar htot commented on July 22, 2024

Hi @andy-shev thanks for the link. I totally agree MRAA seems dead. It would have been nice to keep old code running, and it might be possible for python based code but the nodejs binding have been broken for a long while and nobody seems interested or capable to fix it.

Best is to get kernel driver working (or write kernel driver for the benefit of all mankind) and then modify user space code to use the kernel driver.

from meta-intel-edison.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.