ha:sr201
                Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ha:sr201 [11/07/2023 12:26] – created - external edit 127.0.0.1 | ha:sr201 [16/06/2025 23:15] (current) – [Testing from BASH] andrew | ||
|---|---|---|---|
| Line 22: | Line 22: | ||
| on the header next to the RJ45 connector. | on the header next to the RJ45 connector. | ||
| and P30 pins. | and P30 pins. | ||
| - |  | + | |
| + | |||
| + | ===== Testing from BASH ===== | ||
| + | |||
| + | |||
| + | Below is a quick play about from BASH to test the relay with raw TCP.  '' | ||
| + | If you're stuck on windows you probably don't have netcat, yet another reason to upgrade to Linux. | ||
| + | |||
| + | < | ||
| + | # Commands are ASCII strings that must be sent in one packet | ||
| + | # (even for TCP): | ||
| + | # | ||
| + | #        0R | ||
| + | # | ||
| + | # 1R* Close relay if it's open, wait approx 1/2 a second, open | ||
| + | # | ||
| + | # | ||
| + | # 1R Close relay if it's open. | ||
| + | # | ||
| + | # 1R:0 Close relay if it's open. | ||
| + | # | ||
| + | # 1R:n Close relay if it's open, then in n seconds (1 <= n <= 65535) | ||
| + | # open it. | ||
| + | # | ||
| + | # 2R Open relay if it's closed. | ||
| + | # | ||
| + | # Where: | ||
| + | # | ||
| + | #        R      is the relay number, ' | ||
| + | #               ' | ||
| + | #               If R is ' | ||
| + | # | ||
| + | # If the command is sent over TCP (not UDP, TCP only), the relay will | ||
| + | #    reply with a string of 8 0's and 1's, representing the " | ||
| + | #    was executed" | ||
| + | #    relay is open, ' | ||
| + | </ | ||
|  |  | ||
|  |  | ||
| - | This page has been accessed | + | < | 
| + | $ printf " | ||
| + | 10000000 | ||
| + | $ printf " | ||
| + | 11000000 | ||
| + | $ printf " | ||
| + | 11000000 | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | This page has been accessed:- \\ | ||
| Today: {{counter|today}} \\ | Today: {{counter|today}} \\ | ||
| Yesterday: {{counter|yesterday}} \\ | Yesterday: {{counter|yesterday}} \\ | ||
| Until now: {{counter|total}} \\ | Until now: {{counter|total}} \\ | ||
ha/sr201.1689078397.txt.gz · Last modified:  by 127.0.0.1
                
                