mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-12-11 06:02:00 -05:00
BLE RX/TX Changes (#2752)
* Work on BLE Rx Tx improvements. * Working on compile size. * cleanup * Formatting * Fixes * More Improvements + Custom Parsing for Tags * Moving ERT to external apps. * Fix Icon.
This commit is contained in:
parent
3983749f11
commit
6b05878532
18 changed files with 1167 additions and 873 deletions
|
|
@ -80,18 +80,11 @@ class BTLETxProcessor : public BasebandProcessor {
|
|||
int num_info_bit;
|
||||
char info_bit[MAX_NUM_PHY_BYTE * 8]; // without CRC and whitening
|
||||
|
||||
int num_info_byte;
|
||||
uint8_t info_byte[MAX_NUM_PHY_BYTE];
|
||||
|
||||
int num_phy_bit;
|
||||
char phy_bit[MAX_NUM_PHY_BYTE * 8]; // all bits which will be fed to GFSK modulator
|
||||
|
||||
int num_phy_byte;
|
||||
uint8_t phy_byte[MAX_NUM_PHY_BYTE];
|
||||
|
||||
int num_phy_sample;
|
||||
char phy_sample[2 * MAX_NUM_PHY_SAMPLE]; // GFSK output to D/A (hackrf board)
|
||||
int8_t phy_sample1[2 * MAX_NUM_PHY_SAMPLE]; // GFSK output to D/A (hackrf board)
|
||||
int8_t phy_sample[2 * MAX_NUM_PHY_SAMPLE]; // GFSK output to D/A (hackrf board)
|
||||
|
||||
int space; // how many millisecond null signal shouwl be padded after this packet
|
||||
};
|
||||
|
|
@ -108,22 +101,27 @@ class BTLETxProcessor : public BasebandProcessor {
|
|||
void crc24(char* bit_in, int num_bit, char* init_hex, char* crc_result);
|
||||
int convert_hex_to_bit(char* hex, char* bit, int stream_flip, int octet_limit);
|
||||
void octet_hex_to_bit(char* hex, char* bit);
|
||||
int gen_sample_from_phy_bit(char* bit, char* sample, int num_bit);
|
||||
int gen_sample_from_phy_bit(char* bit, int8_t* sample, int num_bit);
|
||||
bool configured = false;
|
||||
|
||||
float tmp_phy_bit_over_sampling[MAX_NUM_PHY_SAMPLE + 2 * LEN_GAUSS_FILTER * SAMPLE_PER_SYMBOL];
|
||||
int8_t tmp_phy_bit_over_sampling_int8[MAX_NUM_PHY_SAMPLE + 2 * LEN_GAUSS_FILTER * SAMPLE_PER_SYMBOL];
|
||||
float gauss_coef[LEN_GAUSS_FILTER * SAMPLE_PER_SYMBOL] = {7.561773e-09, 1.197935e-06, 8.050684e-05, 2.326833e-03, 2.959908e-02, 1.727474e-01, 4.999195e-01, 8.249246e-01, 9.408018e-01, 8.249246e-01, 4.999195e-01, 1.727474e-01, 2.959908e-02, 2.326833e-03, 8.050684e-05, 1.197935e-06};
|
||||
|
||||
uint32_t samples_per_bit{4};
|
||||
uint32_t channel_number{37};
|
||||
char macAddress[13] = "FFFFFFFFFF";
|
||||
char AA[3] = "AA";
|
||||
char AAValue[9] = "D6BE898E";
|
||||
char advertisementData[63] = {0};
|
||||
|
||||
uint32_t length{0};
|
||||
uint32_t shift_zero{}, shift_one{};
|
||||
uint32_t progress_notice{}, progress_count{0};
|
||||
uint32_t sample_count{0};
|
||||
uint32_t paddingCount{0};
|
||||
uint32_t repeatCount{0};
|
||||
uint32_t phase{0}, sphase{0};
|
||||
bool doneSending{false};
|
||||
|
||||
uint8_t cur_bit{0};
|
||||
uint16_t bit_pos{0};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue