[TSI3] use bytes literal and tobytes()

python3 gives 'TypeError: expected bytes, bytearray or buffer compatible object' when exporting TSI1, or 'TypeError: can't concat bytes to str' when compiling it.