Tuesday, September 10, 2019

GPS Readout for Tesla

.

Saturday, June 9, 2018

Raspberry Pi - Base Working Image

I thought it might be helpful to some to document how I go about taking the latest version of Raspbian (available at https://www.raspberrypi.org/downloads/raspbian/) and customize it for myself. This makes it easier for me to start a project and make sure all the Pi's I work on have the same basic setup.

I tend to work from headless systems, so the first thing I do to the raw image file on my SD card is add a blank file named "ssh" to enable that functionality.  Next, add a file named "wpa_supplicant.conf" to your boot directory as well.   Include your WiFi information so you don't have to connect to Ethernet if you choose not to.

Take that disk image you have on your SD card and connect it to the Pi.  Connect however you choose (I use PuTTY) and login if needed.

Enter "sudo raspi-config" and make the following changes:

  • Change your password (seriously!)
  • Change your host name (I use a convention like PiBWIJune18) so I can find it in my DHCP list if I need to discover the IP and so I know which version I am using.
  • Expand yout file system to use the whole disk
  • set your keyboard type
  • set your time zone
  • optionally decide if you want to boot to desktop or command line
  • optionally enable VNC  (though if you are just doing command line, there is no need to do this.)
After you exit and save all that, now is a good time to reboot. 


Starting up again, I remove Wolfram Alpha.  It takes up about 700 MB and it's not something I use regularly.  I can always add it back if I need it for a project, but I haven't yet.  That command is "sudo apt-get purge wolfram-engine"

Another reason to remove Wolfram is that it seems to have a ton of updates and takes forever.  Once it is gone, run your system updates with "sudo apt-get update".

I run a home NTP server and quite a few of my projects are time related, so I always add NTP.  A great tutorial to do that is at: http://raspberrypi.tomasgreno.cz/ntp-client-and-server.html

Finally, I want an easy way to move files between Pi and my desktop as needed.  So I set up SAMBA sharing.  The tutorial I use it at: http://raspberrywebserver.com/serveradmin/share-your-raspberry-pis-files-and-folders-across-a-network.html

When that's done, I shut down the pi and make a backup.  That's the file I use to start my next project with, my "Base Working Image."

Hope this helps.  If not, at least I can find my notes next time there is a new Raspian release!





Thursday, February 22, 2018

Raspberry Pi NTP Time Server Notes

I've been playing with NTP on Raspberry Pi for a few years now and I had a really good system going with a Pi 2B.  Ever since I have switched to a Pi 3 I have had issues with a False Tick on my PPS that I have been chasing keeping me from Stratum 1 glory!

I was puttering with it today and made two changes that are looking positive, so I thought I would share them.


  1. https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi/using-uart-instead-of-usb
    I followed these instructions to insure my configuration was optimized to the connection.  The big change was to the config.txt file edit to add enable_uart=1
  2. http://www.satsignal.eu/raspberry-pi/Schmidt-RPZ-NTP-2016.pdf
    Updated my ntp.conf to reflect these notes.

My Pi quickly made the GPS the Syspeer!

Looking forward to letting it run for a while to see if PPS comes in.


pi@Telstar2:~ $ ntpq -c peer -c as -c rl


remote refid st t when poll reach delay offset jitter
==============================================================================
1.us.pool.ntp.o .POOL. 16 p - 1024 0 0.000 0.000 0.002
*SHM(0) .GPS. 0 l 3 8 377 0.000 61.197 62.375
xPPS(0) .PPS. 0 l 2 8 377 0.000 -39.896 8.612
172.16.1.255 .BCST. 16 B - 64 0 0.000 0.000 0.002
+time-d-wwv.nist .NIST. 1 u 13 64 377 47.668 -21.062 24.126
+3dgo.net 18.26.4.105 2 u 1047 1024 1 34.263 -3.189 2.058
-tock.no-such-ag 129.6.15.29 2 u 1048 1024 1 42.193 -7.840 1.825
-linode227395.st 192.5.41.41 2 u 3 1024 3 37.624 -38.834 34.088
-ntp2.wiktel.com 212.215.1.157 2 u 1042 1024 1 46.533 -6.673 2.901
-chimera.buffero 139.78.97.128 2 u 1043 1024 1 43.319 -6.320 1.988
#3.time.dbsinet. 209.51.161.238 2 u 5 1024 3 38.411 -4.024 11.058
-c-73-37-183-90. 199.102.46.70 2 u 1043 1024 1 55.524 -4.002 1.507
#soft-sea-01.ser 209.51.161.238 2 u 1035 1024 1 71.671 -14.885 4.472
-ntp.your.org .CDMA. 1 u 1034 1024 1 29.926 -12.408 2.628
-ntp1.wiktel.com .PPS. 1 u 1041 1024 1 43.801 -10.858 3.243









Pi for Echolink on RLC Controller - Part 4 - Read Me First

Pi for Echolink - Part 4

Short update - This did not work.   The Signalink did not provide a needed COR signal to the RLC-3.  Looking at a Rigblaster Plug & Play we can use with some additional wiring.


Sunday, January 28, 2018

Pi for Echolink on an RLC-3 Controller - Part 3 - Wiring the SignaLink


Welcome back to my build of a Raspberry Pi Echolink device to connect to an RLC-3 repeater controller.  You can find part 1 and part 2 here.

Wiring the SignalLink USB



In this part I am working on the cabling.  The RLC-3 controller takes a serial type connector also known as a DB9 RS232 cable.  On the other side, the SignaLink likes a RJ45 connector.

The RLC-3 will need a specific pin connection.  According to this FAQ, here's the pin connection I need to make.
 1 = GND (OPLT on RLC2 Main Port, instead of GND)  
 6,8,9 = GND
 2 = PL Input
 3 = PTT
 4 = Audio Out (To Transmitter)
 5 = Audio In (From Receiver)
 7 = COR Input

Now I need to see how the pins map to the RJ45 connector. I physically went in and mapped each pin to each connection, I confirmed the mapping after with this chart from Juniper.

Inside the SignaLink USB you can map each pin to it's respective connection to handle the audio.  Here's how I connected it.

RLC     RJ45
GND --- Pin 8

GND
GND
---
---
PTT --- Pin 6
MIC --- Pin 7
SPK --- Pin 4

I've added a few ferrites to all the cables since this is a HIGH RF environment.  In addition 5 club repeaters in that space, there is public service radio and broadcasters that we share the top of the building with.   We may need to do one additional connection inside the box to enable COR but that one is outside my current knowledge base.   

My next step is to turn the wired device over to the main repeater guys and let them do the final configuration of the SVXlink and RLC-3 in the next few days.  I hope they will share their configuration.  If they do, I will document via this blog.

73 de Jim N4BFR

Pi for Echolink on an RLC-3 Controller - Part 2 - SVXLink Install

My ham radio club would like to to add Echolink functionality to our repeaters.  In part 1 I did a basic Raspberry Pi setup.  In this version I will attempt to install the Echolink software.

Installing SVXLink


I have read several versions of instructions to trade off complexity vs functionality.
  • The Svxlink site has a really complicated version if you are one of those people who likes to compile yourself and make a bunch of optimizations to your Pi.   I started down this path, but I felt it was terrifically more complex than I needed.
  • The next version I tried, and made significant progress on was this one by KN4ADN.  It has some localization that people might find helpful.   
  • The one I ended up using is the version from the Svxlink site that installs a binary.  Finish the testing and you should hear something like this.




Success on getting the audio to play through a soundcard.  Now I will need to make a change to get it to use the Signalink for Audio Output.   Luckily, that's an easy change.  Editing in the same config file you did before:

 sudo nano /etc/svxlink/svxlink.conf  


Go to the [TX1] section and change the configuration for AUDIO_DEV to this:

 [Tx1]  
 TYPE=Local
 AUDIO_DEV=alsa:plughw:1
 AUDIO_CHANNEL=0

Exit out, connect your speaker to the MON port on the SignaLink.   Now start SVXlink again and run the *# command.  You should hear the relay click on the SignaLink and the audio clip play.

It's a good time to make a backup of your SD card again, because the next step will be to do deeper configuration of the software and wire the Signalink for the RLC-3.

Next Step: Wiring the SignaLink USB

Saturday, January 27, 2018

Pi for Echolink on an RLC-3 Controller - Part 1 - Pi Config

My ham radio club has wanted to enhance our repeater system and add Echolink functionality.   We had IRLP a few years ago but it had fallen out of favor and the gear was removed.   The skill will be to connect it to our repeater system via the RLC-3 controller.   I have not been able to find something specific online, so I am documenting here.

Part 1 - Get the Raspberry Pi basics going


For this project I am using a Raspberry Pi Model 3 B.  This is the latest version as of this writing and allows me the full size USB and Ethernet ports I want to use.

Get a version of the Raspberry Pi software onto a Micro-SD card.
    1. I am using the latest version of Rasbian (currently Stretch).  Downloaded the image from RaspberryPi.org and burned it using SD Card Formatter and Win32Disk Imager.   
    2. I like to run the Pi "headless" (without a monitor or keyboard) Before ejecting the card add a blank file named
      ssh
      to the boot drive to enable access via command line over the LAN.    If you want to use WiFi there are instructions for that online as well.
Directly connected to my LAN and found the IP address in my router.
    1. Login with the pi/raspberry password combination and change the password
    2. Run
       sudo raspi-config  
      
      and update the following:
      1. Network Options - > Hostname
      2. Localization Options -> Change Locale
      3. Advanced Options -> Expand Filesystem
    3. When complete finish and reboot.
Logging back in
    1. you should see your new host name next to your login like
      pi@ECHOLINK:~$
    2. I like to remove Wolfram Alpha from the standard distribution.  This is an optional step but this feature takes up a lot of storage (680+ MB) we won't use.  If you are using a big SD card, you can probably skip this step.  to remove:
       sudo apt-get purge wolfram-engine
    3. Now, make sure you have all your updates:
       sudo apt-get update  
       sudo apt-get dist-upgrade   
      (I did the removal first so I don't have to wait through a lengthy update process for that big file library
Shutdown your Raspberry Pi and make a backup of this disk image:
       sudo shutdown -h -P now  

      This allows me a clean place to go back to if I screw up the rest of it.