I've committed some changes a couple of minutes ago (to libosmocore + openbsc) that make lcr compile again.
The problem is: The query is always false, so no messages are sent to OpenBSC. If I comment out the if-query, everything works as expected: Calls can be made mobile originated and mobile terminated. However, I don't think the if-query is there without a reason.
Since there is only one (gsm-)network instance, the "gsm->network" pointer must be set to something != NULL. Then it should work
Thanx, applied both fixes. (blindly) Please try if it works.
On 25.07.2011 11:49, Andreas.Eversberg wrote:
The problem is: The query is always false, so no messages are sent to OpenBSC. If I comment out the if-query, everything works as expected: Calls can be made mobile originated and mobile terminated. However, I don't think the if-query is there without a reason.
Since there is only one (gsm-)network instance, the "gsm->network" pointer must be set to something != NULL. Then it should work
Thanx, applied both fixes. (blindly) Please try if it works.
Hi Andreas,
I tried to compile the master branch of LCR with your last changes. It failed with the error below. Asterisk version is 1.6.2.5. Is Asterisk 1.6 still supported or is 1.8 recommended now?
Best regards Konrad
make[1]: Betrete Verzeichnis '/home/openbsc/bsc-software/lcr' gcc -DWITH_GSM_BS -I./openbsc/include -I./libosmocore/include -I./openbsc -Wall -DCONFIG_DATA=""/usr/local/lcr"" -DSHARE_DATA=""/usr/local/lcr"" -DLOG_DIR=""/usr/local/lcr"" -DEXTENSION_DATA=""/usr/local/lcr/extensions"" -Dtone_zone_sound=ast_tone_zone_sound -g -O2 -D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po In file included from /usr/include/asterisk/astobj2.h:20, from /usr/include/asterisk/indications.h:29, from chan_lcr.c:160: /usr/include/asterisk/compat.h:93: error: expected identifier or ‘(’ before ‘__extension__’ /usr/include/asterisk/compat.h:101: error: expected identifier or ‘(’ before ‘__extension__’ /usr/include/asterisk/compat.h:101: error: expected identifier or ‘(’ before ‘)’ token chan_lcr.c: In function ‘send_message’: chan_lcr.c:383: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c:679:2: warning: #warning DISABLED DUE TO DOUBLE LOCKING PROBLEM chan_lcr.c: In function ‘lcr_in_proceeding’: chan_lcr.c:1115: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c: In function ‘lcr_in_alerting’: chan_lcr.c:1136: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c: In function ‘lcr_in_connect’: chan_lcr.c:1167: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c: In function ‘lcr_in_disconnect’: chan_lcr.c:1208: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c: In function ‘lcr_in_release’: chan_lcr.c:1242: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c: In function ‘lcr_in_information’: chan_lcr.c:1285: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c: In function ‘lcr_in_pattern’: chan_lcr.c:1361: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c: In function ‘lcr_in_dtmf’: chan_lcr.c:1391: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c: In function ‘release_all_calls’: chan_lcr.c:1655: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result chan_lcr.c: In function ‘wake_event’: chan_lcr.c:1805: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result chan_lcr.c: In function ‘load_module’: chan_lcr.c:3243: warning: passing argument 2 of ‘ast_register_application2’ from incompatible pointer type /usr/include/asterisk/module.h:427: note: expected ‘int (*)(struct ast_channel *, void *)’ but argument is of type ‘int (*)(struct ast_channel *, void *)’ make[1]: *** [chan_lcr.po] Fehler 1 make[1]: Verlasse Verzeichnis '/home/openbsc/bsc-software/lcr' make: *** [all] Fehler 2
Hello Konrad,
2011/7/25 Konrad Meier meierk@informatik.uni-freiburg.de
I tried to compile the master branch of LCR with your last changes. It failed with the error below. Asterisk version is 1.6.2.5. Is Asterisk 1.6 still supported or is 1.8 recommended now?
I have just compiled the current master branch without a problem, using the Asterisk 1.6 header files of asterisk-dev Debian package:
# apt-cache show asterisk-dev Package: asterisk-dev Priority: extra Section: devel Installed-Size: 1688 Maintainer: Debian VoIP Team pkg-voip-maintainers@lists.alioth.debian.org Architecture: all Source: asterisk Version: 1:1.6.2.9-2+squeeze2 Replaces: asterisk (<< 1:1.4.21.1~dfsg-1) Recommends: asterisk Filename: pool/main/a/asterisk/asterisk-dev_1.6.2.9-2+squeeze2_all.deb
-- Lennart
On 25.07.2011 21:48, Lennart Müller wrote:
Hello Konrad,
2011/7/25 Konrad Meier <meierk@informatik.uni-freiburg.de mailto:meierk@informatik.uni-freiburg.de>
I tried to compile the master branch of LCR with your last changes. It failed with the error below. Asterisk version is 1.6.2.5. Is Asterisk 1.6 still supported or is 1.8 recommended now?I have just compiled the current master branch without a problem, using the Asterisk 1.6 header files of asterisk-dev Debian package:
Hi Lennart,
I tried it with a clean debian system and everything compiles well. It seems that I screwed up my test system. Thank you.
The next problem is at runtime. If I use LCR to forward calls from openBSC, the call is rejected immediately by LCR with the following message: 000000 TRACE 26.07.11 14:01:12.979 CH: MNCC_REJ_REQ ---- cause coding=3 location=1 value=27
In openBSC it looks like this: ... <0001> gsm_04_08.c:1355 (bts 0 trx 0 ts 2 ti 8 sub 40732) Sending 'MNCC_SETUP_IND' to MNCC. <0001> gsm_04_08.c:3138 (bts 0 trx 0 ts 2 ti 08 sub 40732) Received 'MNCC_REL_REQ' from MNCC in state 1 (INITIATED) ...
Have you seen the same problem?
Best regards Konrad
On 26.07.2011 14:31, Konrad Meier wrote:
On 25.07.2011 21:48, Lennart Müller wrote:
Hello Konrad,
2011/7/25 Konrad Meier<meierk@informatik.uni-freiburg.de mailto:meierk@informatik.uni-freiburg.de>
I tried to compile the master branch of LCR with your last changes. It failed with the error below. Asterisk version is 1.6.2.5. Is Asterisk 1.6 still supported or is 1.8 recommended now?I have just compiled the current master branch without a problem, using the Asterisk 1.6 header files of asterisk-dev Debian package:
Hi Lennart,
I tried it with a clean debian system and everything compiles well. It seems that I screwed up my test system. Thank you.
The next problem is at runtime. If I use LCR to forward calls from openBSC, the call is rejected immediately by LCR with the following message: 000000 TRACE 26.07.11 14:01:12.979 CH: MNCC_REJ_REQ ---- cause coding=3 location=1 value=27
In openBSC it looks like this: ... <0001> gsm_04_08.c:1355 (bts 0 trx 0 ts 2 ti 8 sub 40732) Sending 'MNCC_SETUP_IND' to MNCC. <0001> gsm_04_08.c:3138 (bts 0 trx 0 ts 2 ti 08 sub 40732) Received 'MNCC_REL_REQ' from MNCC in state 1 (INITIATED) ...
I could solve the above problem by a system restart. The mISDN_l1loop module was loaded but for some reason could not be used by LCR. The LCR error message was: 000000 ERROR loop port 1 failed to bind socket. (errno 93)
By playing with the mISDN_l1loop module I discovered a strange problem. If I load the module with "modprobe mISDN_l1loop pri=1 nchannel=30" all system memory is allocated by LCR after some seconds.
If I load it with "nchannel=20" than everithing works fine.
Can someone confirm this problem?
Regards Konrad
2011/7/26 Konrad Meier meierk@informatik.uni-freiburg.de
I could solve the above problem by a system restart. The mISDN_l1loop module was loaded but for some reason could not be used by LCR. The LCR error message was: 000000 ERROR loop port 1 failed to bind socket. (errno 93)
By playing with the mISDN_l1loop module I discovered a strange problem. If I load the module with "modprobe mISDN_l1loop pri=1 nchannel=30" all system memory is allocated by LCR after some seconds.
If I load it with "nchannel=20" than everithing works fine.
Can someone confirm this problem?
Regards Konrad
On 26.07.2011 20:38, Lennart Müller wrote:
From my experience, no. My init.d script does the following in short:
modprobe mISDN_dsp modprobe mISDN_l1loop nchannel=30 interfaces=2 sleep 1 echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -s 192.168.253.0/24http://192.168.253.0/24 -o eth0 -j MASQUERADE
screen -S bsc -d -m su gsm -c "osmo-nitb -dDRLL:DCC:DMM:DRR:DRSL:DNM:DSMS:DMNSMS:DPAG:DMUX -c /etc/openbsc/openbsc.cfg -m -P" screen -S lcr -d -m su gsm -c "/usr/sbin/lcr start"
I'm using mISDN_l1loop.ko from current mISDN git because it was not included in my kernel. Small patch to make it compile:
--- a/drivers/isdn/mISDN/hwchannel.c +++ b/drivers/isdn/mISDN/hwchannel.c @@ -19,6 +19,8 @@ #include <linux/module.h> #include <linux/mISDNhw.h>
+bool flush_work_sync (struct work_struct *);
- static void dchannel_bh(struct work_struct *ws) {
Hi,
I solved the memory allocation problem. It was the interface configuration from LCR. To work properly I had to remove the [Ext] and [Int] section in the file /usr/local/lcr/interface.conf
This was indicated by a error message in LCR during start: 000000 ERROR Port 1 already in use by LCR. You can't use a NT port multiple times.
All necessary steps for a working OpenBSC + LCR setup can be found in the step by step guide here: http://lab.ks.uni-freiburg.de/projects/gsm/wiki/Openbsc_lcr
@Andreas: Can you apply the mISDN patch from Lennart to the mISDN-Git? Than everything compiles and works properly.
Best regards Konrad
FATAL: Error inserting mISDN_core (/lib/modules/2.6.32-5-686/extra/mISDN_core.ko): Unknown symbol in module, or unknown parameter (see dmesg) I did the exactly same step with fresh Debian 6.0.2 installation and it yields this error. Does anyone know what causes this? I tried using EXPORT_SYMBOL but that case the kernel dropped the modules because of the loop.
-----Original Message----- From: openbsc-bounces@lists.osmocom.org [mailto:openbsc-bounces@lists.osmocom.org] On Behalf Of Konrad Meier Sent: Wednesday, July 27, 2011 6:59 PM To: openbsc@lists.osmocom.org Subject: Re: Current OpenBSC + LCR using MNCC socket
On 26.07.2011 20:38, Lennart Müller wrote:
From my experience, no. My init.d script does the following in short:
modprobe mISDN_dsp modprobe mISDN_l1loop nchannel=30 interfaces=2 sleep 1 echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -s 192.168.253.0/24http://192.168.253.0/24 -o eth0 -j MASQUERADE
screen -S bsc -d -m su gsm -c "osmo-nitb -dDRLL:DCC:DMM:DRR:DRSL:DNM:DSMS:DMNSMS:DPAG:DMUX -c /etc/openbsc/openbsc.cfg -m -P" screen -S lcr -d -m su gsm -c "/usr/sbin/lcr start"
I'm using mISDN_l1loop.ko from current mISDN git because it was not included in my kernel. Small patch to make it compile:
--- a/drivers/isdn/mISDN/hwchannel.c +++ b/drivers/isdn/mISDN/hwchannel.c @@ -19,6 +19,8 @@ #include <linux/module.h> #include <linux/mISDNhw.h>
+bool flush_work_sync (struct work_struct *);
- static void dchannel_bh(struct work_struct *ws) {
Hi,
I solved the memory allocation problem. It was the interface configuration from LCR. To work properly I had to remove the [Ext] and [Int] section in the file /usr/local/lcr/interface.conf
This was indicated by a error message in LCR during start: 000000 ERROR Port 1 already in use by LCR. You can't use a NT port multiple times.
All necessary steps for a working OpenBSC + LCR setup can be found in the step by step guide here: http://lab.ks.uni-freiburg.de/projects/gsm/wiki/Openbsc_lcr
@Andreas: Can you apply the mISDN patch from Lennart to the mISDN-Git? Than everything compiles and works properly.
Best regards Konrad
Hi,
On Sun, Jul 31, 2011 at 02:17:51AM +0900, Seungju Kim wrote:
FATAL: Error inserting mISDN_core (/lib/modules/2.6.32-5-686/extra/mISDN_core.ko): Unknown symbol in module, or unknown parameter (see dmesg)
did you actually check 'dmesg', as indicated in the error message? And what did it say?
Yes, I checked dmesg but all it says is "Unknown symbol flush_work_sync" there was nothing else. I DID patch the code, and I tried adding EXPORT_SYMBOL(flush_work_sync); but it still does not work.
-----Original Message----- From: openbsc-bounces@lists.osmocom.org [mailto:openbsc-bounces@lists.osmocom.org] On Behalf Of Harald Welte Sent: Sunday, July 31, 2011 3:38 AM To: Seungju Kim Cc: openbsc@lists.osmocom.org; 'Konrad Meier' Subject: Re: Current OpenBSC + LCR using MNCC socket
Hi,
On Sun, Jul 31, 2011 at 02:17:51AM +0900, Seungju Kim wrote:
FATAL: Error inserting mISDN_core (/lib/modules/2.6.32-5-686/extra/mISDN_core.ko): Unknown symbol in module, or unknown parameter (see dmesg)
did you actually check 'dmesg', as indicated in the error message? And what did it say?
2011/7/30 Seungju Kim admin@manateeshome.com
Yes, I checked dmesg but all it says is "Unknown symbol flush_work_sync" there was nothing else. I DID patch the code, and I tried adding EXPORT_SYMBOL(flush_work_sync); but it still does not work.
Have you installed all modules using make install? I copied only the mISDN_l1loop.ko to the kernel module directory, because all other modules are already included in your kernel. You could try to restore your old kernel modules and copy only the one missing module by hand.
Might somebody be able to test that issue and correct the patch? I'm not that familar with mISDN and kernel modules. Just tried to make it work quickly, and l1loop works fine so far.
-- Lennart
Hmm I just did the same as you did and it works!
Do not overwrite mISDN_core.ko
From: openbsc-bounces@lists.osmocom.org [mailto:openbsc-bounces@lists.osmocom.org] On Behalf Of Lennart Muller Sent: Sunday, July 31, 2011 4:21 AM To: openbsc@lists.osmocom.org Subject: Re: Current OpenBSC + LCR using MNCC socket
2011/7/30 Seungju Kim admin@manateeshome.com
Yes, I checked dmesg but all it says is "Unknown symbol flush_work_sync" there was nothing else. I DID patch the code, and I tried adding EXPORT_SYMBOL(flush_work_sync); but it still does not work.
Have you installed all modules using make install? I copied only the mISDN_l1loop.ko to the kernel module directory, because all other modules are already included in your kernel. You could try to restore your old kernel modules and copy only the one missing module by hand.
Might somebody be able to test that issue and correct the patch? I'm not that familar with mISDN and kernel modules. Just tried to make it work quickly, and l1loop works fine so far.
-- Lennart