Giter Club home page Giter Club logo

Comments (7)

iegomez avatar iegomez commented on August 22, 2024 1

I once ran the full loraserver stack, including mosquitto, on a Raspberry, but I can't recall if I also used the plugin and don't have access to the RPi based gateways to check right now.

If you are patient enough, I could test it on monday and let you know; if you are eager to try it, just go ahead and compile it: hopefully it will work without any issue, and if not, we can work out the solution and add it to the documentation for anyone that needs RPi support too.

In theory it should compile just fine, given that you have Go with cgo on your RPi. That's assuming you want to compile it in the Pi itself and not cross compile for ARM from another arch. That could be trickier (or not, I really have no idea because I haven't tried it). The plugin is small enough that compiling in the Pi shouldn't take that long, but again, I could try it on monday and post results here.

from mosquitto-go-auth.

douglaszuqueto avatar douglaszuqueto commented on August 22, 2024 1

Thank you @iegomez . I hope so!

I'll start the process to try to compile here as well. If I can get a result by then, I'll come back here.

Thank you again.

from mosquitto-go-auth.

iegomez avatar iegomez commented on August 22, 2024 1

Well, I can now confirm that it works on a Raspberry Pi 3. I added detailed instructions on building mosquitto in the general case and some notes for Raspberry Pi to the readme, but basically what you need is to install and/or build necessary dependencies for mosquitto (websockets, ssl, etc.), build mosquitto itself, install Go for armv6l and then build the plugin as usual.

Be sure to pull or clone the repo again, as I deleted go-auth.h which was built on Linux amd64 so it can be generated in the Pi (or any system) when building.

Two things you should consider:

  1. Building things in the Pi will take long, specially dependencies for mosquitto, such as libwebsockets. So get your swords ready to have a nice time while compiling.

  2. Cross compiling should in theory be possible, but you'd have to cross compile mosquitto first so that the headers are available and only then cross compile the plugin, but even then something could go wrong as I'm not sure that cgo plays well with arm. If you have the time, it'd be a nice experiment, but if you just need to work, prefer compiling on the Pi itself.

Let me know if you run into any problems.
Cheers!

from mosquitto-go-auth.

iegomez avatar iegomez commented on August 22, 2024 1

If you need any help with those or any other ideas, reach me here, at the lorserver (forum)[https://forum.loraserver.io/], or drop me a line at [email protected] / [email protected]. Of course, if you wish to contribute any implementation, just file a new PR.

Cheers!

from mosquitto-go-auth.

douglaszuqueto avatar douglaszuqueto commented on August 22, 2024

@iegomez, i managed to make it work (after a lot of work hehe).

Actually, this project can open many doors to other implementations. Thank you

Cheers!

from mosquitto-go-auth.

iegomez avatar iegomez commented on August 22, 2024

Great news!

What other implementations are you thinking about?

from mosquitto-go-auth.

douglaszuqueto avatar douglaszuqueto commented on August 22, 2024

With such freedom I think of 2 things:

  • Adapt to more specific business rules;
  • Create a log layer;

from mosquitto-go-auth.

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.