Skip to content

Commit

Permalink
fix bugs and improve stableness
Browse files Browse the repository at this point in the history
  • Loading branch information
hdtuanss committed Sep 14, 2023
1 parent 67b9be0 commit be8e5cd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"thread": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"bit": "cpp"
"bit": "cpp",
"*.ipp": "cpp"
}
}
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ The effective range for sniffing uplink is limited in LTESniffer due to the capa
**A:** No. LTE traffic including phone call traffic is encrypted, so you cannot use LTESniffer to know the content of phone calls of someone. Moreover, it is important to note that sniffing phone calls in the commercial network is illegal in most countries. -->
## Credits
We sincerely appreciate the [FALCON][falcon] and [SRS team][srsran] for making their great softwares available.

## Contributor
Special thanks to all the contributors who helped us to fix bugs and improve LTESniffer
[@cellular777][cellular77]

## BibTex
Please refer to our [paper][paper] for more details.

Expand Down Expand Up @@ -265,4 +270,5 @@ To sniff the uplink traffic, LTESniffer requires USRP X310 with 2 daughterboards
[pcap]: pcap_file_example/README.md
[app]: https://play.google.com/store/apps/details?id=make.more.r2d2.cellular_z&hl=en&gl=US&pli=1
[watching]: https://syssec.kaist.ac.kr/pub/2022/sec22summer_bae.pdf
[multi-readme]: https://github.com/SysSec-KAIST/LTESniffer/tree/LTESniffer-multi-usrp
[multi-readme]: https://github.com/SysSec-KAIST/LTESniffer/tree/LTESniffer-multi-usrp
[cellular77]: https://github.com/cellular777
2 changes: 1 addition & 1 deletion src/include/UL_Sniffer_PUSCH.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class PUSCH_Decoder
void set_debug_mode(bool en_debug_) { en_debug = en_debug_;}
void set_api_mode(int api_mode_) { api_mode = api_mode_;}
private:
uint16_t target_rnti = 0;
uint16_t target_rnti = -1;
bool en_debug = false;
int api_mode = -1;
bool configed = false;
Expand Down
12 changes: 6 additions & 6 deletions src/src/UL_Sniffer_PUSCH.cc
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,13 @@ void PUSCH_Decoder::decode()
/*Investigate current decoding member to know it has a valid UL grant or not*/
valid_ul_grant = investigate_valid_ul_grant(decoding_mem);
/*Only decode member with valid UL grant*/
if ((decoding_mem.rnti == target_rnti) || (valid_ul_grant == SRSRAN_SUCCESS))
if (((decoding_mem.rnti == target_rnti) || (valid_ul_grant == SRSRAN_SUCCESS))&& decoding_mem.rnti != 0)
{
/*Setup uplink config for decoding*/
ul_cfg.pusch.rnti = decoding_mem.rnti;
ul_cfg.pusch.enable_64qam = false; // check here for 64/16QAM
ul_cfg.pusch.meas_ta_en = true; // enable ta measurement
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant.get();
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant;
int mcs_idx = ul_cfg.pusch.grant.tb.mcs_idx;
pusch_res.crc = false;
/*Get Number of ack which was calculated in Subframe worker last 4 ms*/
Expand Down Expand Up @@ -503,7 +503,7 @@ void PUSCH_Decoder::decode()
ul_cfg.pusch.rnti = decoding_mem.rnti;
ul_cfg.pusch.enable_64qam = true; // 64QAM
ul_cfg.pusch.meas_ta_en = true; // enable ta measurement
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant.get();
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant;

decode_run("[PUSCH-64 ]", decoding_mem, modulation_mode, falcon_signal_power);

Expand All @@ -512,7 +512,7 @@ void PUSCH_Decoder::decode()
ul_cfg.pusch.rnti = decoding_mem.rnti;
ul_cfg.pusch.enable_64qam = true;
ul_cfg.pusch.meas_ta_en = true; // enable ta measurement
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant_256.get();
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant_256;
modulation_mode = modulation_mode_string_256(mcs_idx);
if (ul_cfg.pusch.grant.L_prb < 110 && ul_cfg.pusch.grant.L_prb > 0)
{
Expand Down Expand Up @@ -542,7 +542,7 @@ void PUSCH_Decoder::decode()
break;
case UL_SNIFFER_256QAM_MAX:
ul_cfg.pusch.enable_64qam = true;
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant_256.get();
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant_256;
modulation_mode = modulation_mode_string_256(mcs_idx);
if (ul_cfg.pusch.grant.L_prb < 110 && ul_cfg.pusch.grant.L_prb > 0)
{
Expand All @@ -555,7 +555,7 @@ void PUSCH_Decoder::decode()
decode_run("[PUSCH-16 ]", decoding_mem, modulation_mode, 0);
if (pusch_res.crc == false)
{ // try 256QAM table if case above failed
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant_256.get();
ul_cfg.pusch.grant = *decoding_mem.ran_ul_grant_256;
modulation_mode = modulation_mode_string_256(mcs_idx);
if (ul_cfg.pusch.grant.L_prb < 110 && ul_cfg.pusch.grant.L_prb > 0)
{
Expand Down

0 comments on commit be8e5cd

Please sign in to comment.