Dec 062016
 

As you can read in my previous post, I’ve been having trouble establishing P2P communication between a Semtech SX1272 and Microchip RN2483 LoRa transceiver. I though this would be a good idea to use my HackRF One and see if it’s possible to see the LoRa packets “on the air”.

I checked out this article which has some very useful details. I later found this gnuradio plugin which allowed me to decode the basic P2P messages I was sending between my LoPy and Dragino LoRa hat.

I used pybombs to install gnuradio on my Ubuntu 16.04.1 desktop so I created a recipe to install this version of gr-lora (which is different from the gr-lora package normally installed by pybombs) as gr-lora-rpp0. You can add this recipe via pybombs recipes add gr-xykon git+https://github.com/Xykon/gr-xykon.git I did not include dependencies for any specific hardware sdr so make sure you have this installed before running pybombs install gr-lora-rpp0

If you’re not using pybombs you can also follow the instructions from https://github.com/rpp0/gr-lora to download and install the gr-lora plugin for your gnuradio installation.

This version of gr-lora requires liquid-dsp which does not build properly on Ubuntu 16. See this issue on github to fix.

I tried with various sample rates (currently using 10e6) but even 1e6 (1M) seems to show the same results so this should probably work with cheaper sdr hardware than the Hackrf One.

With gnuradion and gr-lora-rpp0 installed I used this simple flowgraph to capture the LoRa packets (I have uploaded the lora_recv.grc file on github):

lora_gnuradio

I seem to be getting fairly consistent results from the LoPy but I’m still struggling with the RN2483 from Microchip. Here is a screenshot of a few received packets:

lora_recv.png

More to follow…

 Posted by at 00:05
Dec 052016
 

It’s been quite a while since I last posted anything here but I finally started an interesting project using the new LoRa long range wireless communication protocol.

I had recently received two LoRa based Kickstarter projects, one being the Sodaq One LoRa/GPS tracker which is using the Microchip RN2483 LoRa transceiver and the Pycom LoPy which is based on the Espressif ESP32 and uses a Semtech SX1272 LoRa transceiver. As I had trouble establishing communications between the two different chipsets I also got the Dragino LoRa/GPS hat which uses the same SX1272 as the LoPy.

To get the Dragino hat to fully work I had to do some hardware modifications. First I added a cable to feed 5V to the centre pin of the external GPS antenna connector to use an active antenna. Then I had to add a solder bridge between pins 22 and 24 as explained here. Next up I connected D1 from the LoRa transceiver to PIN16 and D2 to PIN18 as explained here.

This is the final setup on my Raspberry Pi3:

lora_hat

Picture 1 of 3

I started out with the instructions and software found here but I didn’t have a DS18B20 temperature sensor to hand. I modified the software somewhat to either send 3 bytes or to listen and print the received bytes. I uploaded the sources to github. In subdirectory “simple” you can find the sender and receiver. Run make to build the software and sudo ./lora_sender or sudo ./lora_receiver to launch. The RadioHead library used in this code adds a 4byte header to the lora packet. This can be changed in RH_RF95.h and for receiving this can be set to 0 but it seems when sending it is necessary. The header by default is 0xff 0xff 0x00 0x00 and when receiving the first byte received needs to be 0xff or you don’t see it.

As for the LoPy I have also uploaded the lopy_sender.py and lopy_receiver.py files to the same folder. Both sides either listen to LoRa P2P messages on 868.1Mhz and print anything they receive in hex or they send 0x7 0xi 0xab (with i continuously incrementing from 0 to 255) every 5 seconds. The LoPy is adding the 4 byte header 0xff 0xff 0x00 0x00 when sending and it will be visible in the console output when receiving.

 Posted by at 22:48
Jan 282014
 

Hello everyone,

I found out that I won another Saturn FPGA board from numato… sweet. 🙂

So now I decided to see what I can do with these… and checked for free fpga resources on the Internet. I decided to share my results to make it easier for others to find these as well. If you have any suggestions please feel free to post them in the comments and I will expand the list.

Asic world: This site is great to understand the basics of both Verilog and VHDL, the two most commonly used languages for fpga design. Includes a “Verilog in one day” crash course.

fpga4fun: This site has some interesting tutorials and projects for the enthusiast ranging from basic to advanced.

numato.com: Numato, the maker of the Saturn and other fpga boards, has a small tutorial explaining how to get started using Xilink ISE for Simulation and Implementation of your fpga designs.

Free Range Factory: They have free e-books and many other resources for fpga designs. Books are available in PDF and TXT format so they should be compatible with many e-book readers like the Kindle. You can also order paperbacks in their online store. Besides the books, they have a massive library of IP cores that you can use to build your own designs.

I’ll create a separate page to collect more resources in the next few days. I’m also still working on a review for the Saturn board but as usual work and personal life keep me more occupied than I’d like…

 Posted by at 14:23
Dec 312013
 

When I got my new PIC32MX board from Numato, I didn’t have any information about the boot loader they were using. So when I wanted to test some code on the board I simply connected my PICKIT3 clone and reprogrammed the whole thing.

Unfortunately I found that the latest version of MPLAB-X doesn’t seem to work well with my cloned pickit3, although it is running the official firmware. This might actually be a general PicKit3 problem and nothing to do with the fact that mine wasn’t produced by Microchip and sold for 3x the price.

I then thought it would be nice to have the boot loader back, but Numato didn’t publish any .hex file or source code. When I downloaded the Microchip Libraries though I only found boot loaders for PIC24 but finally spotted a text file pointing me to AN1388. One download later and I had the necessary sources to craft a new boot loader for the board.

I only made a few small modifications, adjusting the boot loader switch to use RD7 and removing the code for the LEDs because the Numato board doesn’t have any beside the power LED.

The source code, compiled binary, and Windows Application can be found on github at https://github.com/Xykon/pic-dev

The original Microchip application note download for AN1388 has been included along with their License Agreement. I think I’ll keep my eyes open for an open source boot loader as I find these Microchip licenses very restricting. I’m not even sure if I have the right to publish these modifications or if I should only have posted a .hex file along with a diff to be applied to the original download. I’d welcome any comments on this.

OK it’s 40 minutes to midnight so it’s time to shut down the computer and get (more) drunk 🙂

Happy new year!

 Posted by at 23:19