ubuntu 16.04规避srsLTE报告”Sequence number synch failure“的BUG

参考ubuntu 16.04系统LimeSDR使用srsLTE搭建LTE实验环境构建实验环境,在实际运行时候,手机设备无法正常连接到基站,报告如下错误信息:

Received Attach Request 
Attach Request -- IMSI-style attach request
Attach Request -- UE is already attached.Attach request -- IMSI: 208920100001100
Attach request -- eNB-UE S1AP Id: 3, MME-UE S1AP Id: 3
Attach request -- Attach type: 2
Attach Request -- UE Network Capabilities EEA: 11110000
Attach Request -- UE Network Capabilities EIA: 11110000
Attach Request -- MS Network Capabilities Present: true
PDN Connectivity Request -- EPS Bearer Identity requested: 0
PDN Connectivity Request -- Procedure Transaction Id: 1
PDN Connectivity Request -- ESM Information Transfer requested: false
Downlink NAS: Sending Authentication Request
Plain UL NAS: Authentication Failure
Sequence number synch failure
Downlink NAS: Sent Authentication Request
DL NAS: Sent Downlink NAS Message. DL NAS Count=0, UL NAS count=1
DL NAS: MME UE S1AP id 3
Plain UL NAS: Authentication Failure
Sequence number synch failure
Downlink NAS: Sent Authentication Request
DL NAS: Sent Downlink NAS Message. DL NAS Count=0, UL NAS count=2
DL NAS: MME UE S1AP id 3
Received UE Context Release Request. MME-UE S1AP Id 3
UE is not ECM connected. No need to release S1-U. MME UE S1AP Id 3
UE is ECM IDLE.

初步分析BUG的原因是如下函数在重新生成同步序列号的时候出现错误:

bool resync_sqn_milenage(uint64_t imsi, uint8_t *auts)

目前还在分析,目前出现这个现象的时候,当EPC退出时候,应用一定向user_db.csv回写000000001b02,一旦出现这个数字,我们就没办法注册设备了。

目前的应对办法是把user_db.csv最后的SQN,要比设备最后一次通信记录的数据号大,如果SQN数字复位,可以让设备关机,应该就从0开始了。此问题还在持续跟进中。