Problem with BSL mode solved
Errors with packet length fixed