-
Fldigi Python API and Unkind Demo Gods
05/04/2017 at 07:43 • 0 commentsTwo bits of news.
I've recently gotten around to querying fldigi using the pyfldigi Python module. This needs Python3 since it makes use of xmlrpc.client which I could not find on Python2. If you take a look at the project source on Github in the reast-presentation directory I have a Jupyter notebook of me trying out some fldigi commands connecting to localhost (again I couldn't get it to bind to anything but).
However it looks like fldigi.text.get_rx_data() always returned b'' which was strange. Then I thought the FSQ I was sending out the Arduino beacon was wrong somehow which is why the decodes were not getting into the RX window to be 'get'ed by the API. So a bit of a brick wall there but I will persevere.
Update: I was told that MY callsign needs to have a CRC added to it and perhaps if that is not correct then the decodes are not happening.
The other bit of news is that I gave a short presentation at the REAST club rooms on Wednesday 3rd May. I've added the slides and Jupyter notebooks from that presentation to the source repo.
-
Configuring the Headless Pi
04/30/2017 at 05:34 • 0 commentsIn the past I've always attached a keyboard and mouse and HDMI monitor to the Pi to configure it initially. But here is how to configure an SDCard so it is headless, running SSH and connecting to your wifi network:
- dd the Raspbian image to the microSD card
- Re-insert the microSD card on your Linux laptop or desktop PC, it should automount the boot and linux partitions on the card
- cd /media/USERNAME/boot
- The USERNAME is your username
- touch ssh
- cd /media/USERNAME/02133478634982/
- The number above is the partition uuid, check the output from df -h for a clue
- cd etc wpa_supplicant
- wpa_passphrase YOURSSID "yourpassword" >> wpa_supplicant.conf
Then you can unmount the microsd card and put it in your Pi and it will boot up and put itself on your wifi network. I usually run an nmap ping scan (sudo nmap -sP SUBNET/24) to find out what new Raspberry Pi's have appeared on the network, and then add it's MAC address as a static DHCP IP address.
You can then ssh to your newly minted Pi and run sudo raspi-config to do things such as
- Change the hostname
- Set your default locale (eg en_AU.UTF-8) and timezone
- Expand the file system to take the rest of the microsd
- Enable the VNC server (you will need to download RealVNC connect to connect to it as encryption is turned on - don't know how to turn this off).
- Set your HDMI default resolution to something higher than the default, eg 1024x768 - this will allow the VNC server to also be this resolution
-
Raspbian, FlDigi and GQRX
04/30/2017 at 05:18 • 0 commentsThe version of fldigi on Raspbian Jessie is too old and does not have FSQ mode. You need to download it from here and compile it:
- sudo apt-get build-dep fldigi
- ./configure
- make
- make install
In addition to being an old version, GQRX in the Raspbian repos also did not work. However there is a binary installer that can be found here.
To connect these two up, you will need a loopback sound device. Add a line with 'snd-aloop' to /etc/modules
-
Too Much Power!
04/15/2017 at 13:06 • 0 commentsSo the minikits amp is 8W nominal output, 5W safe with a 5mW input. Looking at the I2C code for the clock generator, I can set 2mA output, on a 3.3v device that makes roughly 16mW power. I need to attenuate that input into the amplifier or I will overdrive it and overheat it.
The minikit does have spot on it to put a pi-attenuator. I calculate I need to attenuate by 6dB, so 1/4 of the power or 4mW input.
We calculated a pi-attenuator with 150R resistors on in parallel connected by a 39R resistor should give roughly 6dB attenuation. Now I need to find these in my boxes of bits!
You can see the calculation using this online RF Pi Attenuator Calculator
-
Receiving FSQ using fldigi and gqrx
04/15/2017 at 02:16 • 0 commentsOn the receiving side of the project, I'm going to use GQRX and FLDIGI. These are GUI apps so I will need to run a remote window manager on the Pi, but will give me superior diagnostic control. FLDIGI has a SDK that I can script up with a serial connection to the Arduino for TX and RX control.
To get FLDIGI to use the GQRX USB demod as output, you need to create a loopback sound device. This is as simle as
modprobe snd-aloop
And then selecting the loopback sound device in GQRX. Then in FLDIGI use the first Loopback sound device as the capture device.
-
WTF Serial
04/15/2017 at 01:50 • 0 commentsI wrote an Arduino sketch to transmit FSQ messages and have the serial port tell me what it's doing.
It didn't work.
The program would hang on first initialising the SI5351.
Remove the "Serial" lines from the code. It works. WTF.
I wonder if this is a bug with this old Arduino Nano or something worse.
Might try to use SoftwareSerial on some other pins.
-
Transferred to veroboard
04/14/2017 at 01:50 • 0 commentsOn the Arduino Nano, pin A4 is SDA and pin A5 is SCL for the I2C bus.
Today I moved the prototype from breadboard to veroboard. So there's a new photo.
I'll have to add more to the veroboard so I cut it big so I can add:
- TX/RX from UART to R-Pi
- Voltage regulator to take 12v in and give 3.3/5v out to power the Arduino Vin.
-
I2C Issues
04/09/2017 at 06:15 • 0 commentsOriginally I was going to use an RFDuino to control the clock generator. I backed the RFDuinos a few years ago in the crowd funding campaign but never used them as I generally needed more IO or something else wasn't right. Turns out the same thing again. The RFDuino uses pins 5 and 6 for I2C. I wired it up but found the I2C bus unstable. It would constantly reset. I had a sketch that would set a frequency and every 10 seconds query the Si5351 for it's top register.
Hello SYS_INIT: 1 LOL_A: 0 LOL_B: 0 LOS: 0 REVID: 1 SYS_INIT: 0 LOL_A: 0 LOL_B: 0 LOS: 0 REVID: 3 SYS_INIT: 0 LOL_A: 0 LOL_B: 0 LOS: 0 REVID: 3 SYS_INIT: 1 LOL_A: 1 LOL_B: 0 LOS: 1 REVID: 1
Looking at the RFDuino spec, it doesn't have a voltage regulator but accepts 1.8-3.6v. I was powering off USB but using the 3V and the GPIO pins are 0.7 * Vdd so I think the clock generator was resetting constantly.
Going back out to the shed I found an OLD Arduino Nano (so old it has a mini-USB port on it) but it worked fine and was able to run the Adafruit Si5351 library and see a signal at my test frequency at 145.225MHz, and the update of the register was working well too:
Hello SYS_INIT: 1 LOL_A: 1 LOL_B: 0 LOS: 1 REVID: 1 SYS_INIT: 0 LOL_A: 0 LOL_B: 0 LOS: 0 REVID: 3 SYS_INIT: 0 LOL_A: 0 LOL_B: 0 LOS: 0 REVID: 3 SYS_INIT: 0 LOL_A: 0 LOL_B: 0 LOS: 0 REVID: 3
On to the next task.