Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port for Raspberry PI #322

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

port for Raspberry PI #322

wants to merge 7 commits into from

Conversation

d-a-v
Copy link

@d-a-v d-a-v commented May 28, 2019

Port of Raspberry-Pi port from https://github.com/hallard/arduino-lmic/tree/rpi/
All credits go to @hallard (at least)

@d-a-v d-a-v changed the title Rpi port for Raspberry PI May 28, 2019
@terrillmoore
Copy link
Member

Thanks for your contribution.

It's difficult to accept RPI makefiles into the core of this repo, because it implies further extending CI testing.

There's an approach that probably will be better. Use this repo in non-arduino environments by using a "pkgsrc" style build, where the Makefiles point to an (unmodified) LMIC repo in a different directory tree. There are lots of examples on the web

The critical thing is that we have to fork hal.cpp for the PI; changes can't be made in the Arduino file because of CI testing issues. That's the intended architecture of LMIC as it came from IBM -- we are expected to create a new HAL directory for each target OS.

Based on a review of your changes, with proper '-D' in the makefiles, and a cloned hal.cpp, you'd be able to use this repo without difficulty in a larger project. I will be happy to help you do that work, and even host the repo in this project. (I can do some git magic to clone your pull request into a new repo.)

It may be take a while before I have the day or two needed for this, alas.

Best regards,
--Terry

@hallard
Copy link

hallard commented Jul 5, 2019

@terrillmoore
Just discovered your repo, awesome work, I will now use this one.
For RPI port, having it here and in sync with your would be a great idea.
I don't know travis nor a git guru either, If you create a new branch dedicated to RPI is it possible to:

  • remove travis for this branch
  • keep syncing RPI branch with the changes you make to the core?

I also added an option long time ago for ESP to be able to manage stack without any DIO pin connected (polling IRQ register via SPI, I know not best implementation but when you're out of IO it can save your life ), Do you think it will be possible to add it also ?
see matthijskooijman#34

@d-a-v
Copy link
Author

d-a-v commented Jul 5, 2019

@terrillmoore

Based on a review of your changes, with proper '-D' in the makefiles, and a cloned hal.cpp, you'd be able to use this repo without difficulty in a larger project. I will be happy to help you do that work, and even host the repo in this project. (I can do some git magic to clone your pull request into a new repo.)

In its current state this PR passes CI and -D has to be used for the rPi part of the code.
While I don't understand how the lmic code is supposed to keep in sync with two separate repositories, I'm OK with you forking, updating and even hosting this porting. Now that @hallard is here maybe you will find together an agreement on how things should be done. Like I said, I claim no credits at all on this PR.

@hallard
About esp8266, there is now something I called "recurrent scheduled function" that is called on every loop() and every yield(). It was brought to the esp8266 arduino core repository for the future-now-too-much-awaited-for ethernet support with lwIP. This is exactly, I guess, what you need for transparently polling IRQ through SPI.
You only need to register your polling function in setup(). The ethernet example is there.
This feature is currently only available in master branch and I'd be more than glad to help with anything on that purpose.

@addaedans
Copy link

I'm sorry to write here, but can someone explain than how and where we need to download from and compile the raspberry related branch and where to use the -D flag? It would be really useful to start testing on my PI:)
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants