#help-with-radio

1 messages · Page 8 of 1

chrome roost
#

The one on the right is rp2040 rfm95 and on the left is adafruit Lora radio featherwing. Both have antennas but I want to use the featherwing because it has an SMA connector

#
#

RP2040 -> rfm95

SCK(gpio 14) -> default SCK pin

MOSI(GPIO 15) -> default MOSI

MISO(gpio 8) -> default MISO

RFM_CS(gpio 16) which I'm assuming is at GPI00 TX-> CS pin at D.

GND -> GND

3.3V -> 3.3

young cove
#

It looks like your are using the same CS, MOSI, and MISO pins for the FeatherWing as are connected to the module on the RP2040 Feather. So both radio modules are connected, and both will try responding on MISO.

chrome roost
#

This is the code I'm trying to use to initialize the featherwing

young cove
#

I think you said it's TX, which is GPIO0. So
#define RFM95_CS 0 instead of 16

chrome roost
young cove
#

Double-check the RST and INT pin assignments, both the jumpers between boards and the on-board jumpers. I have the same boards but the jumpers on my FeatherWing are wired differently

chrome roost
#

I'm not really using RST and INT pins. Also, I tried it on the second one and it didn't work.

young cove
#

do you see "init failed" or "initialized successfully"?

chrome roost
#

init failed

young cove
#

which lora library are you using?

#

and did it work when you used the on-board radio?

#

for instance, it looks like LoRa.begin() needs an arg in Hertz, not Megahertz

young cove
#

if (!LoRa.begin(915E6)) {

normal drift
#

If I am not mistaken, Pin D on the Featherwing will correspond to GPIO6 on the Feather RP2040

young cove
#

the boards are no being stacked, though

chrome roost
#

It still failed.

normal drift
#

OK -- having trouble following the wiring.

chrome roost
chrome roost
#

Let me know if there is anything thats confusing

chrome roost
young cove
#

what lora library did you install in Arduino IDE?

chrome roost
#

by sandeep

#

LoRa by Sandeep Mistry to be exact

young cove
#

Note the commented-out Lora.setPins(...)

chrome roost
#

unfortunately it still failed.

normal drift
chrome roost
normal drift
#

This library may require the INT pin be connected.

#

ah -- I guess it is optional, but I was using it NSS, NRESET, and DIO0 pins can be changed by using LoRa.setPins(ss, reset, dio0). DIO0 pin is optional, it is only needed for receive callback mode. If DIO0 pin is used, it must be interrupt capable via attachInterrupt(...).

chrome roost
#

I see. I just finished soldering the wire. I'll test it just in case

#

It still refuses to output anything

normal drift
#

Can you post your current code?

chrome roost
#

Sorry that was the wrong file

normal drift
#

The boaud rate is now 9600 -- Is your serial terminal set for that -- you had been using 115200

chrome roost
#

Yes, it has been set to that

normal drift
#

you may want to try putting the while (!Serial); back in for testing

#

you might be missing the initial output.

chrome roost
#

Yep that worked for giving me an output but it still failed to initialize. Specifically it says starting lora failed

normal drift
#

That still sounds like a wiring mis-match.

young cove
#

did you try it with the on-board radio? If that works, then it should be a pin or wiring issue. Also make sure the FeatherWing is RFM9x, not RFM69

chrome roost
young cove
#

The same test program (modulo pin changes) should work with the RFM9x Feather you have, with the radio module that's on that board.

chrome roost
#

Yes, it worked with just the RP2040.

young cove
#

and you're still getting "init failed" in the other case?

chrome roost
#

yeah

#

The code didn't work when I set the CS pin to 0

young cove
#

do you still have the bag for the FeatherWing? What is the four digit part number?

#

if that's not available, could you tell me that part number from your order information?

chrome roost
#

I think its ID: 3231

young cove
#

that's right, but if you could confirm that in the order email, that would be great

chrome roost
#

Yes, that was on order email

young cove
#

I would say remove all the wiring, and put the wires back one by one. At any time was reverse polarity applied to the FeatherWing by mistake, or >3.3V?

chrome roost
#

There was 3.7v on BAT pin

young cove
#

it's not connected to anything, so no problem.

#

in the photo you sent, it looks like RST is connected to D, and CS is connected to A, but the listing you gave several posts back, you wrote that CS was connected to D

chrome roost
#

sorry, I switched it out because I was trying to see if only one of them had a problem and I forgot about switching them back. Sorry about that

young cove
#

so I would say rewrite it, and check the wiring very carefully, and make sure the wires are plugged into the breadboard well

#

those wires are soldered on the underside, right?

chrome roost
#

Yes

young cove
#

sometimes we get people who don't solder connections, just checking 🙂

chrome roost
#

This is the output I got: 5:09:11.017 -> LoRa Sender
15:09:11.017 -> Sending packet: 0
15:09:29.247 -> LoRa Sender
15:09:29.247 -> Sending packet: 0
15:09:39.266 -> No acknowledgment received. Transmission failed.

#

The thing is I don't know if it acknowledges now that I am connecting rp2040 to the featherwing because this is the same response I got when I just used RP2040 by itself

young cove
#

Those pins are still for the onboard radio, right? You need to change them

#

@chrome roost ^^

#
const int csPin = 16;          // LoRa radio chip select
const int resetPin = 17;       // LoRa radio reset
const int irqPin = 21;         // change for your board; must be a hardware interrupt pin
chrome roost
#

It failed

young cove
# chrome roost

which pin is TX wired to on the FeatherWing: A, B, C, D, or E?

#

and same for reset and irq?

chrome roost
#

D for TX(CS), reset is gpio9, irq is gpio10

young cove
#

so in the photo CS is A, did you unsolder it and swap things around?

#

what letter pin on the FeatherWing are RESET and IRQ?

chrome roost
#

CS is D
RST is B
IRQ is D

young cove
#

it looks like RST is B to me

#

and IRQ is C

chrome roost
#

Yep you’re right sorry about that

young cove
#

I am out for a couple of hours. Do recheck the wiring. If you have another RP2040 board, you could try that.

little forge
#

I'm wanting help with wireless part of a project both a fairly small project as well as a part of a larger project I'm wanting to create a few wearable electronics that are all able to comunicate with each othereither using wifi or bluetooth if there is a way to have a way to send basic messages from phone to any of the devices or between the different devices. I was hoping to find a way to send wireless UART type messages between the devicesusing the real time clock that is part of the watch to synchronize different light effects If anybody can link me to a learn guide or suggest a circuit python example that can point me in the right direction then much thanks will be given and If I end up on show and tell then I will likely give you a public thanks for pointing me in the right direction thanks

high jungle
chrome roost
#

Hey, I made some progress in trying to get the featherwing rf95 to work with a micro-controller. It works on teensy 3.6 but not on teensy 4.1 or rp2040 with radio. Is there any reason why? I've tried slowing down the clock.

small dome
#

what does “not working” mean

chrome roost
#

In that the featherwing doesn't initialize

chrome roost
umbral oxide
#

quite possibly a pin mismatch or wiring issue

cedar terrace
#

Anyone have experience with setting up a LoRa gateway? I'm trying to understand the function of a LoRa gateway and a ChirpStack server and I just can't seem to wrap my head around it.

chrome roost
#

I'm not so sure about that. I've had the wiring checked on by so many people and also the pinout for SPI on teensy 3.6 and 4.1 are essentially the same and I only removed the teensy 3.6 and replaced it with teensy 4.1

cedar terrace
#

The LoRa gateway makes sense for the most part. but I'm really not understanding where ChirpStack fits in to everything and what it's purpose is

high jungle
sharp pecan
#

Does anyone have advice for choosing between 415 and 900 for lora?

small dome
umbral oxide
#

"or for amateur use with restrictions (check your local amateur regulations!)"

inland thistle
high jungle
ocean hemlock
#

Hey, I'm having some issues getting my LoRa nodes to communicate on Meshtastic. I'm using an Adafruit LoRa hat on my Pi 4B and i have a random waveshare LoRa hat for my pico. My Pi 4b is seemingly fine and working as intended, but my Pico can't send messages but can receive some of my Pis messages. Can't work out the issue. Any ideas on how to fix this issue? or any ideas for debugging to identify the true issue.

pale dagger
#

have you tried connecting to the serial terminal as you send messages? that's where I'd start

sharp pecan
#

For a quarter wave whip antenna, can I double the length to make it a half wave whip antenna?

#

for 915 mhz lora!

#

Im using an adafruit feather m0 RFM9x lora board

primal warren
#

You can, but then you end up driving it at a node, which raises the impedance. This impedance mismatch can be hard on the transmitter circuit.

sharp pecan
#

got it

#

trouble shooting now! Has anyone run into a lora signel transmitting off usb but not battery? I think having my pins set to high and detecting low for buttons is causing too much draw

sharp pecan
#

it was good old while (!serial)

small dome
sharp pecan
#

cheers everyone, I finished my lora project using the adafruit board with the rf9x on it to turn on and off neopixels which activated the gag for my prop!

#

Thankful for the help I received here and looking forward to using lora again in the future

dapper cargo
#

Hey I was looking at maybe building an ADS-B receiver without the use of an SDR and computer. I found a project online that uses a logarithmic power detector and a BPF to get nice analog voltages. It makes the RF section pretty simple. What I'm stuck on is the decoding. The signal is pretty fast at 1 mbps with pulse position modulation. The project I found ended up using an expensive FPGA, but what it comes down to is that it uses an comparator to get it to logic levels and then decode it to bits. I kind of want to stay away from FPGAs if possible (although there are small FPGAs used for budget SDR applications that might be a choice for me). I looked at the PIO to see if it could work and I think it would be a good option, but I also want to look at other options. Does anybody have a good idea to do this?

small dome
dapper cargo
#

Certain PIC16 microcontrollers also have a configurable logic controller which can be used for this, but I couldn't find any information about whether they could handle such a fast signal. I image the PSoC5 could, but it is a bit overkill when it comes to peripherals and putting it on a custom board isn't the easiest task it seems.

#

Or maybe running a decoder on the second core of an ESP32 would suffice, then use the other core for parsing the data and exposing it on a web interface.

cedar terrace
pallid terrace
#

I'm trying to get two LoRa breakouts to communicate, one with a Feather RP2040 running Circuit Python and the other with an Arduino Nano. I can send a message just fine from Arduino to Circuit Python using code based on the example on Adafruit Learn and the Arduino RadioHead library's rf95_server example.

With the code below I'm trying to send a message from Circuit Python to Arduino but I don't get anything. Any ideas?

Radio transceiver modules for long distance data communication

#

Arduino code:

#include <RH_RF95.h>

#define RFM95_CS 7
#define RFM95_IRQ 2

RH_RF95 rf95(RFM95_CS, RFM95_IRQ);

void setup()
{
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Starting LoRa Receiver...");

  pinMode(RFM95_CS, OUTPUT);
  digitalWrite(RFM95_CS, HIGH); // Ensure CS is high before init

  if (!rf95.init()) {
    Serial.println("RFM95 init failed!");
    while (1);
  }

  Serial.println("RFM95 init OK!");
  rf95.setFrequency(915.0);
  rf95.setTxPower(20, false);  // Max TX power (not used in this case)

  Serial.println("Listening for messages...");
}

void loop()
{
  uint8_t buf[RH_RF95_MAX_MESSAGE_LEN];
  uint8_t len = sizeof(buf);

  if (rf95.waitAvailableTimeout(10000))  // Wait up to 10 sec
  { 
    if (rf95.recv(buf, &len))
    {
      Serial.print("Received: ");
      Serial.println((char*)buf);
    }
    else
    {
      Serial.println("Receive failed!");
    }
  }
  else
  {
    Serial.println("No message received.");
  }
}
#

And Circuit Python code:

import busio
import digitalio
import adafruit_rfm9x
import time

# Define LoRa parameters
RADIO_FREQ_MHZ = 915.0  # Frequency must match the receiver

# Configure SPI and LoRa module
CS = digitalio.DigitalInOut(board.D0)
RESET = digitalio.DigitalInOut(board.D2)
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)

# Initialize LoRa radio
rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)
rfm9x.tx_power = 13  # Lower power for stability

# Explicitly set modulation parameters to match Arduino defaults
rfm9x.signal_bandwidth = 125000  # 125 kHz
rfm9x.coding_rate = 5  # 4/5
rfm9x.spreading_factor = 7  # SF7
rfm9x.enable_crc = True  # RH_RF95 enables CRC by default

print("RP2040 Transmitter Ready...")

while True:
    message = "Hello from RP2040!"
    print(f"Sending: {message}")
    rfm9x.send(bytes(message, "utf-8"))
    time.sleep(2)  # Wait before sending again```
surreal vapor
#

Radios are very mysterious.

small dome
pallid terrace
normal drift
#

Radiohead and CIrcuitPython use the same default settings for SF BW and CR. Try removing them

tulip panther
#

I am trying to get a nRF52840-based BLE sniffer up and running, but the firmware UF2 provided is not working - I am using Wireshark 4.4.5, and version 4.1.1 of the extcap files. I cannot use v4.1.0 of the extcap files due to the Wireshark version being >=4.0.0, which is what 4.1.1 is for. Has someone recompiled the Hex for the v4.1.1 firmware to a UF2 yet, or have a tool to upload the Hex files Nordic provides? I am using Product 5199 (the dongle) for the hardware.

cedar terrace
sullen latch
#

Does anyone happen to know of any good (and ideally maintained) tools for mitm proxying BLE, or otherwise reverse engineering the communication/protocol between devices? I'm hoping to replace some terrible iot/"smart" apps with my own thing so I never have to use them again, but the tools that are coming up haven't been updated in like 8 years and/or are seemingly disowned.

high jungle
sullen latch
pale dagger
# sullen latch Does anyone happen to know of any good (and ideally maintained) tools for mitm p...

Here's a pretty detailed write-up to do almost exactly what you're describing: https://www.blackhillsinfosec.com/machine-in-the-middle-mitm-ble-attack/

Ray Felch // Introduction Continuing with my ongoing Smart Lock attack research (see blog Reverse Engineering a Smart Lock), I decided to move my focus to a different type of […]

sullen latch
sullen latch
raw nacelle
#

Okay question on CP and RFM9x. The docs yell about how since there's no interrupt support, you need to constantly poll messages or they are lost, meaning you can't do much else. Is that still true? Is there no buffer on the RFM9x that holds a certain amount of messages?

small dome
#

Seems like that's the limit of the RFM. So I guess if received messages are less than 64 bytes and it is emptied before transmitting, then there wouldn't be data loss.

#

Sorry, received packets not messages.

normal drift
# raw nacelle Okay question on CP and RFM9x. The docs yell about how since there's no interrup...

The RFM9x FIFO can receive a packet up to 252 bytes, but there is no buffering for multiple packets. In The Adafruit CircuiyPython RFM library, asyncio can be used to hopefully allow for better response to incoming packets. It has not be en tested much. Some loss well still occur. The “reliable datagram” mode may help by automating retries.. There are some asyncio examples in the RFM library and I am working (slowly) on a guide. I would like to create some examples that really demonstrate that asyncio does help…

raw nacelle
#

So what happens if 2 packets are sent? Is the first overwritten?

normal drift
#

good question…I have not explicitly tested that…making a note to try it….

#

I’ll try to do some testing tomorrow…

small dome
#

So I missed the LoRa Mode FIFO Buffer, which is 256 bytes (4.1.2.3)

These FIFO data buffer can be read in all operating modes except sleep and store data related to the last receive operation performed.
It is automatically cleared of old content upon each new transition to receive mode
...
By default, the device is configured at power-up so that half of the available memory is dedicated to Rx and the other half is dedicated for Tx.

#

it really sounds to me like it only has the ability to hold one message, reliably.

#

It is also imporant to note that when receiving, if the packet size exceeds the buffer memory allocated for the Rx it will overwrite the transmit portion of the data buffe

normal drift
#

yes, but I’m not sure what it does if a second packet arrives before it is read.. does it overwrite or ignore the new one.

small dome
#

I don't see anything about stalling

normal drift
#

The FIFO is flushed before a transmit. but i expect the the second message will just be lost

#

one major cause of lost packets is if you are also transmitting. it is very hard to make the transition without possibly missing an incoming packet.

normal drift
raw nacelle
pallid terrace
# normal drift Radiohead and CIrcuitPython use the same default settings for SF BW and CR. Try ...

Removing SF, BW, and CR doesn't seem to change anything, neither does setting them explicitly. What else could be the issue? I can send a message from Circuit Python to Arduino without any trouble but can't seem to get it to work the other way. I simplified my code a bit:

Here's the Circuit Python code:

import busio
import digitalio
import adafruit_rfm9x
import time

# Define LoRa parameters
RADIO_FREQ_MHZ = 915.0 

# Configure SPI
CS = digitalio.DigitalInOut(board.D6)
RESET = digitalio.DigitalInOut(board.D5)  
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)

# Initialize radio
rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)
rfm9x.tx_power = 13

print("RP2040 Transmitter Ready...")

while True:
    message = "Hello from Circuit Python"
    print(f"Sending: {message}")
    rfm9x.send(bytes(message, "utf-8"))
    time.sleep(2) 

And the Arduino code:

#include <RH_RF95.h>

#define RFM95_CS 7
#define RFM95_IRQ 2

RH_RF95 rf95(RFM95_CS, RFM95_IRQ);

void setup()
{
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Starting LoRa Receiver...");

  pinMode(RFM95_CS, OUTPUT);
  digitalWrite(RFM95_CS, HIGH);

  if (!rf95.init()) {
    Serial.println("RFM95 init failed!");
    while (1);
  }

  Serial.println("RFM95 init OK!");
  rf95.setFrequency(915.0);
  rf95.setTxPower(13, false); 

  Serial.println("Listening for messages...");
}

void loop()
{
  uint8_t buf[RH_RF95_MAX_MESSAGE_LEN];
  uint8_t len = sizeof(buf);

  if (rf95.waitAvailableTimeout(10000))
  { 
    if (rf95.recv(buf, &len))
    {
      Serial.print("Received: ");
      Serial.println((char*)buf);
    }
    else
    {
      Serial.println("Receive failed!");
    }
  }
  else
  {
    Serial.println("No message received.");
  }
}
normal drift
#

What code are you using to send from Arduino to CP? you example only receives on Arduino from CP -- Does it work OK?

#

I'm confused about which way works and which way does not...

#

From your earlier comments - I think this is the example that is not working but your comment says " I can send a message from Circuit Python to Arduino without any trouble but can't seem to get it to work the other way. I simplified my code a bit" so I was confused.

#

Can you post a picture showing the wiring for both boards. Have you any way to confirm if the Arduino Nano is actually able to receive at all?

pallid terrace
# normal drift I'm confused about which way works and which way does not...

Arduino to Circuit Python works, Circuit Python to Arduino does not. I only posted the code that wasn't working but here's a set where the Arduino sends a message (successfully) and then the Circuit Python board sends a response (unsuccessfully):

Arduino

#include <RH_RF95.h>

#define RFM95_CS 7
#define RFM95_IRQ 2

RH_RF95 rf95(RFM95_CS, RFM95_IRQ);

void setup()
{
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Starting LoRa Communication...");

  pinMode(RFM95_CS, OUTPUT);
  digitalWrite(RFM95_CS, HIGH); 

  if (!rf95.init()) {
    Serial.println("RFM95 init failed!");
    while (1);
  }

  Serial.println("RFM95 init OK!");
  rf95.setFrequency(915.0);
  rf95.setTxPower(13, false);

  Serial.println("Ready to send messages...");
}

void loop()
{
  //Send a message to the Circuit Python board
  const char msg[] = "Hello from Arduino!";
  Serial.print("Sending: ");
  Serial.println(msg);

  rf95.send((uint8_t *)msg, sizeof(msg));
  rf95.waitPacketSent();

  Serial.println("Message sent! Waiting for reply...");

  // Wait for a reply from Circit Python baord
  uint8_t buf[RH_RF95_MAX_MESSAGE_LEN];
  uint8_t len = sizeof(buf);

  if (rf95.waitAvailableTimeout(5000))  // Wait up to 5 seconds for a response
  { 
    if (rf95.recv(buf, &len))
    {
      Serial.print("Received reply: ");
      Serial.println((char*)buf);
    }
    else
    {
      Serial.println("Receive failed!");
    }
  }
  else
  {
    Serial.println("No reply received.");
  }

  delay(5000); // Wait before sending the next message
}
#

Circuit Python

import busio
import digitalio
import adafruit_rfm9x
import time

RADIO_FREQ_MHZ = 915.0 

# Configure SPI
CS = digitalio.DigitalInOut(board.D6)
RESET = digitalio.DigitalInOut(board.D5)
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)

# Initialize radio
rfm9x = adafruit_rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)
rfm9x.tx_power = 13

print("Circuit Python Receiver Ready...")

while True:
    print("Listening for messages...")
    packet = rfm9x.receive(timeout=5.0)  # Wait for incoming message

    if packet is not None:
        message = packet.decode("utf-8")
        print(f"Received: {message}")

        # Send a reply to the Arduino
        reply_message = "Reply from Circuit Python"
        print(f"Sending: {reply_message}")
        rfm9x.send(bytes(reply_message, "utf-8"))

    else:
        print("No message received.")

    time.sleep(5)

Is that more clear?

#

Top and bottom of Circuit Python board

#

Top and bottom of Arduino board - it's a custom PCB and the traces are a mess but there's continuity between all of the pins and there aren't any shorts. There's also an SMD radio on the PCB but I'm just using the Adafruit breakout for now so ignore the SMD components. I didn't connect the Reset pin on either board if that's relevant here.

#

I have not had any way to confirm that the Arduino can receive messages yet, I suppose I could try putting C++ on the board currently running Circuit Python and see if that can get a message through

surreal vapor
#

I am working on this project with fletcher and I had a slightly different result. I get a message through (circuit python to arduino) intermittently. Sometimes every 3 minutes one message comes through with a bunch of squares after it. Sometimes when I eject the circuit python drive it sends the message and the squares.

No clue but makes me think it’s related to baud rate or something type of timing mismatch.

#

Also I tried connecting reset pins and disconnecting them and I see no difference.

#

Would love some alternative theories

normal drift
#

It is really hard to follow the wiring from your pictures. I would suggest simplifying things and connecting your RFM9x boards to the MCUs either with jumpers or via a breadboard https://www.adafruit.com/product/4539. My guess at this point is that the Nano is not working properly -- At a minimum, I would try it without your PCB board. If there is an issue withe the IRQ connection, the NaNo may still transmit but not receive. I have to look more closely at the ReadioHead code to see if the IRQ line is used for Transmit. I have sent data between Arduino and CP MCUs many times and it should not be a problem to do. I'll try to set up an example later today using your code. Just to clarify a few things... When you see the gibbersish on the Nano, do you see the startup messages normally? Are you powering the RFM95 on the Arduino Nano with 5V? I do think the RST lines should be connected. Having them floating is not a good idea, but may not be critical. It may be informative to try running Arduino Code on the RP2040 to see if it works with the Nano. In general, try to simplify the setup.

normal drift
#

I ran your Arduino Code on an Arduino R4 with an rfm9x breakout and it is able to send and receive from a board running your CircuitPython code. It seems to work with or without the RST line connected, but I do suggest using it. If you are getting gibberish on Arduino - check that your arduino Console (or whatever you are using for the serial output) is set to the correct baud rate -- Your example is using 9600.

#

On the PCB for the Naon, you said the SMD RFM9x is not being used, but are any of it s pins connected to the Nano. I suspect you have some wiring problem on that board. Try connecting the rfm9x directly to the nano with jumpers just to see if it works.

tulip panther
#

Had more recent Python version though

pallid terrace
# normal drift It is really hard to follow the wiring from your pictures. I would suggest simpl...

I tried plugging the radio breakout into a breadboard and connecting it to an Arduino Uno running the same code and found the same results (able to send a message to circuit python, not receive). Then I swapped the feather RP2040 running Circuit Python that I've been using https://www.adafruit.com/product/4884
with a feather M0 running Arduino https://www.adafruit.com/product/3044 (active pins should all be the same) so the communication would be Arduino to Arduino and I couldn't get a message across in either direction.

When there is gibberish in the Arduino Serial terminal it seems to take the place of "Starting LoRa Transmitter..." in the setup function - a bunch of boxes appear, that printout does not appear, and then "LoRa init OK!" prints out.

I've been powering the radio breakout with 3.3v but I've changed to 5v and found all of the same results (though I didn't test every single combination of radios with 5v).

I've added on another pin header so that I can use the RST pin on each breakout. For now I'll just use a breadboard instead of the PCB to narrow down possible issues, but to answer your question the SMD radio is connected to a level shifter and the level shifter is connected to the same SPI pins on the Arduino as the breakout (apart from the chip select pin).

Which breakout radio did you use for your test with the Arduino R4? I have no idea how much they vary but I'm using two of these https://www.adafruit.com/product/3072

normal drift
# pallid terrace I tried plugging the radio breakout into a breadboard and connecting it to an Ar...

the Nano and the Uno are 5v MCUs so the breakout should be powered with 5V. otherwise the SPI and other signals will be at 3.3v levels and will be unstable on the 5V MCU. The rp2040 and the M0 are 3.3V MCUs, so you should use 3,3V with them. i am using the same Rfm9x breakout. It’s possible that breakout on your Arduino side got damaged. Try swapping them to see if the behavior is tied to the one breakout.

plush mural
#

Are there any commercially available 60 ghz unidirectional (line of sight) transcievers?
I tried looking for them, but I couldn't find any below the price range of $5000

lapis dagger
#

I have a question. I'm lookin at the lilygo t-twr 2.1, pin 7 on the sa868 controls high / low power, when held low it goes into low power

According to the schematic pin 7 is held to circuit ground via a resistor, does that mean the voltage on that pin is "low"

https://github.com/Xinyuan-LilyGO/T-TWR/blob/master/schematic/T-TWR-Plus_Rev2.1.pdf

GitHub

Programmable walkie-talkie. Contribute to Xinyuan-LilyGO/T-TWR development by creating an account on GitHub.

cedar terrace
restive fjord
#

I recently got a few Adafruit Feather M0's with RFM95 LoRa Radios built in, in addition to an Adafruit microSD breakout board to log 30 byte transmissions between the boards. After wiring them according to the tutorial, I kept getting errors saying the SD card was not detected when using the CardInfo example sketch from the SD custom library. After reading more about it, I found that 64 GB microsd cards (even when reformatted) were to much for the logger, so I bought a 512 MB microsd card with FAT 16. This did not fix the issue. I've resoldered the joints many times now, and even got a friend with more experience to try it in case it was a loose connection, still no resolution. I'm not sure if the radio attachment is interfering with the SPI pins, or if the chipselect needs to be changed. I wrote the chipselect of the radio to HIGH at the very start of the setup(), and also tried using the usb/bat pins for the microsd vin. If anyone has any advice for how to debug whatever's going on, it would be greatly appreciated. Alternatively, if anyone else has found success logging radio transmissions via an alternative method/hardware I would love to learn more.

small dome
small dome
normal drift
#

Also, your picture shows a 32U4, not an M0

normal drift
#

There are known issues on the M0 RFm boards regarding the CS pin, but they do not apply to the 32U4 so it is important to know what you have. Also, you have to select the correct board for Arduino to program it…

small dome
normal drift
restive fjord
restive fjord
small dome
#

And you have CS connected
to Pin 10?

normal drift
restive fjord
#

Ah, okay. That makes sense. The CS pin from the sd card is connected to pin 10

#

Thank you so much again for your help!

small dome
restive fjord
#

Used pin 12, same thing as before. I currently have the 5v pin on the sd card reader connected to the usb pin for clarification

#

Would it be possible to write a script to test the solder joints of each line?

small dome
restive fjord
#

good thinking, let me get back to you on that. Thanks again for the support 😁

small dome
#

(before the init)

restive fjord
#

I checked all the solder joints and all were resistance 0, so I'm guessing it's something else. I tried setting the pinMode(chipSelect, OUTPUT) at the start of setup(), but that didn't fix the issue

#

Is there anything that should be inherently different about using a feather 32u4 with a LoRa radio vs other micro-controllers when using this sd card breakout board?

#

And one more thing, I've noticed that the microsd card gets warm whenever it's left in the reader during all this. Not sure if that's indicative of a short somewhere

small dome
restive fjord
#

came back around 3.3v

#

Do you know of any alternatives I could look at if I can't get this working?

restive fjord
#

I ordered a brand new reader/sd card, and that started working. Thanks again for the help!

green oracle
#

Has anyone here messed with RFID cards? I have two that I need to use frequently, and ideally I'd be able to print a flippable holder that allows me to scan either of them without removal.

#

Any idea how much clearance would be needed in order to do that?

granite spear
green oracle
short nimbus
#

I have a metal enclosed condo mailbox. I know I cant use lora or wifi because the wave cant get throught metal and concrete. But assuming I had an ham license and that my mailbox is about a feet deep could I use some lower frequency to tell a board that Ive got mail ??

#

If the wave is long enough it should get around concrete and metal right or something ? Or I need to re-read the ARRL handbook ?

#

Cant modify the lobby, and there mailbox have a master metal door to all the mailbox so cant run a led throught the mail slot or something or putarepeater in the lobby or put a repeater in the stairs. I only can put something in the mailbox without affixing it (which is against the postal rule) and without modifying the door itself (against the postal laws again) or hire someone at 75000$ a yar to watch my mailbox. I think it's impossible but could be wrong

primal warren
#

Might be able to make an inductive connection (if the boxes are non-ferrous). Or something like WonderBeeps to carry the data via audio. However, I wouldn't give up on LED, you might be able to get enough light leakage to be detected, then modulate it so you can differentiate between it and other unwanted light signals.

high jungle
#

Also, someone on the Meshtastic Discord server has successfully received LoRa signals from within their fridge.

little epoch
#

...sounds like a cool project.

small dome
high jungle
dapper cargo
#

There's a pretty good chance some signal will leak through the mailbox, the same way the fridge isn't a perfect Faraday cage.

Even a tiny bit if leakage is enough.

#

The worst conditions I've even been able to get Lora to work in was through 1.7 km of suburban housing, a metal highway sound barrier and then through a highway elevated on 7 meters of earth. Totaling about 2km.

high jungle
dapper cargo
#

I could technically get line of sight with one of them from the upstairs, but there are a couple of houses and trees in the way.

#

I've been thinking about getting a couple of HT-CT62 modules and make some basic nodes with them to give to my friends.

high jungle
high jungle
dapper cargo
high jungle
dapper cargo
#

Yeah I know they are pretty good, but I am not buying one of those for everyone and they aren't always in stock here to begin with.

#

Plus I already have a large amount of the components to build a handful of my own nodes. Would only need a Lora radio and PCBs.

#

8,75 euros for a HT-CT62 and 1 euro for a PCB.

high jungle
dapper flare
#

Hi! I'm trying to use this MFRC522 RFID with a Raspberry Pi Pico and circuit python 9.2.7: https://www.amazon.com/dp/B01CSTW0IA?ref=ppx_yo2ov_dt_b_fed_asin_title. Can anyone point me to a library/driver I can use for this? And how should I set up the i2c and SPI?

half plover
dapper flare
half plover
#

You can use the pico with Arduino (Arduino is just a company/framework)

dapper flare
#

Still with CircuitPython? I've always stuck with Adafruit libraries, so this is pretty new/

half plover
#

Adafruit might have a library for it on Arduino

#

Darn they don’t

#

As for the circuitpython library for it, it’s for circuitpython, based on a micropython library. You can download the repo and copy the .py file to the lib folder on the circuitpy drive

echo trout
#

is there a working implementation of Meshtastic on the rp2040 RFM95 LoRa board?

high jungle
# echo trout is there a working implementation of Meshtastic on the rp2040 RFM95 LoRa board?

I don't know, but it says this in Meshtastic's documentation:

We strongly recommend choosing devices equipped with the newer Semtech SX126x or LR11xx series, as they offer improved performance and better compatibility than the SX127x series.
https://meshtastic.org/docs/hardware/devices/

Detailed documentation on Meshtastic supported devices, including hardware specifications, performance comparisons, and guides.

echo trout
#

yeah its a 127 😞

normal drift
hushed zealot
#

Hello
This is my first time using this app
I am a sculptor looking for a audio box that will loop tracks to integrate into my project. I’m hoping I can purchase a
A few ready to use or maybe I need to build something from start…my art project requires ir proximity switch with simple audio files to play.
My site is
Joeyrizzoart.com
If you can direct me in the right direction
I greatly appreciate it!

young cove
#

there are lots of kinds of proximity sensors

#

q is what language you want to program it in. CircuitPython is easier than Arduino. You might want to move your question to #help-with-projects or #help-with-circuitpython . This channel is more specialized, about radio

hushed zealot
#

Thank you

plush mural
#

Does adafruit sell any directional 2.4ghz or 5ghz antennas?

granite spear
high jungle
# plush mural Does adafruit sell any directional 2.4ghz or 5ghz antennas?

Follow the instructions in the following video, but instead of 902-928 MHz, choose the frequency you're looking for. Also, you might want to choose a different antenna style than "whip". https://www.youtube.com/watch?v=vFVvXmDCitQ

On last week's The Great Search (https://youtu.be/cB32kaMpqI0), we wanted to find a way to connect a whip-style antenna to our 915 MHz ISM Band Feather boards with either RFM69 or LoRa modules. We started by finding uFL to SMA adapter cables, with great success.

Now we get onto the antenna part! to do range testing, lets get some nice big 915 ...

▶ Play video
brave orbit
#

I have a TYT 9800 ham radio and am poking at adding a stereo audio output - anyone else here own one and interested in info?

median latch
#

Any recommendations for an i2c controllable SW (ham HF bands) receiver? I see si47xx come up often - but it doesn't look like adafruit carries it currently. Anything similar, or pointers to reliable vendors selling breakout boards?

little forge
#

Hi I'm trying to find out everything I can about Ble Mesh acording to the Nordic Website the the processor in many of Adafruit's BLE boards is capable of ble Mesh I'm wondering if there is any Circuit Python Libaries or examples that help setup and use ble mesh. I have a number of wearable projects I'm wanting to make even better if they can comunicate with each other

young cove
winged mica
#

Hello, I'm trying to use a RFM9x module on a Raspberry Pi, but I can't communicate with it: "RFM9x Error: Failed to find rfm9x with expected version -- check wiring"

Here's the code:

import board
import busio
from digitalio import DigitalInOut 
import adafruit_rfm9x

cs = DigitalInOut(board.CE0)
rst = DigitalInOut(board.D17)        
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
rmf9x = adafruit_rfm9x.RFM9x(spi, cs, rst, 868.0)

I also attached a schema of the wiring.

I found a thread that suggests using CE1 instead of CE0 (https://forums.adafruit.com/viewtopic.php?t=175885), and the tutorial (https://learn.adafruit.com/lora-and-lorawan-radio-for-raspberry-pi/raspberry-pi-wiring) also says to use CE1. But this warning (https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/spi-sensors-devices) advises against using CEx pins at all so I'm confused. Should I use CE1 or another pin?

Add low-power long-range radio communication to your Raspberry Pi Project

Make hardware and interface with sensors super easy using CircuitPython libraries

small dome
normal drift
#

CE1 has always worked for me. it is what the rfm9x bonnet uses. Or use neither but CE0 will not work.

winged mica
#

I can confirm the error has disappeared with CE1. Thanks!

glad tinsel
#

I've been doing a bit of reading into bluetooth, and have a question.
Is it possible to get two BLE modules to talk to each other directly? I want to upgrade my little environmental monitor, both with a bigger screen and an outdoor module. The Matrix Portal has a wifi/BLE module onboard, and I'm wondering if I can get that to poll a remote device equipped with something like the Bluefruit SPI friend.
The ArduinoBLE library seems to suggest that I can do this, but I'd just like a confirmation.

glad tinsel
#

Ok, after much digging around, yes. I can do what I want. Well, in theory at least. Next up, buying a bunch of new stuff I guess.

winged mica
#

Hello, the error has disappeared but I can't receive anything. Do I need to connect pin G0? The tutorial says to connect it, but rfm9x has no parameter for the interrupt pin

normal drift
winged mica
#

lora.py

import RPi.GPIO as GPIO
import board
import busio
from digitalio import DigitalInOut 
import adafruit_rfm9x

class Lora:

    def __init__(self, cs=board.CE1, reset=board.D25, sck=board.SCK, frequency=915.0, **kwargs):
        cs = DigitalInOut(cs)
        rst = DigitalInOut(reset)        
        spi = busio.SPI(sck, MOSI=board.MOSI, MISO=board.MISO)

        self._lora = adafruit_rfm9x.RFM9x(spi, cs, rst, frequency, **kwargs)
        self._lora.spreading_factor = 11
        self._lora.receive_timeout = 0.0

    def receive(self, **kwargs):
        message = self._lora.receive(**kwargs)
        return message

    def send(self, message, **kwargs):
        return self._lora.send(message, **kwargs)

test_recv.py

import time

from lora import Lora

lora = Lora()
while True:
    print(lora.receive()) # Always prints "None"
    time.sleep(0.1)

test_send.py

import time

from lora import Lora

lora = Lora()
while True:
    lora.send("TEST".encode("UTF-8"))
    time.sleep(0.1)
normal drift
#

Try using the default spreading factor7. There are known issues with other spreading factors that have been fixed in the adafruit_rfm library. See this example https://github.com/adafruit/Adafruit_CircuitPython_RFM/blob/main/examples/rfm_lora_sf_base.py . For SF 11 you will need to lengthen the receive timeout. But for a simple test just try SF 7

GitHub

RFM69 and RFM9x library, with asyncio support. Contribute to adafruit/Adafruit_CircuitPython_RFM development by creating an account on GitHub.

sour dew
#

I have a question for LoRa tinkerers, who prefer Adafruit hardware:
Is there a current working board manufactured by Adafruit which supports Meshtastic and/or Reticulum OOB? I can take care of case mfg myself but I have to produce a bunch of nodes for a project and I'd like to stop ordering things from Amazon, or imported breakouts where I can.

#

Addendum: I also should mention I don't mean with software already on them.

pale dagger
#

As far as I know, no, but I'm happy to be wrong. I think it was only very recently adafruit switched to the SX1262 family of lora chips, which are better supported in meshtastic than the hope rfm95

high jungle
# sour dew I have a question for LoRa tinkerers, who prefer Adafruit hardware: Is there a c...

During https://www.youtube.com/watch?v=sNEu8FY-e44, Adafruit mentions they have future plans to make a LoRa Feather board based around the RP2350. Assuming @pale dagger is correct in that they're going to utilize the SX1262, then that should be able to be supported by Meshtastic once Meshtastic developers get their hands on it.

high jungle
pale dagger
#

So I think the answer is Adafruit is maybe going to put out some boards with lora chips better supported by meshtastic, but I don't think they've announced any intent to make something purpose-built for meshtastic

pale dagger
#

I have a T1000E, and I like it a lot. It basically disappears in a pocket or bag, has a multi-day battery life, and has an unexpectedly good range compared to other nodes I have with actual antennas

high jungle
sour dew
sour dew
# high jungle During https://www.youtube.com/watch?v=sNEu8FY-e44, Adafruit mentions they have ...

This looks very promising, thank you for the replies.
I hope this works out well, it would be great to be able to source something flash and go like the Heltec V3 in a less international way, even if the situation with all of T's T words improves.
Lower supply chain overhead is just good practice ecologically, and creates better fault (current situation is a great example) tolerance.
If/when the need comes to order a lot of hardware for production I would really prefer to do so with Adafruit.

#

Also some WiFi HaLow gear would be amazing 🙏

small dome
#

I think that could just be summed up with: more options are better.

sour dew
#

Efficacy of available options is better than quantity of options in this case I suppose.
And less disruptable options.

#

Fewer points of failure. In the same way troubleshooting managed networks can be simplified.
Also less resource consumption in transit cost and handling labor, fewer governing bodies touching, tracking, taxing. Seems like NJ to another state is logically a good move.

misty prawn
young cove
median latch
inland thistle
inland canyon
#

Hi, I have a Adafruit Feather ESP32-S3 TFT with an additional RFM95W component for Lora communications. The basic RFM95W example code is working, I'm able to send the test message okay. But, I'd like to use this compentent to interact with the Meshtastic network. Is there a circuitpython library to use this chip with Meshtastic?

high jungle
high jungle
high jungle
inland canyon
small dome
#

That's cool, I didn't know about the serial interface. That's a good immediate next step to get devices on the mesh.

high jungle
high jungle
steady bison
#

Subject: Help with LoRa security/safety in CircuitPython.

I have 2 LoRa feathers and a RPi LoRa bonnet and have them talking to each other alright using CircuitPython. I plan to use them for a sensitive application (remote launching hobby rockets) and I'm worried about some other student/university team/group using the same tech and accidentally using the same API interface and potentially them or me sending a command that opens the wrong valve at the wrong time. I know LoRaWAN suppors encryption, but does CircuitPython have some encryption library I can use for LoRa radios easily?

I'd love to use just "LoRaWAN stack", but it seems local networks are harder to support in the WAN part is not important to me.

Thanks for the help! - Karl

barren haven
#

I'm working on LoRa (E22-900T22D) module about 1 week. I'm configuring my modules with using RF Setting app tranciever module's parameter's are:
FrequencyStr: 868,125MHz
Parameter: 0xc0 0x00 0x09 0x00 0x02 0x2c 0x62 0x00 0x12 0x43 0x00 0x00
tranmode:fixed
address2
chan:18
netid:44
key:0
the receiver one's parameters are these :
FrequencyStr: 868,125MHz
Parameter: 0xc0 0x00 0x09 0x00 0x01 0x2c 0x62 0x00 0x12 0x43 0x00 0x00
tranmode:fixed
address1
chan:18
netid:44
key:
And if you want to see my arduino codes i can share but i thinks those codes are fine too anyway i am having a communication issue between 2 lora.Tranciever lora sends the message but the receiver couldn't get it .

primal warren
#

What address are you sending to?

barren haven
#

yes i recognized it too i will try again with true parameters tomorrow if i fail im gonna write again.

barren haven
#

i have tried to send AT commnads which my lora module supports and i couldn't get response even though i set all baudrates and adjustments does that mean my lora module is not working

#

maybe it has some issues

young cove
barren haven
#

yes i did correct wiring tx-rx rx-tx and, m0=0 m1=1 and grounds together

arctic cloak
#

the stored data... it's gonna be custom.

steady bison
#

Hi folks. I did some quick benchmarks in CP with the LoRa hardware I had on hand to measure packets per second (pps).

In circuitpython:

  1. Max send of a single integer (4 bytes) is ~24 packets/second from rp2040 with lora featherwing to RPi Lora bonnet.
  2. Max send of a full payload (248 bytes) is ~3 packets/second from rp2040 to RPi.

Does this generally vibe with expectations? Has anyone done similar benchmark testing? Thanks!

steady bison
#

LoRa max data rate

tiny karma
#

How does the CircuitPython BLE stack set MTU? My Android phone is requesting a MTU of 512 and that seems to be working, but I'm getting dropped packets unless I call "write" in units of 20 bytes with a 1ms sleep. My service is a StreamOut service with a buffer size of 512, like the Nordic UART service.

young cove
tiny karma
young cove
#

but it may be there is a CircuitPython fix needed as well for Espressif... let me look

young cove
# tiny karma Hi- I'm using CircuitPython 10.0.0-beta.3 on a Adafruit ESP32S3 Feather (PSRAM v...

Could you open an issue https://github.com/adafruit/circuitpython/issues/new/choose about this with a simple test program that shows the problem? Also could you try with the Bluefruit Connect app: https://learn.adafruit.com/bluefruit-le-connect/ios-setup
This may have to do with MTU negotiation. I fixed something about that for nRF but have not had reports of it for Espressif.

Do you happen to have any of our nRF boards?

tiny karma
#

Sure- will open a ticket with a simple test app using Bluefruit Connect. I don't currently have a nRF board but was just looking at ordering one this morning as a test, so I'll do that. (Aside, was surprised to see they don't have STEMMA connectors?)

young cove
tiny karma
#

I see, makes sense. Now that I have used them, I never want to solder another i2c connection 😄

young cove
tiny karma
#

@young cove just to update here, I don't plan on filing a ticket - as the performance issues are on the Android / Flutter side. Testing with Bluefruit Connect's UART implementation gives full performance. I'm now analyzing flutter_blue_plus's Android code and comparing against the Bluefruit Connect implementation.

young cove
sour trout
#

Eh a radio channel... Anyone in here?
I got a uv-k6 and I am trying to use the spectrum analyzer to find the frequency of the Kenwood portophones we use at work but I can not seem to find it on the internet specified frequentie? I got a hackrf I might try but..
I am kinda disappointed I could not find it with my uv-k6

#

Anyone here have any tips?

small dome
#

A spectrum analyzer would be the fastest way to find it.

sour trout
ashen field
#

Has anybody attempted Analog FM voice using the Continuous FM "CFM" mode of the TI CC1200 transceiver?

I'm currently designing a ham radio transceiver board and would like to use Analog and Digital modes, I think modes including AFSK could be doable even if legible analog human voice isn't.

So far I'm thinking I can naїvely upsample an 8kHz input signal by repeating every sample 3 times, setting the cc1200 sample rate to 24

umbral oxide
#

Perhaps a silly question since it involves predicting the future, but is there any intention of supporting LoRa using the SX-1262 in one of the RFM libraries? There is a user trying to do that in CircuitPython using an external library. There was an Adafruit blog post about a year ago with a preview of a breakout board.

slender current
#

I don't think Adafruit is going to release something soon

normal drift
normal drift
#

Looking at https://github.com/adafruit/circuitpython/issues/10644 it is not clear what the OP really needs as far as using the sx1262 since they appear to be able to make it work with a modification to the referenced library. Are they looking to have the library "built-in"? It's not clear why that is necessary.

GitHub

Build Request I'm working on a project that requires LoRa, and the Seeed Studio Xiao ESP32-S3 with the SX1262 Hat fits my use case perfectly. Unfortunately, there isn't a specific firmware ...

umbral oxide
#

Yes, I think they can make it work with the library on top of either a new board definition or using a similar board definition.

#

The only advantage to built-in that I could see would be to use interrupts, which might then support LoraWAN/TTN again, but that’s not what they are asking for afaict.

limber raptor
#

Hello All, I'm looking for some help in getting an RFM69HCW working with my Raspberry Pico 2W. I am using CP 10.0.0 with updated libs as of last night. I am running the attached code snippet, and the output error and file tree is in the attached screenshot, this could be pinout related, as I have not found a good guide for wiring the RFM69 to the RPico2W, or it could be a coding mistake on my part, I'm just not sure...

umbral oxide
#

@limber raptor you're importing adafruit_rfm69, but adafruit_rfm is in the /lib folder ...they are distinct libraries

#

oh, n/m, I see rfm69 now

#

but it's not adafruit_rfm69

#

the import needs to match what's in the /lib folder, and what's used in the code (adafruit_rfm69)

limber raptor
#

I have it working now...

echo trout
#

hi I have two rfm95w's that I've been trying to get to communicate long range and I am having some trouble with my range test code, when I left coding rate at 5, set my bandwidth to 62.5 MHz and varied the spreading factor, I cant get any SF over 9 to receive on my second node even when there six feet apart, 9-7 works just fine but as soon as I go over that it doesn't receive, I'm wondering if I need to increases the time between tx's its currently 4s but even when i try 5+ it doesn't work

echo trout
#

im using the adafruit_rfm library

#

I dont know if its just a limitation of the radio module or the code

#

python```
print("range finder node 1")

import time
import board # type: ignore
import busio # type: ignore
import digitalio # type: ignore

Define radio parameters.

RADIO_FREQ_MHZ = 915.0 # Frequency of the radio in Mhz. Must match your

module! Can be a value like 915.0, 433.0, etc.

Define pins connected to the chip.

set GPIO pins as necessary -- this example is for Raspberry Pi

CS = digitalio.DigitalInOut(board.RFM_CS)
RESET = digitalio.DigitalInOut(board.RFM_RST)
from adafruit_rfm import rfm9x #type: ignore

Initialize SPI bus.

spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)

Initialze RFM radio

radio = rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)

transmit_interval = 2.0
radio.enable_crc = True
radio.coding_rate = 5 # accepted values are 5-8
radio.signal_bandwidth = 62500 # See accepted values in picture
radio.spreading_factor = 9 # accepted values are 7-12, 6 requiers special configuration (not suported here)
# 12 will give slowest troughput but highest range
# 6 is fastest but shortest range

set node addresses

radio.node = 1
radio.destination = 2
radio.tx_power=23
import neoblink #type: ignore

send startup message from node

neoblink.blink_neo_color(0, 255, 0, 1)
radio.send_with_ack(bytes("startup message from node {}".format(radio.node), "UTF-8"))

Wait to receive packets.

print("Waiting for packets...")

initialize flag and timer

time_now = time.monotonic()
while True:
if time.monotonic() - time_now > transmit_interval:
# reset timeer
time_now = time.monotonic()
counter += 1
# send a mesage
print("sending data")
radio.send(bytes("test from:{}".format(radio.node), "UTF-8"))
neoblink.blink_neo_color(000, 000, 255, 1)
```

#
print("Range Finder Node 2")
import time
import board # type: ignore
import busio # type: ignore
import digitalio # type: ignore

# Define radio parameters.
RADIO_FREQ_MHZ = 915.0  # Frequency of the radio in Mhz. Must match your
# module! Can be a value like 915.0, 433.0, etc.

# Define pins connected to the chip.
# set GPIO pins as necessary - this example is for Raspberry Pi
CS = digitalio.DigitalInOut(board.RFM_CS)
RESET = digitalio.DigitalInOut(board.RFM_RST)

# Initialize SPI bus.
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
# Initialze RFM radio
from adafruit_rfm import rfm9x #type: ignore
radio = rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)

radio.enable_crc = True
radio.coding_rate = 5 # accepted values are 5-8
radio.signal_bandwidth = 62500
radio.spreading_factor = 9 # accepted values are 7-12 6 requiers special configuration (not suported here)
                           # 12 will give slowest troughput but highest range
                           # 6 is fastest but shortest range
# set node addresses
radio.node = 2
radio.destination = 1
# initialize counter
counter = 0
ack_failed_counter = 0
radio.tx_power=23
import neoblink #type: ignore
neoblink.blink_neo_color(0, 255, 0, 0.5)
# Wait to receive packets.
print("Waiting for packets...")
while True:
    # Look for a new packet: only accept if addresses to my_node
    packet = radio.receive()
    # If no packet was received during the timeout then None is returned.
    if packet is not None:
        neoblink.blink_neo_color(255, 255, 255, 0.5)
        # Received a packet!
        # Print out the raw bytes of the packet:
        print("RSSI: {0}".format(radio.last_rssi))
normal drift
# echo trout I dont know if its just a limitation of the radio module or the code

These notes may help. There are several parameters to tweak. https://github.com/adafruit/Adafruit_CircuitPython_RFM/issues/8#issuecomment-2603260950

GitHub

I am once gain going to see if I can make any progress on the non default settings for the spreading factor, initially reported in: adafruit/Adafruit_CircuitPython_RFM9x#94 adafruit/Adafruit_Circui...

echo trout
#

Thanks

echo trout
normal drift
# echo trout I’m going to try adjusting transmit timeout and low data rate to see what I can ...

There was also this note on the PR that fixed the SF settings. -- the Low DataRate Optimize flag "should" be set automatically when the SF or Bandwitdth is set such that it is required. set https://github.com/adafruit/Adafruit_CircuitPython_RFM/blob/main/adafruit_rfm/rfm9x.py#L429 and https://github.com/adafruit/Adafruit_CircuitPython_RFM/blob/main/adafruit_rfm/rfm9x.py#L481 -- also - if you have not seen them, the examples for setting the spreading factor https://github.com/adafruit/Adafruit_CircuitPython_RFM/blob/main/examples/rfm_lora_sf_base.py and https://github.com/adafruit/Adafruit_CircuitPython_RFM/blob/main/examples/rfm_lora_sf_node.py may be of interest.

echo trout
normal drift
echo trout
#

I’ve found anything over 9 SF with 62.5MHz bandwidth and 5 CR needs tuning to the timeouts I can do some more testing tomorrow if you would like

#

I can try to make a “cheat sheet” if you want

normal drift
#

an issue in github would be best since there will be a record and anyone can comment there as well.

echo trout
#

I can send you the csv file when im done

echo trout
#

I due believe the timeout parameters will need to be changed with the length of the message sent (esspecialy on longer msg's)

normal drift
#

Could you please update the details of your setup? -- What version of CircuitPython, which boards, which antennae, distance apart and the code you are using if it has been changed from what you posted above. I'd like to be able to reproduce your configuration.

echo trout
echo trout
# normal drift Could you please update the details of your setup? -- What version of CircuitPy...
#node 1 ( master / send node)
print("range finder node 1")
import time
import board # type: ignore
import busio # type: ignore
import digitalio # type: ignore

# Define radio parameters.
RADIO_FREQ_MHZ = 915.0  # Frequency of the radio in Mhz. Must match your
# module! Can be a value like 915.0, 433.0, etc.

# Define pins connected to the chip.
# set GPIO pins as necessary
CS = digitalio.DigitalInOut(board.RFM_CS)
RESET = digitalio.DigitalInOut(board.RFM_RST)
from adafruit_rfm import rfm9x #type: ignore
# Initialize SPI bus.
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
# Initialze RFM
radio = rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)

transmit_interval = 4.0 #time bettween transsmissions, also acts as transmission time out
radio.enable_crc = True
radio.low_datarate_optimize = True
radio.coding_rate = 5 # accepted values are 5-8
radio.xmit_timeout = (transmit_interval - 0.25) # timeout for transmition time (changes depending on packet length)
radio.signal_bandwidth = 62500 # See accepted values in picture
radio.spreading_factor = 12 # accepted values are 7-12, 6 requiers special configuration (not suported here)
                           # 12 will give slowest troughput but highest range
                           # 6 is fastest but shortest range
# set node addresses
radio.node = 1
radio.destination = 2
radio.tx_power=23
import neoblink #type: ignore
# send startup message from node
neoblink.blink_neo_color(0, 255, 0, 1)
radio.send_with_ack(bytes("startup message from node {}".format(radio.node), "UTF-8"))

# Wait to receive packets.
print("Waiting for packets...")
# initialize flag and timer
time_now = time.monotonic()
while True:
    if time.monotonic() - time_now > transmit_interval:
        # reset timeer
        time_now = time.monotonic()
        counter += 1
        # send a mesage
        print("sending data")
        radio.send(bytes("test from:{}".format(radio.node), "UTF-8"))
        neoblink.blink_neo_color(000, 000, 255, 1)
#
#node 2 (reveive node)
print("Range Finder Node 2")
import time
import board # type: ignore
import busio # type: ignore
import digitalio # type: ignore

# Define radio parameters.
RADIO_FREQ_MHZ = 915.0  # Frequency of the radio in Mhz. Must match your
# module! Can be a value like 915.0, 433.0, etc.

# Define pins connected to the chip.
# set GPIO pins as necessary
CS = digitalio.DigitalInOut(board.RFM_CS)
RESET = digitalio.DigitalInOut(board.RFM_RST)

# Initialize SPI bus.
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
# Initialze RFM
from adafruit_rfm import rfm9x #type: ignore
radio = rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)

radio.enable_crc = True
radio.low_datarate_optimize = True
radio.coding_rate = 5 # accepted values are 5-8
radio.signal_bandwidth = 62500
radio.receive_timeout = 3 #receive timieout for radio (changes depending on packet length)
radio.spreading_factor = 12 # accepted values are 7-12 6 requiers special configuration (not suported here)
                           # 12 will give slowest troughput but highest range
                           # 6 is fastest but shortest range
# set node addresses
radio.node = 2
radio.destination = 1
# initialize counter
counter = 0
ack_failed_counter = 0
radio.tx_power=23
import neoblink #type: ignore
neoblink.blink_neo_color(0, 255, 0, 0.5)
# Wait to receive packets.
print("Waiting for packets...")
while True:
    # Look for a new packet: only accept if addresses to my_node
    packet = radio.receive()
    # If no packet was received during the timeout then None is returned.
    if packet is not None:
        neoblink.blink_neo_color(255, 255, 255, 0.5)
        # Received a packet!
        # Print out the raw bytes of the packet:
        print("RSSI: {0}".format(radio.last_rssi))
native kettle
#

Does adafruit have anything that can help me learn and emulate a 433 Mhz RF Remote?

#

It looks like the only thing they have is a 433 Mhz packet radio, which I'm guessing will not work for this use case.

#

i bought a mini fog machine which claimed it had an IR remote, which I know how to handle, but when I opened it up, I found this:

native kettle
#

based on the chip

normal drift
#

I did a bit of "googling" and the AI summary said "For 433 MHz fog machine remotes, there is no single, standardized protocol. Many manufacturers use simple, proprietary protocols that rely on basic On-Off Keying (OOK) modulation. The best way to understand the protocol for a specific device is to reverse-engineer the signal from its remote control." The AdaFruit RFM69 "can" generate OOK but I think more information is needed....

native kettle
#

Thanks, I ordered some cheap 433MHz transmitters and receivers to play around with and learn a bit, but I don't have the time for this project, so I ended up just soldering wires to both sides of the switch and controlling it through an NPN transistor

limber raptor
#

I have 3 devices, 1 Raspberry Pi Zero 2W, 1 Raspberry Pico 2W, and an Adafruit KB2040. I have 2 Adafruit RFM69HCW radios. I am hosting MQTT on the Raspberry Pi Zero 2W using Mosquitto, which is already set up, acting as a broker, and has a single topic ‘weatherpi’. The Raspberry Pico is already set up and publishing data to the topic ‘weatherpi’ on the Mosquitto MQTT server on the Raspberry Pi Zero 2W, via a WiFi connection. One of the RFM69HCW radios is attached to the Raspberry Pi Zero 2W (Receiver), and the other to the KB2040 (Transmitter). I have what appears to be a working radio connection between the RPi and the KB2040. My problem is that the KB2040 is sending data, but that data is not being published to the ‘weatherpi’ topic. What could be the problem? I have attached my sender and receiver python scripts.

normal drift
young cove
#

@normal drift This was originally discussed here: <#general-chat message>. From that thread, it appears the issue is with the RFM transmission.

normal drift
#

@limber raptor from your earlier discussion #general-chat message it s not clear to me if the issue is with the radio transmission or with the MQTT communication from the Pi. Have you verified that the KB2040 is actually sending packets and that ther are being received by the Pi? If not, as noted, it would be best to crate a test to verify that you can, in fact, send packets between the KB2040 and the Pi. If you set up such a test and it does not work, please post your test code. That will make it much easier to help diagnose the problem. If the issue is with sending MQTT messages from the Pi, then it would be best to fix that first without the added complication of the radio link.

limber raptor
#

It appeared that the radio transmissions were going through to the RPi, but my Micro Python script on the RPi was not forwarding the data to the MQTT server. The MQTT server was seeing the connection being made, but no data transfer was taking place. I am pretty sure that I would have to add a network library for the RFM to my script on the RPi and write a data transfer section into the code in it to make this work, just not sure how to go about that yet. In order to make things easier for myself to finish this project in a timely manner, I have decided to re-purpose one of my existing pico 2W's to gather and process the data from the sensor and send it over WiFi, because I know this already works with no problems. I really appreciate the help, and will probably be back to ask more questions when I start tinkering with these KB2040's and RFM69HCW's that I have, once I come up with a task to purpose them with... TYVM for Help!!! 🙂

midnight quarry
#

Hi everyone. Hope someone can help me. I'm currently making a project, where i have a LoRa module that is connected to a arduino nano and a computer with a rtl-sdr that will demodulate the signal using GNU-radio. I read a signal with my rtl-sdr from the lora module. The problem is that i can't demodulate the signal using GNU-radio. Hope anyone is able to help. Thanks.

worn radish
#

Howdy Folks, I am just starting a project with a RP2040 RFM95 900MHz Feather. I am using PyCharm as my IDE and my issue is with getting the past the following;

Error initializing RFM95: Failed to find rfm9x with expected version -- check wiring

Here is my fledgling code:


import board
import busio
import digitalio
import adafruit_rfm9x

# --- Constants ---
RADIO_FREQ_MHZ = 915.0
EXPECTED_RFM_VERSION = 0x12

# --- Pin Definitions for Feather RP2040 RFM95 ---
SPI_SCK = board.SCK
SPI_MOSI = board.MOSI
SPI_MISO = board.MISO
RFM_CS = digitalio.DigitalInOut(board.D10)
RFM_RST = digitalio.DigitalInOut(board.D11)


def initialize_and_verify_rfm9x(spi, cs, rst, frequency):
    """
    Initializes the RFM9x radio module and verifies its version.
    Returns the rfm9x object on success, None on failure.
    """
    print("Attempting to initialize RFM95 radio...")
    try:
        rfm9x = adafruit_rfm9x.RFM9x(spi, cs, rst, frequency)
        version = rfm9x.version
        print(f"RFM9x Version: {hex(version)}")
        if version == EXPECTED_RFM_VERSION:
            print("RFM95 radio detected and initialized OK! Hardware is good.")
        else:
            print(
                f"Warning: Got an unusual version: {hex(version)}. "
                f"Should be {hex(EXPECTED_RFM_VERSION)}."
            )
        return rfm9x
    except Exception as e:
        print(f"Error initializing RFM95: {e}")
        return None


def main():
    """Main function to set up and test the RFM95 radio."""
    # Initialize SPI
    spi = busio.SPI(SPI_SCK, MOSI=SPI_MOSI, MISO=SPI_MISO)

    # Initialize and verify RFM9x radio
    initialize_and_verify_rfm9x(spi, RFM_CS, RFM_RST, RADIO_FREQ_MHZ)

    print("--- Test complete ---")


if __name__ == "__main__":
    main()

young cove
#

you can edit your current message to add the triple-backquotes

umbral oxide
#

@worn radish you've cut traces and custom-wired the CS and RST? (I don't even see that as an option)

#

try:```py
RFM_CS = digitalio.DigitalInOut(board.RFM_CS) #GPIO16
RFM_RST = digitalio.DigitalInOut(board.RFM_RST) # GPIO17

hearty mason
#

does anyone know if the sx1262 boards that were put on the blog last year were ever sold?

#

and if they weren't any recomendations for alternatives?

#

also sorry if this is the wrong place for this

umbral oxide
#

@hearty mason I don't think Adafruit currently offers one, and there isn't an official Adafruit library that supports it. But there are 3rd-party boards (e.g., Seeed "BFF" form factor), and a couple of 3rd-party libraries. (I have not personally tested any of these)

#

if you search this Discord server for "sx1262", you'll find a few prior discussions

hearty mason
#

Yeah I think I’m going to go with the waveshare sx1262 breakout instead

#

Thanks for the help though :)

high jungle
# hearty mason and if they weren't any recomendations for alternatives?
high jungle
normal drift
misty crystal
#

I am using the Adafruit Ultimate GPS Breakout (https://www.adafruit.com/product/746) and I will be interfacing it with a Raspberry Pi 5 in a project. For the Pulse-Per-Second signal on this chip, will it be at 3.3 or 5V? I have to pass it through another ADC to sync up with a signal and I need to step it down, so im wondering how much I need to divide it by. Does anyone know off-hand the output voltage of that pulse?

young cove
hearty mason
#

I'm looking for a board that will do FM transmittion and struggling to find one

#

also why is the adafruit board no longer stocked?

worldly maple
mossy skiff
#

Hello, I broke my radio. In reality I just built the radio wrong I think. Either way, I have what I think is a balun. How could I go about testing the balun for proper functionality?

#

I was thinking of using an LCR device to measure the impedance and capacitance across the device to see that they are the same.

green lantern
#

All you need is an ohmmeter. You should have a low dc resistance across both ends of the balun.

strong bear
#

Is there a sort of "frequency filter chart" with schematics/values for filters for all the different bands of interest? I am finally getting back into an old project I was working on, making a QSD for SDR, and I would really like to stick to proven designs but these things are scattered all over and a centralized reference chart would really help.

crisp mist
#

Qsd?

strong bear
#

quadrature sampling detector, aka "Tayloe detector". It directly digitizes analog signals using (usually) flip flops and some form of clock generation producing two 90degree offset phase signals

This is a good example of one that I built over a decade ago when I was first starting learning stuff, I am getting back into the hobby now and want to build my own... I finally have the resources to build something truely impressive from parts I didn't have to scavenge!
https://www.wb5rvz.org/ensemble_rx_ii/index?projectId=16

I was just hoping a resource exists now that didn't exist then, otherwise I have to collect schematics and parts lists from all over the place to hit every frequency I can instead of going to a single resource

young cove
#

are you trying to build a general-coverage radio, if so, across what freq range?

strong bear
#

.> all of them lmao. But I would be happy with just public audio/text/video communications frequencies

#

certainally not up into gigahertz, products exist for that I can push into what I want to do

young cove
#

could you be more specific on the MHz range?

strong bear
#

I guess 10 to 900? I know it's a big range but I was going to make plug and play modules and build it all into a giant enclosure eventually with a way to switch them around

young cove
#

the reasons for the bandpass filters are to reduce interference from strong out-of-band signals. Usually the filters are designed for particular impedance characteristics in the signal chain, which might vary, so they are usually designed for the product itself.

lapis viper
#

The UK only has one of two frequencies in each of the HF, VHF & UHF ranges that can be used without a license, or under a provisional public limited license. Outside of that, frequency bands are heavily regulated and restricted. And i understand many other developed countries have similar regulations in place

young cove
strong bear
#

@lapis viper Im in the US and aren't those "no transmit" laws?

#

@young cove No, I am in need of a centralized reference of schematics for RF filter designs, if it exists.

lapis viper
strong bear
#

In the US , radio reception law is rational in that RF is considered "public" because its literally light propogating across free space, decryption is illegal without permission, as is transmission on all but a few public bands with power limitations

young cove
#

there are filter design tables and programs. You'd want to pin down filter characteristics like ripple, shape, skirt steepness, etc., width, etc.

#

Any particular filter design can be scaled to different frequencies, impedances, etc.

#

The ARRL Handbook has a chapter on this.

#

I have re-used filter designs from existing projects in the past, but that was because I knew what I wanted, say 50 ohms in/out, covering the 40m band, etc.

slender current
#

@young cove looks like meshcore (similar to meshtastic) is popular in Boston

high jungle
little epoch
#

Huh, so I clicked on the link wondering "Wait ... that DECT?" and it turns out it was.

#

So I guess DECT NR+ is interesting if for nothing else than it's on a clear 1.9 GHz band.

#

And at least the bay area mesh experience has been that we've got so many meshtastic users that we had to switch from the default to MediumSlow and then to MediumFast in order to have enough bandwidth.

pale dagger
#

help, verizon is having trouble with its radios

tame sphinx
fossil cedar
#

hey guys i am new actually do you guys know how to make a radio?

high jungle
mortal shoal
#

They have kits if you're looking to make something more like this. I saw one at a science fair when I was a kid and was blown away.

#

I would never attempt without a kit... That would be a real labor of love.

fossil cedar
#

Ya actually I can't buy a kit

#

I wanted to know the basics matteries required

young cove
fossil cedar
#

Am

young cove
#

are you in RU?

fossil cedar
#

Nono I want to build it on my own

fossil cedar
#

+I wanted to build a radio using which I can make my own signals

young cove
fossil cedar
#

hmmm ok so the radio is called ham radio?

young cove
fossil cedar
#

so i need a amature radio for seding and reciving signals

#

?

young cove
#

I don't know the rules for transmission in Russia. You may be able to use very low power on some frequencies without a license. That is true in many other countries. Are you in high school or college? There may well be an amateur radio club at your school.

remote pond
#

in many countries, you can transmit on broadcast bands with very strict power and antenna limitations. this might be easier for early experimentation (you probably already have a receiver). it rarely gives you enough range for communicating with other people (amateur radio is better for that)

fossil cedar
#

I have a license

fossil cedar
#

I want to build a transmitter and a receiver

#

Now I need the list of components (first I am planing on building the Transmiter)

young cove
#

There will be books and magazines with amateur radio projects available to you. Those are the best sources for you.

young cove
#

another source is https://qrz.ru, probably. The technical instructors in your high school could be helpful to point you to resources as well.

little epoch
#

I've seen some English-language projects from Russian hams and I'd hope there's some really good really wild ham radio stuff still over there in the Russian language.

#

One of them was a homebrew cage dipole antenna like one of the elements in the Duga radar.

fossil cedar
#

So according to you I can use a ham radio to transmit and receive signals ?

young cove
#

but you said you had a license already? Then I would have thought you would be aware of that.

fossil cedar
#

I am building for my brother

#

He has one

#

So I am using his for now

young cove
# fossil cedar So I am using his for now

if he passed his license exam, he would know the rules, and maybe would be able to point you to some literature. How about the links above, and how about the school library?

fossil cedar
#

The school library didn't help that much but the link above did

#

Thx after my exams I am going to build it

fossil cedar
#

Ok wait now even with the required components I am only getting but I only get range up to 1km

fossil cedar
#

Any way to increase the range ?

young cove
fossil cedar
#

I am using a 555 timer ic

#

1m antena

young cove
chilly musk
#

Hi, I was wondering If anyone had any advice for my project. I am trying to make a custom 4 layer PCB that incorporates GNSS and BLE antennas. I'm driving the Bluetooth Low Energy from an STM32 (STM32WB50CG) and am planning to use a chip antenna. For the GNSS I want to use a Ublox MAX-M10S via a Passive Patch Antenna. I've attached a few schematics and am starting to think about layout, I ideal it need to be quite compact eg. 80 x 35mm ideally (I know ill sacrifice GNSS performance as I dont have a large ground plane but I'm happy to have reduced connection quality as the device will only be used with clear sky view).

Ultimately, I am unsure of the separation that I need between the 2 antennas. Should I have them on opposite sides of my rectangular board? can I place them next to each other (30mm separation)?

edit. If I place them on opposite sides of the board I may end up having the Chip antenna arround 20mm from the USB port. I doubt I would have a problem with 5V line as I can route it far away but would having a large metal SMD device nearby effect the signal

Any help would be appreciated. Many thanks

thorny vessel
#

Placement largely depends on the radiation pattern of the antennas. If you can put them in the null spots of each other, you should be golden

thorny vessel
#

In general, I would not recommend putting the them on opposite sides of the same part of the board unless you have a good ground plane in between. But that would probably interfere with the radiation pattern of the chip antenna.

#

By the way, you might also consider a stamped metal antenna for the Bluetooth if you need a little more gain

chilly musk
#

I didn't think about optimising for their radiation pattern!

chilly musk
chilly musk
thorny vessel
#

Looks like lots of room. Check the radiation pattern on AE3 though, I suspect you’ll want to turn it 90 degrees

chilly musk
#

thanks for your help

turbid blade
#

Does anyone know if the RFM9x breakout works with the SB components usbc-Lora dongle? gotta get this working for my CanSat project but I need to know if I have to buy something else

turbid blade
#

@young cove any idea? sorry for ping

young cove
#

but maybe that is just due to the Waveshare software. I don't know.

normal drift
#

Just to clarify, it is possible, in general, to configure an sx1262 module to communicate with an RFM95 (1276 or 1278) module as long as you have access to configure it fully. That is the problem with the SX1262_868M_LoRa_HAt. It is not clear how to configure it

gloomy path
#

Is there any reason to use 2GFSK wideband over OQPSK DSSS to meet FCC compliance of 500kHz bandwidth?

thorny vessel
#

I have no idea. Take a spectrum analyzer and find out?
What band and data rate are you working with?

glad fractal
thorny vessel
#

LoRa has a few configuration options that trade off between power, SNR, and bandwidth. But the settings need to match for your devices to talk. In addition to that, you can choose the center frequency based on your region. In the US we should be using 915 MHz

glad fractal
#

I am in Europe, both devices are 433
I couldn't find how you set configurations in the uart Lora hat i am using in the pi

normal drift
#

What library are you using with the Pico-loRa-sx1262?

glad fractal
#

couldn't find another one for CircuitPy but this one

normal drift
#

OK -- I started with that and had to do some customization to get it to work under CircuitPyhton -- I was then able to communicate with a Pi/Bonnet

glad fractal
#

thanks

#

if I can't figure it out with the current hat i'll probably get the RFM96

normal drift
#

Good luck!

glad fractal
normal drift
#

FYI -- I actualy use the RFM95 (915 Mhz) in USA

#

The breakout just needs to be wired up -- not as simple as the bonnet.

#

Also, I should clarify that I only did minimal testing of communication between the sx1262 and rfm95 -- I wanted to prove "it could be done" but I did not do more than exchange a few messages and declare victory.

thorny vessel
#

I’m considering setting up a LoRa-MQTT bridge so I can deploy sensors further than my WiFi will reach. I’m looking for recommendations for projects that will do this - perhaps something that selectively forwards MQTT updates out onto LoRa too

normal drift
# thorny vessel I’m considering setting up a LoRa-MQTT bridge so I can deploy sensors further th...

There are several hardware configurations that should work. Something like an esp32_s3 https://www.adafruit.com/product/5477 with an RFM feather wing https://www.adafruit.com/product/3231 should be able to support LoRa and MQTT. I see that the RFM feather wing is out of stock now but you could also use the RFM breakout https://www.adafruit.com/product/3072. You also could use a Raspberry Pi for WiFi/MQTT with the RFM breakout or RFM bonnet https://www.adafruit.com/product/4074. Also note that depending on your country, you may need the RFM96(433MHz). the RFM 95 is for 915MHz- USA).

thorny vessel
normal drift
thorny vessel
#

I also found a long forum discussion about lorawan gateways and the importance of supporting all the channels and spreading options simultaneously. But if I’m only going to my local MQTT server I think I’ll be fine

normal drift
#

Yeah , LoRaWAN and LoRaWAN gateways introduces a whole new level of complexity. For your application, LoRa and MQTT sounds like a good approach.

thorny vessel
#

I'm wondering about how to handle the topic alias though.

  • We need to use the aliases over LoRa since there is a 255 character limit per packet so sending the topics every time could consume most of our packet
  • I don't want to predefine the topics on the LoRa bridge because this would require manually synchronizing configurations between the nodes and the bridge
  • Maybe the node can send a the full topic the first time, and the bridge can reply with an assigned topic alias?
#

I guess I am defining my own transport layer now

#

So network layer then. We'll need a couple tables to store:

  • MAC address to LoRa ID
  • MQTT topic to MQTT alias
  • MQTT subscriptions and who to forward them to
thorny vessel
normal drift
#

Sorry, you have lost me. Perhaps your project is for more complex than it first appeared. I assumed you were trying to send some data peer to peer via lora then use the gateway to send to an MQTT server using WiFi. I guess I misunderstood. Hopefully others can help. I don’t think I have anything more to contribute. Good luck.

thorny vessel
#

No, I think you're on track. I was just reading the LoRaWAN flyer to see if they had anything to share, but it doesn't actually talk about what I'm interested in

thorny vessel
#

Anyway, thank you for being my rubber ducky

thorny vessel
normal drift
#

Rfm69 does not support LoRa.

molten bough
#

Can anyone point me in the direction of a BLE beacon where there is 'some' fixed point of data I can reference? I'm looking at building a driver ID system, each driver has a beacon assigned to them and the receiver updates some information based on the driver. AirTag's don't seem to have any consistent data. Any information is much appreciated!

slender current
molten bough
#

I have ordered some inplan in100 devices.. looks like they do exactly what I need and are pretty customizeable.

normal drift
#

@young cove Thanks for approving/merging/releasing the RFM/RFM9x RSSI fix.. @plain grotto I added some comments to the PR with additional history and information. Let me know if you want to discuss this further.

plain grotto
candid hazel
#

Would This https://www.adafruit.com/product/3232 work on this https://www.adafruit.com/product/5724 ?

I have the can feather, with a can-tranciever hooked back to itself for a mini CAN bus. Works! slow but works! Bitbanging the can-transciever on GPIO, SPI is available.

thorny vessel
#

The featherwings are supposed to work with all the feathers. They lined up the power, I2C, and SPI

#

I’m interested in your use case. Do you plan to monitor your car’s on-board diagnostics from 5km away?

rapid hearth
#

This would be appropriate for first "CQ CQ CQ...CQ DX CQ DX..."

dark tiger
#

DX?

#

何ですか?

silver marten
#

So I came up with the idea for this channel. It is supposed to be for anything dealing with RF. So, amateur (ham) radio, esp, Lora, gps, wifi, bluetooth, etc.

visual junco
#

That's so Cooooooooooooooooooooool

surreal fulcrum
#

RadioFruit

visual junco
#

Thats a Cooool Name

grave lava
#

I'll definitely be posting in here more soon. I need to get back to my HAB build.

restive fjord
#

It never once occurred to me to separate the letters by shifting the audio tone -- nice idea. I think this is well done (and unique).

silver marten
#

@restive fjord welcome to the channel I suggested to be created

restive fjord
#

Spark-gap transmission is a very early form of radio (think lightning crashes heard in an AM broadcast receiver on the 'medium wave' BC band - 530 kHz to 1700 kHz).

1700 kHz is the same as 1.7 MHz.

#

Might seem strange today, but just using sparks to telegraph messages, wirelessly, over large distances -- would have been a revelation empowering new things to occur.

restive fjord
#

At least one high-powered audio transmitter used water cooling for the microphone.

!

silver marten
#

The antenna is considered the most important part of radio. With out a good (resonate) antenna for the frequency you are using, you are going to have a high SWR (standing wave ratio) and you are going to have a tough time TXing (transmiting) and you could burn the finals up in your radio

#

Standing wave ratio (SWR) is how much transmitted power is reflected at the feed point of the antenna

visual junco
#

@restive fjord Did you make that...?

restive fjord
#

Techguy12: no it's radio history -- they got lots better photos online than stuff I've seen in person. There was a spark-gap transmitter on display in the lobby of the ARRL when I visited there in 1974. Looked like a saw blade to interrupt the gap.

visual junco
#

Woah...!

#

I would like make a Jacobs Lader

#

LOL

#

😅

restive fjord
#

I'm thinking about making a good high voltage supply but I don't want to overdo it. I'd like to stick to a B+ of about 240 volts DC or so.

#

I need to read some specs on the tubes I want to play with to see what the plate voltages range to (miniature receiving tubes, mostly).

#

6BE6 I think is one of them that I have on hand.

#

The next steps would be to carefully consider the power supply's configuration (for example, if to use a center tap on the secondary winding, which I always liked) since they cost a bundle if purchased new.

#

Sometimes you can find them with similar ratings but one will be a lot more power (say 80 VA over a 45 VA transformer).

#

My Novice CW transmitter probably had a 130 VA transformer in it (75 watts input to the plate of the PA, which could be upped to about 100W but I was licensed for 75W max).

visual junco
#

Oooooh I see

#

What will you use the tubes for....?

visual junco
#

@restive fjord

silver marten
#

The current licensing system is better in the US

#

No morse code required

#

I would not have been able to get licensed if code was still required

restive fjord
#

@visual junco The point is to use some tubes with a decently high plate voltage. Don't really have a plan beyond building a power supply and finding some tubes.
Either a simple receiver or a simple transmitter would be likely candidates. A lot depends on unforseen opportunities arising.

#

I think one of these tubes I have can act as a mixer or an oscillator - both are interesting applications.

#

@silver marten The CW requirement was dropped a long time ago.
Still it's hard to beat for weak signal work. I can copy distant CW stations long before I can hear any voice stations in operation, on a given day, if any are operating on a given frequency band.

silver marten
#

@restive fjord I know, but I tried learning CW and couldn't. The digital modes have a lower threshold than CW

visual junco
#

Oh So the tubes can act as a mixer and oscillator That's Kewl....! So how do we use it in Power Supply (Sorry for my silly question I dunno much about electronics)

#

@restive fjord

restive fjord
#

Valve tubes have effects similar to transistors, and normally require high voltage (100-400+) to operate linearly. A high DC voltage (lack of electrons) is on the plate while the cathode has a heated up cloud of electrons. Between these two pieces of metal is a screen called the control grid on which the electrical potential is varied, this changes the rate of electrons flowing from the heated cloud (cathode) to the high voltage plate (anode).

#

In the power supply a rectifier tube can be used instead of solid state diodes to turn AC into DC for the plate voltage (usually referred to as B+)

visual junco
#

Woah Didnt knew that

#

Thats Kewl

#

Thanks @Tufi#9492

restive fjord
#

Every joint I have attempted on my tube amp today has been cold :\ something is wrong.

rapid hearth
#

Rework is a dish best served hot.

#

newer lead free solder melts at a higher temp.

#

larger wires and joints soak up more heat too so you may need a bigger tip on the iron

restive fjord
#

It's a 40 watt knock off iron. It may be time to upgrade.

remote ermine
#

@restive fjord A good technician own several irons.

#

More power is needed for GND plane connections.

silver marten
#

@restive fjord Buy a tube socket

nocturne vine
#

Amateur radio brought me here to Ada fruit ( thank you Dr.Cohen aka chip)

silver marten
#

@nocturne vine I suggested this channel. Enjoy📻

hot laurel
#

I've wanted to build a monitor for packet radio (listening for particular callsigns, to know when friends are mobile nearby) using an Arduino and serial level converter to talk to a TNC. But I just god an SDR (Software-Defined Radio) device in the newest #AdaBox, so maybe making an iGate with SDR and Raspberry Pi is the project will get me using python and Pi? http://www.algissalys.com/amateur-radio/raspberry-pi-sdr-dongle-aprs-igate

silver marten
#

@hot laurel I am making something similar to this for my senior project in college. I am using a tnc-pi to communicate between the RPi and the radio

hot laurel
#

I don't know that project. I've been using Arduino for most things for 5+ years, and haven't needed more I/O (Once I needed a MEGA, but didn't have to move to a pi...) but I've been hacking with packet for decades. 😃

silver marten
#

I hope to put my project on hackster.io this summer. It is supposed to help SAR teams locate each other

nocturne vine
#

On QRZ .com ,there is a story about Emily Calandrelli's new childrens book" Ada LaceTake me to your leader" A young girl with intrest in science,math and technology.

#

Emilt Calandrelli is a MIT graduate and producer of a Saturday morning science show on Fox.......smrt

restive fjord
#

@visual junco The power supply and the tube are only related in that the power supply meets one of the requirements of the tube (fairly high plate voltage, which the power supply .. wait for it .. supplies).
The usual practice is to use a rectifier in the power supply. This can be either a tube, or a solid-state device (normally, a diode).

#

@silver marten Over the years I've seen too many people convinced they could not do a given thing (even if I thought they could).

My younger brother had to endure my use of CW when I was fourteen (and he was nine). Even though the room only had me in it, apparently, he could still hear it, wherever he was (had to be a room nearby).

#

I was unaware he was hearing me sending CQ's (to try to contact someone new).

So many years later, at a funeral, somehow the topic came up. He was able to perfectly recite my CQ:

#

dah dit dah dit ___ dah dah dit dah
dah dit dah dit ___ dah dah dit dah
dah dit dah dit ___ dah dah dit dah

#

dah di dit ___ dit

#

dit dah dah ___ dit dah ___ dit dah dah dah dah ___ dah ___ dah dit ___ dit dah dit
dit dah dah ___ dit dah ___ dit dah dah dah dah ___ dah ___ dah dit ___ dit dah dit
dit dah dah ___ dit dah ___ dit dah dah dah dah ___ dah ___ dah dit ___ dit dah dit

dah dit dah

#

CQ CQ CQ DE WA1TNR WA1TNR WA1TNR K

#

He made no errors. None.
And he still to this day has no idea what it means (he cannot translate it into the above English spelling of the same message, and never could/tried to).

visual junco
#

Woooah

restive fjord
#

I was stunned. He wasn't particularly musical (or I didn't know it if he was).

#

OTOH his son is fluent in Mandarin. ;)

#

Language skills probably weigh equally to musical skills, for stuff like this.

silver marten
#

I haven't found the way I can learn cw yet

#

@restive fjord

restive fjord
#

@silver marten
Well we had a machine that sent Morse code. It was optical with paper tape. It was probably somewhat programmable to playback at different speeds.

#

http://www.arrl.org/w1aw
W1AW sends code practice transmissions most night (I think at 7:30 pm local hour) at various speeds.
Raw beginners should start slow and work their way up; once you get the hang of it, start fast and work your way down to your real (100 percent copy) speed.
There are now (of course) computer-based Morse tutors.

#

An old Navy fellow taught me the mnemonics they used to train with:

#

H - dit dit dit dit - 'hitting the hip'

#

W - dit dah dah - 'the world war'

#

L - dit dah dit dit - 'he LOST his lid

#

F - dit dit dah dit - 'For the FAIR-est

#

Q - dah dah dit dah - 'here comes the bride (queen)

#

B - dah dit dit dit - 'BE a good boy (hehe)

#

K - dah dit dah - 'KAN-dy Kid

#

V - dit dit dit dah - (Beethoven's Vth)

#

I don't remember any others.

#

The vid I posted here (pretty sure it's in the scrollback) fascinated me, as it leveraged media means unheard of in my day. I think it's a successful approach. I liked it a lot!

#

When you start copying callsigns on DX bands in CW that have no counterparts in the voice segment of the same band, it provides motivation to learn as it provides valuable information you can't get otherwise (without resorting to a DX mapping web site, hehe).

#

There are CW propagation beacons. FM repeaters usually identify in CW (some identify in synthesized voice as well). Knowing a repeater's callsign can materially help in making contacts through it, as you can (then) look it up online and find out where it is!

#

Our motivation was just to get on the air (at all). It used to be required. For everybody!

restive fjord
restive fjord
#

The main problem with this guy (see immediately above) is his timing is off, between letters and words. ;) It's like he doesn't know it. Weird.

#

OTOH I'd need a machine myself to send that slowly. It's sooooo slow.

#

I like W1AW's 'fist' (unique sonic signature depending on the personality and skill of the CW operator).
They tend to send the characters a bit faster, and space it out so that the words per minute comes out correctly.

restive fjord
#

Sidetone (when sending Morse) should be between 400 and 950 Hz, I think. When listening, the tone of the signal should work with the CW filter you are using in your receiver.

#

So for example in my Kenwood R599A, it has a fairly narrow CW filter, and only sounds good at a very particular frequency (I don't know what that frequency is).

upbeat elbow
#

ARRL uses Farnsworth method... characters are sent at 18 wpm but spacing between characters is adjusted to the code "speed".

#

700 Hz tone is the "gold" standard but should be what is pleasing to your ear.

restive fjord
#

Yeah the Kenwood R599A uses a 500Hz CW filter. You can go off a tiny bit to one side but it's not going to move a lot.

silver marten
#

I also don't have much time to study it. Cw academy i think it is called is what I will do when I have time

silver marten
restive fjord
#

That is really neat, you have inspired me to learn more about radio...

silver marten
silver marten
mental warren
#

@BobaFETT#0170 Thanks a million! This should come in very handy.

silver marten
#

@mental warren i used 12awg wire and it worked ok

mental warren
#

@silver marten what gauge did you use?

silver marten
#

12awg

#

Other words 12

worldly scarab
#

Anybody here get the LoRa Feather M0 running a LoRaWAN stack? LMIC seems to be the best bet, but I've had no luck finding examples online.

#

but for $6 more, the Arduino MKRWAN1300 works great (LoRaWAN stack builtin 😃 )

restive fjord
#

I'd routinely transmit 75 watts on antenna wire that wasn't as thick as a pencil lead.

silver marten
#

@worldly scarab I don't know much about LoRa try #help-with-projects. Let us know what you find out

drifting oasis
#

@worldly scarab take a look at the following links:
https://github.com/mcci-catena/arduino-lorawan
https://github.com/mcci-catena/arduino-lmic
i have not used these libraries for quite some time as i have moved to other platforms, but these LMIC versions worked well on the feather M0 when i was using these platforms.
Maybe they will provide some help

tall tendon
silver marten
#

Made a QSO into Slovenia today

#

On 14.235MHz

indigo basin
#

Quick question: How does sdr actually work?

still heart
#

Software Defined Radio? basically code (software) instead of circuits (hardware) for doing things with radio communications

restive fjord
#

(response to a deleted question wrt LoRa low vs high band selection for purchase)
The higher band has a shorter antenna length, possibly making for a smaller form factor.

#

The low band may be suitable for Amateur Radio uses (ham radio).
The high band is near some baby monitor frequencies (and other consumer products that might be leveraged in some manner, in a project).

#

One or the other may not be in stock at the time that you order.
The application notes may suggest one or the other has a difficulty not shared by both, barring your participation (or easy participation).

#

They may have different typical ranges.
The low band is more apt to be overheard for stealth apps since equipment for use there is older (more legacy receivers in the field capable of hearing it).

balmy plaza
#

@restive fjord Thank you for the info.

silver marten
#

@restive fjord Dah-di-dah-dit dah-dah-di-dah

I am attempting to learn morse code half way through the alphabet

upbeat elbow
#

"CQ"

silver marten
#

Made a contact with a guy in Idaho today

rapid hearth
#

What would be amazing is if that guy powered his radio with a battery built using potatoes.

silver marten
#

Lol

#

@rapid hearth most modern radios run off of 13.8vdc. amps very depending on your watts output my 100 watt hf Yaesu FT-991 draws 23A. Tube type tend to draw a lot more volts and amps

rapid hearth
#

Tuber type radios do pack in more calories.

silver marten
#

I prefer the silicon critters

#

More portable

feral bridge
#

well FM signal reception is really bad at my area, I'm using TEA5767, is there anything I could possibly do for a better signal reception?

#

when I bought my TEA5767, they gave me a free 3.5mm pluggable antenna

#

it is extremely bad

#

I can't hear anything, only faint noises

silver marten
#

@feral bridge i am looking it up

#

can you send a picture of your setup?

feral bridge
#

@silver marten my setup is pretty simple

#

I'll send a picture when I get home

silver marten
#

Ok

feral bridge
#

I think I need a better antenna

#

My RTLSDR is shipping and might be better

silver marten
#

Make an antenna. That would be your best bet

feral bridge
#

Sorry for taking so long

#

White wire goes to RPI which is unrelated to radio, it has an USB soundcard which inputs the audio and streams it to discord

#

Here's the antenna

silver marten
#

Connect the antenna directly. That whole length of wire is acting as an antenna. Tune the reciever to the strongest fm station and see what you get

indigo basin
#

I gotta say, thats a nice SDR setup, mind if you share your methods?

silver marten
#

I think it is too, @indigo basin. Just trying to help him get it working

indigo basin
#

yeah

#

@feral bridge may i ask why you didnt use the pi for additional processing?

#

im guessing that wouldnt be feasible with that board, nvm

silver marten
#

It's an i2c board

feral bridge
#

@indigo basin it isn't an SDR setup, my SDR unit is still in shipping

#

@silver marten that's make it hard to use since I always have to keep the breadboard with the Arduino and the TEA5767 in the open

#

And thus keep the RPI close

silver marten
#

@feral bridge let me think on it

feral bridge
#

Keeping the tea5767 in the open has its own problems

#

I.e. power

restive fjord
#

I rock the Buddipole antenna - sets up in just a few minutes. Especially good for 14 MHz and above (up to 28.4 MHz or so). Maybe 6 meters as well (no equipment for that band, here).
http://www.buddipole.com
I prefer the long telescopic whips http://www.buddipole.com/lotewh.html
and the 32" arms http://www.buddipole.com/exanar.html
and the VersaTee *http://www.buddipole.com/versatee.html* and a pair of the
Mini Coils http://www.buddipole.com/minicoil.html
as the must-have parts for this system.

feral bridge
#

they ship by USPS Global Priority lmao

#

I'd say nope

#

199$ antenna wth

#

60.90$ shipping

silver marten
#

@restive fjord he is having trouble receiving the commercial FM radio band 87 MHz-108MHz

restive fjord
#

I've taken an indoor clothes line, hung one vertical dipole on it, and a number of director/reflector elements (just lengths of hookup wire) for better results than just the vertical dipole alone. For the Weather band in particular (160 MHz or so?)

#

Essentially a mastless Yagi, oriented vertically (because of gravity, not for any radio reason)

#

google says 162.400, 162.425, 162.450, 162.475, 162.500, 162.525, and 162.550 MHz.

#

The main problem with the indoor antenna is pickup of additional electrical (human-sourced) interference, as compared with a rooftop antenna.
Each site is different, and tracking down sources of electrical noise is not a trivial skillset. ;)
⁤   ● ● ●

#

I wound about seven turns of hookup wire around my Tivoli ONE receiver (oriented correctly; I opened the cabinet to check!) as an inductive pickup for the AM (MW) BC band, with a random length of antenna wire hooked up to one end of the turns wrapped around the radio.
The other end is meant for 'ground' and should be close to the radio; your body (bare fingers touching the wire) is generally a good enough sink.

#

When you touch that wire, the signal and noise both go way up, but in my case the noise is overpowering, so instead I tried a second (indoor loop) antenna as the 'ground'. Seemed possibly better than available grounds (sinks) including using my body for that.

#

I don't have a proper air-variable capacitor to wire in parallel with the indoor loop antenna (it's about 3.5 feet across) so I didn't bother with too much testing.
⁤   ●    ●

#

The turns around the radio are secured with (paper) medical tape; some care was taken to keep the turns parallel and uncrossed. I didn't want to cut my hookup wire into sections, so it's difficult to say how much good any of this is doing as compared with the factory (internal) antenna (which also leverages several turns of hookup wire!) (black wire, foreground)

#

Note that they (Tivoli/Henry Kloss) also seem to be using turns of hookup wire (in a loop) (blue wire, right, background) for FM reception as well. I think the idea there was that this setup would be good enough for local stations and would make for a much neater appearance in the home (with no antennas showing; just the AC mains power cord showing, behind the unit).

#

Fortunately, I still have my Sony ICF-S10MK2 pocket portable AM/FM receiver, which is my standard for comparison of reception on the AM BC band -- it's a little DX monster.

silver marten
#

@feral bridge Can you take a video of your problem?

#

other than a better antenna suited for the fm broadcast band I dont think there is much you can do

slate cypress
#

I have pretty much the entire buddipole lineup. I love their mast- bought one for my RV.

#

I have a super noisy apartment, so I try to keep my antenna up outside, but it interferes with my telescope. So I took it down temporarily.

silver marten
#

I have the superantenna go kit

slate cypress
#

I'd like to find something a bit more permanent than the buddipole. I've had mine up for years, but the whips get flooded and corroded.

restive fjord
#

any one ever worked on LoRa? I am trying to make a PC gateway.

#

like this

restive fjord
#

anyone?

silver marten
#

I have not, but once I get a job again and get some money, I plan on getting into it

#

he even takes video suggestions

feral bridge
#

welp I was ill these days couldn't respond

#

well anyway, what should I even film

silver marten
#

the audio?

silver marten
#

in different places of the house to get an idea of reception

feral bridge
#

Hmm OK

feral bridge
#

Well I went through a lot of problems

#

Converted an PSU to a bench power supply

#

Added some stuff to the antenna

#

Tried different locations

#

And made sure the WiFi range is max and bought a 15m extension cord

#

It's working acceptable now

#

You were eight

#

Right

#

The length of the wire was acting as an antenna

silver marten
#

@feral bridge congratulations on stepping into the world of troubleshooting radio. Also ferite is your friend when it comes to noise

restive fjord
#

spi_scan.c:21:21: fatal error: bcm2835.h: No such file or directory
#include <bcm2835.h>
^
compilation terminated.

#

how do I fix this guys?

silver marten
#

@restive fjord do you have the library installed?

restive fjord
#

i am not sure

#

@silver marten

silver marten
#

I had a similar error with another library because the library was not installed correctly. Use the git bash program. It makes it a lot simpler.

restive fjord
#

and now

#

it shows this

silver marten
#

@queen cloak What do you think? @restive fjord I don't know enough about coding to say.

restive fjord
#

@silver marten thank you tho

silver marten
restive fjord
#

You could write a wrapper around that function so that it returns a boolean value. Right now it's declared void, so you can't use it in a test like that. @restive fjord
This is a C++ programming question. #general-tech and #help-with-projects tend to answer those (anything but #circuitpython-dev goes in one of those two channels, unless you see fit otherwise).

#

still gone afk

feral bridge
#

well is it possible that I combine two RTL-SDR dongles because using either one doesn't have enough bandwidth for me?

silver marten
#

Not that I know of. You could use both but that would be quite a bit of finangling. They would be separate on the sdr program, that is if the program can handle two at once

feral bridge
#

I've been hoping to see ATSC streams because one RTL-SDR dongles don't have enough b/w

feral bridge
#

2.8 * 2 == 5.6MHz

#

that will still not work

#

three RTL-SDRs are still cheaper than one HackRF

silver marten
#

how much bandwidth do you need?

safe nexus
#

I need to figure out TX on my HackRF1

silver marten
#

Are you licensed for the band you want to use it on?

#

By the way I don't own one. Let me look

#

@safe nexus what os are you using?

safe nexus
#

Linux, windows, WsL, though it's more not knowing my way around GNU Radio

silver marten
#

I haven't used GNU radio, I have used sdr console

silver marten
#

@restive fjord I will not be able to help. I hardly know how to code. I kind of know arduino c, but that's it.

#

Sorry.

coarse scroll
#

@restive fjord what does G0 do?

#

my guess would be change lora=rf95.RF95(0, 27, 22) to lora=rf95.RF95(0, 17, 27)

restive fjord
#

@coarse scroll thank you! i got it working not im stuck on a different problem

coarse scroll
#

np

restive fjord
#

anyone ever worked on LoRa?

silver marten
#

not yet

restive fjord
#

can some help me?

normal drift
#

@restive fjord On your previous question - G0 - is the Interrupt to the board - see https://learn.adafruit.com/adafruit-rfm69hcw-and-rfm96-rfm95-rfm98-lora-packet-padio-breakouts?view=all#spi-logic-pins . What are you trying to do with Lora. Ive doen a bit with it in Circuitpython with a feather M0 Express. You mentioned Raspberry Pi - I have not tried it there. I have been trying to use an rfm69hcw on a raspberry pi , but not successfully, yet.

Radio transceiver modules for long distance data communication

restive fjord
#

@normal drift i am trying to send messages from one lora to another

normal drift
#

@restive fjord What Processor/board? What Library are you using?

restive fjord
#

@normal drift I have two RFM9x each connected to Arduino and RPi. Arduino side is ready and works well. RPi side works with C++ code but not with Python. I think the config values are not set. C++ code to C++ code works. Here is the C++ library.https://github.com/hallard/RadioHead/blob/master/RH_RF95.h

Python code to C++ code does not work. Here is the python code.https://github.com/ladecadence/pyRF95/blob/master/rf95.py

How I do set the values so that they match?

normal drift
#

@restive fjord thanks for the links - I'll try to take a look later today. I'm glad to hear to have been able to get the C++ versions to play together. Thats a big start. I have been able to get the Arduino code to talk to a device running CircuitPython. I also would like to be able to use an RPi in the mix. I I'll let you know if/when I make any progress.

restive fjord
#

@normal drift awesome

normal drift
#

What frequency are you using? Do you have examples of the python script and the arduino sketch you are using to configure the boards?

normal drift
#

the first thing to verify is do both configurations have the same mode set: lora.set_modem_config(Bw31_25Cr48Sf512)

#

the Arduino default appears to be Bw125Cr45Sf128

restive fjord
normal drift
#

great - thanks - and it does looke lke the default modes are the same -- too bad - that was an easy fix 😉

restive fjord
#

but when I set the mode to Bw125Cr45Sf128 on python it does not work.

normal drift
#

uderstood -- I was hoping that was the problem but I gusess not. OK - It'll be a few hours before I can do much more. I'm looking forward to working on this .

normal drift
#

@restive fjord just curious - do you get past the "RF95 not found" on your RPi? I'm still struggling with that.

restive fjord
#

yes. i do. i get to "$TELEMETRY TEST"

#

@normal drift its either wiring or outdated modules/drivers. See if you enable your SPI on Pi. Check wiring.

normal drift
#

yup -- working on it -- SPI works on the PI, but not when I talk to LORA, yet ... works fine on on a Feathe M0 Express, so the Lora unit is ok.

normal drift
#

@restive fjord success! I was able to send and receive a packet between my RPi lora and a CircuitPytjon Lora !!!

#

I made a few changes to the rf95.py library - raised SPI speed to 10Mhz - modifed RESET to go Low then High.

#

still experimenting, but major progress

#

ha - now back to 488000hz and it is working

restive fjord
#

do you mind sending me the library?

normal drift
#

ahh -- none of that really matterd - what make it work for me is cahning line 230 of rf95.py from self.spi = spidev.SpiDev() to self.spi = spidev.SpiDev(0,0) -- will post the revised lib in a second..

#

note, I am using 915 mHz

restive fjord
#

@normal drift basically, only change you made it line 230?

normal drift
#

yes - but one sec and I'll post another

#

I think this version handles the RESET better - the original does not actuall send a RESET since it is HIGH to start.

#

It is not perfect, but ir works -- the first few characters transmitted appear to be missed.

#

still much better!

#

als - no need to .set_modem_config() the default is correct.

#

BTW - I am using an RPi 3B+ under newly updated Stretch -- perhaps that is significant....

restive fjord
#

hmmm

#

mine is not working 😦

#

@normal drift do you have time to teamviewerr?

normal drift
#

waht is that?

restive fjord
#

remotely control my screen and what is wrong. You said "raised SPI speed to 10Mhz". which line is that?

normal drift
#

That was somethsing I tried, but it still works at 488000

#

line 247

#

Now it works as lon as I have the (0,0) specified, fails if not, but are you getting RF95 not Found?

#

if not, none of this matters,

restive fjord
#

no, i am not getting RF95 not Found . I am seeing that it is sending TELEMETRY TEST

normal drift
#

Ah tehn nothing I have done will impact you.

#

let me try your test code - just a sec

restive fjord
#

ok.

normal drift
#

it works fine

#

I think I know the problem!

#

I am sending to Circuit python - you are using arduino.

#

I think the arduino library is looking for a packet "header" taht may not be present. Jsut a hunch -- I need to check the code

restive fjord
#

yes. okay

normal drift
restive fjord
#

what do I change it to? @normal drift

#

what do i change that line to? @normal drift

normal drift
#

not suggesting you change that line -- still looking

restive fjord
#

ok

normal drift
#

Ok - sorry -- I'm not finding it. I have to go for a few hours. I can try setting up and arduino test to see if I can figure anyhting out. I need to spend more time reading the arduino code. I may be wrong about this, but is sounds to me like you are transmitting.

#

MAy be late tonight or tomoorw before I can do any more.

restive fjord
#

@normal drift yes, could you please setting it up with an arduino?

normal drift
#

will do

restive fjord
#

@normal drift please do that. when will you be able to set it up and connect back?

#

@normal drift can you do it tonight? i am available anytime. I really want to get this working.

pliant venture
#

@restive fjord Please try to be patient. jerryn is a member of the community, volunteering his time when he helps. He is around as much as he can be, but we all need to be able to keep up with the other things going on in our lives. jerryn will get back to helping you as soon as he can, but as he said, it may not be until late tonight or tomorrow.

normal drift
#

@restive fjord I have verified that when I transmit from the RPi, my Circuitpython board recives the message, but Arduino does not. Interestinly, the Cisrcuitpython and Arduino can excahge messages. Looing into the arduino code now.

silver marten
#

@normal drift thank you for helping

normal drift
#

So - the "radiohead protcol" on the Arduino assume there is a 4 byte packet header - working up an example - I can now get data from the RPi to Arduino.

#

@silver marten this has been a TODO project for me for awhile. Nice to get it working.

#

Still a few quirks to work out...

silver marten
#

@normal drift I honestly don't have the money to do much in the way of fun stuff like what you guys are doing. But I hope to change that soon.

normal drift
#

well these radios are a lot less expensive than Ham radios 😉

silver marten
#

true 😉

restive fjord
#

.... .. .... ..

silver marten
#

Hi hi

normal drift
#

@restive fjord here is a modified version of your example that successfully sends messages to both my Arduino and CircuitPython boards. You have to append a 4 byte header (0xff,0xff,0,0) to every packet. The header can be used for addressing . The first 2 bytes are the TO and FROM address, the others are used for seding additonal data about the sender. 0xFF is a "braodcast" address and is accepted by all.

#

take a look and see if it works and makes sense. Soory for the brief explanation, but it's late and I need to get to bed. Let me know if it owrks and if you have questions. Good luck!

#

BTW - the RPI rf95.py does not have any provision for the headers internally like the Arduino and CircuitPython libraries do. They put them on and strip them off hidden from you. That might be worth considering if you plan to always talk from RPi to Arduino. When you receive packets from the Arduino, they will have the 4 byte header on them and you need to account for them. They can be used ao the receiver knows wher the meassge came from and who it was intended for. Could be a nice feature if you have several radios talking to eachother.

restive fjord
#

@normal drift thank you so much! I spent way too much time on this, trying to get it working. Thank you!. I will try this python code right now and let you know.

restive fjord
#

@normal drift thank you it works. How do I make it show only the message? Right now, it is receiving $TELEMETRY TESTo⸮f⸮⸮#<⸮٦6⸮⸮⸮⸮⸮⸮7⸮web⸮S{ ⸮\7⸮f⸮⸮⸮⸮⸮m[⸮<⸮x⸮+Z⸮?⸮弭H⸮mk⸮⸮⸮&⸮⸮|⸮~&ݩ⸮p⸮Nl_⸮;⸮⸮⸮⸮_t⸮-⸮⸮%ỷv⸮⸮;⸮⸮⸮_S(⸮⸮⸮⸮⸮L9G⸮⸮⸮q⸮⸮⸮⸮N⸮⸮⸮5⸮⸮⸮⸮⸮⸮^⸮⸮⸮⸮⸮wm⸮.⸮⸮⸮!⸮⸮⸮r⸮⸮⸮⸮ ⸮⸮ ⸮⸮

restive fjord
#

is there a way to clean it?

normal drift
#

@restive fjord the Arduino C++ code is just printing the contents of "'buf" as a string and C++ expects strings to end with a "0" (null terminated. In this cass the Serial.println((char*)buf); keeps going through buf (and beyond) until it finds a 0. There are a few ways to deal with this. Since "len" was returned a few lines earlier you can just print the first "len" bytes of "buf" or a simple think ist append a "0" aftetr "len bytes like this : RH_RF95::printBuffer("Received: ", buf, len); Serial.print("Got: "); buf[len]=0; Serial.println((char*)buf); I tried this and it seems to work OK. Good luck.

#

@restive fjord The Arduino example is assumig the received data is an ASCII string. This may or may not be valid so you may want to think about how to better handle the arriiving data. "buf" is just an array of bytes.

normal drift
#

FYI - the more I read about the Raspberry Pi python spidev interface, the less I understand abput why the change I made to rf95.py in line 230 has any impact. This is also consistent with the fact that @restive fjord was not having the same problem as I was regarding the "RF95 not found" error. The good thing is "it works for me". I just wish I knew why and I'll pursue this as I can and report back any findings. If anyone has any suggestions, please let me know.

#

Just to recap - that change was: what make it work for me is cahning line 230 of rf95.py from self.spi = spidev.SpiDev() to self.spi = spidev.SpiDev(0,0) -- according to the docs, I can find, this should not be necessary,

restive fjord
#

@normal drift which hardware platforms are you using today for RF95x stuff? (for both stations)

normal drift
#

Raspberry Pi 3B+ with RFM95 breakout board - Feather M0 Express with RFM95 Featherewing

#

Alos Feather M0 express and rfm95 feather wing with arduino -- other is with CP 3.0

restive fjord
#

So no integral MCU or CPU with a radio.

#

I'm just wondering if it's necessary to buy the one with the integral SAMD21 onboard or if the breakout is sufficient. They're kind of pricey for the limited use I'd give them.

normal drift
#

@restive fjord I avoided the integral because it is not an express board. no flash chip

#

The featherwings are nice if you are using a feather MCU board.

restive fjord
#

@jerry right -- no SPI flashROM; limits use with CircuitPython (for example).

#

My Uniden handheld scanner hears narrowband and wideband FM, and AM.

I'm guessing I'll hear something from the LoRa transmitter on it, and can then determine if there's any Part 15 traffic in the area to avoid (and Part 18, ISM).
Pagers and such are a bit higher in frequency, last time I checked (I'll probably start with the ham allocation above 900 MHz).

normal drift
silver marten
#

i have to get mine working with the ham it up add on

#

my rtl that is

restive fjord
#

Oh I totally forgot the SDR was that inexpensive. Haha.

#

I think you just made a sale.

silver marten
normal drift
#

I usr CubicSDR on my Mac with it. Not sure what Linux support there is.

restive fjord
#

For that price it'd be worth having on hand with no sure answers about it wrt Linux. ;)

normal drift
#

I receieved mine with AdaBox007 - nice surprise.

#

Now I can listen and pick locks

silver marten
#

GNU companion radio software is nice

restive fjord
#

Which of the two chips talks to the host PC?

normal drift
#

not sure - I have note delved too depp into it

silver marten
#

@restive fjord How do I get adafruit to carry the updated ham it up add on for the rtl dongle?

restive fjord
#

@silver marten There was a recent conversation about suggesting products to the Adafruit team thru the regular sales site, in Discord. Maybe as recent as yesterday.

#

Pretty sure it follows the same model as suggesting edits to product support pages and the like.

silver marten
#

i have the older ham it up but, would like to be able to buy it from adafruit

normal drift
#

@restive fjord my Mac sees this on its USB port ```RTL2838UHIDIR:

Product ID: 0x2838
Vendor ID: 0x0bda (Realtek Semiconductor Corp.)
Version: 1.00
Serial Number: 00000210
Speed: Up to 480 Mb/sec
Manufacturer: Realtek
Location ID: 0x14243000 / 16
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0

restive fjord
#

Yeah those product id and vendor id's will probably show up in a Linux dmesg even without a driver.

#

I had a weather-enabled clock with the atomic thing (WWVB) in it -- came with a battery operated sensor and did telemetry very n seconds (45 maybe). Just temperature.

#

But the battery did not like winter and I did not care in summer so it got lost. ;)

#

I just wanted to know how cold it was

restive fjord
#

@normal drift it is showing this error and not continiously sending messages. It send 1 or 2 and shows this message.

#
Traceback (most recent call last):
  File "example.py", line 44, in <module>
    while not lora.available():
  File "/home/pi/programs/Tests/pyRF95_original/pyRF95/rf95.py", line 449, in available
    self.set_mode_rx()
  File "/home/pi/programs/Tests/pyRF95_original/pyRF95/rf95.py", line 366, in set_mode_rx
    self.spi_write(REG_01_OP_MODE, MODE_RXCONTINUOUS)
  File "/home/pi/programs/Tests/pyRF95_original/pyRF95/rf95.py", line 323, in spi_write
    self.spi.xfer2([reg | SPI_WRITE_MASK, data])
IOError: [Errno 9] Bad file descriptor
normal drift
#

Hmm. Something changed. Post your code. Will look at it later tonight.

restive fjord
normal drift
restive fjord
#

@normal drift not sure what i did, but now its back to not communicating with the arduino.

#

its just passing like it was doing originally 😦

restive fjord
#

i dont understand it

#

When you leave it alone for a while and it's still working it starts to sink in what was stable about it. Nothing but time (as marked on the calendar) for that.

normal drift
#

@restive fjord you modified the prgrams and mixed tabs and spaces. That icauses all sorts of problems for python. Here are corrected versions: (note - I changed the pins and frequnecy- change them back before you run it.

#

Also, I think the messages are going out too close together for the Arduino - I t only reports the firat message.

restive fjord
#

@normal drift hmm. its still just passing

normal drift
#

what do you mean

restive fjord
#
#!/bin/s__h
gcal -s Mon -b 12 -K --iso-week-number=yes $1

calendar

#

@normal drift its printing:

#
        pass
        print ("Passing here:(")```
#

pringitng passing here

#

and i am not receiving anything on the arduino serial

normal drift
#

just a sec

#

It is stuck waitning fpr a resapnse from the arduino and it is not seeing it - you prgram from yesterday works. trying to find the change

#

Ok yesrdays program had an error that made it work 😉 it was just sending packes i na loop tha never ended, not waiting fpr th e responses every time.

#

You may miss a packet - you should have a timeout on the wait for a response - if not received - try again.

#

send it again - wait for some time - if no packet - send it again

#

or if oyu don't need the response, don't wait for it.

#

This is where you need to experiment with your code to make it do what you want.

restive fjord
#

but even with the code i have right now, arduino is not receiving anything while the pi said it has sent already. and the Pi start witing for the Arduno to send.

normal drift
#

on mine the arduino sees the first 0 1 2 3 message

restive fjord
#

on mine it doesnt even see it. it was just working today. I tried spi-scan I think and it stopped working'

normal drift
#

fix pins and freq! it will send some and miss some - reporting "nothin received" but it will keep sending

#

looking ito why it is not receiveg message from arduino

#

something wrong on receive - my Circuitpython board seeds the responses from the arduino, but the RPi dpes not - still looking -- arduino should receive messages

restive fjord
#

@normal drift do you think something is wrong with the pi?

normal drift
#

no - something is wrong with the code 😉

restive fjord
#

@normal drift ok. so i moved the wires while it was transmitting and i got 0 1 2 3 on the arduino

#

but received nothing on the Pi

normal drift
#

progress - still lokking at pi side.

#

ok - PI does receive.... still trying to pull it together.

#

this version uses the lora.available() but it will hang forever if nothing received. -

#

don't use rh_new_2

#

iif it misses a packet, it dies.

#

also make sure all your wires are connected 😉

#

Let me know if rh_new works for you?

#

its runnin here for past several minutes - sending/receiveing happily

#

@restive fjord the baisc issue was that there will be missed packets so you have to deal witht that. There were alos some issues with the print statement that I fixed. Look over the code and let me know if you have any questions about it. experiment with it to make it work better for you.

#

don't use tabs 😉

restive fjord
#

@normal drift thakn you so much! i will test these soon and let you know

#

how it goes

normal drift
#

good luck -- ignore the rh_new_2.py for now -- it will just hang on first missed packet

restive fjord
#

those long usernames are really distracting. Makes me not want to read the entire thread.

restive fjord
#

@normal drift i am getting this hmm

#
/home/pi/programs/Tests/pyRF95_jerryn/pyRF95/rf95.py:257: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  GPIO.setup(self.reset_pin, GPIO.OUT)
RF95 LoRa mode ok
waiting
waiting
waiting
Traceback (most recent call last):
  File "rh_new.py", line 36, in <module>
    data = lora.recv()
  File "/home/pi/programs/Tests/pyRF95_jerryn/pyRF95/rf95.py", line 458, in recv
    if not self.available():
  File "/home/pi/programs/Tests/pyRF95_jerryn/pyRF95/rf95.py", line 449, in available
    self.set_mode_rx()
  File "/home/pi/programs/Tests/pyRF95_jerryn/pyRF95/rf95.py", line 366, in set_mode_rx
    self.spi_write(REG_01_OP_MODE, MODE_RXCONTINUOUS)
  File "/home/pi/programs/Tests/pyRF95_jerryn/pyRF95/rf95.py", line 323, in spi_write
    self.spi.xfer2([reg | SPI_WRITE_MASK, data])
IOError: [Errno 9] Bad file descriptor```
normal drift
#

Did you edit the file? Check for tabs?

#

What are you running it as sudo? I don’t have to do that.

#

Post both files. I’ll try them here later tonight. I have to go now.

restive fjord
#

@normal drift yes i edited the file. in fact, it is working on and off. wiring is the problem. is the G0 pin supposed to be grounded? there is 5V running thru it. can you post your schematics?

normal drift
#

G0 is your interrupt pin. Not grounded. There should not be 5V anywhere. Pi is 3v. Will post more in a few hours.

restive fjord
#

@normal drift ok thank you.

normal drift
#

@restive fjord your code runs fine on my syste, - the only change I made was to set the frequency. Ill post my wiring next