Difference between revisions of "Building a 4 Port Packet Controller"
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | This page serves to be a guide for those wishing to build a 4 port packet controller on a Raspberry Pi 3 B+ or similar hardware. This design allows any combination of software TNC ([https://github.com/wb2osz/direwolf Direwolf] or G8BPQ's [https://www.cantab.net/users/john.wiseman/Documents/QtSoundModem.html QtSoundModem]) or G8BPQ's C port of [https://www.cantab.net/users/john.wiseman/Documents/ARDOPC.html ARDOP] modem for HF. This means the controller can have any combination of up to 4 300/1200/2400/4800/9600 baud packet and/or ARDOP modems running simultaneously. When coupled with G8BPQ's excellent packet switch, this allows for a low cost controller to house a multiport packet system or to act as a "network TNC" for other software, including [https://www.outpostpm.org/index.php Outpost PPM], [https://winlink.org/WinlinkExpress Winlink Express], [https://www.cantab.net/users/john.wiseman/Documents/index.html BPQ32], [https://ohiopacket.org/xrpi/ XRouter] and others which support the AGWPE and/or KISS over TCP protocols. It uses the very popular Linksys WRT54G or BEFSR41 router as an enclosure as well as acts as a 3 or 4 port 10/100 megabit network switch to allow expansion of controllers and/or addition of other network devices. When coupled with a WRT54G, this can also include providing a wireless access point or if flashed with [https://dd-wrt.com/ DD-WRT firmware], bridging to a wireless access point (Wireless client). This should cost under $100 USD to build, most of the part values are not critical. | + | This page serves to be a guide for those wishing to build a 4 port packet controller on a Raspberry Pi 3 B+ or similar hardware. Please note that due to a [https://github.com/raspberrypi/linux/issues/3962 hardware design limitation], the Raspberry Pi 4B+ and it's variants is unable to drive more than one soundcard at a time. This design allows any combination of software TNC ([https://github.com/wb2osz/direwolf Direwolf] or G8BPQ's [https://www.cantab.net/users/john.wiseman/Documents/QtSoundModem.html QtSoundModem]) or G8BPQ's C port of [https://www.cantab.net/users/john.wiseman/Documents/ARDOPC.html ARDOP] modem for HF. This means the controller can have any combination of up to 4 300/1200/2400/4800/9600 baud packet and/or ARDOP modems running simultaneously. When coupled with G8BPQ's excellent packet switch, this allows for a low cost controller to house a multiport packet system or to act as a "network TNC" for other software, including [https://www.outpostpm.org/index.php Outpost PPM], [https://winlink.org/WinlinkExpress Winlink Express], [https://www.cantab.net/users/john.wiseman/Documents/index.html BPQ32], [https://ohiopacket.org/xrpi/ XRouter] and others which support the AGWPE and/or KISS over TCP protocols. It uses the very popular Linksys WRT54G or BEFSR41 router as an enclosure as well as acts as a 3 or 4 port 10/100 megabit network switch to allow expansion of controllers and/or addition of other network devices. When coupled with a WRT54G, this can also include providing a wireless access point or if flashed with [https://dd-wrt.com/ DD-WRT firmware], bridging to a wireless access point (Wireless client). This should cost under $100 USD to build, most of the part values are not critical. |
[[File:4PPC_Schematic.jpg|320px]] | [[File:4PPC_Schematic.jpg|320px]] | ||
Line 763: | Line 763: | ||
Once downloaded, consider pulling it into a preferred text editor and review each step. Afterwards, make the script executable and run it. | Once downloaded, consider pulling it into a preferred text editor and review each step. Afterwards, make the script executable and run it. | ||
− | chmod +x controller_setup.sh | + | chmod +x controller_setup.sh<br> |
− | sudo ./controller_setup.sh | + | sudo ./controller_setup.sh<br> |
The script will print a basic summary of each step, after each step completes, it will prompt to "Press any key" to continue. This is intended to allow capturing of error messages along the way or review of items changed. If something goes wrong, pressing CTRL+C will exit out of the script. | The script will print a basic summary of each step, after each step completes, it will prompt to "Press any key" to continue. This is intended to allow capturing of error messages along the way or review of items changed. If something goes wrong, pressing CTRL+C will exit out of the script. | ||
Line 778: | Line 778: | ||
This script will | This script will | ||
− | 1) Remove packages which do not permit running from a read only filesystem | + | 1) Remove packages which do not permit running from a read only filesystem<br> |
− | 2) Install busybox-syslogd and remove rsyslogd | + | 2) Install busybox-syslogd and remove rsyslogd<br> |
− | 3) Update cmdline.txt to boot read only | + | 3) Update cmdline.txt to boot read only<br> |
− | 4) Create symbolic links for specific paths and files, allowing them to run from tmpfs | + | 4) Create symbolic links for specific paths and files, allowing them to run from tmpfs<br> |
− | 5) Moves random-seed to tmpfs and update systemd unit to suite | + | 5) Moves random-seed to tmpfs and update systemd unit to suite<br> |
− | 6) Updates /etc/fstab to mount /boot and / read only | + | 6) Updates /etc/fstab to mount /boot and / read only<br> |
− | 7) Adds several tmpfs entries to /etc/fstab to allow read write to system RAM | + | 7) Adds several tmpfs entries to /etc/fstab to allow read write to system RAM<br> |
− | 8) Appends lines to /etc/rc.local to update /etc/resolv.conf and restore alsactl levels | + | 8) Appends lines to /etc/rc.local to update /etc/resolv.conf and restore alsactl levels<br> |
This too should be reviewed prior to being run. Once logged into the Raspberry Pi 3 the script can be downloaded with | This too should be reviewed prior to being run. Once logged into the Raspberry Pi 3 the script can be downloaded with | ||
Line 793: | Line 793: | ||
Once downloaded, consider pulling it into a preferred text editor and review each step. Afterwards, make the script executable and run it. | Once downloaded, consider pulling it into a preferred text editor and review each step. Afterwards, make the script executable and run it. | ||
− | chmod +x controller_setup.sh | + | chmod +x controller_setup.sh<br> |
− | sudo ./controller_setup.sh | + | sudo ./controller_setup.sh<br> |
The script will print a basic summary of each step, after each step completes, it will prompt to "Press any key" to continue. This is intended to allow capturing of error messages along the way or review of items changed. If something goes wrong, pressing CTRL+C will exit out of the script. | The script will print a basic summary of each step, after each step completes, it will prompt to "Press any key" to continue. This is intended to allow capturing of error messages along the way or review of items changed. If something goes wrong, pressing CTRL+C will exit out of the script. | ||
Line 806: | Line 806: | ||
ro | ro | ||
− | In some cases, the "ro" command will report | + | In some cases, the "ro" command will report "mount: /: mount point is busy." and a remount read only is not possible. Generally this is due to a service opening a file read write, a reboot will always correct this condition. |
--- | --- | ||
Line 816: | Line 816: | ||
This script will | This script will | ||
− | 1) Create a running folder of /home/pi/bpq | + | 1) Create a running folder of /home/pi/bpq<br> |
− | 2) Download the most recent version of pilinbpq from G8BPQ's website | + | 2) Download the most recent version of pilinbpq from G8BPQ's website<br> |
− | 3) Download the accompanying HTMLpages and unzip them | + | 3) Download the accompanying HTMLpages and unzip them<br> |
− | 4) Create a startup script that allows updating of pilinbpq on restart | + | 4) Create a startup script that allows updating of pilinbpq on restart<br> |
− | 5) Create, enable and start a systemd unit to handle the start, stop and restart of BPQ | + | 5) Create, enable and start a systemd unit to handle the start, stop and restart of BPQ<br> |
This too should be reviewed prior to being run. Once logged into the Raspberry Pi 3 the script can be downloaded with | This too should be reviewed prior to being run. Once logged into the Raspberry Pi 3 the script can be downloaded with | ||
Line 828: | Line 828: | ||
Once downloaded, consider pulling it into a preferred text editor and review each step. Afterwards, make the script executable and run it. | Once downloaded, consider pulling it into a preferred text editor and review each step. Afterwards, make the script executable and run it. | ||
− | chmod +x bpq32_setup.sh | + | chmod +x bpq32_setup.sh<br> |
− | sudo ./bpq32_setup.sh | + | sudo ./bpq32_setup.sh<br> |
---- | ---- | ||
+ | |||
+ | With all of this completed, the controller needs some configuration to become operational. At a minimum, /home/pi/bpq/bpq32.cfg must be edited to an appropriate callsign. It is suggested to update ALIASes to reflect the system location and/or role. Each of the ports should be updated to reflect appropriate information, a frequency and baudrate is suggested. The Telnet port allows remote access to the node, pay careful attention to the USER= lines which contain usernames and passwords for access. | ||
+ | |||
+ | More configuration information can be found in the [[4 Port Controller Administration Guide]] |
Latest revision as of 14:48, 25 October 2022
This page serves to be a guide for those wishing to build a 4 port packet controller on a Raspberry Pi 3 B+ or similar hardware. Please note that due to a hardware design limitation, the Raspberry Pi 4B+ and it's variants is unable to drive more than one soundcard at a time. This design allows any combination of software TNC (Direwolf or G8BPQ's QtSoundModem) or G8BPQ's C port of ARDOP modem for HF. This means the controller can have any combination of up to 4 300/1200/2400/4800/9600 baud packet and/or ARDOP modems running simultaneously. When coupled with G8BPQ's excellent packet switch, this allows for a low cost controller to house a multiport packet system or to act as a "network TNC" for other software, including Outpost PPM, Winlink Express, BPQ32, XRouter and others which support the AGWPE and/or KISS over TCP protocols. It uses the very popular Linksys WRT54G or BEFSR41 router as an enclosure as well as acts as a 3 or 4 port 10/100 megabit network switch to allow expansion of controllers and/or addition of other network devices. When coupled with a WRT54G, this can also include providing a wireless access point or if flashed with DD-WRT firmware, bridging to a wireless access point (Wireless client). This should cost under $100 USD to build, most of the part values are not critical.
Before starting this build
1) It is assumed there is a working Raspberry Pi 3 B+ with Raspian/Raspberry Pi OS 10 installed. This will probably work for Raspbian 9 and hopefully 11
2) Remote access via SSH has been setup. Once this build is complete, the Raspberry Pi 3 B+ will run headless
3) The onboard soundcard has been disabled. This is accomplished by editing /boot/config.txt and adding the line
dtparam=audio=off
Then reboot
4) While the software setup is believed to be safe, please be sure that all important data is backed up in case something goes wrong.
5) All software setup will happen after the hardware build is complete.
Required parts
1) 1x 24x12 hole perf board
2) 4x 10k 1/4w resistors
3) 4x 2n2222 Transistor or equivalent
4) 4x 1n4004 Diode or similar
5) 8x 50K Potentiometer or similar
6) 4x 10uF Electrolytic Capacitors
7) 4x USB Soundcards, no specific chipset needed
8) 2-3ft of Ribbon cable, multicolor suggested
9) 4x 18" Devicenet 2PR22 or equivalent cable
10) 1x Raspberry Pi 3B or 3B+
11) 1x 12VDC to 5VDC downconverter
12) 1x WRT54G versions v2.0 or above or BEFSR41 v4.0 or above
13) 8-12" of 22awg solid wire (Petsafe or equivalent)
14) 1/8" Heatshrink tubing
15) 1/4" Heatshrink tubing
16) 1x RJ-45 connector and 6-8" of CAT-5 type cable
17) 4x DB9 solder type female connector, cup type leads recommended
18) 4x DB9 Hoods, metal plated recommended
19) 9/64ths or 5/16ths inch drill bit and drill
20) Soldering iron with fine tip and solder
21) Electrical tape
22) Bench vice (optional)
Assembly
1) Starting with a 24x12 hole perf board, take one of the 2n2222 transistors and place it 8 holes back and with pin 1 (emitter) 4 holes in from the left
2) Take one of the 1n4004 diodes and on the ringed side, bend the lead 180 degrees downward
3) Insert the 1n4004 diode directly behind the 2n2222 with it's anode (no stripe) directly behind the 2n2222 emitter and it's cathode (striped, bent 180 degrees) behind the 2n2222 base (center pin)
4) Take one of the 10K resistors and bend one lead 180 degrees, similar to the 1n4004 in step 2
5) Insert the 10k resistor where the long lead goes through the same hole as the 2n2222 base (center pin) and the resistor itself goes through the pin one hole away from the 2n2222.
6) Flip the perf board over, bend the 2n2222 emitter, base leads towards the back of the board and the collector lead towards the front of the board. Bend both the thicker leads of the 1n4004 diode towards the front of the board. Bend the lead of the 10K resistor that shared a hole with the 2n2222 base backwards and the other lead of the 10K resistor forward.
7) Take the 10K resistor lead which was bent forward and feed it back up through the perf board to the top (component side)
8) Take the collector lead from the 2n2222 and feed it back up through the perf board to the top similarly to the 10K resistor.
9) Take the anode side of the 1n4004 (no stripe) and feed it's lead through the same row of holes in the perf board to the top as the 2n2222 collector
10) Flipping the perf board back to the component side, bend all leads towards the front of the board.
11) Flipping the perf board over to the lead side, apply solder to the junction of the 1n4004 anode and 2n2222 emitter as well as the junction of the 1n4004 cathode and 2n2222 base+10K resistor.
12) Using wire cutters, carefully clip the excess leads on either side of the 1n4004 cathode, 2n2222 base and 10K resistor (center most junction). Do not trim the lead coming off the 1n4004 cathode and 2n2222 emitter, we will need it for connection to ground in a future step.
13) Flipping the perf board back over, trim the diode, resistor and 2n2222 leads to be just long enough to go over the next hole towards the front of the perf board
14) Skip one hole to the right and repeat the assembly of the 2n2222, 1n4004 and 10K resistor (Steps 1-13). Be careful to not trim the lead on the underside for the 1n4004 cathode and 2n2222 emitter.
15) Repeat steps 1-14 for the remaining 2 PTT circuits, when finished it should look similar to this.
16) Take one of the 50K potentiometers and bend the wiper pin back towards the other two pins. The original is on the left, the bent is on the right
17) Insert the potentiometer at the back of the perf board, one row of pins from the rear all the way to the left.
18) Flipping the board over, bend the outer most lead towards the front of the board and the wiper and inner leads towards the rear of the board.
19) Repeat steps 16-18 for the 7 remaining potentiometers, when finished it should look similar to this.
20) Take a 4 conductor ribbon cable and cut it to about 4-5/8" length.
In this guide the color map is
Purple: TX Audio
Blue: PTT
Green: RX Audio
Yellow: Ground
21) Strip back about 1/4" from the purple lead and 3/16" from the green lead, twist and tin with solder.
22) Inserting the purple wire through the perf board, bend towards the 50K potentiometer furthest from the PTT circuits. This lead will need to overlap with the lead from the 50K potentiometer, if the wire is too short, pull it back out and strip a bit more insulation and try again. Once long enough, solder the purple lead to the 50K potentiometer.
23) Inserting the green wire through he perf board, bend towards the wiper of the adjacent potentiometer where the purple wire was soldered. This lead does not need to be as long, just long enough to overlap with the wiper lead. Once bent and sufficient length is verified, solder the green lead to the 50K potentiometer wiper.
24) Pull the blue and yellow wires down to the lead side of the perf board. They will be attached in a future step.
25) Repeat steps 20-24 for the next 4 conductor ribbon cable, when finished it should look similar to this.
26) Repeat steps 20-24 for the 2 remaining 4 conductor ribbon cables, when finished it should look similar to this.
27) Take one of the USB soundcards and carefully begin to pry apart it's shell. A box cutter or similar knife along the groove seems to work well.
28) Flipping the USB soundcard over, using a pair of needle nose pliers and a soldering iron, carefully heat the audio connectors and gently pull them away from the soundcard. It will probably take a few times rotating between pins, but it should eventually pull off the board.
29) Repeat this process for the other jack on the soundcard, when complete the card should look similar to this.
30) Apply solder to the 2 solder pads furthest from the USB connector on the microphone side and center most pin on the speaker/phone side.
31) Take one of the 10uF electrolytic capacitors and solder it to the outer most pad on the microphone connector. Be sure to have the side with arrow pointing away from the pad. This is to block a small DC bias which is commonly present on the microphone line on soundcards. When completed it should look similar to this.
32) Bend the axial lead of the capacitor 180 degrees back towards the soundcard. Once the lead is bent over the soundcard, cut the lead to be just short of the soundcard itself.
33) Repeat steps 27-32 for the remaining 3 soundcards.
34) Take a 3 conductor ribbon cable and cut it to about 6-3/4" length.
In this guide the color map is
Red: Microphone Input
Orange: Ground
Yellow: Speaker output
35) Strip about 1/4" of the Red wire, twist and tin, then insert into the outer most potentiometer next to the green lead. Once overlap with the potentiometer lead is confirmed, solder into place.
36) Strip back about 3/16" of the yellow wire, twist and tin, then insert into the wiper of the outer most potentiometer wiper next to the purple lead. Once overlap with the potentiometer wiper is confirmed, solder into place.
The 3 conductor ribbon cable should look like this from the top of the perf board.
37) Repeat steps 34-36 for the second 3 conductor ribbon cable cut to about 6-1/4" length to the next set of potentiometer. The third ribbon should be cut to about 5-3/4" and fourth ribbon should be cut to about 5-1/4". When finished it should look similar to this.
38) Flipping the perf board over to the lead side, pull the blue wire from the 4 conductor ribbon cable through the gap on the 3 conductor ribbon and pull it forward towards the front of the board
39) Cut about 4-1/2" of the 22awg solid insulated wire for use as a ground bus wire.
40) Strip back about 1" of insulation off one end and lay the ground bus wire along the perf board. We want it to run along right next to the 50K potentiometers, which do not have wires soldered to them as well as the 2n2222 emitter lead tails we left from previous steps. Using a box cutter or similar, cut the insulation to length which shields the bus wire, but exposes the wire where solder connections need to be made.
41) Once the insulation is cut, pull the insulation away to expose the wire to each point that needs soldered.
42) Repeat cuts of the insulation to allow connections to all potentiometers and other ground leads.
43) Carefully apply solder to each junction where a ground connection is to be made. The first connection should look similar to this.
44) The third junction is both the potentiometer as well as the 2n2222 lead. Bend the 2n2222 lead over the bus wire before applying solder.
45) Continue soldering the ground leads and potentiometer, the finished soldering should look similar to this.
46) Bend the ground bus wire at a right angle, towards the front of the perf board.
47) Strip back insulation to where the ground bus wire is exposed along the same row of holes with all the other PTT circuit leads.
48) Pull the exposed ground bus wire through the perf board to the component side.
49) Flipping the board over to the lead side, attach stripped insulation to the exposed bus wire and bend it towards the front of the perf board. There is one point where the exposed bus wire is close to a 1n4004 cathode, 2n2222 base and 10K resistor lead. Be sure to leave sufficient space, slightly bending the ground bus wire if needed.
50) Strip about 3/16" of insulation off the orange and yellow wires on the first couple of potentiometers, twist and tin the leads.
51) Cut about 3/8" of 1/8" heat shrink tube and slide it over the yellow wire, bend the orange and yellow wires together and solder them together.
52) Slide the 1/8" heat shrink tube over the soldered junction; apply heat with a heat gun, hair dryer or similar to shrink the tubing over the soldered junction.
53) Repeat steps 50-52 for the three remaining wire pairs, when finished it should look similar to this.
54) On the first 3 conductor ribbon cable, pull apart the 3 wires, strip about 3/16", twist and tin each wire.
55) Solder the red wire to the electrolytic capacitor, the yellow wire to the inner solder pad which has solder added and yellow wire to the inner speaker output pad.
56) Repeat steps 54-55 for the remaining three soundcards.
57) Cut about 2 1/2" of orange wire, strip back about 3/16", twist and tin one end.
58) Insert the tinned wire into the perf board adjacent to the first 10K resistor lead.
59) Bend the lead towards the back of the board, overlapping with the 10K resistor lead.
60) Apply solder to this overlap, soldering the first orange wire to the 10K resistor lead.
61) Cut about 1" of orange wire, strip back about 3/16", twist and tin one end.
62) Insert the tinned wire into the perf board adjacent to the 2n2222 lead.
63) Bend the leads towards the back of the board, overlapping with then 2n2222 lead.
64) Apply solder to this overlap, soldering the second orange wire to the 2n2222 lead.
65) Strip the ends of the 1" second orange and neighboring blue wire, twisting and tinning the leads.
66) Cut about 3/8" of the 1/8" heat shrink tubing and slide over the orange wire, solder the second orange wire to the neighboring blue wire.
67) Slide the heatshrink over the soldered junction and apply heat to shrink the heatshrink tubing over the junction.
68) Repeat 58-67 using about 3" of red wire for the second circuit, 3-1/2" of brown wire for the third circuit and 4" of white wire for the third circuit. When finished it should look similar to this.
69) Cut about 2" of black wire, strip back about 3/16", twist and tin one end. Insert in the hole adjacent to the ground bus wire.
70) Bend the tinned black wire lead towards the back of the perf board, overlapping with the copper ground bus wire, apply solder to the junction.
71) Take one of the 18" Devicenet cable and strip back about 5/8" of the outer jacket.
72) Fold back the braid on the Devicenet cable.
73) Carefully pull the nylon threads from the bundle and cut away the threads.
74) Separate the red/black and blue/white pairs and bare ground wire.
75) Carefully peel away the foil surrounding the red/black pair, a small cut in the foil may be needed to begin peeling away. Repeat this for the blue/white pair as well
76) Separate all wires in the Devicenet cable bundle.
77) Strip back about 1/8" of insulation from the red, black and blue wires, twist and tin along with the bare ground wire. Do not strip back any insulation on the white wire.
78) Pull apart all wires on the first 4 conductor cable, strip back about 3/16" of each wire, twist and tin the leads. Cut about 1" of 1/4" heat strink tubing and slide it over the 4 conductor cable.
79) Cut 4 sections 3/8” lengths of 1/8" heatshrink tubing, sliding the first section over the red wire of the devicenet cable, solder the red devicenet cable to the purple ribbon cable.
80) Slide 1/8" heatshrink tubing over the black wire, solder the black devicenet cable to the blue ribbon cable.
81) Slide 1/8" heatshrink tubing over the blue wire, solder the blue devicenet cable to the green ribbon cable.
82) Slide 1/8" heatshrink tubing over the bare wire, solder the bare wire from the devicenet cable to the yellow ribbon cable.
83) Cut about 5/8" of 1/8" heatshrink tubing over the white wire, leaving some heatshrink past the end of the white wire and slide the other heatshrink tubing over the junction of the 4 soldered wires.
84) Apply heat to the 1/8" heatshrink tubing, to cover the soldered junctions and end of the white wire.
85) Carefully pinch the heatshrink, which runs past the tip of the white wire. This will be hot from the heat gun so be careful.
86) Pull all wires together and squeeze gently, slide the 1/4" heatshrink tubing over the bundle of soldered wires.
87) Apply heat to the 1/4" heatshrink to insulate the bundle of soldered wires.
88) Wrap electrical tape starting over the heatshrink, wrapping past the folded back braid of the devicenet cable.
89) Repeat steps 71-88 for the remaining three devicenet cables. When finished it should look like this.
90) Take the Raspberry Pi 3 and flip it upside down, we will need to locate the solder pads on the underside to attach the needed 4x GPIO pins, 2x Ground pins and 1x +5VDC power input pin.
91) Rotating the Raspberry Pi 3 to bring the 40 pin header forward, apply heat and solder to the five right most pins. When completed it should look similar to this.
92) Moving to the left side of the 40 pin header, skip the left most pin, but apply heat and solder to the next two most pins. When completed it should look similar to this.
93) Using scrap insulation from the 22awg solid wire, slide the insulation over the outer most pins on the 40 pin GPIO header. The insulation length should be slightly shorter than the pin itself. Repeat for both rows of pins on the far left and right sides.
94) Apply slight pressure to insulation to side it down fully onto each pin, this should expose a small amount of the tip of the pins on all 4 corners of the 40 pin header.
95) Taking more of the 22awg solid wire insulation, slide it over the two right most pins on the 4 pin header near the 40 pin header, if present. This should be cut to full length of the pin as our only objective is insulating these pins from the perf board.
96) Carefully take the assembled perf board and line up the front two rows of holes with the 40 pin header on the Raspberry Pi 3, be sure to bundle the 5x wires coming from the under side into the gap between the 40 pin header and 4 pin header if present. Press down on the perf board and ensure that the header pin tips are visible through the perf board.
97) Cut about a 5" length of 2 conductor ribbon. This will be used to pick off 12VDC from the WRT54G or BEFSR41 so choose colors which represent this. In this example we will use white wire for +VCC and black wire for ground/return.
98) Locate the WRT54G or BEFSR41 for service, double check the device version, for WRT54G we want to use hardware versions 2.0 or above and for BEFSR41 we want to use hardware versions 4.0 or above. This is only for physical space for the Raspberry Pi 3. Earlier versions have some obstructions in the area making mounting the Raspberry Pi difficult.
99) Carefully apply pressure to one of the front legs on the WRT54G/BEFSR41, this should eventually allow the face to pry apart from the body. In some units this plastic is brittle and may break, in this example it came apart, though some damage to the plastic is visible. If there is significant difficulty in removing the face, pull out the rubber feet and look to see if there are screws holding the face to the bottom of the enclosure. This was present in some, but not all units. Once the first side is open, pull the entire face away from the remainder of the unit, exposing the internal main board.
100) If using a WRT54G with removable antennas, unscrew both antennas and set them aside for now then push the top of the cover towards the back, this should move it past tabs on the base of the enclosure and allow the top to be lifted up and removed.
101) Looking towards the back of the main board, there should be one or two screws holding the main board to the bottom of the enclosure. Unscrew this screw and set it aside for now or screw it back into the bottom of the enclosure to separate the board completely.
102) Strip about 3/16" of insulation off the 2 conductor ribbon from step 97, twist and tin.
103) Flipping the WRT54G/BEFSR41 upside down, locate the DC power connector and solder the 12VDC wire to the inner most solder point and the ground wire to the perpendicular solder point. This should provide 12VDC along the power cable.
104) On the opposite side of the 2 conductor ribbon, strip about 3/16" of insulation, twist and tin.
105) On the 12VDC to 5VDC converter, locate the input pins, in this example they are labeled In- and In+.
106) Insert the 12V lead into the In+ hole and solder into place, insert the ground lead into the In- and solder.
107) Assemble approximately 6" of Cat5 ethernet cable with an RJ-45 connector attached. It is also possible to cut apart an existing cable, ideally we want the internal wires to be solid, but stranded can probably work if twisted and tinned.
108) Insert the RJ-45 into the Raspberry Pi3 and set the Raspberry Pi in the front right corner of the WRT54G/BEFSR41 main board to get the distance and location where the ethernet line will need to be stripped to wrap under the main board.
109) When the length is found, carefully cut through the insulation off the CAT-5 cable. This should be right at the point where the cable reaches the edge of the board.
110) Pull the insulation off the end of the CAT-5 cable, exposing the 4 pairs of wire and if present, nylon threads.
111) Cut any nylon threads being careful not to accidentally cut any of the 4 pairs. Separate the orange and green pairs from the brown and blue pairs
112) Carefully cut the blue and brown pairs where the insulation has been stripped back, apply about 1" of the 1/4' heatshrink to the end of insulation and apply heat to shrink over the transition between insulation and bare wires.
113) Untwist the ends of the orange and green wire pairs, stripping back about 1/8" of insulation from the ends.
114) On the underside of the WRT54G/BEFSR54, find the LAN ethernet jack closest to the DC power connector, it will most likely be 2 rows of pins. As shown, the pins with a visible trace represent the needed pins for 100 megabit ethernet.
115) On the orange and green wire pairs, bend the exposed copper wire into an L shape and apply a small amount of solder to tin the ends.
116) Carefully solder the 4 CAT-5 wires to the pins on the WRT54G/BEFSR41. As pictures this is Orange white, Orange, Green white, skip 2, Green.
117) Run the CAT-5 cable to the edge of the WRT54G board and bend the wires at the corner, bringing the insulated section of the cable towards the front right corner where the Raspberry Pi 3 will reside.
118) Cut about a 4" length of 2 conductor ribbon. This will be used to take the 5VDC from downconverter to the Raspberry Pi 3choose colors which represent this. In this example we will use white wire for +VCC and grey wire for ground/return.
119) Split and strip about 3/16" off the 2 conductor ribbon from step 118, twist and tin.
120) On the 12VDC to 5VDC converter, locate the output pins, in this example they are labeled Out- and Out+. Solder the appropriate wires to the output pins.
121) On the other end of the 5VDC ribbon, strip and tin about 1/8" from the ends.
122) With the 40 pin header in the front and Raspberry Pi 3 showing the solder side up, attach the 5VDC (white) and ground (grey) wires to the two tinned pins. Be extra careful here to ensure the correct pins are soldered. This is the DC power input to the Raspberry Pi 3. A short between pins, wiring this backwards or shorting any other pins could damage the Raspberry Pi 3, the 12v to 5v converter and/or the host WRT54G/BEFSR41 itself.
123) Flipping the Raspberry Pi 3 with the component side up, reapply the perf board over the 40 pin header, ensuring the 5 floating wires from the bottom of the perf board are bundled together through the opening outside of the 40 pin header.
124) Taking the first PTT line which is orange, carefully bend it, leaving a loop of slack and cut the wire to length to be soldered to the first pin.
125) Strip about 1/8" of insulation off the orange wire, twist, tin and solder to the outer most header pin.
126) Repeat steps 124 and 125 for the second PTT which is red, the third PTT which is brown, the ground which is black and fourth PTT which is white.
127) Strip about 3/4" of the 22awg solid wire, feed the wire through the mounting hole on the Raspberry Pi 3 closest to the USB connectors, running through the left most column and third row from the front.
128) Bend the bare copper wire around the perf board and back around the under side to secure the wire into place on the perf board.
129) Pulling the 22awg wire tight, bend the wire along the bottom of the Raspberry Pi 3, laying between the solder pins of the 40 pin header.
130) Bend the remainder of the 22awg wire through the opposite mounting hole on the Raspberry Pi 3, stripping off insulation which runs past the perf board, inserting the bare 22awg wire through the perf board.
131) Bend the bare wire around the perf board to hold the board in place.
132) Looking down at the perf board, verify that the bare copper wires holding the perf board to the Raspberry Pi 3 are not creating any shorts.
133) Flip the Raspberry Pi 3 to the solder side and apply strips of electrical tape to insulate it from shorting against the WRT54G/BEFSR41 main board. The inner two strips will need a corner cut away as to not interfere with the insertion or removal of the SD card. On the last piece of tape, be sure to pull the 5VDC power wire to run underneath the Raspberry Pi 3 and over top the 3 prior lengths of electrical tape.
134) If needed, apply electrical tape to the 12V to 5V converter. In the converter used here, there is a small blue LED which is intentionally not covered to allow visibility to the power status.
135) With everything taped up, reattach the antennas if the WRT54G is in use to prepare for a power up test. Insert the needed SD card into the Raspberry Pi.
136) Plug in an ethernet cable to an open port on the back of the WRT54G/BEFSR41 (not the ethernet jack closed to the DC power connector) and the 12VDC supply to the 12V power connector. If all goes well, the WRT54G/BEFSR41 will power up as will the Raspberry Pi 3, two of the LAN interfaces show link and the USB sound cards will light up or flash.
137) If the power up test is successful, remove the 12VDC supply and flip the WRT54G/BEFSR51 to where the ethernet jacks are forward. Take a length of about 1-1/2 of electrical tape and cover the ethernet jack closest to the power connector. This port has the Raspberry Pi 3 soldered to it internally and should not be used to plug in an external device.
138) Take the upper cover of the WRT54G/BEFSR41 and 9/64ths or 5/16ths drill bit and drill the first hole for the Devicenet cable. Keep in mind 4 holes will need to be drilled which is a somewhat tight fit, especially on the WRT54G. It is suggested to start towards the top of the cover and near the corner of the LAN port segment.
139) Drill 3 additional holes to permit the remaining 3 devicenet cables out of the WRT54G/BEFRS41. Be careful not to get too close to the antenna connector on the WRT54G, it may have a small hood which consumes space outside of the existing hole in the cover.
140) Carefully push the first Devicenet cable through the hole drilled. The tolerance is fairly tight, it may be necessary to squeeze the tip of the Devicenet cable to pass through the hole.
141) Feed the remaining three Devicenet cables through the other holes drilled, pulling them through.
142) Take the main board from the WRT54G/BEFSR41 and reattach it to the bottom of the enclosure, reattaching the screw(s) as needed.
143) Take the top cover to the WRT54G/BEFSR41 and slide it back into position with the bottom of the enclosure. Be sure to line up the two tabs near the rear and slide the top cover forward to pull into place.
144) Swinging the WRT54G/BEFSR41 around, it may be needed to adjust the position of the Raspberry Pi 3 slightly. the Raspberry Pi 3 itself should be slightly behind the row of LEDs on the front of the WRT54G/BEFSR41 so the front face plate can attach without issue.
145) Carefully take the front cover of the WRT54G/BEFSR41 and press it back into place. This is generally not an easy fit, it may take some rocking back and forth to get things to snap back into place. It's probably easiest to set one side and then work to snap the other side.
146) Take one of the female DB9 connectors and apply solder to pins 1.
147) Repeat step 146 for pins 2, 3 and 5.
148) Flip the DB9 over and repeat step 146 for pin 6.
149) Apply solder to the outside of the DB9 connector next to pins 1 and 6. This is needed to ground the outside of the DB9.
150) Taking the first devicenet cable that comes out of the WRT54G/BEFSR41, strip back about 5/8" of it's jacket, pulling the braid back over the jacket, removing the foil surrounding the red/black pair and blue/white pair, strip, twist and tin all colored wires and the bare grounding wire.
151) Take the white wire and attach it to DB9 pin 2. This pin is in the middle of 2 other pins which have had solder applied.
152) Repeat step 151 for red to pin 1, black to pin 3, blue to pin 5.
153) Flip the DB9 over and solder the bare wire to pin 6.
154) Cut about 3/4" of a single wire, stripping back about 3/16" on one side and 3/8" on the other side. Tin the 3/16" side.
155) Bend the tinned 3/16" section 90 degrees and solder to the connector of the DB9 connector with the remainder of the wire running about parallel to the bare wire from the Devicenet cable.
156) Wrap the opposite end of the shell jumper around the bare wire at some convenient length then apply solder to solidify the connection.
157) Take one of the DB9 shells and lay the DB9 connector plus devicenet cable in it, mark about 1/4" past where the shell connector ends and wrap about 5-7 turns of electrical tape around this point. This will grow the outside diameter of the devicenet cable to where the DB9 shell teeth will "bite" into the wire, holding it firmly in place and offsetting any stress from the soldered pins.
158) Add the second half of the shell, inserting the connector locking screws facing the front of the connector. The electrical tape will make bringing the two sides a bit more difficult, if possible use a bench vice or similar to hold the two sides together.
159) Run the shell screw through both halves into the mating nut, tighten screw to bring both sides together. Repeat on other side of DB9 shell. When finished it should look similar to this.
160) Repeat steps 146-159 for the remaining 3 Devicenet cables.
---
Software Setup
If you have an existing Raspberry Pi 3 node running Direwolf, QtSoundModem, ARDOPC, you can configure each now. The soundcard numbers may need to be found experimentally, the PTT GPIO numbers are as follows:
Port 1 uses GPIO 21
Port 2 uses GPIO 20
Port 3 uses GPIO 16
Port 4 uses GPIO 12
Controller Setup
If you are starting with a fresh system, the following scripts will help with the setup.
This script will perform several functions to build the base controller:
1) Apply all available system updates (this can take considerable time)
2) Install needed packages to build direwolf and run controller functions
3) Download and install the current version of Direwolf
4) Create symbolic links to allow direwolf to be run out of the source tree
5) Installs suite of scripts to be run by the pi user during system administration
6) Executes a script to name soundcards based upon the USB port they are plugged in (sc0, sc1, sc2, sc3)
7) Restarts systemd-udev-trigger to apply soundcard changes
8) Builds base direwolf configuration files
9) Installs startup scripts for each of the 4 direwolf instances
10) Create systemd units for 4 direwolf instances
11) Adds command aliases to aid in administering the controller
It is encouraged that the script be reviewed prior to being run. Once logged into the Raspberry Pi 3 the script can be downloaded with
wget https://ohiopacket.org/files/scripts/controller_setup.sh
Once downloaded, consider pulling it into a preferred text editor and review each step. Afterwards, make the script executable and run it.
chmod +x controller_setup.sh
sudo ./controller_setup.sh
The script will print a basic summary of each step, after each step completes, it will prompt to "Press any key" to continue. This is intended to allow capturing of error messages along the way or review of items changed. If something goes wrong, pressing CTRL+C will exit out of the script.
Once completed, the script will return to a bash prompt. At this point a reboot can be performed, the system should come back in a minute or two and the soundcards, if they have an activity LED should all begin flashing on startup indicating that all 4 instances of Direwolf are running.
---
Read only setup
This script is optional but will reconfigure the Raspberry Pi 3 B+ to run in a read only state. This should increase the lifespan of the SD card. This is appropriate for systems which function as a Node, Chat system and/or Winlink RMS Gateway. This does not permit file storage needed to run a BBS. If you do want to run a BBS, this step can be skipped or other arrangements can be made for BBS file storage.
This script will
1) Remove packages which do not permit running from a read only filesystem
2) Install busybox-syslogd and remove rsyslogd
3) Update cmdline.txt to boot read only
4) Create symbolic links for specific paths and files, allowing them to run from tmpfs
5) Moves random-seed to tmpfs and update systemd unit to suite
6) Updates /etc/fstab to mount /boot and / read only
7) Adds several tmpfs entries to /etc/fstab to allow read write to system RAM
8) Appends lines to /etc/rc.local to update /etc/resolv.conf and restore alsactl levels
This too should be reviewed prior to being run. Once logged into the Raspberry Pi 3 the script can be downloaded with
wget https://ohiopacket.org/files/scripts/readonly_setup.sh
Once downloaded, consider pulling it into a preferred text editor and review each step. Afterwards, make the script executable and run it.
chmod +x controller_setup.sh
sudo ./controller_setup.sh
The script will print a basic summary of each step, after each step completes, it will prompt to "Press any key" to continue. This is intended to allow capturing of error messages along the way or review of items changed. If something goes wrong, pressing CTRL+C will exit out of the script.
Once completed, the script will return to a bash prompt. At this point a reboot can be performed to test out the read only startup. The system should come back in a minute or two. If all goes well, a reconnection with SSH should succeed. From this point forward, whenever an edit needs to be made to a file stored on the SD card, the following command must be run:
rw
When the changes are finished, run the command
ro
In some cases, the "ro" command will report "mount: /: mount point is busy." and a remount read only is not possible. Generally this is due to a service opening a file read write, a reboot will always correct this condition.
---
BPQ installation
If you wish to run BPQ on this system, a script has been written to help get the base setup in place.
This script will
1) Create a running folder of /home/pi/bpq
2) Download the most recent version of pilinbpq from G8BPQ's website
3) Download the accompanying HTMLpages and unzip them
4) Create a startup script that allows updating of pilinbpq on restart
5) Create, enable and start a systemd unit to handle the start, stop and restart of BPQ
This too should be reviewed prior to being run. Once logged into the Raspberry Pi 3 the script can be downloaded with
wget https://ohiopacket.org/files/scripts/bpq32_setup.sh
Once downloaded, consider pulling it into a preferred text editor and review each step. Afterwards, make the script executable and run it.
chmod +x bpq32_setup.sh
sudo ./bpq32_setup.sh
With all of this completed, the controller needs some configuration to become operational. At a minimum, /home/pi/bpq/bpq32.cfg must be edited to an appropriate callsign. It is suggested to update ALIASes to reflect the system location and/or role. Each of the ports should be updated to reflect appropriate information, a frequency and baudrate is suggested. The Telnet port allows remote access to the node, pay careful attention to the USER= lines which contain usernames and passwords for access.
More configuration information can be found in the 4 Port Controller Administration Guide