Hi,

Ive just setup  an OpenBSC + nanoBTS environment to experiment around with your Osmocom software and a Motorola C123. I tried wo write a little application similiar to app_ccch scan, which is able of responding to paging requests by sending a rach request and the following paging response procedure. The rach access is working fine, but i cant get the paging response to work properly. The message itself is correct (layer2/layer3 parts) according to the specs. OpenBSC is also working correctly as it is working with my normal cell phone or your mobile application.
What i'm doing in my code is the following:
1. After getting the immediate assignment i call l1ctl_tx_dm_est_req_h0 in l1ctl.c (l1ctl_tx_dm_est_req_h0(ms,    arfcn, ia->chan_desc.chan_nr, ia->chan_desc.h0.tsc, GSM48_CMODE_SIGN, 0)) in order to tune to the assigned channel (or the h1 procedure for hopping).
2. Afterwards i build the paging response (layer2 + layer3), pad the msg and send it via osmo_send_l1(ms, msg) similiar to l1ctl_tx_data_req in l1ctl.c

That it is not working can be seen in the OpenBSC abis debug output:
<0004> abis_rsl.c:1318 (bts=0,trx=0,ts=0,ss=0) Activating ARFCN(514) SS(0) lctype SDCCH r=OTHER ra=0x67 ta=0
<0004> abis_rsl.c:1064 (bts=0,trx=0,ts=0,ss=0) CHANNEL ACTIVATE ACK
<0004> abis_rsl.c:891 (bts=0,trx=0,ts=0,ss=0) CONNECTION FAIL: RELEASING CAUSE=0x01(Radio Link Failure)
<0004> abis_rsl.c:621 (bts=0,trx=0,ts=0,ss=0) RF Channel Release CMD due error 1
<0004> abis_rsl.c:658 (bts=0,trx=0,ts=0,ss=0) RF CHANNEL RELEASE ACK
<0004> abis_rsl.c:594 (bts=0,trx=0,ts=0,ss=0) is back in operation.

It should be looking like this:
<0004> abis_rsl.c:1318 (bts=0,trx=0,ts=0,ss=0) Activating ARFCN(514) SS(0) lctype SDCCH r=OTHER ra=0x10 ta=0
<0004> abis_rsl.c:1064 (bts=0,trx=0,ts=0,ss=0) CHANNEL ACTIVATE ACK
<0000> abis_rsl.c:1490 (bts=0,trx=0,ts=0,ss=0) SAPI=0 ESTABLISH INDICATION
<0003> gsm_04_08.c:1076 PAGING RESPONSE: mi_type=0x04 MI(...)

Has anyone an idea what I'm doing wrong? Thanks in advance for any help!

Best regards,
David