parent
3babba3aba
commit
9c8031c47a
25
README.md
25
README.md
|
@ -213,7 +213,7 @@ sudo mysql -u root -p
|
|||
|
||||
# At the password prompt, just hit enter. We are going to change the root password in a second
|
||||
|
||||
alter user root identified by 'a password you write down or remember';
|
||||
alter user root@localhost identified by 'a password you write down or remember';
|
||||
|
||||
CREATE DATABASE IF NOT EXISTS pixeltube_db;
|
||||
USE pixeltube_db;
|
||||
|
@ -236,7 +236,28 @@ exit;
|
|||
sudo systemctl restart apache2
|
||||
```
|
||||
|
||||
### Setup Open Lighting Archetecture as the ArtNET sACN middle man:
|
||||
### Setup Open Lighting Archetecture as the ArtNET/sACN middle man:
|
||||
|
||||
Edit:
|
||||
|
||||
`sudo nano /etc/ola/ola-artnet.conf`
|
||||
|
||||
```
|
||||
always_broadcast = false
|
||||
enabled = true
|
||||
ip = eth0
|
||||
long_name = PiXelTube Master
|
||||
net = 0
|
||||
output_ports = 4
|
||||
short_name = PiXelTube Master
|
||||
subnet = 0
|
||||
use_limited_broadcast = false
|
||||
use_loopback = false
|
||||
```
|
||||
|
||||
Save and exit.
|
||||
|
||||
|
||||
|
||||
You can access the Pi's OLA webinterface via the following address:
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
from scapy.all import *
|
||||
from scapy.arch import get_if_addr
|
||||
|
||||
def forward_artnet(pkt):
|
||||
# Check if the packet is an ArtNet packet
|
||||
if pkt.haslayer(IP) and pkt.haslayer(UDP) and pkt[UDP].dport == 6454:
|
||||
# Check the source IP address and interface
|
||||
if pkt[IP].src.startswith("10.0.") and pkt.route()[0] == "eth0":
|
||||
# Modify the source IP address to the new network
|
||||
pkt[IP].src = get_if_addr("wlan0")
|
||||
# Forward the packet to the new network
|
||||
send(pkt, iface="wlan0")
|
||||
print("Forwarded ArtNet packet from eth0 to wlan0")
|
||||
|
||||
# Sniff ArtNet packets on eth0
|
||||
while True:
|
||||
sniff(iface="eth0", prn=forward_artnet, store=0)
|
Loading…
Reference in New Issue