Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
weatherbox:gateway:fake_and_bridged_mode [2020/04/20 19:32] kluong [Fake Mode] |
weatherbox:gateway:fake_and_bridged_mode [2021/09/19 21:59] (current) |
||
---|---|---|---|
Line 31: | Line 31: | ||
^ Mode ^ Description ^ | ^ Mode ^ Description ^ | ||
- | | Fake Mode | This mode does not require any physical devices at all; it simulates a weatherbox network by sending packets from multiple types of weatherboxes in an infinite loop. | | + | | Fake Mode | This mode does not require any physical devices at all; it simulates a weatherbox network \\ by sending packets from multiple types of weatherboxes in an infinite loop. | |
| Bridged Mode | This mode allows you to hook up a physical device that emits TX frames onto uart lines. This could mean a full weatherbox, or just a microcontroller running a stubbed version of the normal firmware. | | | Bridged Mode | This mode allows you to hook up a physical device that emits TX frames onto uart lines. This could mean a full weatherbox, or just a microcontroller running a stubbed version of the normal firmware. | | ||
Line 87: | Line 87: | ||
self.packets['snapdragon'] = "\x7e\x00\x22\x90\x00\x7d\x33\xa2\x00\x40\xa3\x53\x7d\x5e\x20\x9c\x01\x04\x00\xff\xff\x12\xe4\x49\x00\xca\x0d\x44\x0c\x2c\x31\x01\x00\x2f\x01\x34\x00\x64\x00\xbb" | self.packets['snapdragon'] = "\x7e\x00\x22\x90\x00\x7d\x33\xa2\x00\x40\xa3\x53\x7d\x5e\x20\x9c\x01\x04\x00\xff\xff\x12\xe4\x49\x00\xca\x0d\x44\x0c\x2c\x31\x01\x00\x2f\x01\x34\x00\x64\x00\xbb" | ||
self.packets['badPacket'] = "\x7e\x00\x16\x90\x00\x7d\x33\xa2\x00\x40\xe6\x4b\x5e\x03\xfd\x01\x00\x59\x90\x95\x95\x94\x88\x48\x48\x49\xe2" | self.packets['badPacket'] = "\x7e\x00\x16\x90\x00\x7d\x33\xa2\x00\x40\xe6\x4b\x5e\x03\xfd\x01\x00\x59\x90\x95\x95\x94\x88\x48\x48\x49\xe2" | ||
- | |||
</code> | </code> | ||
+ | These packets were taken a while back by grabbing receive frames from an xbee. | ||
====== Why? ====== | ====== Why? ====== | ||
Line 97: | Line 97: | ||
====== Further Improvements ====== | ====== Further Improvements ====== | ||
- | * Automated testing: this is important, because as the software gets bigger it gets harder and harder to test all of the cases manually by running the whole program. | ||
- | * Unit testing | ||
- | * End-to-end testing | ||
- | * Packaging story needs to be better; hard to run application with virtualenv | ||
- | * Fake mode with C code - this might be useful for creating new schemas | ||
- | * Deployment needs to be better | ||
- | * systemd | ||
- | * staging environment? | ||
- | * Command line args could use some cleanup | ||
- | * Is there a way to de-couple the python xbee library from the underlying transport mechanism? | ||
- | * We could possibly use a pty to "subscribe" via some mechanism for debugging and testing purposes | ||
- | * REST api to get status? | ||
- | * Adding a new schema to the gateway | ||
+ | ^ Item ^ Description ^ | ||
+ | | Automated testing: t | This is important, because as the software gets bigger it gets harder and harder to test all of the cases manually by running the whole program. | | ||
+ | | Unit testing | | | ||
+ | | End-to-end testing | | | ||
+ | | Packaging story needs to be better; hard to run application with virtualenv | | | ||
+ | | Fake mode with C code - this might be useful for creating new schemas | | | ||
+ | | Deployment needs to be better\\ * systemd\\ * staging environment? | | | ||
+ | | Command line args could use some cleanup | | | ||
+ | | Is there a way to de-couple the python xbee library from the underlying transport mechanism | | | ||
+ | | We could possibly use a pty to "subscribe" via some mechanism for debugging and testing purposes | | | ||
+ | | REST api to get status? | | | ||
+ | | Adding a new schema to the gateway | | | ||
+ | | Logs for the gateway could be more useful | | | ||
+ | | Migrate from python 2 to python 3 | Python 2 is going away | | ||