Cynics Soapbox

Random thoughts...

Modbus: 2 Readers, 1 Producer

Modbus: 2 Readers, 1 Producer

Our Solax inverter talks to the power meter via 2-wire modbus. It works well but the inverter really does want a constant stream of information so the requests flow at a high rate. We want to monitor our consumption of electricity, which means we want to look at data from the power meter at the same time as the inverter. This isn't how the Modbus protocol works though. Only one Reader (not the term used in the spec but I'm...

Protobuf

Protobuf

I've been trying to talk to a network device that uses Googles Protocol Buffers for it's data exchange. Fair enough and thankfully someone had already done the work and created the needed protocol file. Of course, it was created a while back and protobuf has moved onto proto3! Enter proto3!After copying the original proto file across to my project, I edited it to adapt to the newer proto3 specification and pressed on with actually using it. syntax="proto3"; package...

Remote VS Code on FreeBSD

Remote VS Code on FreeBSD

I've been using VSCode as my primary code editor for a long time, but recently I've been doing more and more working on code that will run on remote machines. The whole edit, rsync, edit cycle ws getting a little boring so I finally looked at using the remote extensions. I added the Remote-SSH extension, added the first host (a RaspberryPi)  I needed and suddenly I was editing the code directly on that machine. Simples! Why didn't I do this...

SDR Pt.6

SDR Pt.6

It's been a while since I was able to devote much time to this and as the Weather Underground service is still not accepting submissions it hasn't been a high priority. However, with the festive season upon us and some time available I sat down to look at things again. The code I had written worked on my laptop but failed on the RaspberryPi :-( thinking about the differences between them an obvious line of investigation was the relative processing...

SDR Pt.5

SDR Pt.5

After the highs and low of the last coding session, it was heartwarming when after a few minor tweaks I saw this... Reading direct from the ISS :-)Now I had readings the next step was to start collecting them and then uploading to Weather Underground via their Personal Weather Station (PWS) network. My initial aim was to get a simple uploader working and then refine the data to slowly add the more complex items as time permits, but this...

SDR Pt.4

SDR Pt.4

I've managed to spend more time looking at it and have made some progress, though have once again run into issues. After much investigation I've created a processing flow that takes the raw samples and can extract valid weather packets -  but only from recorded files. When trying with live data it always returns invalid packets :-( The flow is this parse the samples into complex numbersdown mix these initial complex numbers using an appropriate frequency offsetpass the downmixed data...

SDR Pt.3

SDR Pt.3

Having found what appeared to be signals from the weather station in the data I captured (read here for more) the next logical step was to try and decode it. Inspectrum has some useful tools and following an example of analysing data I watched on YouTube, I started by adding a frequency plot (right click, Add derived plot > Add frequency plot). The center of the plot and the spectrum covered can be easily adjusted. Frequency plot centre and spread...

SDR Pt.2

SDR Pt.2

Continuing to try and figure out how to grab the data from the SDR it struck me I had  a few pieces of the puzzle to complete. Can I actually capture the data using the SDR? Until I know for sure that the data is available then doing anything else seems a little premature.If I can see the data, can I decode it and does it look as the information I have found on the web implies it should?...

SDR

SDR

For the last few years I’ve had a Davis Vantage Vue weather station. It’s been great though getting the data in a useful format is far from easy. Following our recent move the weather station needs to be relocated. It’s new home will be more exposed and as we’re still building the house there isn’t anywhere convenient to locate the large weather station base unit or associated pieces to upload the data. This has led...

RaspberryPi & SWD

The KroozSD board now comes with a handy SWD connector, a simple 3 pin 1mm JST located in the middle of the board. As debugging is one of the harder aspects of embedded development the connector has always been an interesting addition but finding a way to interact with the port has proved tricky. While I have several devices that claim to offer the required interfaces, none of them have proved to be supported. However, I came across an article...

Quad Update #7

In my earlier post I said that the bootloader for the KroozSD was luftboot, but in reality it’s available here. The version contained in that tree doesn’t appear to be fully up to date as there is no CRC and the strings reported by the device are different, but I’m assuming the current code is similar. While I realise I could simply switch to a different laptop, I can’t help but feel this should be a...

Routing D'oh!

React-router is a great addition to React, but yesterday marked the first time I had used it for a project. It led to a period of head scratching, but maybe this post will help someone else avoid the same mistake I made! Simple Setup Installing it was simple enough. npm install --save react-router Having installed it I then added the import lines, import {Router, Route, Link, browserHistory} from 'react-router'; and then added some routes to the root component. render(( ), document....