-
Notifications
You must be signed in to change notification settings - Fork 4
/
start_bbs.py
42 lines (34 loc) · 1.1 KB
/
start_bbs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
Useful:
python -m serial.tools.list_ports -v
"""
import sys
import socket
#import threading
#import queue
import time
import pdb
import logging
logging.basicConfig(filename='RetroBridgeBBS.log',level=logging.DEBUG)
import RetroBridgeBBS
def main():
while True:
time.sleep(0.2)
if __name__ == "__main__":
device_managers_to_start = [
{ 'name':'Node 0', 'class':RetroBridgeBBS.device.manager.ConsoleManager, 'args':[] },
{ 'name':'Node 1', 'class':RetroBridgeBBS.device.manager.SerialManager, 'args':['/dev/ttyUSB1', 57600]},
#{ 'name':'Node 2', 'class':RetroBridgeBBS.device.manager.TelnetManager, 'args':['', 3030]},
]
config = dict()
config['name'] = 'RetroBridgeBBS'
config['device_managers_to_start'] = device_managers_to_start
config['require_username'] = False
config['require_password'] = False
config['default_transfer_protocol'] = 'zmodem'
bbs = RetroBridgeBBS.BBS(device_managers_to_start, config)
try:
main()
except KeyboardInterrupt:
pass
logging.info("Exiting main program. All Done!")