- Jun 6, 2020
- 11,559
- 4,422
I have an app that is receiving data from an altimeter.
The altimeter is sending packages of 404 bytes.
The first 4 bytes contain information about the total number of packages to expect and the actual package number.
The rest is alti data.
On connection, the altimeter sends 14 bytes containing info about ID, battery voltage, etc, immediately followed by the first package of 404.
Reception of this package is confirmed by sending a code back to the altimeter, which in return sends the following package.
A timer is set at 1000ms. If the next package is not received, the tick event sends a message, asking to repeat the transmission.
This request is repeated max three times. When still unsuccessful, the connection is cut.
Sometimes this works and I do receive up to 100 packages and more, sometimes it dies in the timer_tick event.
Any Ideas?
B4X:
B4X:
The altimeter is sending packages of 404 bytes.
The first 4 bytes contain information about the total number of packages to expect and the actual package number.
The rest is alti data.
On connection, the altimeter sends 14 bytes containing info about ID, battery voltage, etc, immediately followed by the first package of 404.
Reception of this package is confirmed by sending a code back to the altimeter, which in return sends the following package.
A timer is set at 1000ms. If the next package is not received, the tick event sends a message, asking to repeat the transmission.
This request is repeated max three times. When still unsuccessful, the connection is cut.
Sometimes this works and I do receive up to 100 packages and more, sometimes it dies in the timer_tick event.
Any Ideas?
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
B4X:
Sub Bluetooth_serial_Connected (Success As...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید