add setup files and lorocat.py testing script
This commit is contained in:
parent
09cf868cf9
commit
e8eee7b28c
16
lorocat.py
Executable file
16
lorocat.py
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import socket, sys, time
|
||||
|
||||
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
|
||||
sock.connect(('fdfd:cafe::1', 6969))
|
||||
|
||||
while True:
|
||||
data = sys.stdin.buffer.read(64)
|
||||
if not data:
|
||||
break
|
||||
|
||||
sock.sendall(data)
|
||||
time.sleep(0.869)
|
||||
|
||||
sock.close()
|
14
setup-loro_rpi3.sh
Executable file
14
setup-loro_rpi3.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
modprobe regmap_spi
|
||||
modprobe mac802154
|
||||
insmod /home/loro/LoRo/LoRo/loro.ko tx_poll_div=1
|
||||
sleep 1
|
||||
ip link set down wpan0
|
||||
iwpan dev wpan0 set pan_id 0xbeef
|
||||
ip link add link wpan0 name lowpan0 type lowpan
|
||||
ip link set up wpan0
|
||||
ip link set up lowpan0
|
||||
ip addr add fdfd:cafe::1/64 dev lowpan0
|
|
@ -4,10 +4,11 @@ set -e
|
|||
|
||||
modprobe regmap_spi
|
||||
modprobe mac802154
|
||||
insmod ~/LoRo/LoRo/loro.ko
|
||||
insmod ~/LoRo/LoRo/loro.ko tx_poll_div=1
|
||||
sleep 0.5
|
||||
ip link set down wpan0
|
||||
iwpan dev wpan0 set pan_id 0xbeef
|
||||
ip link add link wpan0 name lowpan0 type lowpan
|
||||
ip link set up wpan0
|
||||
ip link set up lowpan0
|
||||
ip addr add fdfd:cafe::2/64 dev lowpan0
|
Loading…
Reference in a new issue