Skip to content

Commit

Permalink
Transmit callsign via LLDP.
Browse files Browse the repository at this point in the history
- Fix startup order of tap device creation and basestation start
- Update firmware config script
- Update Readme

Fixes #5
  • Loading branch information
lukasostendorf committed Jun 18, 2020
1 parent 34351fa commit 8606154
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 24 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,39 @@ transmit IP traffic.

Main Features:
- OFDM based system with 40 subcarriers (4kHz subcarrier spacing)
- DL @ 439.7MHz / UL @ 434.9MHz (can be reconfigured)
- Basestation - Client topology, supports up to 14 connected clients
- up to 400kbps data-rate and <150ms RTT at the application layer

## Quickstart

### Installation
Download the HNAP4PlutoSDR firmware. Connect a PlutoSDR to your PC and copy the
Download the HNAP4PlutoSDR firmware from [here](https://github.com/HAMNET-Access-Protocol/HNAP4PlutoSDR/releases).
Connect a PlutoSDR to your PC and copy the
image to the Pluto's mass storage device. Eject the Pluto and wait until
the flashing process is completed (LED1 stops blinking).

Now, connect to the Pluto via SSH to initially configure the system.
Set the following variables:
Run the following commands:

```shell script
# Activate 2nd CPU, isolate core 1
fw_setenv maxcpus 2 isolcpus=1
```
```
# IP address of this Pluto within the HNAP Network
# (you can define any IP address as long as they are within one subnet)
fw_setenv hnap_tap_ip 192.168.123.1

```
```
# If this Pluto will act as a basestation, set this variable
# To enable autostart of the basesation
fw_setenv hnap_bs_autostart 1
```
```
# Set your callsign. It will be broadcasted via LLDP
fw_setenv hnap_callsign <YOUR-CALLSIGN>
```
Reboot the Adalm Pluto.

### First tests
Expand Down Expand Up @@ -84,3 +93,8 @@ If you do not want to swap the TCXO immediately, try the following:
around the default frequency of 439700000. There is a calibration tool *client-calib* that only syncs to the Downlink and
estimates the carrier offset that might help: `./client-calib -f <DL-FREQ>`

### What's next?

Read the docs to reconfigure your system [here](https://manual.hnap.de/system_config/)

Read how to build the firmware yourself [here](https://manual.hnap.de/building_the_fw/)
11 changes: 6 additions & 5 deletions config-firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ cd ..
## Build liquidsdr
echo "Building liquidsdr..."
cd liquid-dsp
if [[ ! -f configure ]]
then
./bootstrap.sh
fi
./configure arm --host=arm-linux-gnueabihf --prefix="$PLUTO_SYSROOT_DIR/usr/" CC="arm-linux-gnueabihf-gcc --sysroot=$PLUTO_SYSROOT_DIR"

# Configure somehow does not correctly identify malloc and realloc
Expand Down Expand Up @@ -81,11 +85,8 @@ cd ..

## Copy network init script to rootfs
echo "Copy network autoconfig script to rootfs..."
cd startup_scripts
cp S101transceiver.sh $PLUTOSDR_FW_ROOTOVERLAY/etc/init.d/
cp S102iperf.sh $PLUTOSDR_FW_ROOTOVERLAY/etc/init.d/
cp S103basestation.sh $PLUTOSDR_FW_ROOTOVERLAY/etc/init.d/
cd ..
cp startup_scripts/* $PLUTOSDR_FW_ROOTOVERLAY/etc/init.d/


## Copy FIR filter to rootfs
echo "Copy FIR filter coefficients to rootfs..."
Expand Down
16 changes: 0 additions & 16 deletions startup_scripts/S101transceiver.sh

This file was deleted.

9 changes: 9 additions & 0 deletions startup_scripts/S42network_tap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# Networking: create tap devices
# Note: this has to be done before the lldp service is started (S60)
TAP_IP_ADDR=`fw_printenv -n hnap_tap_ip`

tunctl -t tap0
ifconfig tap0 $TAP_IP_ADDR
ifconfig tap0 up
17 changes: 17 additions & 0 deletions startup_scripts/S90transceiver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# Configure pluto platform so that the waveform can be started
# Name of the custom FIR filter
FILTER=AD9361_256kSPS.ftr


# Config Link Layer Discovery Protocol to broadcast callsign
# This has to be done after lldp is started (S60)
CALLSIGN=`fw_printenv -n hnap_callsign`
lldpcli configure lldp tx-interval 60
lldpcli configure system description $CALLSIGN
lldpcli resume

# Install custom FIR filter
cat /root/$FILTER > /sys/bus/iio/devices/iio:device1/filter_fir_config

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[ -f /root/basestation ] || exit 0

# Autostart the basestation service

start() {
if [ `fw_printenv -n hnap_bs_autostart` = 1 ]
then
Expand Down

0 comments on commit 8606154

Please sign in to comment.