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

How to p2p btw two MKRWAN boards ? #23

Closed
yijenlu1971 opened this issue Jul 17, 2018 · 26 comments
Closed

How to p2p btw two MKRWAN boards ? #23

yijenlu1971 opened this issue Jul 17, 2018 · 26 comments

Comments

@yijenlu1971
Copy link

yijenlu1971 commented Jul 17, 2018

I have two arduino MKRWAN 1300, and want to send & receive by point to point. One board I loaded DumbModemLoRaSender, the other board I loaded LoRaReceiver. But, the receiver can't get anything. Please give me help, thanks.

arduino-mkrwan-1300

@facchinm
Copy link
Contributor

Hi @yijenlu1971 ,
using @sandeepmistry 's LoRa library (https://github.com/sandeepmistry/arduino-LoRa) version 0.5.0 you already have everything you need; launch LoRaReceiver on one board and LoRaSender on the other and it should be already working.
Two tips: remove the boards from the foam, otherwise there could be little short cicuits between the pins that make it behave "randomly".
Then, make sure the firmware version of LoRa modules is up to date (using MKRWANFWUpdate_standalone example).
Let me know if it works!

@yijenlu1971
Copy link
Author

yijenlu1971 commented Jul 18, 2018

Thanks your suggestion. It works now.
Try to debug. I put LED indicator to LoRaSender. When it send out, LED will flash. So, I found the board's not running at standalone. Now, both boards are loaded before running. It seems UART is a trigger to make arduino-mkrwan run or wakeup, is that right ??

arduino-err

@facchinm
Copy link
Contributor

@yijenlu1971 I'm happy it works! The serial "trigger" is due to this line

https://github.com/sandeepmistry/arduino-LoRa/blob/master/examples/LoRaReceiver/LoRaReceiver.ino#L6

that stops the execution until you open the serial port

@yijenlu1971
Copy link
Author

Thanks very much.

@bradtothebone
Copy link

bradtothebone commented Nov 26, 2018

same thing but I get: Starting LoRa failed!

I tried checking the freq was correct (in lorawan more this needs to be US915):
if (!LoRa.begin(915)) {
Serial.println("Starting LoRa failed!");

I did update the firmware with the standalone sketch too, maybe incorrectly? I get version 2 something and the directions say min is 1.1.6:

Any ideas? Thanks

Device : ATSAMD21G18A
Chip ID : 10010005
version()=v2.0 [Arduino:XYZ] Nov 13 2017 18:12:39
Version : v2.0 [Arduino:XYZ] Nov 13 2017 18:12:39

@facchinm
Copy link
Contributor

Hi @bradtothebone ,
you need to open the serial monitor after flashing the standalone updater for it to apply.
Then, using LoRa library >= 0.5.0 you'll be able to talk with the chip.

@bradtothebone
Copy link

Thanks.. I basically mixed up which chips I had flashed. few of them on the desk, one on a breadboard as a module. phew, I thought I had killed it by having the antenna off!

@rafaelcastellar
Copy link

Hi guys!

I'm stuck here with my two MKRWAN1300 p2p. I did what you said here, but I'm still getting the "Starting LoRa failed!" error.

I had updated the firmware from sandeepmistry sketch (MKRWAN has mlm32l07x01_bin_len error - not declared in the scope)
I'm running sandeepmistry Sender and Receiver sketches, both are giving me this messages.

A dumb question: the devices need to be wired? I'm just trying them wired in nothing but the usb cable to my computer.
The "First config" example from MKRWAN works fine, so I thought it is not a hardware problem..anyway, I don't know how to have them working.

Any help?

Tks!!

@facchinm
Copy link
Contributor

facchinm commented Apr 8, 2019

The error while compiling FwUpdater is not a good sign, are you sure you have downloaded the whole MKRWAN library? Once updated, there's no special wiring to do, just use Sandeep's library (at least version 0.5) and you should be ok.

@rafaelcastellar
Copy link

Hi FAcchinm!
I was able to update just with Sandeep's sketch, the erro variable scope erro I was getting from MKRWAN library. But you were right, something was missing. I removed it and downloaded again and now this updated worked as Sandeep's:

13:06:20.956 ->  Wrote and verified address 0x08012b00 (99%)
13:06:21.023 ->  Wrote and verified address 0x08012c00 (99%)
13:06:21.090 ->  Wrote and verified address 0x08012d00 (100%)
13:06:21.156 ->  Done.
13:06:21.156 -> 
13:06:21.156 -> Starting execution at address 0x08000000... done.
13:06:21.156 -> Flashing ok :)
13:06:22.022 -> ARD-078 1.1.9

But when I run the Sandeep's LoRaSender.ino I still get this error:

13:10:18.003 -> LoRa Sender
13:10:18.454 -> Starting LoRa failed!

I'm pretty sure I am doing something wrong once it happens with my two boards.
Tks

@superkalt
Copy link

superkalt commented Apr 8, 2019

hi,
firmware 1.1.9 works
mabye you try to connect to a TTN Gateway? So you know that´s the Gateway is ok and working.

@rafaelcastellar
Copy link

I Superkalt! I will try it later, right now I'm not covered by any gateway.

Tks

@rafaelcastellar
Copy link

rafaelcastellar commented Apr 9, 2019

Hi Superkalt. I tried but it seems not ok. Don't know if I set everything right. I used the correct keys created in TTN and I should be covered by a gate right now.
That's the logs:

21:43:10.303 -> TTN Mapper fuer Muenchen
21:43:10.303 -> Device: MUMAP-00
21:43:11.131 -> Version: ARD-078 1.1.9
21:43:11.230 -> Device EUI: a8610a30373c6001
21:43:11.230 -> Verbindung mit ABP Mode
21:43:11.330 -> Verbindung zum TTN Netzwerk hergestellt
21:43:16.301 -> Start loop
21:43:16.301 -> Loop:0
21:43:16.301 -> D:0|C:1|P:3
21:43:16.301 -> Daten senden
21:43:16.334 -> ABP => Anpassung moeglich
21:43:16.334 -> Auswertung der Fehler
21:43:16.334 -> 11 > Nachricht gesendet
21:43:16.334 -> Daten empfangen nach 1 Sekunde Pause
21:43:18.355 -> Keine Daten erhalten
21:43:18.355 -> Pause 120 Sekunden0|5|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95|100|105|110|115|120|
21:45:23.280 -> Loop:1
21:45:23.280 -> D:1|C:1|P:3
21:45:23.280 -> Daten senden
21:45:23.280 -> ABP => Anpassung moeglich
21:45:23.321 -> Auswertung der Fehler
21:45:23.321 -> 11 > Nachricht gesendet
21:45:23.321 -> Daten empfangen nach 1 Sekunde Pause
21:45:25.302 -> Keine Daten erhalten
21:45:25.302 -> Pause 120 Sekunden0|5|10|15|20|25|30|35|40|45|50|55|60|65|70|75|80|85|90|95|100|105|110|115|120|

Should I specify any code related to the gate? I should be covered by this gate: eui-b827ebfffede01eb from this https://www.thethingsnetwork.org/community/saopaulo/ here in São Paulo, Brazil.
Oh, it is raining heavly here and I'm indoor.

Is this log enough to determine if there are problems with the boards to get them working in P2P mode?

Tks agains!

@superkalt
Copy link

it looks fine. Please check the OTAA Mode. if this Mode is working the Board and the cover is ok.
you need a script with english logging?

@rafaelcastellar
Copy link

rafaelcastellar commented Apr 9, 2019

Hi Stefan! It did not connected in OTAA mode. Could it be a gateway problem?

20:03:38.640 -> TTN Mapper fuer Muenchen
20:03:38.640 -> Device: MUMAP-00
20:03:39.468 -> Version: ARD-078 1.1.9
20:03:39.501 -> Device EUI: a8610a30373c6001
20:03:39.501 -> Verbindung mit OTAA Mode
20:04:40.517 -> Keine Verbindung zum TTN Netzwerk moeglich
20:04:40.517 -> Prgramm Abbruch > Endlosschleife

In the ABP mode it did not get the data sent, neither these data can be seen at TNN.

Meanwhile, with LoRa.h it keeps:

20:11:37.645 -> LoRa Sender
20:11:38.076 -> Starting LoRa failed!

Tks!

P.S: about the logging it is ok for me, ich lerne Deustche und das ist gut für mich...

@superkalt
Copy link

:) ok.

  1. no TTN Network
  2. broken Hardware
  3. wrong keys

@rafaelcastellar
Copy link

  1. no TTN Network: may be, I'll try to reach the responsible for it here in São Paulo
  2. broken Hardware: don't know, it begins with MKRWAN.h, just with LoRa.h it failed to begin
  3. wrong keys: checked them several times, but will do again.

Vielen danke!

@superkalt
Copy link

write a email .... superkalt is easy to find in the www

@1n9yun
Copy link

1n9yun commented Apr 11, 2019

refaelcasteller !
I have the same problem with you! I hope to solve our problem quickly.
If you solved it, could you comment about what you did?

and I'll do that too!

@sandeepmistry
Copy link
Contributor

@bradtothebone @rafaelcastellar @7n7n7n SAMD Core v1.6.21 introduced a regression.

I've opened a pull request to fix it: arduino/ArduinoCore-samd#400

For the short term I suggest downgrading to SAMD Core v1.6.20. in the board manager.

@rafaelcastellar
Copy link

rafaelcastellar commented Apr 13, 2019

Thank you very much @sandeepmistry ! That worked!

One of them is sending packets, the other one is not getting them yet, it is freeze at message:
20:30:23.293 -> LoRa Receiver
It should be something wrong with the code of receiving, I'll check it out... But there is not "failed" message :-)

Tks!

@Michael-List
Copy link

Downgrading to SAMD Core v1.6.20 works for me with the Arduino MKR 1300

@mcradit
Copy link

mcradit commented Apr 22, 2019

Downgrading to SAMD Core v1.6.20 worked for me too with the Arduino MKR 1300

@jugfk
Copy link

jugfk commented Jul 31, 2020

In terms of Arduino MKR1300 LoRa P2P test of Sandeepmistry,
I did both SAMD Core v1.6.20 and LoRa v0.5.0 by Sandeepmistry but they still stuck like below that.

"13:19:10.335 -> LoRa Receiver"

Please help me figure out the problem.

  • References:
  1. https://github.com/sandeepmistry/arduino-LoRa/blob/master/examples/LoRaReceiver/LoRaReceiver.ino
  2. https://github.com/sandeepmistry/arduino-LoRa/blob/master/examples/LoRaSender/LoRaSender.ino

@LeonWandruschka
Copy link

Just try to change the MHz from 915E6 to 915 after this it worked for me!
Why? I don't know just give it a try. ; )

@dazrave
Copy link

dazrave commented Oct 14, 2022

I'm having the same "LoRa Receiver" and nothing else using a pair of MKR WAN 1310's. Both when flashed can send packets but both when acting as receiver don't receive anything.

I've got the latest branch of MKRWAN and Sandeep's repo running. It's getting quite frustrating!

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

No branches or pull requests