Thursday 26 December 2019

Yaesu 450D CAT Control

CAT Control on Yaesu 450D

Equipment needed

A PC, RS232 cables and luck..
Nothing special on the PC is needed. A simple USB->RS232 adapter and a CAT audio interface to connect to the data port. I used a Line In/Out audio interface to connect as I didn't have get the quality I wanted from a Microphone input on a cheap-n-nasty interface.

Audio Interface (PC)

 



The Behringer UCA202 from Ebay was picked as it used Line input and output levels. The interface is more suited for 600 Ohm line terminations that the Yaesu prefers.









For the Radio, I used the diagram at this site to connect to two RCA plugs. I tried with and without 600Ohm audio transformers but I didn't see any performance difference.


Digital interface

Nothing special here... a 1:1 straight through cable is needed. Pins 2,3,5 and 7,8 are wired 1:1 on a Female to Female DB-9 and that's all



PC Software

As most of the time I am on FT8 or WSPR, I will be showing how WSJT software setup works. I have had very ropey results with the CAT software and things go bad quite often.

To setup the PC, (WSJT-X)



I originally left everything at DEFAULT but that seemed to be the cause of randomness. I ended up adding an oscilloscope trace to the serial port and noticed that data was not being received properly - and thats when I realised things were not good.

Playing with numbers, I managed to get it all working again using 8 Data Bits, 2 Stop Bits and no handshaking

I set the baud rate to 4800 baud to give the best chance of good data over the link. 

The Radio

On the radio, using the (F)unction menu, The option CAT TOT was set to 1000 (its defaulted at 10) and CAT RTS/CTS was disabled
















Saturday 2 November 2019

[Linux] Automounting NFS using PAM_EXEC

Linux - Using PAM_EXEC to mount userspaces


PAM_EXEC - What is it?

On a Linux box, users are authenticated via a PAM module. These modules check passwords, and do tasks before the shell is presented.
PAM_EXEC will allow you to run a script when the user logs on/out or changes passwords.

My Mission

The main aim was to mount a NFS space under the users $HOME directory when they login. This allows for shared storage to be used and no-matter what server the user logs in to, their NFS shares are present.

My script

A file named  /usr/local/bin/mounthome.sh with the below contents. Set the file permissions to execute using chmod +x /usr/local/bin/mounthome.sh

Change the mount server and volumes to suit your own server needs. The below will create a directory called nfs and mount the NFS server under it

 

#!/bin/bash
#   
#        "User: $PAM_USER"
#        "Remote Host: $PAM_RHOST"
#        "Service: $PAM_SERVICE"
#        "TTY: $PAM_TTY"

if [ "$PAM_TYPE" == "open_session" ]
then
        mkdir /home/$PAM_USER/nfs
        mount -t nfs -o user server.local:/volume1/$PAM_USER /home/$PAM_USER/nfs
        chmod 777 /home/$PAM_USER/nfs
        chown $PAM_USER:$PAM_USER /home/$PAM_USER/nfs
fi

if [ "$PAM_TYPE" == "close_session" ]
then
        umount /home/$PAM_USER/nfs
fi

exit 0


Executing it using PAM

Modify /etc/pam.d/common-session file accordingly:

session    optional     pam_exec.so    /usr/local/bin/mounthome.sh

And thats all it takes!



Thursday 10 October 2019

Logic Level Shifters - Practical things of the BBB

Logic Level Shifters (on the BBB)

 

The Beaglebone

Using the BeagleBone PRU_1 as inputs, you have to take care of what other functions are also present on the pins. For example, the PRU1 0..8 pins are also BOOT configurations! These pins tell the BBB what to do on powering up.There is a specific combination of pull-up and pulldown resistors on the port to setup modes for the CPU.

When adding level shifters to these pins - be aware!


The Simple FET shifter (Bidirectional)


Using a device from EBAY, the FET can be used - but you need to know what it is doing..


From the circuit, you can see that R3 is a pullup. Adding this will override the BBB's on-board BOOT strapping if you use it on PRU_1 and you may notice that your board will fail to boot. 







Zener Clamps 

Conclusion : Not suitable for high speed logic

For a simple unidirectional clamp, a 3.3V Zener diode can be used to limit the voltage.There are 2 components - cant be easier! - if you have Zener diodes to hand!

So far I am favouring the above circuit - I have to confirm that it can handle the speed I need and it doesnt skew the signal edges.

After some tests - this is unsuitable for high speed using the components I had to hand.

The blue trace is the 5V signal, the yellow is the output to the Beaglebone - this is not good.




TXS0108E

NOTE!  there are 2 different versions.. TXS and TXB - One is for open collector and the other is for Push-Pull. I bought the Open collector version.. Wrong part for a BUS configuration.

A range of chips from TI are available for the purpose of level shifting.



You can buy read made tiles from EBAY and other online shops.





From the Breakout,  there is quite a special feature that is available when using this chip. On the bottom right is an OE signal input. This allows for the outputs of the level converter to be tri-stated to Hi-Z and only when the BBB cpu has completed its bootup, this pin can be asserted which wakes up the converter. 

This allows for the PRU1 bus to be 'left disconnected' until linux is running, which at that point I can switch on using a GPIO 



I have now settling on...
 
 
TEXAS 
lNSTRUMENTS 
б Pin Configuration and Functions 
DB, OW, ОН pw PACkAGE 
[тор 
SN74LVC4U5A 
scAS375I -МПСН lY9'-REWSED lANUARY 2015 
А4 
Аб 
GND 
GND 
10 
12 
24 
23 
21 
20 
18 
17 
16 
15 
13 
\Јссв (3,3 М) 
VccB (3.3 М) 
81 
вз 
84 
GNO 
МАМЕ 
VccA 
GNO 
GNO 
GNO 
Vcc8 
Vcc8 
Pin Functions 
DESCRlPT'0N 
Pouer supply for side А 
Directjon сог*го• 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 
Ground 
Ground 
Ground 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
Transceiver 1/0 pf 
0utput ЕпвВ'е 
Pouer supply for side В 
Pouer supply for side В