aluminiumi / srsLTE-plus-sib12

Modification to srsLTE to enable wireless emergency alerts (WEA) via SIB-12 CMAS messages. CMU 14-829 Mobile & IoT Security project.
GNU Affero General Public License v3.0
25 stars 12 forks source link

ETWS_INDICATION AND CMAS_INDICATION #2

Open Dastgsm opened 4 years ago

Dastgsm commented 4 years ago

In the code of wi leig, they use SIB10 and SIB12,to perform the paging with sib10 and sib12, they use :

My question is where it is in code ? do you think about sib10 and sib11 adding on this code?

aluminiumi commented 4 years ago

With regard to the code you posted, I don't have your answer but can maybe lead you in the right direction.

pcch_msg is declared in a couple of different files, namely: srsenb/src/stack/rrc/rrc.cc srsue/src/stack/rrc/rrc.cc

You would probably be more interested in the first file.

These variables are of type pcch_msg_s, which is declared in: lib/include/srslte/asn1/rrc_asn1.h

The struct does not have the etws_indication_present or cmas_indication_present boolean variables, so you would have to add them.

Dastgsm commented 4 years ago

Thank's for reply me, i see it : it's etws_ind_present  on paging_s and his asn1 code is : // Paging ::= SEQUENCE struct paging_s {  // member variables  bool                 paging_record_list_present = false;  bool                 sys_info_mod_present       = false;  bool                 etws_ind_present           = false;  bool                 non_crit_ext_present       = false;  paging_record_list_l paging_record_list;  paging_v890_ies_s    non_crit_ext; // sequence methods  SRSASN_CODE pack(bit_ref& bref) const;  SRSASN_CODE unpack(bit_ref& bref);  void        to_json(json_writer& j) const;};

and for cmas_ind_r9_present on the asn 1 is :   // Paging-v920-IEs ::= SEQUENCE struct paging_v920_ies_s {  // member variables  bool               cmas_ind_r9_present  = false;  bool               non_crit_ext_present = false;  paging_v1130_ies_s non_crit_ext; // sequence methods  SRSASN_CODE pack(bit_ref& bref) const;  SRSASN_CODE unpack(bit_ref& bref);  void        to_json(json_writer& j) const;};

Dastgsm commented 4 years ago

Thank's , i think's it's some code like this on rrc.cc and on the function is_paging_opportunity :  500c500,501 < bool rrc::is_paging_opportunity(uint32_t tti, uint32_t *payload_len)

+++> bool rrc::is_paging_opportunity(uint32_t tti, uint32_t payload_len) /modifying for indication CMAS and ETWS /512c513,521<   paging_s paging_rec = &pcch_msg.msg.c1().paging();

+++>   paging_s paging_rec = &pcch_msg.msg.c1().paging(); /modify paging message/ +++>   /adding indication of SIB11 and SIB10, only for ETWS/ +++> //  paging_rec->etws_ind_present = true; +++>   /adding indication of SIB12, like our, CMAS indication*/ +++>  paging_rec->non_crit_ext_present = true; +++>    asn1::rrc::paging_v890_ies_s paging_v890; +++>    paging_v890.non_crit_ext_present = true; +++>    asn1::rrc::paging_v920_ies_s paging_v920;  +>    paging_v920.cmas_ind_r9_present = true; 513a523,524 +>    paging_v890.non_crit_ext = paging_v920; +>    paging_rec->non_crit_ext = paging_v890;

aluminiumi commented 4 years ago

I don't have a means to test, but your modification looks reasonable.

Dastgsm commented 4 years ago

did you have any idea or tutorial how to install srsEPC and srsEnB in two machine differents? how to configure it?