Skip to content

Commit

Permalink
fix(main) add pjlink tester sample
Browse files Browse the repository at this point in the history
  • Loading branch information
smarthomeagentur committed Nov 27, 2024
1 parent 2fc2d7f commit eae31b8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pjlinktest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# IP and port of the projector
IP="192.168.45.185"
PORT="4352"
COMMAND="%1POWR ?"

# Loop 100 times
for i in {1..100}; do
echo "Attempt $i:"

# Send the command and capture the response
RESPONSE=$(echo "$COMMAND" | nc -w 1 $IP $PORT)

# Check if the response is non-empty
if [ -n "$RESPONSE" ]; then
echo "Response received: $RESPONSE"
else
echo "No response received."
fi

# Optional: Add a delay if needed (e.g., 1 second)
#sleep 1
done

0 comments on commit eae31b8

Please sign in to comment.