That dinky radio module whereof I posted a picture a few days back?
Just sent the letter Z to it.
Better still, it received the letter Z, all wrapped up in 802.15.4 formatting.
I spent much of the afternoon bashing my head against this. I was sending from an XBee Pro, at a distance of a few inches (no antennas connected on either end). Send a character to the XBee, read the FIFO on the AT86RF231 (for such is the radio chip on my board; that and some Skynetworks front-end thingy); get zero length if nothing had been sent yet, or a reasonable-looking length if I'd sent a character... and consistent packet contents... but the contents were consistently wrong.
All of which pointed to the actual RF portion working, but the protocol being somehow FUBAR. Almost like there was a scrambler somewhere, or the XBee was using a proprietary protocol, or they weren't speaking the same Baud rate, or....
Hey.
Last test was Continuous Transmit with Spreading.
In high-speed data mode.
Folks, when you're trying to get an AT86RF231 and an XBee to talk to each other: don't have the '231 in high-speed mode. You will not like the results.
With TRX_CTRL_2 now set properly (i.e.: zero), the packet gets through in what appears to be a reasonable format, with intelligible address fields. I can even find the character I typed.
Still not getting the RX interrupt, and I'm not sure about various other status... but it is currently in promiscuous mode, and may not be well behaved. Maybe for my next trick I should try setting an actual ID, and sending addressed packets to it.
Update: that lack of interrupt status? My initialization table still had some magic settings from the transmitter test mode. Take those out, leave the chip at mainly default settings, and the status and the interrupt show up as expected.
Still need to do a receiver sensitivity test, which means scaring up a string of attenuators, which I hope I can borrow (though at some point I really ought to have my own set, and the ones from Mini-Circuits don't cost all that much).
Update 2: haven't rounded up a string of teenyfiers yet, but hooking up an antenna to each end (with a notable lack of proper RF grounds, mind you), and putting the XBee Pro in the next room (with much metallic clutter in between) and at minimum output power (+10dBm), I'm seeing Energy Detect of 48 (nominally meaning 48 dB above the minimum useful receive power) on my board with the LNA enabled, and 31 with it disabled.
Which says that the LNA is actually performing a useful function, implying that my board doesn't have a big noise problem. Which, given that there's a 72 MHz processor less than an inch from the LNA, wasn't exactly a given.
Looks like that mixed-signal layout lesson I had from an RF guru back in the mid-90s is still useful.
Still TBD, how much signal loss is being caused by my layout and choice of component values. Though, given that TX and RX share a common path between chips, and the TX test gave pretty much the expected output power, the RF path can't be too lossy.
Update 2a: sanity check. Not quickly finding my old cardboard* path-loss calculator, I look for one on-line: so. Sez 2.45 GHz and 0.005km should have a loss of 54dB, unrealistically assuming no signal-blocking clutter. With LNA off, ED=31 should mean I'm getting roughly -60dBm at the PHY, which means I'm suboptimal by roughly 15dB. LNA on, ED=48, so -43dBm at the PHY; LNA gain is supposed to be about 12.5dB, so call it -55dBm at the antenna terminal. Think clutter, antenna placement/alignment, and lack of grounding could account for a 10dB discrepancy?
Oh, and background RSSI is basically zero, so the radio isn't picking up lots of interference from either itself or the WiFi.
*Not cardboard-and-string. Sorry, Bluebottle.
Update 2b: hmmm. The antenna I'm using on the transmit end is quite a bit longer than the one on the Gadget. It's one of a pair I bought somewhere-or-other, quite some time ago. Has no markings on it. Does have an RPSMA connector, but... I wonder if it's meant for 915 MHz.
The only other definitely-2.45 GHz antennae I have handy fit into one of two categories: (a) not an RPSMA connector, but something else for which I have no adapter, or (b) currently connected to my WiFi router, which is currently in use.
Update 2c: I think the big antenna must be Spark Fun #WRL-00558, which is meant to be a 2.45 GHz item. Also, I had a second one, and substituting that for the dinky one that presumably came off an old WiFi router picks up 2dB.
Update 2d: borrowed a bunch of SMA attenuators and a good SMA cable. Installed U.FL-to-SMA cables on both UUT and XBee Pro. Modified the UUT firmware to flash a green light on receipt of a packet with valid CRC, red for invalid CRC, and black for no packet. Problem: there's enough leakage on both ends that, with each U.FL-to-SMA cable terminated and no approved signal path, I still get consistent green flashes about 4-5 feet away.
So, I guess, I need to change the code to drive external LEDs, and stick the UUT in a metal box with nothing protruding but the business end of the SMA connector and the tips of a pair of added LEDs - maybe I can scare up LEDs with long little round noses that can poke through tiny holes in the box.
Update 3: Did as planned above, except that I could only get one of the external LEDs working - I figure the fiddly little DFN-packaged filter/ESD clamp, for which my footprint was suboptimal, probably still has Soldering Issues.
Anyway, one blinky LED is at least somewhat informative, and with the radio in the box. the lid sealed, and an attenuator on the connector to avoid a dangling impedance mismatch, it was non-blinky with no cable connected.
Stack up attenuators until XBee transmit power 0 (+10dBm) gives no (or, anyway, few) happy blinkies on my gadget. That adds up to... 3x20 + 4x10 + 5x6 = 130dB, so I can't cope with a -120dBm signal. No surprise there; -113 would be optimistic.
Set XBee output power to 1 (+12dBm). Blinky mostly comes back.
So... -118dBm? I'm not quite sure I believe that. Still: there's a pretty good suggestion that I can get some serious range with this puppy, without even resorting to high-gain antennae.
BTW: there's no metal can on this board. Everything hanging out in the open, as shown here. Well, apart from the whole thing being shielded for test purposes, but that just locks the MCU in a reflecting noise cage with the radio.
Comments