#help-with-radio

1 messages · Page 5 of 1

grizzled vapor
#

Definitely. Especially with just a homemade heterodyne receiver

untold needle
#

Thanks, unfortunately our transmitter didn't work at that sort of range so either the gain of the dipole wasn't high enough or the transmitter was just weak. But at least we got some data.

fallow plank
#

I have the Adafruit RFM69HCW Transceiver module (https://www.adafruit.com/product/3071)
With uFL and a small antenna. In ideal conditions it only goes for like 70 meters, even with extremely brutal settings.
In a worst case it goes like 40 meters.
I want a module to use in a shipyard. I need it to work for 200 meters reliably. I will only be transferring about 40 bytes at a time, so I can go brutal with the settings.
Is the Adafruit RFM95W LoRa Radio Transceiver module (https://www.adafruit.com/product/3072) going to be capable for it?
I want it to take small obstructions if possible.
The thing is I want to use it a shipyard which has a lot of iron around, and there are stuff everywhere. I can get the receiver high up but the transmitter is going to be moving.

#

Before anyone asks, I had used a 433mhz antenna, on the 433mhz module.

young cove
#

you will want to experiment with antennas too; don't use some smaller compact antenna which might be less efficient

fallow plank
#

Is a spring antenna gonna be better than one of the compact generic black antenna's?

young cove
#

start with a 1/4-wave wire instead of something with a coil in it

fallow plank
#

Alright. Thanks!

young cove
#

a full-sized black one would be ok, but better if it is full-sized, which for 433 MHz is kinda tall (17cm or so)

#

really, though, it is best done experimentally. You could try a 1/4-wave, and a black one, at some distance, and see what the RSSI differences are. It will also depend on orientation. the typical pattern around a stick or straight wire antenna is a torus

#

strongest signal is perpendicular

edgy folio
#

Using rfm95 with the antennas lady ada recommended from digikey. To my knowledge the only feedback on signal strength is the RSSI and SNR. I don’t have a scope or any fancy equipment. I noticed the rssi db change when i switched antennas to sma that actually physically connect now. 😅 Can you recommend a resource I could read up on what is a good db, bad db, for basics. I don’t really know how to interpret the rssi results.

#

Without antennas sitting next to each other i was getting -100 or so db. With antennas connected sitting right next to each other I’m now getting about -51 db. Is that sufficient to go about 1000 meters at least?

young cove
edgy folio
#

Good point. Just need to test it. I live in a city kind of and the final install will be out in the country in a different state.

#

The bad part is my receiver is inside a giant clear mailbox which requires 12v for the amplifier. Its not exactly portable. 😞 I think i do have a 3rd rfm i can setup and go for a drive with. 👍

fallow plank
#

Try it in your house without line of sight first.

#

A thing I found did interference for me was my big tv.
Putting it behind it increased rssi by 15

#

For me increasing tx_power to max and preamble to 10 really helped.
Also, smaller bitrate seemed to also help.

edgy folio
#

Just soldered up a 3rd rfm with reverse tft s2. Nice compact package with a battery for field testing.

#

Possibly my bad soldering for why the antenna performance is poor. The edge launch sma adapters are tricky to solder.

cobalt bluff
brave willow
#

Obviously it's new

cobalt bluff
past solar
short nimbus
#

Step 6: Build a Duga radar that is so powerful that it disrupts and jam ham radio in a 50 light years radius by replacing it with loud pings and buzzs

dark steeple
#

Any advice for grounding an antenna used with a Raspberry Pi 3 A+ and an RTL-SDR dongle?

#

Trying to capture NOAA weather APT audio streams and I get some pretty noisy results.

#

And you can feel the static on the thing when it's receiving.

primal warren
#

You can either use a grounded power supply, or simply ground the antenna shield.

twin pasture
#

Does anyone have experience using the RFM69 Featherwing with the Feather M4 Express? I’m having a strange issue. I can get it to initialize and go through setup. It even connects to the transmitter. However, when I remove the transmitters power, it still says it’s connected. I’m using extremely similar code to another project that uses two M0 feathers with the built in RFM69 and those work. If you need more details I can share. Code is basic right now

normal drift
twin pasture
# normal drift I've used them together many times, but I have never tried disconnecting power t...

Sorry, I think I explained poorly. The feather wing is attached to the Feather M4 on one of the triplers along with the OLED screen. This as a unit acts as the receiver and is provided power consistently (I do not turn it off during the testing). The transmitter is a Feather M0 that has the built RFM69. During the test, the OLED displays a message whether it’s searching for a connection, or if it’s connected. That’s the setup. The test is this: allow the M4 receiving unit to boot up and look for signal, then plug in the M0 using USB. This causes the M4 to display the connected message. I then unplug the M0, the code should cause the M4 to now say “Searching” again now that !rf69.available() should be true. However it continues to say “Connected.”

umbral oxide
#

@twin pasture might help to post the receiver code. there is no "connection" per se, the receiver listens and if there is a packet, it gets the bytes, and then presumably immediately listens again

#

it may be that the "connection" text isn't changed in the code when the receiver times out due to no new packet

twin pasture
#

is there a special format I should follow or does a screenshot suffice?

umbral oxide
#

post a file using the "+" sign to the left, files are much better than screenshots. OR, check the #welcome for how to paste in smaller chunks of code with formatting

#

(be sure there's no private info in the code)

#

Is this Arduino or CircuitPython?

twin pasture
#

I'm writing this Platform IO. The loop is pretty short and simple so I'll try to format it as a chunk

#
void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(13, HIGH);
  delay(500);
  digitalWrite(13, LOW);
  delay(500);
  
  if(!rf69.available()){
    display.clearDisplay();
    display.display();
    delay(1000);
    display.setCursor(0, 12);
    display.print("Searching...");
    display.display();
    delay(1000);

  }
  
  if (rf69.available()){
    display.clearDisplay();
    display.display();
    delay(1000);
    display.setCursor(0, 12);
    display.print("Connected!");
    display.display();
    delay(1000);
  }
  
}
#

To me this should be checking if a signal is available, and if the signal from the transmitter drops, it should go back to searching, and displaying that

#

I'm not sure where I'm going wrong

umbral oxide
#

is it possible it's picking up packets from some other nearby transmitter?

twin pasture
#

So when plug in the M4, it will boot up and display "Searching" indefinitely from what I've seen. It only displays "Connected" when I plug in my M0.

#

So unless some weak signal piggybacks of the M0 (Idk if that's even possible), but I don't personally have any other sources running, and I don't expect my neighbors are running anything that should interfere either

umbral oxide
#

oh, I think you need to read the packet, to clear out the rf69.available(), not sure why different between M0 and M4

twin pasture
#

hmm okay, maybe it will resolve itself if I keep writing and actually receive the data then

umbral oxide
#

I think so, the bytes stay in the buffer until read / received

#

(if you have encryption in the set up, you shouldn't get stray packets from others)

twin pasture
#

Gotcha, that's a good explanation. I'll keep pushing along then, I've just been trying to add code incrementally. Thanks for the good advice!

#

Yeah, I have the encryption set up

#

@umbral oxide I think you were right, when I added the next stage of code, it fixed the issue

#

Thank you again, that was really helpful!

pastel granite
#

Afternoon everyone,

It's been quite a while since I last dropped by - glad to see some familiar faces that helped me when I was first getting started. Thank you again 🙂

#

Quick question:

Getting a strange error when trying to scan for Bluetooth advertisements. Any permutation of self.ble.start_scan() (e.g. self.ble.start_scan(ProvideServicesAdvertisement)) returns an object that I can't iterate over.

for advertisement in self.ble.start_scan(ProvideServicesAdvertisement):
 <do stuff here>

When I try I get the following error:

 File "adafruit_ble/__init__.py", line 262, in start_scan
  File "adafruit_ble/advertising/standard.py", line 180, in matches
  File "adafruit_ble/advertising/__init__.py", line 298, in matches_prefixes
TypeError: extra keyword arguments given
#

Anyone else have this problem, or know where I can look to troubleshoot?

pastel granite
young cove
chilly mesa
#

Are there any tutorials available for LoRA projects (not LoRaWan)?. Not sure how to integrate data coming from, say a LoRa feather to another LoRa feather and then send that info to a computer or the web.

primal warren
#

Without LoRaWan, it's basically a point-to-point link. Send and receive packets, basically.

pastel granite
#

Totally solved. My bad. Thanks again @young cove 🙂

young cove
#

great!

chilly mesa
umbral oxide
#

@chilly mesa you could double up, like wifi (or Ethernet) Feather + LoRa FeatherWing, or vice versa, and sent it to computer (or server) over network

primal warren
#

You could, I suppose, talk to the LoRa chip directly with a USB-SPI interface, but you'd probably have to roll your own software.

umbral oxide
#

uart might have some easier elements to cobble together (from a full-blown MCU /LoRa board or combo)

primal warren
#

Yeah, that was the original answer: use an MCU on both ends and have the MCU on one end talk to the host computer.

vocal veldt
vocal veldt
#

LoRa -> LoRa -> WiFi/Ethernet bridge with two of the new radiofruit feathers

#

LoRa feather -> UART would be nice too for data science applications

umbral oxide
#

A lot of ways to slice-and-dice it:
• Radio Feather + Ethernet FeatherWing
• Radio Feather + Airlift FeatherWing
• Pico W + Radio FeatherWing
• ESP32-* + Radio FeatherWing
ethernet tls would be nice, as would CYW co-processor 😉

vocal veldt
#

Radio Featherwing -> ESP32 would be a great idea (as esp32 can do WiFi and BLE)

#

@umbral oxide CYW co-processor?

umbral oxide
#

the wifi from Pico W

vocal veldt
#

oh ok!

#

thought there was some kind of new co-processor i haven't heard of yet!

umbral oxide
#

hard to be cost-competitive with that though, compard to Raspberry Pi org, not sure if there are any licensing issues

vocal veldt
#

i havent checked in a while if Wiznet released their ipv6 ethernet IC

umbral oxide
#

6100 is out in small numbers

vocal veldt
#

so the TLS lib and crypto apis don't need to sit on the main mcu

twin pasture
#

Has anyone ever used RF69 to control Stepper Motors using AccelStepper library? I'm having some serious trouble getting movement although I'm receiving the correct joystick data.

twin pasture
#

I think I got it, I needed to run more instances of stepper.runSpeed()

bronze cloud
#

Does anyone know if there's a difference between RFM95/RFM96 radios with and without the metal cover?

half plover
bronze cloud
#

Certified as in the W model for sale outside China?

half plover
#

If you zoom in on the shielded module it has an FCC ID

#

Certified meaning it meets the requirements required to be used in end products by the FCC

#

The unshielded module lends me to think that it is not certified for end product use

bronze cloud
#

Would the RFM69 not need the same certification? There doesn't seem to be any version of that with a cover on it

#

Maybe there was just more room on the cover to put the FCC ID? 😉

half plover
#

It doesn’t appear there is a certified RFM69 module. I don’t know if it technically requires certification because it only operates in the ISM bands vs the certified module which also appears to support 2.4GHz which does require certification

bronze cloud
#

Yes, that would make sense I guess

#

Thank you 🙂

little forge
#

I'm wanting to create a smartish Phone I'm unsure what fona board will work in Australia on the Lte/4G/5G network any info would be helpful thanks

primal warren
#

The FONA boards are (AFAIK) all based on SimCom products, so the minimum effort shift would presumably be to a more modern SimCom module. There's some discussion on the subject here #help-with-hw-design message

high yew
#

hey all. stupid question: can an arduino be used as an rfid transmitter?

#

let's say i know the serial number (wiegand id) of a key fob. can i "beam" that id at a reader from several meters away?

worn bridge
grizzled vapor
#

The flipper zero for example can emulate nfc tags. But only in near field. Beaming a magnetic field that far away would take a considerable amount of power and engineering. Or it might be downright impossible if the communication is bidirectional

high yew
#

Gotcha. Just to help my understanding tho, when an rfid reader beams energy at an rfid tag, it becomes energized and transmits it’s data, right? How much energy is that? I’m saying, how can I energize an rfid tag on my own, but with just a bit more power so the transmission range is increased?

primal warren
#

There are two kinds of RFID tags in common use, low frequency 125kHz, and high frequency 13.6MHz. The basic idea is you transmit on their frequency and they receive it and rectify it to obtain operating power.

grizzled vapor
#

I guess you could make a more powerful reader, but you might end up overloading and possibly destroying NFC tags

primal warren
#

Since the tag communicates by tapping power from the field in pulses, a more powerful reader would probably be unable to detect the changes from a card that wasn't in the near field

untold needle
#

@primal warren Ok so that project is done but now I'm on to a new perhaps the hardest project I've ever even thought about. I'm trying to build a remote controlled rocket with rocket candy fuel using RC communication. Electronics weight limit is 300g

#

fuel weight limit is separate

granite spear
#

It's unusual to have remote control on a rocket per se. Even if they're actively guided (which is hard), that's usually done with an onboard controller to keep them either just going "up", or on a planned trajectory. It's a very fast system, so doing it by remote control would often mean it goes sideways before a human could see what's going on and react to it.

untold needle
#

That's pretty hard

#

Oh and it has to land not too fast

granite spear
#

Yeah, that's seriously advanced levels of control, especially with a solid rocket, which means it won't generally have variable thrust available.

#

Do also bear in mind that you are veering quite close to what the laws of various countries might call a "guided missile"...

untold needle
#

Thats basically what we need to make

#

A miniature one

#

How on earth do you even start with that though

granite spear
#

Figuring out the mechanism for steering and thrust would probably be one of the early issues. As I mentioned, solid-fuel rockets don't really have built-in thrust control because they burn themselves instead of have a liquid fuel you can vary the flow of. Maybe you can choke off the nozzle to reduce thrust? You'd also need either a gimbaling mechanism or some sort of side thrusters to aim it.

primal warren
#

Presumably it would be under thrust while moving upward, and then returning downward just under the pull of gravity. So thrust vectoring is probably not useful, but steerable fins or somesuch could aim things. The tricky part is having the rocket a) figure out where it is, b) where it wants to go, c) which way it's currently headed, d) what its current orientation is, e) what correction is needed, f) the amount of time available to make that correction, and g) how to command the actuators to achieve that correction (if possible). Every single one of these steps is complicated.

waxen idol
gloomy path
#

Is there a way to make a sub-ghz radio to use.. more.. power? Trying to debug a power issue, and i need to make it use more current, but i can't increase the PA output level.

primal warren
#

The usual way is to add another PA stage.

young cove
grizzled vapor
#

To simulate pulsed power, you can use a mosfet and resistor that can pulse the power rails

cosmic valve
#

Henlo Frens,
I'm currently working on robots for competitions, but every time we go to an event, the 2.4GHz wifi channels are used up beyond usefulness.
Now we cold switch to 5GHz, but that would bring down range and object-penetration significantly.

Since the robot doesn't send all too much data I was thinking of going 900MHz or similar.

How does one go about doing this?
Do you just grab an xBee and slap a network interface through it?
Will other devices interfere?

primal warren
#

I'd look at an RFM69 and one of the protocols RadioHead supports, or possibly an RFM95 and LoRa.

#

There's always a chance of interference, and various ways to mitigate it (the 2.4GHz spread spectrum devices are pretty robust, but as you've seen, there is a limit)

cosmic valve
#

ooh yeah
thanks for the leads!

granite spear
#

You also might consider UWB radios like Decawave, as I imagine those would be pretty tolerant of interference.

opal relic
#

Hello all. I have just got my hands on the Adafruit Feather RP2040 with RFM95 LoRa Radio - 915MHz - RadioFruit and STEMMA QT

But though I can load a micropython UF2, and see the device in the Repl on Mu, I can't seem to mount it as a drive and load lib Files. Any idea?

#

There was no flavor of Micropython for this board specifically, so I used the pi pico uf2

umbral oxide
#

With MicroPython, you should be able to access files with Thonny

opal relic
#

the pi nas is a NAS device on the network

umbral oxide
#

did you disconnect it from Mu first?

#

and in the Thonny Run menu, configure the interpreter?

rain orchid
#

and very much like a guided missile

untold needle
#

No, it is allowed

rain orchid
untold needle
#

If you looked at the UK amateur rocketry, it's allowed

rain orchid
#

Maybe I misunderstood however it sounds similar to Mark Rober's rocket from a different altitude and fuel. Even he had to stop the landing as it would be too much like a missile

untold needle
#

Fortunately UK and US laws differ greatly

#

And there are specific masses and constraints in place

heady scarab
#

The missile knows where it is at all times. It knows this because it knows where it isn't. By subtracting where it is from where it isn't, or where it isn't from where it is - whichever is greater - it obtains a difference or deviation. The guidance subsystem uses deviations to generate corrective commands to drive the missile from a position where it is to a position where it isn't, and arriving at a position that it wasn't, it now is. Consequently, the position where it is is now the position that it wasn't, and if follows that the position that it was is now the position that it isn't. In the event that the position that it is in is not the position that it wasn't, the system has acquired a variation. The variation being the difference between where the missile is and where it wasn't. If variation is considered to be a significant factor, it too may be corrected by the GEA. However, the missile must also know where it was. The missile guidance computer scenario works as follows: Because a variation has modified some of the information that the missile has obtained, it is not sure just where it is. However, it is sure where it isn't, within reason, and it know where it was. It now subtracts where it should be from where it wasn't, or vice versa. And by differentiating this from the algebraic sum of where it shouldn't be and where it was, it is able to obtain the deviation and its variation, which is called error.

#

Sorry..... I had to 😁

bronze cloud
#

Would this qualify as a dipole antenna?

primal warren
#

Kinda-sorta. You could think of it as either that or an antenna with a counterpoise.

#

Normally a dipole is fed with a balanced signal, and that board provides an unbalanced signal. You can convert between them with a device known as a “balun“, but the counterpoise is probably simpler. Looks cool, I like it.

bronze cloud
#

I could also put a grounded metal plate below the antenna, that would probably have a similar effect then, I guess?

primal warren
#

Yes, that would work too.

#

You'd want the antenna perpendicular to it, so it would act as a ground plane

bronze cloud
#

Is a red triangle a bad reaction? 🥺

granite spear
grizzled vapor
#

You would have to find some way to effectively guide the rocket. Fins may not work very well at a slow descent speed. And you need to find some way to actuate the guidance system.

wary arrow
#

Is there a straightforward way for hobbyists doing radio stuff to make sure not to interfere with sensitive electronics (like medical equipment)? Something like “only use this amount of power to transmit”?

granite spear
#

Using only FCC-certified radio modules would be a good start, at least. But it's hard to guarantee no interference without a full testing process.

deft jasper
#

Hello. I have 2 pairs of 315/433 Mhz transmitter / reciever (one 315 and one 433). How can i check if they work? Becouse i can't make it communicate. I tried 3 diffrent libraries and on all i just see empty serial console. I think they can be broken, becouse i dont't know any other reason why they both not working. I already trying different pin, different wires and even powering from external source, to make sure it have enough power. I tried even using my car key to check if it prints something, but nothing. Can i make sure that they are good or broken?

deft jasper
#

Okey, i gave up with this terrible thing, its almost random high and low values, completely noisy signal at reciever output pin (still not sure if it is working or not).

#

Is there any 315 Mhz / 433 Mhz radio modules that i can easy use? And it have only 1 pin for data (i have limited number of pins)?

primal warren
#

I've played with those, and had trouble with the UHF being radiated causing my circuits to have problems (to the extent of frying a microcontroller in one case)

grizzled vapor
#

I don't see how it could fry a micro

primal warren
#

A short jumper wire makes a very efficient antenna at 432MHz

deft jasper
#

I tried this https://www.instructables.com/How-to-test-RF-transmitter-and-receiver-before-pro/ and it is just a random flashing in my opinion (weird thing is i have both 315 and 433 recievers, but only one transmitter, but both recieved are affected with my transmitter signal)

Instructables

How to Test RF Transmitter and Receiver Before Programming: Hello guys,
Do you have RF transmitter and receiver not working after you programmed?
Do not worry, you can use this techniques to check your devices.

#

Maybe it is not good visible on this video, but both leds keep "pulsating" even when i am not sending any signal.

#

And when i start sending 0 or 1 led just change state for few miliseconds and thats all. I was thinking that sending 1 witll make reciever pin HIGH and sending 0 will make it LOW, but it definitely not working like that.

#

So i just want to give up with these crappy boards and buy a better module, but can't find anything good with i can replace it.

granite spear
# deft jasper And when i start sending 0 or 1 led just change state for few miliseconds and th...

It's possible that the receiver is doing some adaptation to the signal strength, so if nothing is transmitted, it just ends up amplifying the noise up until you get random output. But if you have a quickly-changing series of 1's and 0's like real data, then it'll be able to lock on to the correct threshold and output the data. This is why people use things like Manchester encoding to have a "balanced" signal with a consistent power level no matter what the data is.

primal warren
#

Those boards look like the cheap SAW ones I was (briefly) using. I ended up switching technology.

deft jasper
#

I will also switch technology if I can, but I don't think there is any other way. I want to make a module that sending signal right after recieve power source. Don't have much time to eg. connect to wifi hotspot or something, i need to use a connectionless transmission.

primal warren
#

I find the RFM69 modules quick and well behaved. I've also used some of the 2.4GHz spread spectrum modules, but they can take a few seconds to synch up after power-on.

wary arrow
#

I’m considering using radio to measure distance between objects a few millimeters apart (directly, by using changes in signal strength as transmitter and receiver move). Is there a practical limit to how precise this approach could be? I’m thinking that with an op-amp and good ADC, I could actually get really precise measurements

half plover
#

Not sure what frequency range you’re talking about

#

Ultrasonic though tends to be pretty common

#

Though looking, ultrasonic seems to be good for 2cm up to 4m

wary arrow
half plover
#

You’re talking about LiDAR at this point

wary arrow
half plover
#

LiDAR is just crazy accurate

#

Though that one probably isn’t a good example

wary arrow
#

Those scales are multiple orders of magnitude off from my intended use 🙂 micron precision within centimeters of distance

half plover
#

I’d probably venture that micrometer accuracy measurement is going to cost quite a bit to develop

#

It might be difficult to obtain at a hobbyist scale

wary arrow
#

That sounds plausible for sure

#

But what I’m talking about is easier and probably more capable than something like lidar or ultrasonic sonar. There’s no need to wait for a reply, timing doesn’t have to be precise, etc. just signal strength

half plover
#

You’d have to have a system that polled the ADC fast enough and could use the data fast enough.

#

That might be difficult to achieve with a microcontroller

#

Not impossible but definitely a huge learning curve to get there

#

I’d recommend looking at a jfet op amp with a GHz GBWP (Gain Bandwidth Product)

#

Something like an LTC6869 I think has 4GHz GPBW

#

That op amp would be a great place to start

wary arrow
#

@half plover thank you!

granite spear
#

Bear in mind that with RF, everything would affect signal strength at that kind of precision besides just distance. Like, just your antenna swaying a micrometer in the breeze, or a chance reflection of the wave from a truck passing by on the street, etc.

wary arrow
#

Ah yeah

#

So not robust

#

Unless it is inside a faraday cage

half plover
grizzled vapor
#

Maybe a capacitive sensor would also work since capacitance changes with distance. You could measure the frequency that it oscillates at in an RC or LC oscillator, and determine the distance. But inductive might be the better way to go since those sensors exist, are common, and I think are used in the vibration analysis industry to measure small distances when something is vibrating.

silent lynx
#

I've been playing around with collecting data from zigbee devices (eg aqara temperature sensors) via the phoscon-gw API. I've run into some complications, and so I have many questions, but let me start with some basics.

#

Let me preface this by saying that, I'm pretty good at doing network searching, and I've been surprised at how little tech level info I've been able to find about how zigbee works. A pointer to some good tech docs would be welcome.

#

As best I can understand it, a zigbee "end device" is kinda autonomous, in that it spends most of it's time sleeping, and periodically wakes up to sent data to its server. And it seems that the criteria that it uses for waking up/sending vary from device to device. Am I right so far?

#

These Aqara devices I'm working with will work flawlessly for long periods, weeks, longer. But will without warning just stop sending their data. From the server/gateway dashboard it appears that the device is still there (aka "reachable"?) but it just won't send.

#

And I'm kinda stumped on how to debug this "failure".

primal warren
#

Kind of: Zigbee is a "mesh" network, so "end" nodes will often do routing as well, so they'll receive packets from a nearby node and rebroadcast them.

silent lynx
#

Is this making any sense? One thing I think I want to know is what is the criteria/trigger that these aqara devices use for sending? Why would the stop sending?

#

@primal warren Yes. Although what I've read suggests that the "end devices" are optimized for long battery life, so they usually do not do repeating.

primal warren
#

It sounds like "sending" is covering more than one concept. There's transmitting radio information, and there's forwarding information from the local interface. Since it appears reachable, I'm guessing it's still transmitting. But perhaps it has ceased generating its own traffic from local data.

#

Zigbee does have the concept of "reduced function devices", which do not do forwarding, but I'm not sure whether that concept is in use (as you said, detailed information is tricky to find)

#

Note that there are flavours of Zigbee as well. For example, DigiMesh is Zigbee compatible, but implements sleep functionality on routing nodes to save power.

silent lynx
#

@primal warren Yes it definitely seems to have ceased generatiing it's own transmissions. I've found that I can force it to "update" by short pressing the hardware button on the device. And maybe that's just what I have to do. But it feels like it would help me if I understood what the devices "rules" are for when it chooses to send its data.

primal warren
#

Perhaps it would be useful to know more details about your end node. Is it Zigbee + a local MCU or what?

silent lynx
#

It's an Aqara temperature/humidity/airpressure sensor. (I can dig out the model number if that's useful.) It's "connected" through a conBee II dongle, attached to a raspberry pi, running the PhosCon-GW gateway software.

#

I pair the device with the gateway using the gateway's web app. And I'm collecting data from the gateway using its API called from Python scripts.

primal warren
#

This one?

silent lynx
#

As near as I can tell ( after a lot of testing and experimentation) the gateway, and my scripts are working as expected. The problem is that the device is just stops sending new data to the gateway.

primal warren
#

Hint: look for an FCC ID sticker (like "2AKIT-WSDCGQ11LM") and do a search on that string

silent lynx
#

I like that idea. Thanks. I will.

primal warren
#

Apparently that chip has a few issues, and can stop generating packets if it exceeds the maximum number of simultaneous data requests, it receives a request to leave, it gets a factory reset, or the watchdog timer expires. The newer Azurewave AW-CU479 apparently is more reliable. That doesn't help you, however.

#

Apparently you can access a serial data stream from some of the test points on the internal board, where the module will tell you what is happening.

silent lynx
#

Aha, yea. Searching on "FCC ID: 2AKIT-WSDCGQ11LM" The most interesting info I've found yet. Thanks. That IS the number on the back of the device I have.

#

Changing to a more reliable device is not out of the question. Although I already have about a half dozen of these Aqara ones, so I'm gonna keep trying to figure them out.

#

Thanks for your help.

ebon needle
#

Hello everyone, Is it possible to detect the lora usage from a lora gateway?

Like if two lora devices are transmitting and receiving in a area. Is it possible for a stranger to detect that lora usage from a lora gateway?

granite spear
#

Maybe. I think that a typical gateway will have some defined parameters that it will listen on, with regard to channel frequency, modulation mode, etc. So it might not be able to pick up every possible LoRa variant that someone might be using. That could depend on the gateway, though... some of them might be fancy enough to scan the whole waveband simultaneously.

ebon needle
#

Can i connect lora gateway to any cloud. For example arduino iot cloud or aws?

#

I want to show the detected signals on a website or a mobile application.

granite spear
#

I'm not sure. Often the gateway would just transmit the received data itself, if it was LoRaWAN. It might or might not do anything with signals that it doesn't know what to do with.

ebon needle
#

Can we decrypt that data?

granite spear
#

Depends on the device sending it. There's nothing keeping a transmitter from sending encrypted data with whatever uncrackable algorithm they want to use.

ebon needle
#

Ohh

grizzled vapor
wary arrow
grizzled vapor
#

but inductive sensors are readily available, so I would use those

wary arrow
granite spear
#

I think they can, depending on the coil diameter. However, note that you'll probably need to calibrate the heck out of them if you need actual micron-scale accuracy. They'd likely be sensitive to that level of motion, but there's no actual distance ruler involved (like there would be with using the speed of sound or light as a reference), so you'd have to translate the measurement into a distance yourself.

grizzled vapor
#

although there are sliding distance sensors that can be pretty accurate and cheap

#

maybe look into the type used in digital calipers

#

they have a resolution in the 10s of micrometers

smoky yarrow
#

Hey I have a couple questions about how actual radio people would pronounce some frequencies if spoken

Could someone tell me how to pronounce “15234002hz” in a clearly understood way? Like would I say “one five two mhz three four zero kilohertz and two hertz” or would I say “one five two point three four zero point two mhz?hz?“? (I’m not even sure how it’s said when you say point)

Is there some guiding standard like the phonetic alphabet on how to most appropriately convey a frequency over voice?

like it’s not a GREAT idea to say the letter O when you mean to say ‘zero’

sorry if this is pedantic, but I’m writing some software and need to know how to feed it to the text to speech engine

granite spear
#

You would almost certainly only say the unit (MHz, kHz, etc.) once at the end rather than giving a combination of them. Personally I would pronounce the given example as "fifteen point two three four oh oh two megahertz". But I do not know if there is a better, more official standard among people like ham operators.

grizzled vapor
#

Also, that extra 2 Hz probably does not matter unless you need to be exact. So just round up and say something like 15.234MHz

#

and I would also say "fifteen point two three four megahertz"

primal warren
#

If you want to be fancy, you could have "decimal" instead of "point". If you want to be ridiculous, you could say "radix".

long quarry
#

Heya folks. Bouncing around projects and thought I would use some Waveshare SX126X pico boards I have to finally play with radio. The Waveshare examples aren't for CircuitPython and I have run into a few issues. Does anyone have experience with these radios?

#

Trying to get working on CircuitPython so I can experiment...then I will buy some of the FeatherLora boards because they look awesome.

grizzled vapor
#

I think they use the same sx126x ic as the rfm modules that have circuitpython support

#

Maybe

#

If the ics are the same, there's a good chance they're compatibke

restive fjord
#

@edgy folio i'm reading through your code and looks roughly like what i'm doing. but theres a few differences between what i'm doing and the code you have

#

i have a continuously playing animation on the neopixels, they just change to a different animation when certain packets are recieved

#

the delay between each frame of the neopixel animation is 0.2 seconds which i listen for packets & process the packet if one is recieved

#

i suspect i'm dropping packets when i'm sending the neopixel data over the data pin

#

if you have any suggestions on a better way do this

#

-- for anyone else with suggestions, I'm using circuit python.

edgy folio
#

@restive fjord yes circuit python would be a better place since that's the language and libraries. radio could also include RC, HAM, etc.. 😉

#

or LORAWAN yes but the help channels are generally centered around the underlying programming languages used.

restive fjord
#

lemme go move it

regal stone
#

Ahoi! I'm pretty new to this BLE stuff and playing with a Bluefruit Feather 32u4 and a Raspberry PI4 on the other side. I wanted to write a python app to connect to the feather and send bytes (UART) but I'm stuck in chaos. So I went back to the terminal and played with the bluez tools to see what is what. Now I've managed to connect to the feather via gatttool (took me a while to use the -t random switch). But, well, now I'm stuck understanding how to send bytes to the feather. I know that I would do something with characteristics but I'm alread stuck in identifying which characteristic does what. I get a list of 12+ characteristics, with just UUIDs and no discernable hint on which does what.

Long story short, I'm stuck, basically have just the slightest idea what I'm doing and am looking for help. Am I even in the right place here?

#

PS: using the mobile BLuefruit app connecting and sending/receiving stuff in UART works like a charm.

#

I'm using the "standard" UART sketch from Adafruit on the Feather, actually called bleuart_datamode

regal stone
#

😅

regal stone
#

Ok, I can see that my connection attempts (currently with bleak) fail with authentication errors. Resulting error is "disconnected early". But, this nordic/feather doesn't use authentication o_O what is going on here?

#

Output from btmon:

        Handle: 64
        Random number: 0xabcddb36eb794a5b
        Encrypted diversifier: 0x41fa
        Long term key: 828ade9031e4c803d21215bca9f0b827
> HCI Event: Command Status (0x0f) plen 4                                                                                                                                                                                                                                                         #35 [hci0] 504.919704
      LE Start Encryption (0x08|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Encryption Change (0x08) plen 4                                                                                                                                                                                                                                                      #36 [hci0] 505.069090
        Status: PIN or Key Missing (0x06)
        Handle: 64
        Encryption: Disabled (0x00)
< HCI Command: Disconnect (0x01|0x0006) plen 3                                                                                                                                                                                                                                                    #37 [hci0] 505.069157
        Handle: 64
        Reason: Authentication Failure (0x05)
#

this happens with the adafruit BLE python library

regal stone
young cove
regal stone
regal stone
grizzled vapor
#

How do I design a wideband RF power amplifier?

#

Actually nevermind. I can't transmit voice on some of the lower bands with only a technician license

#

So 🤷‍♂️

#

Actually I might want to do something with 50MHz so

#

Is a homemade 20W transmitter practical to make?

primal warren
#

Making the basic transmitter isn't too tough (couple of vacuum tubes), but the modern regulations require it to be a well filtered waveform, without splatter and harmonics, and sometimes the output filter ends up being the hard part.

grizzled vapor
#

I don't have any tubes. (And I don't want to mess with the HV power supply required). For a narrow frequency, a Class C amp would make sense, but if I want a digitally tunable amp or a wideband amp, I have no idea how to do that.

#

Maybe class A or class AB, but I've never seen that

primal warren
#

They've both been done, in solid state

pallid fern
#

Some BLE questions. I am trying to setup a service to advertise by altering the ble_json_peripheral.py and ble_json_service.py examples. But I am running into an error.

  File "<stdin>", line 30, in <module>
  File "ble_json_service.py", line 17, in __init__
  File "adafruit_ble/services/__init__.py", line 49, in __init__
NotImplementedError: 
>```
Here is the ble_service.py
```from adafruit_ble.uuid import VendorUUID
from adafruit_ble.services import Service
from adafruit_ble.characteristics import Characteristic
from adafruit_ble.characteristics.int import Uint32Characteristic

class SensorService(Service):
    # pylint: disable=too-few-public-methods

    uuid = VendorUUID("f1f8a0ea-f7f7-11ed-b67e-0242ac120002")

    sensors = Uint32Characteristic(
        uuid=VendorUUID("f1f8a388-f7f7-11ed-b67e-0242ac120002"),
        properties=Characteristic.NOTIFY,
    )

    def __init__(self, service=None):
        super().__init__(service=service)
        self.connectable = True```
#

Anyone have an example of how these work together?

acoustic field
#

I'm having issues with the Adafruit RP2040 with RFM95 wireless. I can get some simple RX TX code working just fine, but anything more than that has been a struggle. The first thing i did, was add a voltage divider to the VBAT and GND and that seems to be working. As soon as I add the I2C cards (even before writing code with them) the program would hang on rf95.waitPacketSent() If i unplug the i2c from the QWIC connector, it goes back to functioning again as expected. For context i have 2 i2c breakouts plugged in. BM085 TempPressure and BNO085 9DOF. I can't get these programmed because once they are plugged in, Arduino seems to have challenges talking to the board.

So with i2c it freezes 100% of the time, without it, it will freeze after a few packet sends. rf95.waitPacketSent()

granite spear
regal stone
young cove
normal drift
#

The Circuitpython tinylora library is deprecated and does not work anymore. I am not aware of any LoraWAN libraries for the PI. There are a few C libraries for the RP2040….

green oracle
#

Do those things not just use UART?

normal drift
#

No - SPI

green oracle
#

Unless it's something super nonstandard I don't see any reason you can't just use the SPI interface on the Pi.

normal drift
#

Sure, if you want to write the code. I was just asking a library already existed.

#

The rfm9x works fine with a Pi. Just looking for LoRaWAN support.

normal drift
#

I am really puzzled that I cannot find any examples of using a Raspberry Pi with an rfm9x board to create a LoRaWAN node. I wonder if I am just looking at it incorrectly or is no one actually doing this. There are some old libraries based on LMIC that may have worked with TTN V2 and earlier, but they have not been updated in several years. for example https://github.com/pmanzoni/raspi-lmic. The MCCI_LMIC library works great for the Arduino IDE and I suppose the "raspi-lmic" library was an adaptation of the earlier version of this. I'm just surprised there does not seem to be anything more recent that would work with the current TTN V3.

umbral oxide
#

I spent some time with it last year, but hit a lot of roadblocks and never got it to work (but that's probably more on me than anything)

normal drift
normal drift
#

Making progress. I can get a "Join Request" to be seen by my gateway and forwarded to TTN.... Things get a bit confused (or actually I get a bit confused) after that, but this is a big step forward! Thanks for the link.

wary arrow
#

Are there any words or phrases for talking about the shape of an RF “shadow”?

granite spear
edgy folio
#

Could you run blinka with the circuit python rfm95 library? I think those have lorawan support.

normal drift
short nimbus
#

what can I do from the ARRL handbook without a ham license ? make something that receive anything and uses the open-sources frequencies like 80-255Hz/12-14mhz/900mhz/2400 Mhz(such as lora/5g/bluetooth etc)/490-900 ThZ ???

granite spear
#

Yeah, the hundreds of THz band is fun to play in, no license needed.

short nimbus
#

I admit that 80-255Hz and 490-900Thz was a bit of a joke

#

cuz you cant really help transmitting on these frequencies and Im not really sure if boucing off lights rays count as transmitting

primal warren
#

You can build receivers for most anything you want, with a few narrow exemptions for things like the AMPS bands (which are no longer used anyway)

short nimbus
#

isnt local am/fm override allowed for a place of business since there is no way you can interfere with very powerful commercial radio stations transmitters ? isn't that how they do intercoms in stores like walmart ?

primal warren
#

No, you are not allowed to override/jam existing signals.

#

Intercoms often use one of the business bands.

green oracle
#

Or are wired, or potentially just run over the network.

short nimbus
#

My biggest concern I guess is to be stuck on a single frequency like with these crystals

#

because licensed users have priority over unlicensed on license-exempt bands so if a source near me uses says 2400.8 I cant use it and have to switch but being stuck on one frequency kill the whole project

#

The modern solution for this is like SDR right ?

primal warren
#

Or DDS or analog tuning or hybrid or or or or

#

There are lots of ways to address frequency setting.

#

Also, crystals are cheap, in the old days, it was common to have a few of them so you could choose a frequency that was currently unused.

green oracle
#

SDR changes nothing about the licensing of different bands. It's more of a difference of approach in tuners, which today tend to prefer broadband.

grizzled vapor
#

Clock generators and PLLs can solve the crystal problem. I see the problem as having matching networks and filters that only work on certain frequencies or bands

#

I want to build an SDR (yes very ambitious project) or a digitally controlled HF ham transmitter, but I don't know how to get enough power to an antenna if I'm using some sort of digitally tunable network (which I think will use varactors)

short nimbus
#

I asked mostly so I can know what to look up in the huge arrl book 🙂

short nimbus
#

Are nordic nrf consdeiered a kind of SDR since you can choose a channel and hence change the frequency or they are too integrated / not configurable enough to be considered SDR-like ?

granite spear
short nimbus
#

If I seem to talk about two different things it's normal. Just trying to understand radio while complying with canadian laws

primal warren
#

There are frequency limitations as well

short nimbus
#

bah I guess Ill do the ham license then. Will prove that I know electronics a bit too ....

high yew
#

hi all....i don't see it in the specs/description: does this work with Pi Zero W?

primal warren
#

I don't see why not. It's basically an SPI and I2C peripheral with a few other GPIOs.

high yew
#

ack, thanks!

short nimbus
#

What ARRL chapters should I read if my building is surrounded by concrete high-rise around and Im trying to figure out what bands might work / what size antenna I might need for ham ?

primal warren
#

The "Propagation" chapter (19 in recent editions) might be a good one.

#

The "Antennas" chapter (21?) is another good bet.

short nimbus
#

thanks Ill take a look. Trying to find out if Ill actually be able to have an ham where I am to see if its worth it to invest my time in a ham license. Also morse aint so bad to learn after all

acoustic field
# granite spear Can you explain the voltage-divider part of your design? That could be fine or i...

long time no reply, (my apologies) Per Adafruit's documentation https://learn.adafruit.com/feather-rp2040-rfm95/power-management#measuring-battery-3122383
Note that unlike other Feathers, we do not have an ADC connected to a battery monitor. Reason being there's only 4 ADCs and we didn't want to use one precious ADC for a battery monitor. You can create a resistor divider from BAT to GND with two 10K resistors and connect the middle to one of the ADC pins on a breadboard.
This is what i did.
Everything works fine in CircuitPython, but arduino seems to lockup.

The issue i'm having now, is the amount of data i need to transmit is causing a slight delay between packets. So, i'm trying to figure out the best way to compress the data.

UPDATE: I decided to give it another go. and i recieved an error on RH_LoRaFileOp which their documentation explains there is an issue, but the version they want to install is 6 years old. So time for a new solution. 😦 I don't think i can use the LoRa boards from Adafruit for this project, they don't seem tobe working with this library, and circuit python isn't fast enough for my application

solemn aurora
#

Hi, I have a bit of a technical question regarding Ebyte's E32 LoRa modules.

Ebyte's documentation seems to make no mention of a maximum packet size, however it seems like the module is segmenting the transmitted data automatically into chunks of 59/51 bytes like the LoRaWAN Regional Parameters document recommends for the EU443 band at a 1.2kbps data rate.

Is this a limitation that applies to the "LoRa modulation" as a whole due to RF regulations, or does it just apply to LoRaWAN for the same reasons ?

I'm mostly trying to figure out if I can avoid having to add these packet size tables to a driver I'm working on.

young cove
short nimbus
#

Im checking if an antenna will likely work here and if there are still ham in my city before I invest my time in it

acoustic field
#

is there any way to speed up the sending of data in circuitpython for the RFM95 module? seems to be related to the number of bytes being sent, i'm sending around 192 characters, and there is a slight delay between sends. If i send a single number it's fast, but if i send a string of data there is a delay. Not sure how to improve performance.

Note: I'm not able to get arduino (radiohead) library to work on this board. RP2040 RFM95. CircuitPython works fine but the send is a bit slow

#

And has XBEE stopped making 900mhz modules?

solemn aurora
# primal warren That may be a LoRaWAN limitation <https://lora-developers.semtech.com/documentat...

Thank you for the link.
It seems like both the PHY and LoRaWAN have slightly different limits.

I stumbled on the following link that mentions different values related explicitly to LoRa.
https://lora-developers.semtech.com/documentation/tech-papers-and-guides/lora-and-lorawan#:~:text=Table 2%3A LoRa modulation characteristics

And when going over the "LoRaWAN® Regional Parameters RP002-1.0.4" document, I found this small blurp I missed that specifically point to a PHY limitation.

primal warren
primal warren
short nimbus
# acoustic field And has XBEE stopped making 900mhz modules?

Found a few kits that still can be ordered on digikey with several 900mhz modules/modems in them. lead time of 2 weeks. It just seems that generally 4/5 fo their products are marked obsolete/no longer made but depending on which ones they have replacements

solemn aurora
normal drift
normal drift
#

For the Radiohead library, I was able to get it to work with the following pins#define RFM95_CS 16 #define RFM95_RST 17 #define RFM95_INT 21 and I had to do a toggle of the RESET pin beforinitializting the radio

  digitalWrite(RFM95_RST, LOW);
  delay(100);
  digitalWrite(RFM95_RST, HIGH);
acoustic field
# normal drift How long of a delay are you seeing? Can you post the code you are using to send ...

.25 sec per message
The code is pretty basic

# Initialise RFM95 radio
rfm95 = adafruit_rfm9x.RFM9x(board.SPI(), CS, RESET, RADIO_FREQ_MHZ)
while True:
    data = "%s,%s,%s" % (
        dof(bno), # Dof Data
        altimeter_altitude(bmp), #Altimeter Data
        battery_voltage(adc)
    )

    print(packet)
    rfm95.send(bytes(data, "UTF-8"))

The data string is
-0.005005,-0.011963,-0.987122,0.159302,1.262690,-0.784932,-161.755127,0.128906,0.218750,9.746094,0.000000,0.000000,0.000000,-9.562500,-30.937500,-11.187500,26.45, 973.7,333.921,4.12

normal drift
#

You have a print(packet) line in there -- how long does that take to print?

acoustic field
acoustic field
# normal drift You have a print(packet) line in there -- how long does that take to print?

without the send it takes no time at all. it streams data like i'd like to see on the send. i've removed it, but the receiver is still getting the same speed. If i replace the send data with a single integer it's pretty speedy.

So i feel i wouldn't see much more improvement in arduino then? I might need to go back to looking to compress the string to send the data.

#

I am not sure. I watched a video of a guy streaming telemtry from the XBEE and was getting a pretty speedy send rate. Is this something to do with the radio, microcontroller or the library itself?

normal drift
#

I'm not sure -- I have not done any testing of the actual data rates.

acoustic field
#

This is the arduino code loop. ```void loop() {
delay(1000); // Wait 1 second between transmits, could also 'sleep' here!
Serial.println("Transmitting..."); // Send a message to rf95_server

packetnum++;

char radiopacket[20] = "Hello World # ";
itoa(packetnum++, radiopacket+13, 10);
Serial.print("Sending "); Serial.println(radiopacket);
radiopacket[19] = 0;

Serial.println("Sending...");
delay(10);
rf95.send((uint8_t *)radiopacket, 20);

Serial.println("Waiting for packet to complete...");
delay(10);
rf95.waitPacketSent();
}``` Basically just the send portion from the example RX TX example. It hangs on rf95.waitPacketSent() and won't loop

normal drift
#

ignore the notes about "reliable daatagram" old cut/paset

acoustic field
#

so you're not even using the waitPacketSent

normal drift
#

not in this example -- I have a 5 second delay anyway

acoustic field
#

yeah, i don't want to wait. just want to see a steady stream of sensor data. I might take what you have and see if it works any different. Silly question, i haven't done arduino in a while, how to do you concat char[] data to the uint8_t type?

normal drift
#

sorry -- that was wrong. I'm not sure I understand.

acoustic field
#

it's ok, i greatly appreciate the feedback and help

normal drift
#

Good luck!

acoustic field
#

With the xbee module looked like he was able to simply write serial.println() and the module would send the data. curious how these lora radios are different from the xbees

#

@normal drift last silly question, the send isn't expecting an ACK, and its waiting for feedback is it?

normal drift
#

in CircuitPython send() does not wait for an ACK -- send_with_ack() does

#

in Arduino the sendtowait() expects and ack -- sendto() does not

acoustic field
#

but that is using the manager that you have setup? which im' not using

normal drift
#

I am using the datagram manager but not using the "reliable datagram"

#

sorry it is not a great simple example... as I noted., it was just what was handy and I wanted to convince myself the rp2040 worked...

acoustic field
#

ok, i was able to get it working (not sure what i did. Serial doesn't write out, but the packets are being sent... fun fact, still has the same delay i saw in circuitpython.

#

That's just sending a string the same size

young cove
normal drift
acoustic field
#

Thank you

#

Ill give it a try

normal drift
#

oops -- I had commented out the waitPacketSent -- it also works with it

#

@acoustic field this bit rate calculator may help . it looks like the bit rate for the default setting is only 5468 bps so your 192 byte packet (1536 bits) will take .25 seconds to send.https://www.rfwireless-world.com/calculators/LoRa-Data-Rate-Calculator.html

primal warren
#

Good point: LoRa lets you trade off range, speed, and noise immunity in various ways.

#

It's optimized for range (LoRa means "long range") more than speed in most cases.

normal drift
#

You can "try" adjusting the settings, but if I recall corecctly, that has not gone well in the past 😉

primal warren
#

Normally when I'm looking for speed, I use something other than LoRa

acoustic field
primal warren
#

Xbee is more of a mesh network design, and you probably just need point to point.

#

I'd probably go with 432MHz to get additional range, maybe a simple RFM69 type module. A "belt and suspenders" approach might be appropriate, both send out your data via radio and write it into an SD card or similar. Then if you get some dropped data via the radio link, you can recover it later after your retrieve your rocket. And if the rocket gets lost or the SD card doesn't survive, you at least have the radio data.

forest pendant
#

can lora be as reliable as bt for short to medium distances? ive herd you can incorporate crc and many features to reduce packet loss but im more curious in real world tests. mainly looking for best wireless to try for greenhouse sensors and maybe so basic controls. in north America i believe we can only use 915mhz. i think bt would be faster in updating sensor and controls but maybe lora is good for this project too. also are there any lora modules that are cross compatible with other lora chips. seems thats loras limitation is the chips all have to be of the same type i think. wish there was at least a basic set of features that worked across all lora chips for interoperability

granite spear
#

The base LoRa protocol is "fire and forget", rather than being a connection-oriented scheme like Bluetooth, so there's no built-in acks or retransmission of lost data. That could be layered on top if you need it, though.

#

Most LoRa modules will be using the same family of Semtech transceivers, so they should be pretty compatible if they are in the same country-specific frequency band.

forest pendant
primal warren
#

They have a fair amount of latitude, the same modules are used for 868MHz and 915MHz, you use software to configure the particular frequency to use.

short nimbus
#

and by software afaik it's preprogrammed channels so someone else loras might interfere with yours

primal warren
#

I haven't had a problem with that, but I live in the middle of nowhere

short nimbus
#

Id like to know what to make of this, if it's any good, if it's actually a kind of schematic, if you can tell the voltage of the battery from this etc

primal warren
#

That looks like a lot of processing for a little 8-bit CPU

short nimbus
#

there an adafruit breakout in it too. Not sure what to make of it. Just a random transciver on amazing seemingly made in a very hobbyist way with an extruded aluminum casing

#

I thought it was interesting to share it here because it seems to uses an arduino / the atmel of an arduino and at least one adafruit component(The SI5351)

primal warren
#

Sounds like something with a lot of work in it. It's possible to do all that processing with some effort and clever coding.

short nimbus
#

the specs says it has 2000 lines of code whatever that mean (LOCs not really a good indicator or anything) so it seem like light software use

short nimbus
#

seems to be a clone of a clone of a qrp labs qcx modified 5W transceiver with the github ssb modding version

copper mason
slender current
copper mason
#

Didn’t work

#

I also tried to increase the buffer

slender current
#

what platform are you using it on? nrf?

short nimbus
#

recommendation for a transceiver kit you can easily deconnect the transmit trace/lock it at hardware level and add sensors to (temperature/rain/etc) (like the qrp qcx) except not on HF bands ? (qcx is Available for 160, 80, 60, 40, 30, 20 or 17m bands and only for CW while I can only catch centimeters bands atm) ? In Canada you can listen to ham bands until you get your license. The goal is to start checking for antennas to see what I can receive so that when I get my license everything is ready to run ?

young cove
short nimbus
#

Basically I cant transmit at the moment. I was advised with the canadian basic license I can use a kit if I want and to get a transceiver anyway until then but not transmit/change the trace on the board (like by using a jumper). That will let me test antennas in receive mode only. For voice ham like 70cm and below since my apartment cant do RF. When I can actually transmit I'll have a radio already and just need to reconnect the trace/jumper and I know the antenna works so it can happens as soon as my card is in the mailbox

young cove
short nimbus
#

I just feel like it is better to avoid accidents. Like you are cleaning the desk and the mic falls off and hit the ground transmit button first etc

#

also I have 100 peoples in my building so if someone transmit illegally I can show them it cant be me because it's disabled

young cove
#

most of the activity on the VHF/UHF bands is going to be FM voice. other modes are going to be rare

copper mason
short nimbus
#

I had the canadian FCC shows up at my house when I was 11yo (but it was the neighbor) and the first thing they asked was to see our radios and 2) if they could transmit 3) where the antennas were

#

So I feel like Id be safe from having a life-ruining 20k$ fine if I can prove it cant transmit and not get to question 3

#

along with circonstantial evidence (Im studying for it, it's free, why would I take a chance to disrecpect the law when Ill be able to legally in a few months etc)

slender current
#

(bleak is used by blinka bleio)

short nimbus
#

I just really want to have an antenna that works and is tuned by then. But I guess an sdr usb key seems the best choice so far. Since qrp are all HF kits

#

But ideally it would have been easier to pass the exam I guess if I actually had to assemble a kit

copper mason
#

But I guess I will try on a pie 4

young cove
short nimbus
#

I cant do HF

#

Unless I buy an house etc and that seems very expensive just for an hobby

#

I cant even get digital tv belows 180 MhZ

young cove
#

you can do HF out of the apt. You can do low-power HF in the apt, but it might be frustrating. People do HF from their balcony

#

but it really depends on what you are interested in

short nimbus
#

I was just thinking that like on the qrp kits if I have to install an adafruit SI5351 myself, connect it to the op-amp and the antenna solder the caps/resistors etc I would learn much more

#

vs getting a pre-assembled unit or say a baofeng/yaesu portable radio

young cove
#

so you can make a qrp kit, and operate it from the park or a parking lot, etc. picnic table

short nimbus
#

yeah but they are CW and HF both thinks I'll probably never do

#

the qrp only does CW in HF bands

young cove
#

you can get qrp radios that do digital, e.g. FT8 mode

short nimbus
#

Im In canada btw, 6 months balcony blockage because of snow hurricanes 😄

#

most of us apartment-dwlelers ham have to get portable unit / vehicle stuff with mag antennas

#

and even then it's limited by temperature / weather

#

sorry if it's confusing I just started studying that field

#

I just dont want to spend like 2000$ and end up realizing that's it's impossible for my apartment to get anything in from any band

young cove
#

i think the q is what you want to do... also, you might get interested in other things later. listening on HF/VHF/UHF now with a cheap SDR, appropriate software, and an improv antenna will get you started about what is on the bands. For just listening you can get away with a whip antenna or random piece of wire.

#

there are articles and books about apartment operating

#

e.g. get an RTL stick SDR now

short nimbus
#

not much in the ARRL handbook about this though. apartment appears twice in the whole thing that is why Im confused about it / asking these questions 🙂

young cove
#

websearching "ham apartment operating" will get you more. For HF, you can use mobile antennas mounted on the balcony or a "magnetic loop" (small loop), but you are not interested in HF, sounds like.

#

antennas are not magic. A simple J-pole or similar will be fine to start with.

#

ARRL Antenna book has more material than Handbook for antennas in particular. Again, maybe check the library first before purchasing

short nimbus
#

seems like the low profile one is in the digital subscription of my public state library

#

but only 2007 prehistoric editions

young cove
#

2nd edition is supposed to be highly revised

short nimbus
#

Im a bit confused about rtl-sdr

#

it is supposed to be an open system like arduino ? Cause I see lot of unrelated "brands" selling it

#

And I dont see an rtl-sdr brand

green oracle
#

rtl-sdr is the software driver for the RTL2832 family of chips.

young cove
#

don't need to buy from us -- lots of places to get these

copper mason
static flare
#

Does anyone know of a clear, complete list of the US915 LoRa single channel point to point (not LoRaWAN) transmit restrictions?

short nimbus
#

So I did get an rlt blog rtl-sdl kit. Will arrive around monday. Already tried the web version of SDRs that peoples host so getting used to the interface etc

young cove
short nimbus
#

yep

#

mostly want to lisiten to ATC (legal in Canada) and checks for lifesigns on centimeter bands

#

also rx-only so no way I have a tx accident

#

only bad thing is that Ill need 25ft of coax

green oracle
primal warren
#

Things like subcarrier audio (SCA) are related, it's not encrypted, but you're not supposed to listen to it without paying for it.

green oracle
#

Yeah good luck enforcing that.

short nimbus
#

Im only able to transmit on 20 to 120Hz so far and 400 Thz to 750 Thz(by accidental reflection not direct transmit) so not going to have problems I think

#

so no worries

#

the rtl-sdr cannot transmit either (but Im aware everything transmit when listening at very short distance because of interference/rf leaking)

primal warren
#

20Hz? The 180 megameter band?

short nimbus
#

human voice 😄

short nimbus
#

they investigated my rtl-sdr 6 times at the canadian customs 🤣

#

Maybe it will be delivered by the RCPM / Industry Canada 🤣

young cove
high yew
#

Hi all. Does adafruit have any boards that have both wifi and rfm69 (or lora)? I’m trying to build/find a simple radio to mqtt gateway device.

young cove
#

I'm not sure how well the radios will work together, being so close

#

you may not want to stack them, but separate them a bit.

high yew
#

And just communicate between them over serial?

granite spear
young cove
#

you talk to the FeatherWings over SPI

deep lance
#

If anyone can track down the part number for the ceramic antenna used on the Raytac nRF52840 modules (like https://www.adafruit.com/product/4078) Adafruit uses in their BLE feathers I'd be forever indebted to you. Please @ me if anyone finds it!

#

I have an nRF52840 Express that I've just discovered suffers from the "magic finger" bug. It has extremely poor BLE signal which suddenly gets 100x better whenever I touch the antenna with my finger.

Not sure how to test it with a scope / meter, or if I can, but I'm guessing the ceramic antenna on mine has cracked. Looks like a fairly simple part to replace, and I'm guessing it'd be cheaper than throwing out the whole feather board.

deep lance
young cove
deep lance
#

Thanks
I almost wonder if Raytac makes them in-house, or if they have another manufacturer making it proprietary for them; they certainly move enough volume too justify it.

The one I found earlier looks like a footprint match and it's gain numbers are similar to the ones listed in Raytac's datasheet for the module; can't hurt to give it a go. Worst case I'll just DIY a 2.4G wire antenna and solder it on.

short nimbus
#

nrf52840 you said ?

#

thats the module in it ?

#

or the model for the whole thing ?

deep lance
#

Afaik all of Ada's nrf52840 boards use the same Raytac module, pre-flashed with the bootloader ofc.

#

The individual ones I linked above don't come with bootloader flashed though

short nimbus
#

you dont have the raytac model number for the module right ?

#

if you did it's very likely the FCC fillings would say which antenna they use

young cove
#

and didn't find the antenna. I don't have time right now to look up the FCC filing, but maybe you know where to look

short nimbus
#

not 100% sure

#

seems there are like 4 submoidels even in the same model of raytac

#

and it mostly show flexible antennas and the very small one is just labeled Bluetooth ANT

#

while the flexible ones are molex 146153-0150 and -0300

#

I mean I dont see why they would make the antenna separate one in a small blue module. Its probably just a random piece of metal made by raytac

short nimbus
brisk night
#

Question: The RFM69 boards are advertised as using 915MHz, but I can't find any information on frequency beyond that. According to the chip datasheet, it can do 902MHz to 928MHz. Is there a way to select the frequency in CircuitPython (or Arduino), or are the chips hardcoded to just one frequency on the Adafruit boards? (I also have the same question for the 433MHz versions.)

granite spear
brisk night
#

Right, that's what I assumed, but I'm not seeing anything on Adafruit Learn or the documentation on frequency selection. Maybe I'm looking in the wrong place? I prefer to use Circuit Python, and I don't have time to add features to the driver myself right now. Does Circuit Python provide any way to access the chip registers? I assumed it doesn't, but...

granite spear
#

Hmmm, I'm definitely a little bit confused. It looks like the CPy driver has code to set the frequency registers, but the annotations want you to pass in only "433" or "915" exactly, even though it's calculating the more generic clock config registers from that value. I also don't immediately see anything like a channel selector.

#

It loooooks like you should be able to directly set the .frequency_mhz field to a floating-point value of your choice after initialization and it would do the right thing, though.

#

However, take that with a little bit of a grain of salt, as I might be missing something with a quick glance.

brisk night
#

Ok, that's very helpful! Maybe I'll get one and test it out a bit. I've got a handheld and an RTL-SDR I can use to listen to see if changing the frequency works correctly.

#

I really would like to hook one of those up to an amp to get longer range (don't worry, I'm licensed, so it's legal, as long as I follow certain protocols), but if it only works on a single frequency that's a non-starter, because interference between devices becomes a major problem. (I really want to see if I can push the local HAM club into more modern technology, and if 20 or 30 people are all trying this on the same frequency, it won't work.)

primal warren
brisk night
#

Yeah, they do support 868MHz. I'm in the U.S., where that's not an unlicensed or HAM band, so I'm mainly interested in the 915MHz and 433MHz.

In fact, looking at the data sheet, it appears that the chip supports all of those bands, suggesting that the 915MHz version is merely coded to use that band and not limited to it by the hardware. I might be wrong, but if I understand the data sheet right, the 915MHz version should also work for 433MHz, if you just set the frequency to that.

#

(If anyone here knows better, feel free to correct me...)

primal warren
#

While the chip itself supports it, the matching networks on the board are pickier, you have one design for the 433MHz band, and a different design for the 868-915MHz band.

brisk night
#

Oh, that makes perfect sense. Thanks for the explanation!

untold glacier
#

Hello! I'm using an RP2040 feather w/ LoRA FRM9x @ 915MHz and CircuitPython. I'm trying to see if I can squeeze a bit more range out, so I wanted to bump up the tx_power from the default of 13 to the max of 23 (listed here: https://learn.adafruit.com/adafruit-rfm69hcw-and-rfm96-rfm95-rfm98-lora-packet-padio-breakouts/circuitpython-for-rfm9x-lora). However, when I set the tx_power to anything higher than 19, the feather starts to reboot sometimes when when I run send_with_ack(), sometimes coming back up and continuing and sometimes switching into safe mode with a hardware error. Any ideas?

primal warren
#

Could be a power supply problem: to transmit more energy, the radio needs to draw more current. If the power supply can't manage that load, the voltage could sag, causing a brownout/reset.

untold glacier
#

I've tried a usb-c cable connected to my Mac and/or a 3.7V 350mAH lipo connected to the charge port

primal warren
#

It could also be an interference issue: the energy radiated from the transmitter can be picked up by the other wiring and interfere with logic signals.

untold glacier
#

Would that be fixable by shielding the antenna from the board, or it would be from the transmitter inside the chip and so I can't do much about it?

#

I'm just using one of the little coil spring antennas soldered to the antenna pad on the board

#

Or is there a way if I can check with a multimeter if it might be power supply vs interference?

#

It's occasionally doing it even at the default value of 13, which seems like a problem.

#

It's happening more often when I have USB plugged in, vs when I'm running just off the battery, if that is useful information

primal warren
#

It's hard to tell, not only do USB ports vary, but the USB cord itself could be acting as an antenna. If your board is one with a U.FL connector, you could try moving the antenna away from the board to see if that helps. If not, maybe try putting some metal between the radio and CPU to act as shielding.

#

It would be hard to see brief voltage sags on a multimeter, unfortunately

normal drift
untold glacier
normal drift
untold glacier
#

And the 2200mAh is still 3.7V?

normal drift
untold glacier
#

Thanks! I'll have to try some other USB ports and check my code against the sample to make sure I'm not doing anything weird.

#

But knowing that's not expected behavior is helpful

normal drift
#

Good luck -- BTW -- I have had issues with the RFM9x_RP2040 when I connect it to the USB ports on my MAC. Sometimes it just hangs the MAC until I disconnect it. IT works fine on a Linux system...

#

I need to do more testing so I can open an issue for that behavior.

untold glacier
#

Yeah, I'm on an M2 Mac. Hasn't been hanging the machine but they disconnect and reset like crazy when I try and send packets. I can try running through a powered hub or something first to see if that helps too

#

I can try testing off a Windows box. My Linux machines are all Pis so the USB power output is a little limited

normal drift
#

hmm -- mine freezes the entire MAC but recovers when I unplug the board....

#

I am also using powered hiubs.

untold glacier
#

That sounds like a Finder issue where it's still trying to read from the CircuitPython drive and not timing out properly when it disconnects

#

But I don't know why it would be disconnecting

#

But also good info!

normal drift
#

Me either -- and it appears to only happen with the RP2040 board -- not any others. I just have not had time to work up a good example of the behavior. I'm not sure if it is related to the Radio or not.

untold glacier
#

If I keep getting stuck I might switch to arduino code from CircuitPython and see if that makes a difference. Also at that point I believe I can use interrupts to have each of my senders also being a repeater for any packets they receive, which will help with range as well

normal drift
#

Acutally, I am using a Pi400 for the "linux" box now.

untold glacier
#

Oh, interesting. I do have a Pi4 I could try with. I was thinking of the Pi1B that's sitting in my desk not currently in use

#

Gotta go to my day job, but sounds like I have plenty more testing I can with on tonight now. Thanks!

normal drift
#

Good luck!

untold glacier
#

Pulled the batteries, plugged one feather into a cell phone charger and the other into a known good USB-C to USB-C cable direct into USB-C on the Mac and so far no crashes @ tx_power=23

#

I'm now suspicious of the LiPos. Maybe the 350mAh are small enough that they are dropping voltage with the full current draw of the transmitter

primal warren
#

Yes, the lower capacity cells have greater internal impedance.

untold glacier
#

Thanks for all the help, I'm hoping swapping to better power has solved my issues. 🤞

normal drift
untold glacier
#

That sounds similar to what I was seeing actually but I may have been explaining it badly. The Pi disconnects and reconnects a whole bunch, and sometimes will reboot into safe mode, and I get no errors or useful output in the console when it happens, so it wasn't clear what the problem is.

#

I'm still optimistic that it's just a power issue, because in my short test after switching to dedicated USB power and disconnecting the battery, I didn't have any resets or disconnects. I'm going to try cell phone USB packs tonight for a range test and see if the Pis are more stable on those than the LiPos

normal drift
#

I am having trouble getting a clean way to demo this. I agree that it may all be power related. I'll keep poking at it as well. Thanks!

#

ah - finally reproduced the "Safe mode" entry on the Pi .. progress

normal drift
#

hmmm -- on my Mac, I had been using the "mag-tip" cables. Switching to a "normal" USB-A to USB-C cable between my powered hub and the RFM9X RP2040 seems to be working much better.

#

but the same "fix" does not work on the Pi...It still disconnects when I transmit at 23.

#

OK -- back to the drawing board. The MAC just "froze" even with the new cable. This still may all just be "power delivery" but there is something different about these RP2040 RFM boards...

short nimbus
#

Not sure where to asks this but can I plug my rtl-sdr on a powered usb hub despite all the heat it generates ? Is a usb hub internally not much heat resistant vs when the rtl-sdr is next to another usb plug on a computer? Or there are no reason to worry here?

untold glacier
primal warren
spice sluice
#

Hey guys I want to transmit 3 variables via radio using circuit python and a rfm69 radio

#

Can someone give me or mock up some code for me in not the most experienced and have like a day and a half to do this

umbral oxide
#

@spice sluice the protocol sends bytes, so depending what type your variables are, you may need to convert or encode them as bytes

spice sluice
#

Ok thanks I’ll look at the links you have sent.

normal drift
# untold glacier I feel better about you being able to repro it at least, not just me doing somet...

Just some more information... I hooked up a PPK2 power profiler to see what the current draw was for tx_power = 23 -- it is ~150mA (~100mA at tx_power=13 - default) - Nothing surprising there. I also hooked up a scope to see if I could see any impact on the bus voltage -- I did not. However, transmitting at tx_power = 23 does impact the Mac severely. Now it is disconnecting the CIRCUITPY drive ( and resetting the board) with every transmission. If I power it from a USB "wall supply (2A), then it works fine.I am really puzzled by this. Next I will move back to some other RFM9x boards to see if this is only the case for the RP2040RFM board as I suspect it is....

normal drift
#

The issue does not occur when running the same code on a feather m0 rfm9x

#

RFM9x RP2040 USB interference at high power

brisk night
#

@untold glacier @normal drift The general rule of thumb I've heard on LiPos (and lithium ion in general) is that the batteries don't handle drawing more power than their rating number very well. So if the battery is rated for 350mAh, you'll probably get an unacceptable voltage drop if you are drawing more than 350mA. The Macs are probably providing 500mA, so if it's not working well on the Mac, it's probably not going to work well with a 350mAh battery either. (Again, this is just the rule of thumb that I've heard. It's probably not super precise, and maybe more recent LiPo technology can handle higher draw better. The symptoms do sound like the problem is a big voltage drop though.)

untold glacier
#

Any idea why it would only happen on the RP2040 feather and not the M0?

brisk night
#

The RP2040 probably draws more power than the M0.

#

On a side note: If you are only transmitting intermittently, putting a large capacitor across the power bus could solve the problem. This could work as long as the capacitor holds enough power to provide the extra current during transmits and has enough time to recharge fully between transmits.

spice sluice
#
import board
import busio
import digitalio
import adafruit_rfm69
import adafruit_bmp280
import struct

        LED.value = True
        # Print out the raw bytes of the packet:
        print("Received (raw bytes): {0}".format(packet))
        # And decode to ASCII text and print it too.  Note that you always
        # receive raw bytes and need to convert to a text format like ASCII
        # if you intend to do string processing on your data.  Make sure the
        # sending side is sending ASCII data before you try to decode!
        env_packed = float(packet, "ascii")
        print("Received (ASCII): {0}".format(packet_text))

Hey i am working on some code to recieve and save data to a .txt file if im honest i have got here and dont know where to0 go from this point.

umbral oxide
#

you'll probably first want to unpack the received raw bytes into the 3 float variables, then make a string (or CSV line, or something), print it for debug for now at least, and write (append) it to the .txt file

#

where is the text file - on the CircuitPython device flash or SD Card or other?

spice sluice
#

Is it possible to apped 3 files at teh same time

umbral oxide
#

should be much easier on a Pi to do the file writing. yes you can write to multiple files (sequentially, not quite simultaneously)

spice sluice
#

Ok. Well considering we are recieiving every 30 seconds we should have enough time.

#

f.write( 'dict = ' + repr(dict) + '\n' ) i understand i need to use thise line. But itr isnt expolained that well. Do i replace it to be this f.write( 'alt_unpacked'\n' )?

umbral oxide
#

I'm guessing you want human-readable text files, and I suspect alt_unpacked is a float, so you'll want to turn that into a string to write it to the file

spice sluice
#

yes. THis is what i ahve so far.

spice sluice
#

or f.write((str) 'alt_unpacked'\n' )

umbral oxide
#

you can test it on your laptop with regular Python, to get it exactly how you want it 😉

#

I think you want to open for append, not write?

#

also looks like you're only unpacking 2 variables, but I think there are 3?

#

(I prefer method 3, a lot of use is still method 2)

spice sluice
#

Ok, I dont understand where i convert it though.

umbral oxide
#

for example:```py

foo = 3.14
f"the value of foo = {foo}"
'the value of foo = 3.14'

or, in code.py:

print(f"the value of foo = {foo}")
the value of foo = 3.14

similar in a file write / append
#

(write the string form of the variable(s), along with any desired punctuation or other string info)

spice sluice
#

ok

#

foo meaning string?

#

print(f"temp_unpacked = {str}")

umbral oxide
#

foo is a variable name

#
f.write("some line of text\n")
# or
foo = 3.14
f.write(f"the value of foo = {foo}\n")
#

in an f-string, f"some string {some_variable}", the variable name goes inside of curly braces

spice sluice
#

some string being the alt_unpacked?

umbral oxide
#

the string form of the variable alt_unpacked

#

strings can be any text, variables need to be converted / formatted using an f-string (or one of the other methods from that link)

#

can you pull up a Python REPL on your laptop? makes it easy to quickly test things iteratively

spice sluice
#

im on my pc now. Im just looking at the code you sent

#
import board
import busio
import digitalio
import adafruit_rfm69
import adafruit_bmp280
import struct

rfm69.receive()

temp_unpacked, press_unpacked, alt_unpacked = struct.unpack('ff', env_packed)

print(str)temp_unpacked, press_unpacked, alt_unpacked)

f.write(f"temp_unpacked = {foo}\n")



f = open( 'alt.py', 'w' )
f.write( 'dict = ' + repr(dict) + '\n' )
#

Like this

#

Im very confused

primal warren
#

Maybe something like ```python
temp_unpacked, press_unpacked, alt_unpacked = struct.unpack('fff', env_packed)

print(f'temp_unpacked = {temp_unpacked}')
print(f'press_unpacked = {press_unpacked}')
print(f'alt_unpacked = {alt_unpacked}')

with open('alt.py', 'w') as f:
f.write(f'dict = {repr(temp_unpacked)}\n')

umbral oxide
#

'fff'

primal warren
#

Good catch, edited

spice sluice
#

So, theoretically is this working?

import board
import busio
import digitalio
import adafruit_rfm69
import adafruit_bmp280
import struct

rfm69.receive()

temp_unpacked, press_unpacked, alt_unpacked = struct.unpack('fff', env_packed)

print(f'temp_unpacked = {temp_unpacked}')
print(f'press_unpacked = {press_unpacked}')
print(f'alt_unpacked = {alt_unpacked}')

with open('alt.py', 'w') as f:
  f.write(f'dict = {repr(alt_unpacked)}\n')

with open('temp.py', 'w') as f:
  f.write(f'dict = {repr(temp_unpacked)}\n')

with open('press.py', 'w') as f:
  f.write(f'dict = {repr(press_unpacked)}\n')
primal warren
#

It's probably quicker to try it than ask me. I'm guessing you need to do all the rfm69 setup first

spice sluice
#

like is that recieving and saving the data

spice sluice
#

it will need to be in a while true statment as well

umbral oxide
#

well, env_packed isn't declared anywhere... presumably it comes from rfm69.receive()?

#

like env_packed = rfm69.receive()? (assuming that the function returns that variable with all of the packed bytes)

spice sluice
#
import board
import busio
import digitalio
import adafruit_rfm69
import adafruit_bmp280
import struct

# 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.
# Definepinsconnectedtothechipuse these ifwiringupthebreakoutaccordingtotheguide
CS = digitalio.DigitalInOut(board.D5)
RESET = digitalio.DigitalInOut(board.D6)
# Or uncomment and instead use these if using a Feather M0 RFM69 board
# and the appropriate CircuitPython build:
# CS = digitalio.DigitalInOut(board.RFM69_CS)
# RESET = digitalio.DigitalInOut(board.RFM69_RST)

# Define the onboard LED
LED = digitalio.DigitalInOut(board.D13)
LED.direction = digitalio.Direction.OUTPUT

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

# Initialze RFM radio
rfm69 = adafruit_rfm69.RFM69(spi, CS, RESET, RADIO_FREQ_MHZ)



env_packed = rfm69.receive()

temp_unpacked, press_unpacked, alt_unpacked = struct.unpack('fff', env_packed)

print(f'temp_unpacked = {temp_unpacked}')
print(f'press_unpacked = {press_unpacked}')
print(f'alt_unpacked = {alt_unpacked}')

with open('alt.py', 'w') as f:
  f.write(f'dict = {repr(alt_unpacked)}\n')

with open('temp.py', 'w') as f:
  f.write(f'dict = {repr(temp_unpacked)}\n')

with open('press.py', 'w') as f:
  f.write(f'dict = {repr(press_unpacked)}\n')
umbral oxide
#

I suspect you want to open the files for append, so you get new lines every 30 seconds?

#

with open('alt.py', 'a') as f:

spice sluice
#

Ok

#

changed that

#

so theoretically when i test tommorow that should work

#

?

umbral oxide
#

hard (for me) to say just by looking at code

#

"the proof is in the pudding", as they say

spice sluice
#

ye

#

is there a gps channel lol

umbral oxide
#

probably just help-with-circuitpython

spice sluice
#

i need to now set it up to communicate with sonda hub for our tracking

umbral oxide
#

the code above is on a Raspberry Pi? And it has an RFM69 bonnet or something? And it's set up with Blinka to use CircuitPython libraries?

spice sluice
#

I installed libraries once by sticking it all in the same file

#

i was going to do this that way?

#

ye it is on a pi

umbral oxide
#

not a Pico, this is a Raspberry Pi like a Zero W or Raspberry Pi 4 or something?

spice sluice
#

it can be on a pico

#

have we done something wrong

umbral oxide
#

Pico is completely different than a Raspberry Pi, and the implementation will be different... a Pico may not have all of the things you need in your ground station??

#

(just recalling something vague from yesterday)

spice sluice
#

i was going to use a pico for the balloon

umbral oxide
#

right

spice sluice
#

and like a pi 3 for the ground station

#

plugged into a pc for file writing?

umbral oxide
#

OK, actual Raspberry Pi... it can write to files on the SD card

#

BUT...

#

CircuitPython doesn't run natively on a Raspberry Pi (well, technically it does, but it's very alpha and doesn't support all the things, so ignore that)

spice sluice
#

so we wrote that in circuit python when it should of been 'normal' python

umbral oxide
#

well, normal Python may or may not have support for the hardware libraries you need to use (I'm not the best one to ask that)

spice sluice
#

ok. Well i can deal witht hat bit tommorow when i have the pi

#

got to hop off for a bit

untold glacier
#

Hello! Since I'm still having issues with the RP204-based LoRA boards resetting (even when connected to USB power now occasionally), I'm going to switch to M0-based LoRA feathers. Next thing I'm looking at is antennas. I am currently using the small spring antenna, but I probably have room on this project for an up-to 8" antenna if necessary. Not knowing too much about RF propagation, would a slightly larger antenna even help? I was thinking about trying something like this: https://www.adafruit.com/product/3340 but it seems to be discontinued. Is that because it has a very similar/same performance as the spring antenna?

#

I'm trying to get a bit more range through a bunch of steel and concrete indoors. Running at 915mhz, and my data is approximately 10 byte packets once every few seconds.

#

I'm also going to try playing with the bandwidth, spread, and coding settings, but my current testing with that is stalled by the feather resets, so I'll wait till the new ones come in to ask questions about that.

grizzled vapor
grizzled vapor
primal warren
untold glacier
#

Ordered some 1/2 wave whip and ufl to sma connectors as well. I have 26AWG solid core sitting around, I assume that should be good to test with if I cut it to the correct length?

primal warren
#

Yes, a simple wire antenna of the proper length works quite well

normal drift
untold glacier
#

No other sensors or displays aside from an RFID/NFC reader via UART. I can switch to arduino if needed, just started with CircuitPython because it was easy. I have antennas being shipped as well; if that solves the problem with the RP2040 board I can use those instead. Whichever ends up being more stable.

fallen parcel
#

(Haii everyone. So I know nothing about circuitry so please understanding of that please!)

Is there any way to increase the range of the Adafruit Stereo FM Transmitter? I would Like to be able to 60 feet compared to the stock 30ft desistance?

green oracle
#

Probably not legally.

fallen parcel
green oracle
#

You're legally limited to a certain transmission power and antenna gain.

fallen parcel
green oracle
#

Depends on where you live.

fallen parcel
fallen parcel
#

(Haii everyone. So please know that I nothing about circuitry so please be understanding and patient please!)

So I want to make a little radio station for a geocache and want to know what I am going to need? the radio will be inside a house (with permission) and will transmit the needed info out to the street front to complete the cache.

Ideally I would like to just plug this whole set up into a house wall outlet.

with my very very rough understanding I think I need a bread board to connect everything. But what are other thing I should or shouldn't pick up for this project?

(tools is not an issue my school has the tools necessary)

#

also could I use a regular old MP3 Player to play my audio to transmit?

short nimbus
#

you dont need the player unless you want to listen to it as it transmit

#

Also the receiver wont get an mp3 file but a FM modulated signal

#

so formats like mp3 dont matter here either. And you'll need an MCU plugged to the headphone jack of the breakout. Think of it as if the fm transmitter is the "player"

#

also the antenna has to be legal in your juridction for an unlicense FM transmission

fallen parcel
primal warren
fallen parcel
primal warren
#

It doesn't sound very demanding, I'm guessing it just has to tell the transmitter what to do, then it's basically idle? Pretty much anything would work here.

fallen parcel
gentle barn
# fallen parcel (Haii everyone. So please know that I nothing about circuitry so please be under...

I would recommend a breadboard for testing. Right now, I'm doing something with extremely simple wiring so I just use jumper wires directly without breadboard. But that gets extremely annoying as soon as you have to connect 2 wires to one pin, use pcb-less components like LEDs, etc.
Then, for the final build you could again wire it directly. Or to make it neater and easier by using some kind of prototype PCB. https://www.adafruit.com/category/466 (Various sizes, and packs of multiple available) This is probably the most expensive version, but it's very convenient because it's wired exactly like a breadboard so you can just 1 to 1 move your tested circuit from breadboard to soldering.
Other common kinds of protoype PCBs have no connections at all between the pins, or have all pins in each row connected.

#

If you do featherwing + feather then your wiring is probably very simple so you might not need a breadboard or prototype PCB but some stacking headers might be useful 🤔

#

The system requirements of both the FM radio and the music maker wing seem extremely low. The music maker only needs SPI and does all the mp3 decoding for you. But still I would check to get a microcontroller that is supported by their libraries. The music-maker seems to only have an arduino library and no circuitpython support

young cove
gentle barn
#

neat! 😄

young cove
young cove
gentle barn
#

lmao

gentle barn
young cove
gentle barn
#

great to know. Thanks!

primal warren
#

Probably a lot of floating point, so something like an AVR probably couldn't manage it, but one of the fast i.mx chips might be able to.

thin flax
#

it actually has no floating point and not even any division except for one in the encoder

#

the point is it's simple

gentle barn
#

(or suggest it to him. That library already supports dozens of codecs)

short nimbus
#

nobody mention checking legal stuff for transmitting ?

#

in canada you are restricted to like 1/25 wavelenght for unlicensed am/fm so the provided one is too long

short nimbus
#

yeah there is a wire antenna that comes with the kit

primal warren
#

I find it bizarre that there's a limitation on antenna length instead of transmit power or (more appropriately) radiated power. Limiting the antenna length gives too many opportunities to game the system.

#

There are lots of ways to get serious efficiency out of shortened antennæ, there are entire industries built on doing exactly that.

short nimbus
#

there's many restrictions one of which is antenna length

#

like for AM it's 3 meter including the power cord and the ground mass

#

so 1/100 wavelength depending on the frequency...

#

along with the 100mw output limit etc etc etc

#

I find it kinda funny though

#

like even if you are licensed the limiting factor clearly isnt the electronics

#

but the 900 feet antenna you need and the crane you need to rent to put it up and having enough land

#

costs about 800$/h + a 5k$ deposit + 1k$ a day for the driver/supervisor in my area for a crane

primal warren
#

What "needs" a 900 foot antenna?

short nimbus
#

AM ?

#

like at 500 khz for transmitting if you are licensed/a radio as per 1/2 wavelength to transmit ?

young cove
primal warren
brisk night
#

Most people, even licensed people, don't transmit at all on the longer bands. I have my Amateur Extra license, but I don't even bother with the longer wavelengths, because even a quarter or eighth wavelength antennas are way too long. Sure, you can use shorter antennas, but you'll need significantly more power and get much higher losses that way. At the really long wavelengths, the transmitters required to get good results from shorter antennas are prohibitively expensive, and you still need a really long antenna, even if you can get away with a smaller fraction of a wavelength. 2,200 meters, the longest HAM wavelength, still requires a 72 foot antenna at 1/100th, and it's going to perform very poorly even with the best transmitter on the market. AM radio stations transmit up to 50kW, and those are operating around 550 meters, where a quarter wave antenna is less than 500 feet. Amateurs can't do 50kW to get a reasonable broadcast range, and they need much longer antennas to get the same performance at longer wavelengths on top of that.

I do know that most people don't use half wavelength antennas at 500kHz. This is because most people can't afford to broadcast on 500kHz to begin with, and even if they could afford the equipment, they wouldn't be able to afford the antenna on top of that. (People who have the wealth to afford all of this typically live under HOAs that forbid tall antennas and the towers required to hold them.) Most people don't bother. I would love to transmit in 630 meter band (472kHz, the closest HAM band to 500kHz), but I just don't, because I can't afford the antenna and required infrastructure to put up even the ~500 foot quarter wave antenna required to get good range with affordable HAM equipment. I would use a halfwave antenna at 500kHz if I could. The reason people don't is cost, not because you don't need it to function well.

#

So, electronics is part of the limit, but the cost of putting up an antenna that can handle the lower bands (and get good results) can actually be significantly more than the electronics.

primal warren
#

I could probably set up a 500kHz loop that doesn't take too much room. That might be an interesting experiment.

brisk night
#

Hmm, maybe. Loops aren't as good as other types of antenna, but they are generally better than just a shorter straight antenna, so maybe. I agree, that might be an interesting experiment!

gleaming kernel
#

hi guys ,recently im making a tiny esp32 dev board which required an antenna, do you have any recommendation of tiny smd footprint antenna for wifi. I used johanson antenna 2450AT18D0100E, but i didn't work for me

primal warren
untold glacier
#

1/2 wave whip antennas for the RP2040 LoRa testing came in. Only been testing for a few minutes on USB power connected to my Mac, but no resets yet 🤞

#

I have some questions about LoRa settings though. I'm using this website https://unsigned.io/understanding-lora-parameters/ to try and figure out the best settings for my environment, but I'm starting with tests at my desk with the modules about 5 feet from each other.
tx_power is 23, coding_rate and spreading_factor are default, and I'm experimenting with changing the signal_bandwidth. If I set signal bandwidth to 62500, everything works pretty well. I'm using send_with_ack and receive(with_ack=True). Occasionally the sender won't see the ack back from the receiver, which seems a little odd at this close distance but I can deal with it for now.

The first issue I'm seeing is that as soon as I bump down the signal_bandwith one more step to 41700, the two RP2040s no longer see each other. I'm sending about 100 bit packets and flashing the LED when they are sent and received, and get nothing once I jump down to 41700 on signal_bandwidth. Is that expected?

grizzled vapor
#

I guess you want bandwidth to be high. Not exactly sure why you're having that problem below 41700 but it probably isn't beneficial to lower bandwidth unless you're on a crowded channel

#

If I'm wrong please correct me

brisk night
#

You're correct. Wider bandwidth means more data per unit time can be transmitted. If the bandwidth is too low for the transmit speed, the signal will be garbled. It's possible that's what is happening here. I don't know enough about LoRa to actually do the math though. It's also possible that the chip itself isn't terribly precise, in which case some bandwidth is wasted on that, and the speed/bandwidth issues get even bigger.

I can't say exactly what isn't working here, but there's some background information that might help.

untold glacier
#

I'm not expecting a crowded channel, but I'm not sending many bytes and I'm looking for more range, which is why I was tweaking some of the settings. My range test today with the new antennas went pretty well though, so I might be ok with the current settings.

primal warren
#

You've got the right idea, you can trade bandwidth (speed) for range. However, I too am unclear on how the various LoRa parameters interact.

untold glacier
#

With my current settings, I got about half a mile through some buildings and warehouses, which is good enough for the moment. The next thing I need to figure out it what device I will need on the receiver end to receive data from a number of RP2040 LoRa modules. I'll likely have between 9 and 14 RP2040s, each with an RFID read that can get tagged up to once every 30 seconds. The goal is to record all the RFID tags on a Pi, NUC, or other PC somewhere in range. Worst case I guess I could use a match RP2040 for each receiver and a USB hub to connect them all, but that doesn't seem like the most efficient option. I'm trying to research LoRa gateways, but most of what I'm finding is LoRaWAN-based, which isn't quite what I'm looking for. Anyone have suggestions on hardware I can use, or what search term I'm missing to try and find something that can receive packets from multiple LoRa senders at once?

normal drift
# untold glacier With my current settings, I got about half a mile through some buildings and war...

I’m not sure I understand the problem. Any LoRa board can receive from multiple transmitters. The RadioHead (Arduino) and Circuitpython libraries use the same packet header that supports addressing of up to 255 “nodes”. You should be able to use an RFM9x module with a raspberry Pi as the receiver. THe “bonnet” is nice for use with a Pi https://www.adafruit.com/product/4074. Or am I misunderstanding your needs?

#

You would definitely want to use the “reliable datagram” mode to avoid “collisions”

untold glacier
#

I guess the thing I'm worried about is timing/collisions. If all my senders happen to try to send a packet at the same time, and I can only receive 1 packet at a time, I was thinking I might miss some packets. And I cant block too long on each sender since they are triggered by user interactions and not a sensor check-in. But I guess I should just try it first and see how it goes before I try to get too complicated

umbral oxide
#

How long are your messages? There's always a chance of missing or overflowing the FIFO even with only one sender. Reliable datagram mode lets you add some robustness in case no ACK is received.

normal drift
#

The "reliable datagram" mode handles ACK packets and retries so I would expect it to work for you.

#

I'm not sure multiple receivers would be all that big a help since they all still actually receive the packets from all nodes. They just decide in software if they want to accept it.

umbral oxide
#

reliable datagram retries are manually though?

normal drift
#

You set the number of retries and the software does it

#

you code does not have to do the retry.

#

and there is some random delay to retries to avoid repeated collisions.

umbral oxide
#

I see, defaults to 5 retries

normal drift
#

After that -- you get a failure response so you can manually restart if necessary

umbral oxide
#

a fast, interrupt-capable environment (e.g., Arduino) would be less likely to get misses or fifo overruns?

normal drift
#

Yes -- Arduino is probably more robust. And the Pi (with Blinka) is probably the least.

#

I have had issue between Pi and Arduino -- Arduino ACKs too fast.

umbral oxide
#

is that a library issue?

#

or module?

normal drift
#

I think tha latest RadioHead library now ahas a way to tweak it as well. I have not tried it. For CP, without interrupts I just don't think it can reliably handle the Ardunio response, especially on a Pi.

#

If I recall correctly, there was some issue with the way the Pi handle SPI transactions taht was slowing it down markedly. I'll look for some notes on it.

umbral oxide
#

sounds like we need an async version of the CP lib, so the IRQ pin can be monitored, with keypad or the like

untold glacier
#

I'll take a look at reliable datagram. I'm currently using send_with_ack in CP, not sure if that's the same thing or not

umbral oxide
#

is the node addressing handled in the hardware module, or in the library?

normal drift
umbral oxide
#

(just wondering about the efficiency of an m:n config)

untold glacier
umbral oxide
#

so a 10-byte message about every 2 seconds (14 nodes, 30 secodns cycle) ...but highly variable timing so lumpy distribution?

untold glacier
#

Yup

#

I can use an arduino as the receiver, just want to periodically (once a minute maybe) dump the data back to a PC device, either over USB or via a REST API on wifi or whatever makes the most sense

normal drift
#

As I noted, You may run into issues getting CP and Arduino to play together... I'm looking for the recent change to RAdioHead that mah help.

untold glacier
#

Worst case I can switch to Arduino for everything, just started in CP because it's so easy (as a python dev)

normal drift
#

I hope you can stick with CP

untold glacier
#

Also @normal drift just for reference I haven't had a single reset on the RP2040 now that I switched to the external antennas as long as I keep the antenna a small distance from the board, even using the 350mAh lipos. It seems to have been RF interference as the issue. I am able to get it to disconnect the USB mass storage on the Mac if I lay the antenna on top of the board

#

So progress on that end!

normal drift
#

I have had the same results.

untold glacier
#

I have 2 rp2040s and 2 M0s here that I can use for testing, so maybe I'll set up 3 of them as senders on a faster interval for testing with the 4th as the receiver and see how it goes

#

Although I only bought 2 antennas 😅

#

I'll just do a wire antenna for the other two

normal drift
#

I need to experiment with this -- updating my "todo" list, Unfortunately, you have to make this change to the RadioHead.h file in the Arduino library not just to a single sketch....

normal drift
#

Just tested the mod to RadioHead.h and it does make a big difference when using a Pi ZeroW. Adding the 10ms ACK delay on the RadioHead side allows the Pi Zero to receive the ACKs -- Without it, they often fail. On a Pi400, the delay is not needed.....

normal drift
#

This may prove to be a huge improvement for Pi <--> CP RFM communication!

icy surge
#

RFM?

primal warren
#

Probably a reference to the RFM series radio modems

#

RFM69, etc.

icy surge
#

ah

normal drift
cosmic badge
#

Any got ideas for the kind of radio i would need to be able to support 10-20 character text messages…, through a cruise ship

primal warren
#

I'm thinking a LoRa module might be the way to go, cruise ships are large and contain a lot of metal, so you'd need something with a lot of link headroom. Fortunately, LoRa lets you trade bandwidth for range, those short messages don't need much bandwidth, so you can optimize for range.

hollow mango
#

Hi all, I am trying to get a pair of RP2040 RFM featherwings to act as a transmitter reciever pair as per this tutorial (https://learn.adafruit.com/feather-rp2040-rfm95/using-the-rfm-9x-radio). When I upload Feather9x_TX.ino or Feather9x_RX.ino RadioHead examples they both get stuck at the "Waiting for packet to complete..." portion and will never finish executing. Does anyone know what could be causing this issue, or have a better tutorial they could point me to?

Thanks

primal warren
#

Are your RFM FeatherWings the RFM95 version or the RFM69 version? Do you have antennæ connected?

hollow mango
#

RFM95 with 3 inch stranded wire antennae

graceful ice
#

Hi all, I'm playing around with the rfm69 and rfm9x bonnets for Raspberry Pi. The rfm9x seems to work fine when I work rfm9x_simpletest.py but when I run rfm69_simpletest.py I run into a few issues. I get the output below. Let me know if this would be better to post under a different channel.

Temperature: 158.0C
Frequency: 32.12548828125mhz
Bit rate: 15.56420233463035kbit/s
Frequency deviation: 125488.28125hz
Traceback (most recent call last):
  File "rfm69_simpletest.py", line 52, in <module>
    rfm69.send(bytes("Gateway says: Hello world!\r\n", "utf-8"))
  File "/usr/local/lib/python3.7/dist-packages/adafruit_rfm69.py", line 778, in send
    self.idle()  # Stop receiving to clear FIFO and keep it clear.
  File "/usr/local/lib/python3.7/dist-packages/adafruit_rfm69.py", line 461, in idle
    self.operation_mode = STANDBY_MODE
  File "/usr/local/lib/python3.7/dist-packages/adafruit_rfm69.py", line 534, in operation_mode
    raise TimeoutError("Operation Mode failed to set.")
TimeoutError: Operation Mode failed to set.
normal drift
subtle palm
#

Does adafruit carry any simple 433.92 MHz receivers that I can simply get an OOK signal out of? The RFM69HCW 433 MHz Transceiver Radio Module appears to be the simplest but sounds like it's designed to only work with a paired transmitter with a higher level message format.

primal warren
# subtle palm Does adafruit carry any simple 433.92 MHz receivers that I can simply get an OOK...

I don't think so. There are some 315MHz receivers that could do that. However, it's not hard to find simple 433MHz receivers, here's one possibility: https://theelectronicgoldmine.com/products/g22483

The Electronic Goldmine

Low cost 433mH ASK/00K receiver is perfect for remote keyless entry (RKE) circuits, remote lighting controls, wireless alarms, long range RFID, asset tracking and on-site paging. The receiver module requires no external RF components. It is very sensitive and stable due to its super-regenerative design. Operates on 5VD

leaden sparrow
#

headdesk spent a solid 40 minutes debugging an issue with the Adafruit BLE Sniffer on MacOS, having even remembered that I had to change the interface.split('-') to be interface.rsplit('-').

I remembered wrong. It needs to be changed to interface.rsplit('-',1)

Guess that's a sign to go to bed!

buoyant rover
#

good day all..

buoyant rover
#

I would like to know how to disconnect from a wifi connection and switch to monitor mode (and being able to set the channel). Because if I connect to an AP, which is on channel 3 and I change my wifi into monitor mode on channel 5, when I retrieve a packet in monitor mode the channel from the packet is still 3 (from the AP) and not channel 5 from the monitor mode.

#
import wifi
import random
import time
import ipaddress

ssid='YOURSSIDHERE'
passwd='YOURPASSWORDHERE

def show_monitor_example(n=1):
    for i in range(0,n):
        channel_num = random.randrange(1, 14)

        print(f"{'-'*25}\nMonitor starting on channel {channel_num}...")
        m = wifi.Monitor(channel=channel_num)
        time.sleep(1)

        p = m.packet()
        if p != {}:
            packet_ch = p[wifi.Packet.CH]
            print(f"Packet received on channel {packet_ch}")
            
        m.deinit()
    return


def show_ap_example(n=1):
    for i in range(0,n):
        print("Connecting to ssid...")
        wifi.radio.connect(ssid, passwd)
        if wifi.radio.connected:
            print(f"Connected to wifi on channel {wifi.radio.ap_info.channel} with ip {wifi.radio.ipv4_address}")
            print("Pinging 8.8.8.8")
            ping_time = wifi.radio.ping(ipaddress.ip_address('8.8.8.8'))
            print(f"Pingtime: {ping_time}")

show_monitor_example(3)
show_ap_example()
show_monitor_example(3)
#

the example above shows the issue with the 2nd show_monitor_example(3) call

#

I assume I have to disconnect my wifi.radio.connect() - but I have no idea how to do that. Any help is appreciated.

umbral oxide
#

connect to wifi on whatever channel the AP is on, then deinit wifi and monitor a random wifi channel, then deinit monitor, rinse, repeat

#

be prepared to: catch exceptions, use a watchdog timer, and have a safemode.py file to recover from hardfaults

#

tl;dr: wifi.radio.enabled = False & monitor.deinit()

#

(monitor also doesn't behave very well on top of normal wifi station-to-access-point traffic, so best to not have them both running, even on the same channel, if at all possible)

buoyant rover
#

@umbral oxide thanks for the extensive explanation, tl;dr and link to the gist. I will check it out later this weekend and see if I can make it work. I did some quick trial and error yesterday as well and I think by putting a stop and start station in between also resets the channel and allows the monitor to operate on another random channel.

I only did some quick observations on this, not extensive testing, but will do so alongside applying your examples.

show_monitor_example(3)
show_ap_example()

wifi.radio.stop_station()
time.sleep(2)
wifi.radio.start_station()

show_monitor_example(3)
umbral oxide
#

@buoyant rover wifi.radio.stop_station() & wifi.radio.enabled = False will free up the channel. Those two calls are different under the hood (on espressif port boards), and there are other reasons to use one or the other (or both), but for your use case, either will work.

open nymph
#

In the context of HF ham radio, would a dipole antenna that has one end pretty close (<5 feet) to the ground cause excessive noise? The antenna is parallel to the ground, but there's some extra that dangles down.

primal warren
#

Not noise in particular, but it will change the pattern a little

open nymph
#

My radio doesn't have a grounding wire, could that be it?

#

I really have no idea at this point. What are some common causes?

primal warren
#

What sort of noise? Hiss comes from different sources than crackle, which are different sources than hum or buzz.

open nymph
#

By CW being noisy - I mean that I can hear the dits and dahs and would be able to understand it if I knew morse code, but I've tried 3 different programs to decode it and they all output garbage.

primal warren
#

That could be atmospheric or static noise, or noise created in the radio itself. Does the noise change if you disconnect the antenna?

open nymph
#

I'll try

#

The noise is much worse with the antenna connected. It's also connected through a tuner, so I'm going to try connecting the antenna directly to the radio.

#

The noise is back with the antenna connected directly to the radio.

primal warren
#

So it's being picked up by the antenna, that's useful info

brave orbit
#

plausibly background noise

dusky path
#

Would this be the proper channel to discuss bluetooth?

umbral oxide
#

good place to start ...or if it's more of a code question, there are channels for Arduino and CircuitPython

dusky path
#

Well it'd be using the BLE Sniffer and decoding a Bluetooth protocol.

umbral oxide
#

ask away, this is as good a place as any

dusky path
#

Don't have a question at the moment, the sniffer is still in the mail... just wanted to find the right place for questions when I can get started.

leaden sparrow
# dusky path Well it'd be using the BLE Sniffer and decoding a Bluetooth protocol.

The nRF Sniffer documentation linked in the Adafruit Learn article is very, very good. One of the key things I don’t recall seeing in the Learn article was how to sniff the traffic of a device. By default you’ll only see data on one of the three advertising channels.

And that was another thing that wasn’t clear: you will only be able to sniff one of 40 channels at a time. There are only 3 you really need to sniff, but the connections can happen on any of the three. So you have a 33% chance of sniffing what you want! You can try again until the connection happens on the channel your sniffer is currently on (it hops between all 3 advertising channels)….or you can buy two other sniffers! Makediary has $12 USD dongles that can sniff BLE as well. With 3 sniffers you can configure each to listen on a specific channel and not hop. Then you can capture connections much better!

dusky path
#

Thanks @leaden sparrow I'll keep that in mind. Guess I'll be doing a lot of turning on/off'ing 🙂

dusky path
#

Well failing right out of the gate, I don't see btle in the list.

#

Something tells me this is only going to work with Windows

leaden sparrow
#

Nah, I got it working in Mac

#

In the Adafruit documentation is the solution.

#

You need to change a line from something likeinterfaces.split(‘-‘) to be something like interfaces.rsplit(‘-‘, 1)

dusky path
#

Hmm Apples PacketLogger gets bluetooth packets on the mac... wonder if I can use it with the sniffer?

#

Yeah I'm guessing Wireshark doesn't have access to bluetooth on the mac since I don't show any bluetooth devices when I select WIRELESS | BLUETOOTH DEVICES from the menu

leaden sparrow
#

Unfortunately, the documentation for the sniffer is all over the place

dusky path
#

I see it, it says "The nRF Sniffer plug was installed and the device showed up in Wireshark, " ... but in my case I don't see the sniffer plug showing up at all (it's flashing blue so it's capturing stuff). Maybe a security feature in Sonoma... or maybe I have to go into security and allow access.. not sure.

I may be able to just use Apple's PacketLogger if I can figure it out.

Either way I'm out of time for the night. Thanks for the responses! I'll have to carry the fight on tomorrow.

leaden sparrow
#

I may be able to hop on a voice channel tomorrow

hybrid raptor
#

I've used the nRF sniffer with Wireshark under Sonoma with no problem

dusky path
#

That is reassuring! When you installed WireShark and went to the bluetooth devices list, did you see it populated with anything? Mine looks like this. I did go into privacy and settings and set Wireshark as allowed for bluetooth.

dusky path
#

Hmm so I didn't install the py3 stuff... doing that now.

#

Ok I have the device showing up now and enabled the toolbar!

#

Ok have to stop now. Next step is to figure out how to actually capture things using it.

#

Wahoo, got it capturing packets. Thanks @leaden sparrow that fix for the interface file was needed.... I wish Adafruit would update it's documentation to include that!

#

Anyone know what the difference between CMD and DAT does on the sniffer? I suspect given the name one only sends CMDS and the other DAT but it'd be nice if there was official docs on what that is for somewhere.

leaden sparrow
#

I haven't been able to figure that out, or why the yellow LED turns on now and then. But I think CMD is to program the sniffer, and DAT is to run it

#

you can also scour the documentation (do you see a theme emerging here 🙃) for the non-sniffer version adafruit puts out.

dusky path
#

I was wondering about the orange LED too! 😄

#

Maybe we can get ChatGPT to scour the docs for us and tell us 😉

#

Hmm I do notice the orange led turns on when wireshark is capturing

leaden sparrow
#

I do think there's a bug in the adafruit firmware where sometimes during wireshark it will crash and stop reporting data. I wish nRF made the firmware open source!

dusky path
#

Good to know, thank you! I'll keep an eye out for it.

#

I'm wanting to decipher the protocol used between an app and a toy so I can try to create a javascript app that can communicate with the toy. Hope the JS ecosystem is good to do that with the web bluetooth api, though it looks like Chrome and Edge are the only ones currently support it.?

leaden sparrow
#

That was something Google hamfisted their way in, yeah.

dusky path
#

Ideally I could just create a React App, throw in some packages, and be off to the races 🙂

hybrid raptor
leaden sparrow
#

@dusky path make sure to check out the Common Sniffing Actions link I sent you. You're at teh stage where that's useful. To actually sniff the traffic between devices, you'll need to:

  • Select the specific device id from teh drop down toolbar
  • Keep on connecting until your sniffer is on the same channel as the peripheral's Advertisements
    Once those are both true you should start to see the device's talking.

Also, make sure to try and use the nRF Connect mobile app to interact with the device

dusky path
#

Got it! I'll give this a good read-through!

#

I'm going to throw the findings into a github repo as I go along.

#

Just for others, I found this a nice overview video on BlueTooth : https://www.youtube.com/watch?v=1I1vxu5qIUM

A ton of your devices use Bluetooth to communicate wirelessly. But how does Bluetooth work? In this video, we'll dive into the details of how your smartphone sends audio to your wireless headphones. Bluetooth is rather complicated and thus we're going to use a number of analogies and tools to explain it fully.

This video is sponsored by KIO...

▶ Play video
leaden sparrow
dusky path
#

Interesting, the Tower (the item I'm tracing the bluetooth protocol on) doesn't show up in lists of bluetooth devices, yet I do see advertiser broadcast packets. I'm guessing BLE has a broadcast option that allows you to say if the device advertising should show up on lists, kind of like how you can set a wifi device as 'hidden' and you have to know it's name to connect to it.

dusky path
#

Probably this: "Scannable vs Non-Scannable: determines whether an advertising device is capable of handling a Scan Request message from an observer or central. Scan Requests and Responses are used to allow devices to advertise more data than can fit into one advertising packet."

dusky path
#

Ugh, I can catch the device connection but I'm guessing it never gets on the proper channel for me to see the READ/WRITE cmds. I've disconnected/reconnect many times. I'm unsure if I'm doing something wrong or just unlucky.

leaden sparrow
#

If you download nRF Connect, do you see the device advertising?

dusky path
#

Oh I see the advertising, and then I set the wireshark device to the device so I don't see everything and I see the device advertise and I see the connection, but the moment it connects I don't see anything else about it. I'm expecting to see READ/WRITE as I issue commands from the app that the device responds to.

leaden sparrow
#

Can you post a screenshot of post connection?

dusky path
#

Here you go

#

The empty PDU's come immediately after connection. I do send commands after but not seeing anything really being caught for that.

leaden sparrow
#

Does the Sniffer’s LED turn red?

dusky path
#

Yes

#

What does it mean when it goes RED? Crashed?

leaden sparrow
#

That’s my guess? But I haven’t been able to confirm it.

#

My concern is that there's a flaw in the firmware

dusky path
#

I wonder if the py code is tripping up somehow

leaden sparrow
#

Could be. I know there's reference to Logs in there somewhere, so you may be able to see what the device is doing and if's crashing

dusky path
#

I feel like it just goes off the rails somehow. Like there are lots of packets afterward, empty PDU which should be there, but they become all malformed. Once it goes off the rails its over and while it still captures packets they remail malformed. So annoying. I guess I'll have to figure out how to log the packets using iOS. This is the one time I actually wish I had Android.

supple thistle
#

I'm quite new to programming with bluetooth and am trying to understand how this works in general, especially with MCUs. My goal is to having a few very tiny MCUs communicate with each other with mere bytes of data intermittently.

Is there any good example that explains how to do this? I've only seen the 'scan for advertisements' example and that's it.

primal warren
#

Bluetooth is fairly complicated, you can probably use a simpler protocol for that.

supple thistle
#

this is for a complicated wearable device with a lot of parts involved, and ideally I'd like to not have to rely on a wifi network

#

and introducing physical wire connectivity reduces the modularity of what I aim to do

primal warren
#

WiFi is also complicated. I was thinking a simple ASK, FSK, or LoRa setup.

supple thistle
#

if it requires additional hardware that I don't already have then it's almost certainly a no-go

primal warren
#

I take it your very tiny MCUs have Bluetooth support?

supple thistle
#

Yes, although I'm finding out there is apparently limited support with the QT PY ESP32-S3's BLE capability, at least with CircuitPython.

primal warren
#

When you said "tiny", I was thinking something like an ATtiny, not a dual core 32-bit one!

supple thistle
#

I'm not sure how much that matters for my specific use case but it does seem to limit my options

#

I'm using them to drive display of an eyeball for each one, trying to use bluetooth to transmit a few bytes about what angle and eyelid closure value

#

with a brain also doing communication (might do a pico w for this) among several parts

#

to get an idea of the limited space I'm working with

primal warren
#

That's a cool build

supple thistle
#

the display is a usb-c 1080p oled from AR glasses that I took apart, it's for my wearable PC project and this is the HELM for more fun cosplay stuff

#

and each eye is a 128x128 oled that I'm using a lens to expand the depth slightly in a mostly-reflective outer shell

#

I'm just wanting to use bluetooth to have each component go 'hey, I exist' with the brain going 'oh okay, let me signal some data to you' while ensuring a low power connection is loosely maintained

#

I'll have to move closer to metal at some point eventually (not python), just been getting into microcontrollers only very recently.

hybrid raptor
#

It won’t talk to the Internet though and is only supported on ESP32 devices. You can use it from Arduino or CircuitPython.

supple thistle
#

oh, sweet!

#

though I think I got past the problems I was having with my mobile router, so I might be able to just do regular wifi anyways

#

pi zero w 2 running RaspAP as a router and local portable network for my devices to communicate through, while also granting a wireless tether to internet

supple thistle
#

oh awesome, thank you!!

supple thistle
leaden sparrow
hybrid raptor
hybrid raptor
leaden sparrow
hybrid raptor
umbral oxide
#

yeah monitor mode picks up esp-now frames, I used that for debugging, they’re just customized management action frames

somber wadi
#

Anybody have any idea how you go about getting the code to receive GPS from 32U4 and having it go to Google Maps on an ESP 32 web server I can log into an IP address and view the map

#

I can't get the code for the radio module 32U4 to parsing the GPS data raw data test passes radio to radio test passes but if I mix a parsing and try to transmit it it never goes through

#

I made it really far for not knowing how to do this at all

leaden sparrow
# dusky path I feel like it just goes off the rails somehow. Like there are lots of packets a...

I've done a bit more research, and I think the Adafruit Sniffer is a bit defective for whatever reason. Maybe the bluetooth spec changed in a way it can't handle. Maybe the most recent software assumes a more recent firmware. It's not even a MacOS thing. The moment you do the steps to follow a specific device, the device crashes. The current firmware version for sniffers is 4.1.1 (https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE/Download?lang=en#infotabs), but the adafruit version is around 1.0.1. The FAQ (https://learn.adafruit.com/introducing-the-adafruit-bluefruit-le-sniffer/faqs) calls out that they got a custom firmware due to no 32khz crystal, and so you can't even flash the most current firmware on. I suspect Adafruit will have to request a new firmware image.

In the mean time, https://makerdiary.com/products/nrf52840-mdk-usb-dongle has instructions on how to flash it with the sniffer firmware and is pretty cheap.

leaden sparrow
#

Hmm. Nevermind, despite the angry red llight I'm still getting some connection traffic back and forth

dusky path
#

I feel like @torpid echo might want to know that a product she is selling is only half working. It's been some time since she's visited the product, might be time to update it (or discontinue it) For sure the docs need to be updated.

dusky path
#

Maybe @rough ivy Could make the BLE sniffer a product of the day and in the process iron out the issues we are seeing.

slender current
#

do you have a support forum post for the sniffer issues? That's the place to get official support

dusky path
#

Ah I have not tried that path, I will do so, apologies!

dusky path
young cove
leaden sparrow
#

Unfortunately that’s for the nrf52, while the sniffer device is nrf51. Good catch though. I’m now scouring my drawers to see if I have one of those

#

Yesssss Success

dusky path
#

So this is the latest firmware? Is there a way to tell what is currently installed?

earnest fossil
#

https://github.com/DonutCables/PicoW_Game_Timers Background context for my project.
TLDR: Up to 6 peripheral devices sending maybe a 15 entry dict of data each to a central device, the central device sending smaller packets back including timer countdowns, and the central device also posting the info to a simple web page to be looked at.
The entire time I've been working on this so far I've figured bluetooth/ble is the way to go for the peripheral - central connectivity, but as I keep running into hiccups with that (Pico W having wifi but not ble on CP, Zero W having ble but not wifi on CP, ESP32S3 having both but some newer hardware weirdness, ble just being limited in general on CP right now) I'm finally asking for input on if I should consider something better suited.

GitHub

Contribute to DonutCables/PicoW_Game_Timers development by creating an account on GitHub.

#

Physical needs: Up to 300ft range with obstructions ranging from people+paintball cover to people+woods

#

Prefer to be able to have addressed bidirectional communication, but could probably get away with broadcast only if I didn't have a choice

leaden sparrow
primal warren
earnest fossil
#

What could I realistically expect from ble, particularly when inside a box and under the lid of a bucket?

#

Also what differences would I get between "ordinary" radio and lora?

hybrid raptor
#

I don't think there's any way to give a realistic guess here. Range would vary depending on materials, how many and what kind of obstructions, transmission power, antenna design. There are a lot of variables.

earnest fossil
#

So, had found that before and didn't see much that caught my eye, but this time I clicked "advanced usage" and the stuff with the address headers makes it seem much more useful

#

What's the likelyhood that I'd be able to send at minimum a timing signal from the central device once a second and then send back state data from the peripherals also at once a second reliably?

#

The examples seem to show a fairly slow frequency at 10 seconds

hybrid raptor
#

If you're okay working with ESP32s, you might consider using their "ESP-NOW" protocol - it's a point-to-point variant of WiFi. Its long range mode should get you better range than Bluetooth, especially if you use an external antenna. It's proprietary and not cross-platform though so you'd be using it only with ESP32s and ESP8266s.

#

Yeah LoRa is designed to be long distance but very slow.

earnest fossil
#

Hmm, ESPs would also be cheaper than lora capable boards

#

Any sort of weird limitations I should know about before I start doing the funky handshakes to get CP flashed on these S3 boards?

hybrid raptor
#

Not that I can think of. The S3 is a very capable MCU. Maybe be aware that the UF2 bootloader is less permanent on the S3 than it is on the RP2040s. It's just another piece of application that gets loaded at boot. If it gets wiped you can always just reinstall it.

earnest fossil
#

Yeah I don't think this project really entails anything that would risk writing over it

supple thistle
#

I've had a great time with the QT PY ESP32-S3s I've got so far, and utilizing ESP-NOW to communicate between several that I have was extremely easy

earnest fossil
#

Yeah I've actually just managed to get two S3s doing some quick talking after I figured out I had to have their macs handy

supple thistle
#

yeah, as I've been planning out my project I nabbed each one's MAC address and physically labeled them to keep my stuff organized. working on a tons-of-parts wearable XR helmet

earnest fossil
#

I'm a little sad I'll have to replace all the Picos I have for the project already, but I'm sure I'll find something for them later

supple thistle
#

I have a pico that's driving the 18 data lines for the RGB dreads I have, but otherwise I've been trying to keep everything smol. still need to figure out a solid way to communicate between it and my ESPs

earnest fossil
#

Actually while I'm thinking, does ESP-NOW have a good way to guarantee packets are received?

supple thistle
#

not sure, but you can check failed and successful packet count

earnest fossil
#

I've got a good 3-4 async tasks running at a time in the nodes right now and it seems like it'd be real easy for it to be able to miss a packet

supple thistle
#

I only just barely implemented it the other night and have been rewriting it since I was having an exception from trying to read from a packet when I think I wasn't supposed to

umbral oxide
#

ESP-NOW frames are buffered, and you can increase the buffer size (especially on an S3)

earnest fossil
#

Marvelous, though I did also realize I have no reason to be sending all of the timer to the nodes, I just need to send activate/deactivate strings

leaden sparrow
dusky path
#

I did think the empty PDU packets were normal based on what I read, but what came after wasn't helpful. I don't know if it couldn't follow the connection as it hoped channels, or if there was some other problem.

At this point I believe that Adafruit is selling a non-functional product (half working or not).

I've pivoted and spent the $$ to join the apple developer plan. It was either that or buy a Android tablet... I feel I probably should have bought the tablet. Anyone have a recommendation of a cheap android device that I could do this type of stuff with? Has to run at least Android 10 (actually says 5.1 but I'd prefer not to be on the razors edge) and support Bluetooth LE (4.0).

young cove
dusky path
#

I'm a bit hamstrung there because the controlling app only runs on iOS and Android... and I have no Android devices sadly.