-
Notifications
You must be signed in to change notification settings - Fork 60
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
Feature Request: Code that works for testing 2x Lora Vision Shields #87
Comments
Hi Jeremy, In the meantime, I'm setting up a new API to allow manually changing the channel mask, overriding the default configuration (arduino/mkrwan1300-fw@9479bb9). This would allow sending messages via single channel "gateways" (like ESP32 with LoRa radio) Hope it helps! |
Thank you so much @facchinm for looking into this. I have got my LoRanWan Vision Shield connecting in North America on the https://explorer.helium.com/coverage network. I contacted their devs who have purchased the board with a portenta and will try to add Helium support in their arduino LongFi library. For point-to-point LoRa I am not really sure how to use https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0 with the patch but the LoRa ping/pong example looks exactly what I want. Not really sure what board would work. See Image below. I will probably wait for you to have something from Arduino that I can test. |
Hi @hpssjellis, PR #90 adds new APIs to enable/disable channels. Could you please try them and give us some feedback? Thanks! |
@giulcioffi . I would really like to help test these. Controlling the channel mask should be helpful. Do you have any links to example programs I can try? I really appreciate you working on this. . I made a quick attempt to print information but had no luck. Does the channel information need a live connection, I don't think so? Notice I had no printout from getChannelMask. |
Sorry, the firmware binary was not updated...I just pushed a new commit in PR #90 with the updated firmware. Please upload the example MKRWANFWUpdater_standalone with the new binary to update the firmware.
|
@giulcioffi that worked better. Using this code
I got these results
Possibly the default channelmask should be saved as it looks like it gets lost if you disable all the channels. P.S. How would code look to use only one channel to allow 2 Portenta's with the Lora Vision Shield to communicate? |
Hi @hpssjellis, thank you for pointing out this failure on Portenta. |
@giulcioffi That is great. I thought it didn't work but then I ran the updater and my code worked great. Here is the new output.
If you can think of some code to test point to point that would be really useful. I will be testing my own ideas based on sandeepmistrys lora, but using your channel masks |
@hpssjellis unfortunately the mask is not enough for point to point communication; you can use it to talk with a low cost, single channel gateway (eg. an ESP32 with Semtech radio) that will transparenly forward the data to the cloud. |
Just checking, @facchinm and @giulcioffi . The Portenta vision shield LoRa hardware limitations, are they simplified with the Breakout board, which does give access to some of the lora chip pins? Also if I am stuck with Murata chip programming, I would give it a try, I just need a few examples to get started. |
So, I just tested a possible procedure and I think it could work for you 🙂
Let me know if you need any help! |
@facchinm Martino, I really like where this is going. I have an error running on windows. (I installed the Tlera board then replaced the board code with your repository. Not sure if that is the best method. ) |
Almost there 😄 The PortentaLoRaBridge sketch should be flashed on the Portenta, so you should select Portenta H7 M7 as target. All the other sketches than will run on the Murata if compiled for Vision Shield 😉 |
That makes sense but @facchinm I am getting same error using either the M7 or M4 core. Are you running a newer than 1.3.2 mbed board? Where would I find the Class Uart to check? |
Ah yes, I'm using an unreleased version of mbed core... You can either use the git version or just wait a bit until we release (hint, will happen soon 😉 ) |
@facchinm Sounds good. I will wait. Thank you so much for looking into this. Your my new Tech Hero. |
@hpssjellis core 2.0.0 is live and released, so now the sketch should compile just fine 🙂 |
@facchinm That is big news. Yes I will be testing everything and making more Portenta Videos. P.S. I am making a Portenta Arduino IDE Library with a bugs folder as I find any. I will also post issues as appropriate. |
@facchinm are you on a Mac on Linux machine? I am having a few serial port issues that look linux based
I will test from my ubuntu machine tonight. Couple of questions:
|
@facchinm Works great on Ubuntu. Ping pong switching master etc. Very impressive. What is the plan if you can get this working on windows? Can this be made as part of the MBED core or would you push a PR to https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0 ? |
@facchinm from a memory allocation point of view does this make any sense to you? I have my 2 Portenta LoRa shields Ping and Ponging each other, I then put a normal Machine Learning program on one of the Portenta boards using the normal arduino method. On bootup the boards still ping and pong, even though the machine learning program also runs! If I then clean both the M7 and M4 cores of the that board, it still Ping and Pongs with the original when powered. If I shut down the cleaned board, the Ping Pong stops. Weird. Basically really resilient. I can't stop it from being able to ping/pong. Any idea how to clean it? I even fired up OpneMV and it still ping/pongs but only when powered. If I load your Tlera core, I can flash a blank program which stops the 2nd board from ping/pong. Has your Tlera Core created a permanent thread like a virtual 3rd core? |
Super happy you made it working 🎉 ! |
I will look into the RPC library as I need to get information from the M7 core to the murata module, thank you @facchinm. One quick question: On the MKRWAN library the DevEui was generated by the library. In the GrumpyOldPizza library there does not seem to be that ability. Do I just let TTN determine the DevEui? |
Sure, DevEUI is a sorf of mac address, so you shouldn't join the same network with two boards sharing it. TTN takes care there's no duplicate when they assign it so it's all fine 😉 |
@facchinm just an update here. I seem to be able to communicate with the murata module from the Portenta using UART3. That seems to be connected to the murata module regular Serial. Still testing if I can send data using UART3 to the murata module.
|
@facchinm I had this bright idea to fork your version of the grumpyOldPizza library at https://github.com/facchinm/ArduinoCore-stm32l0 add several Portenta Specific examples here and then submit a PR back to grumpyOldPizza to include in his library. Unfortunately I have just clued in that your fork is very raw and not at all ready for a PR back to the master. It is probably a fair bit of work to make it ready and that is a waste of your time. I thrive on wasting time. You have basically just changed: boards.txt and the B-L072Z-LRWAN1 variant.cpp file for each of the Arduino boards. Is there anything else you changed or is that it? Is this something you would eventually submit as a PR or somehow include with the Arduino MBED boards or is this something I might be able to submit as a PR to grumpOldPizza? It looks like I just have to make a B-L072Z-LRWAN1 folder for each of the Arduino boards and then use your board.txt file and link everything to the new folders. |
@giulcioffi , @facchinm your version of the grumpyOldPizza library is very cool, any chance it will ever bit a bit more mainstream and give support for all the arduino mbed devices? I am having a lot of success with both Portenta P2P and LoRaWan, my plan is to make a P2P system which switches to the LoRaWan system when needed. My proof of concept is running. Unfortunately the Murarta module memory seems to die at 0x08010000 is there any way to give it a bit more space? |
I would like to distribute to friends my .bin or .dfu files made using @facchinm version of the GrumpyOldPizza Tlera board. Does anyone know how to upload these files to the Portenta from the command line on windows. The problem is going to be getting them to load to the correct memory location and if I can just use a regular arduino uploader? Here is the load command that my linux computer generated
Developing with LoRaWan is incredibly frustrating as you always have to rely on other peoples gateways. What @facchinm has got working with LoRa is very exciting. It is much too hard to teach others how to work with the GrumpOldPizza method, which as far as I can tell needs a linux computer but giving people my code would work fine. Seems to be some information here in the installation folder for windows
Whereas on my window machine the code looks something like
Can someone take the above windows command and adapt it to upload the GrumpOldPizza binary.dfu file ? P.S. I assume dfu-util can take both .bin and .dfu files. . So I tried this command on the windows dos prompt after moving the linux .dfu file into my downloads folder
Not really sure if the Portenta should be in boot mode or regular mode as on the linux computer we install a bridge file to the portenta and then run grumpyOldPizza. I will try to test out if my command line is working. Also downloaded onto windows stm32flash and tried
|
@facchinm I think you might be proud of me. Looks like if I install xxd and run
and replace the following file: https://github.com/arduino-libraries/MKRWAN/blob/master/examples/MKRWANFWUpdate_standalone/fw.h I can convert my GrumpyOldPizza .dfu files made on a linux computer to a header file then change the 2 variables to the following:
and using a windows computer and the program MKRWANFWUpdate_standalone with the new fw.h file looks like it loads onto the Portenta Boards from a windows computer. In my case I can publish the fw.h files to my students who don't have linux computers. (95% of them don't have linux computers) |
@akash73
I am having troubles getting my 3 Lora Vision Shields working in North America.
Any code or suggestions would be appreciated but I think my biggest issue is my gateways are not stable. (I will probably drive the 40 km and do some testing where there are more gateways).
The other issue seems to be just less North American testing.
It would be really good if we could do some point-to-point testing with the Vision Shields. The https://github.com/sandeepmistry/arduino-LoRa library looks promising but I can't even get the MRKWAN DumbModemLoraSender program working. (Looks like it is directly from the sandeemistry library.)
Any suggestions for connecting the Semtech module up correctly? I might eventually be able to access all 160 pins on the PortentaH7 so direct connections might be a possibility in the near future. I just need to know more information about what needs to be connected.
I have posted a similar issue with the sandeepmistry LoRa Library
The text was updated successfully, but these errors were encountered: