LoraMAC demo not working
-
I've received new Lopy units, and upgraded to latest version, details as:
(sysname='LoPy', nodename='LoPy', release='1.7.8.b1', version='v1.8.6-724-g2b9ed601 on 2017-07-28', machine='LoPy with ESP32', lorawan='1.0.0')I've tried the basic LoraMAC sample and am not receiving any data between the pair of units.
(wifi is working fine)I noticed an old support message, that mentions similar error.
https://forum.pycom.io/topic/770/lora-receiving-only-bIs this bug still existing?
This is a pain as I'm doing a workshop demo later this week and wanted to use the units for a hands on demo.
-
@johnmcdnz Just to be sure, you have connected the antenna to the correct port (the one next to the LED and reset button)?
-
@jcaron Yes. I already have two working Lopy from earlier delivery (on different os version) that are working fine.
-
@johnmcdnz Could you please give a snippet of your code? I'll have a look at this now.
Thanks!
-
@bucknall Thanks Alex....
This code runs on both units, and each just prints b' ' repeatedly.from network import LoRa
import socket
import time#lora = LoRa(mode=LoRa.LORA, frequency=925000000, sf=7)
lora = LoRa(mode=LoRa.LORA, frequency=925000000, power_mode=LoRa.ALWAYS_ON, tx_power=5, bandwidth=LoRa.BW_250KHZ, sf=7, preamble=8, coding_rate=LoRa.CODING_4_5, tx_iq=False, rx_iq=False)s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
s.setblocking(False)while True:
# send some data
s.setblocking(True)
s.send('Hello')
print('hello send')# get any data received... s.setblocking(False) data = s.recv(64) print(data) # wait a random amount of time time.sleep(machine.rng() & 0x0F) -
Sleep on it....
Alex, and anyone else: I came home this evening to have another crack at this problem. Turned my PC on (Lopy powered from the USB ports). Suddenly I see the 'hello' message!!!!
What can I say?
I have each unit on opposite sides of the PC, about 50cm apart. So we can suspect some local RF interference probably.
Now I can get my workshop demo ready.
-
@johnmcdnz Great to hear! Sometimes it's worth changing external variables for things like RF. I know I've previously had issues with some antennas as well.
-
@bucknall
Had a couple of hours on it and have all 5 units working. I'm not sure I fully understand the issue, but this is what I noticed:I have a wifi router connected to my laptop, that I'm using as a separate AP for the Lopy. If I disconnect the ethernet from the Laptop, this may remove the problem.
So, I've wondering if there is RF EMC interference in the cables between the router/laptop/lopy.
Also if I then reboot the Lopy the problem disappears.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login