xg590 / sx1276 Goto Github PK
View Code? Open in Web Editor NEWMicroPython Library for SX1276 (A Long Range Radio Chip from Semtech)
License: Apache License 2.0
MicroPython Library for SX1276 (A Long Range Radio Chip from Semtech)
License: Apache License 2.0
I'd to like to perform FSK modulation on my hardware. it would be great if you show me how i could do that.
Hello,
I am trying to send an object over LoRa using your sender and receiver scripts. I am getting a runtime error in line lora.send(dst_id=0, msg=payload, pkt_type=lora.PKT_TYPE['REQ'])
.
The error says RuntimeError: no active exception to reraise
. I have also tried to convert the object to a byte string,
I get the same error in both cases. I can print the object as a byte string.
The string is 538 characters long.
What I found out is that when the payload length is getting longer only then the error occurs. Is there any way to send this big payload?
Hi, thank you for writing this code. I look forward to use it as a base for my LYLIGO Lora board. However I can't find any licensing information. Please could you tell me with what license do you release this code? I want to use it according to your wishes. Cheers.
Hello,
I have like material :
And i wish to know if the matérial are compatible with your solution to work with Micropython to create a LoRaWan Network
I have connected multiple nodes to the ESP32 and Lora isn't getting initialized. The interfaces are working fine.
Hi,
Another feature that would be of great help is to set the number of retries to send a packet if the ACK is not received within the timeout.
Also, without ACK sending messages (not broadcasts), i.e., 'REQ' without ACK.
I have implemented two-way communication by defining a new packet type that builds on the "REQ" type. I'm quite not sure how to go about it.
How to fetch the source ID (ID of the sender of the message) from a received packet?
Can we do something like
def onBroadcast(self, packet, SNR, RSSI):
print("[New 'Discovery' packet]", src_id, packet, SNR, RSSI)``
Is it possible to display the RSSI and SNR values?
I am trying to send REQ messages in a while loop to a receiver who receives the message and responds with some content. The REQs are not ACKed in my code.
My requester is
while True:
if received_payload != None:
print(received_payload)
payload = "Node,3"
print('[Sending]', payload)
lora.send(dst_id=1, msg=payload, pkt_type=lora.PKT_TYPE['REQ']) # Sender's lora_id is 1 and receiver's is 0
#Check and resend the message
resend_count = 0
print(lora.seq_num)
while (int(lora.seq_num) != 0) and resend_count < 7:
lora.send(dst_id=1, msg=payload, pkt_type=lora.PKT_TYPE['REQ'])
print("Resending packet..."+str(resend_count))
resend_count += 1
time.sleep(0.05)
The receiver is
while True:
lora.mode = 'RXCONTINUOUS'
if received_payload != None:
count = 0
resend_count = 0
try:
if str((received_payload), 'UTF-8').startswith("Node"):
print("REQ Message starts with a 'Node'")
if len(message_list) > 0:
print("Sending this node's messages")
send_message = "Table," + str(message_JSON)
print(send_message)
lora.send(dst_id=3, msg=send_message, pkt_type=lora.PKT_TYPE['REQ'])
print(lora.seq_num)
while (int(lora.seq_num) != 0) and resend_count < 7:
lora.send(dst_id=3, msg=send_message, pkt_type=lora.PKT_TYPE['REQ'])
print("Resending Message..."+str(resend_count))
resend_count += 1
print(lora.seq_num)
if (int(lora.seq_num) != 0) and resend_count >= 7:
print("Message sending failed!")
else:
print("Message sent!")
else:
print("This node's message list contains no entries. Sending nothing back.")
except:
print("REQ Message Received But Payload Decode Error")
sleep(0.03)
The receiver is receiving the REQ messages and is also sending the content. But somehow, the ACKs are not working.
What I found from the debug prints is that the REQ sender does not receive the ACK messages.
I have setup two or more nodes sending data to a single node. A lot of collisions occur and "PayloadCrcError" shows up. But why does it get stuck at this? In the image below, one node is sending a sequence number and "HelloWorld" and the other is sending "HelloWorld_1".
Also, is there a way to receive maximum data from multiple nodes?
is there a way i could set two different spreading factor and bandwidth for two LoRa modules operating on same MCU? I mean when SF 8 500khz for one LoRa and SF 10 and BW 125khz for another. is it possible?
Hello,
The example code has the following lines for the 914-916 MHz and 902-928 HMz.
I would like to modify the following line in the receiver and sender to set the frequency for hopping between 865.20 MHz and 868 MHz. How can I do that?
channels2Hopping = [914_000_000+200_000 * random.randint(0,10) for i in range(128)] # 914~916 MHz
channels2Hopping = [902_300_000+200_000 * random.randint(0,127) for i in range(128)] # 902~928 MHz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.