Please Help Osmo-hlr

Why My phone is not autoconnect to my base station
I configured mnc mcc about my sim card but it not autoconnect to phone and İt taking to me this error . Why You know ?

root@kali:/etc/osmocom# osmo-hlr
<0004> telnet_interface.c:104 telnet at 127.0.0.1 4258
<0000> hlr.c:569 hlr starting
<0001> db.c:221 using database: hlr.db
<0001> db.c:77 (283) recovered 14 frames from WAL file /etc/osmocom/hlr.db-wal
<000b> control_if.c:887 CTRL at 127.0.0.1 4259
<0006> input/ipa.c:265 accept()ed new link from 127.0.0.1 to port 4222
<0006> input/ipa.c:265 accept()ed new link from 127.0.0.1 to port 4222
<0003> db_hlr.c:456 Cannot read subscriber from db: IMSI=‘286039540347361’: No such subscriber
<0006> ipa.c:526 bad message length of 25966 bytes, received 3 bytes
<000b> control_if.c:363 Failed to parse ip access message: -5
<0006> ipa.c:526 bad message length of 25196 bytes, received 3 bytes
<000b> control_if.c:363 Failed to parse ip access message: -5

How Can Connect my phones automatically ? I set up mnc mcc about my sim settings. I set up phone only 2g but dont connect phones automatically to osmocom. İt still connect to own base stations. I dont understand ?

Please help to me now other people connecting to my bts . I can not prevent it : S

Hi,
you need to either manually add IMSI to hlr database or configure ‘subscriber create on demand’ feature in HLR configurations (see osmoHLR manual section 6.3. https://ftp.osmocom.org/docs/latest/osmohlr-usermanual.pdf).
Basically, if you add ‘subscriber-create-on-demand 5 cs+ps’ to osmoHLR configurations file (under ‘hlr’ section), it should automatically create entries in the database when new IMSI attemps to connect.