serial mock test working, partly

- socket close problems interferes with multiple tests
- writes via publish not working yet