Skip to content

Instantly share code, notes, and snippets.

@drtrigon
Last active Jul 27, 2018
Embed
What would you like to do?
OWPJON - Local bus going through walls / outdoors - https://github.com/gioblu/PJON/issues/222
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
owp:ws:v1
5.051000118255615, HEX: 0xCB 0xA1 0xA1 0x40
96095.921875, HEX: 0xF6 0xAF 0xBB 0x47
6120.0, HEX: 0x00 0x40 0xBF 0x45
owp:1w:v1
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
0, 0, 0, 0, 0, 0, 0, 0 HEX: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
31.6875, HEX: 0x00 0x80 0xFD 0x41
0.2199999988079071, HEX: 0xAE 0x47 0x61 0x3E
4.659999847412109, HEX: 0xB8 0x1E 0x95 0x40
nan, HEX: 0x00 0x00 0xC0 0x7F
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
BUSY: 666
owp:ws:v1
5.051000118255615, HEX: 0xCB 0xA1 0xA1 0x40
96099.4453125, HEX: 0xB9 0xB1 0xBB 0x47
6120.0, HEX: 0x00 0x40 0xBF 0x45
owp:1w:v1
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
0, 0, 0, 0, 0, 0, 0, 0 HEX: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
31.34375, HEX: 0x00 0xC0 0xFA 0x41
0.20999999344348907, HEX: 0x3D 0x0A 0x57 0x3E
4.659999847412109, HEX: 0xB8 0x1E 0x95 0x40
nan, HEX: 0x00 0x00 0xC0 0x7F
(wait some time, may be 1 or 2 hrs ...)
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
FAILED: 65535
FAILED: 65535
nan HEX:
95888.171875, HEX: 0x16 0x48 0xBB 0x47
765.0, HEX: 0x00 0x40 0x3F 0x44
owp:1w:v1
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
0, 0, 0, 0, 0, 0, 0, 0 HEX: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
27.25, HEX: 0x00 0x00 0xDA 0x41
0.029999999329447746, HEX: 0x8F 0xC2 0xF5 0x3C
4.690000057220459, HEX: 0x7B 0x14 0x96 0x40
nan, HEX: 0x00 0x00 0xC0 0x7F
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
BUSY: 666
FAILED: 65535
BUSY: 666
5.00600004196167, HEX: 0x27 0x31 0xA0 0x40
95880.7578125, HEX: 0x61 0x44 0xBB 0x47
765.0, HEX: 0x00 0x40 0x3F 0x44
owp:1w:v1
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
0, 0, 0, 0, 0, 0, 0, 0 HEX: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
27.4375, HEX: 0x00 0x80 0xDB 0x41
0.029999999329447746, HEX: 0x8F 0xC2 0xF5 0x3C
4.690000057220459, HEX: 0x7B 0x14 0x96 0x40
nan, HEX: 0x00 0x00 0xC0 0x7F
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
FAILED: 65535
5.14300012588501, HEX: 0x75 0x93 0xA4 0x40
95891.34375, HEX: 0xAC 0x49 0xBB 0x47
5.0279998779296875, HEX: 0x60 0xE5 0xA0 0x40
@?D
nan HEX: 0x6F 0x77 0x70 0x3A 0x31 0x77 0x3A 0x76 0x31
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
Connection with device ID 42 is lost.
FAILED: 65535
nan HEX:
BUSY: 666
FAILED: 65535
nan HEX:
FAILED: 65535
nan HEX:
FAILED: 65535
nan HEX:
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
FAILED: 65535
5.051000118255615, HEX: 0xCB 0xA1 0xA1 0x40
95892.921875, HEX: 0x76 0x4A 0xBB 0x47
765.0, HEX: 0x00 0x40 0x3F 0x44
owp:1w:v1
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
0, 0, 0, 0, 0, 0, 0, 0 HEX: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
27.34375, HEX: 0x00 0xC0 0xDA 0x41
BUSY: 666
FAILED: 65535
nan HEX:
BUSY: 666
4.690000057220459, HEX: 0x7B 0x14 0x96 0x40
4.690000057220459, HEX: 0x7B 0x14 0x96 0x40
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
FAILED: 65535
5.238999843597412, HEX: 0xE3 0xA5 0xA7 0x40
95890.21875, HEX: 0x1C 0x49 0xBB 0x47
765.0, HEX: 0x00 0x40 0x3F 0x44
owp:1w:v1
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
0, 0, 0, 0, 0, 0, 0, 0 HEX: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
27.28125, HEX: 0x00 0x40 0xDA 0x41
0.029999999329447746, HEX: 0x8F 0xC2 0xF5 0x3C
4.690000057220459, HEX: 0x7B 0x14 0x96 0x40
nan, HEX: 0x00 0x00 0xC0 0x7F
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
owp:ws:v1
5.14300012588501, HEX: 0x75 0x93 0xA4 0x40
95887.9375, HEX: 0xF8 0x47 0xBB 0x47
765.0, HEX: 0x00 0x40 0x3F 0x44
owp:1w:v1
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
0, 0, 0, 0, 0, 0, 0, 0 HEX: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
27.28125, HEX: 0x00 0x40 0xDA 0x41
5.051000118255615, HEX: 0xCB 0xA1 0xA1 0x40
4.690000057220459, HEX: 0x7B 0x14 0x96 0x40
0.029999999329447746, HEX: 0x8F 0xC2 0xF5 0x3C
$ ./test.sh
owp:dg:v1
4.578000068664551, HEX: 0xFA 0x7E 0x92 0x40
31.303279876708984, HEX: 0x1E 0x6D 0xFA 0x41
owp:ws:v1
5.119999885559082, HEX: 0x0A 0xD7 0xA3 0x40
95891.453125, HEX: 0xBA 0x49 0xBB 0x47
765.0, HEX: 0x00 0x40 0x3F 0x44
owp:1w:v1
38, 0, 0, 215, 1, 0, 0, 77 HEX: 0x26 0x00 0x00 0xD7 0x01 0x00 0x00 0x4D
0, 0, 0, 0, 0, 0, 0, 0 HEX: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
27.21875, HEX: 0x00 0xC0 0xD9 0x41
0.029999999329447746, HEX: 0x8F 0xC2 0xF5 0x3C
4.690000057220459, HEX: 0x7B 0x14 0x96 0x40
nan, HEX: 0x00 0x00 0xC0 0x7F
$
#!/bin/bash
# in front of lora (1 tunnel)
printf "\x01" | ./owpshell-ubuntu14.04 - - 44
printf "\x11" | ./owpshell-ubuntu14.04 - - 44 | ./unpack-test.py f
printf "\x12" | ./owpshell-ubuntu14.04 - - 44 | ./unpack-test.py f
# lora (2 tunnels)
printf "\x01" | ./owpshell-ubuntu14.04 - - 43
printf "\x11" | ./owpshell-ubuntu14.04 - - 43 | ./unpack-test.py f
printf "\x12" | ./owpshell-ubuntu14.04 - - 43 | ./unpack-test.py f
printf "\xFF" | ./owpshell-ubuntu14.04 - - 43 | ./unpack-test.py f
# behind lora (3 tunnels)
printf "\x01" | ./owpshell-ubuntu14.04 - - 42
printf "\x4A" | ./owpshell-ubuntu14.04 - - 42 | ./unpack-test.py BBBBBBBB
printf "\x4B" | ./owpshell-ubuntu14.04 - - 42 | ./unpack-test.py BBBBBBBB
printf "\x41" | ./owpshell-ubuntu14.04 - - 42 | ./unpack-test.py f
printf "\x42" | ./owpshell-ubuntu14.04 - - 42 | ./unpack-test.py f
printf "\x43" | ./owpshell-ubuntu14.04 - - 42 | ./unpack-test.py f
printf "\x44" | ./owpshell-ubuntu14.04 - - 42 | ./unpack-test.py f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment