Author |
Post |
|
#1 Thu Feb 09, 2012 10:18, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
|
Is it possible to send/receive SMS in national lang on OpenWRT ?
I have not tried yet smstools3 on openwrt but there were some problems first time I began to use smstools3 in usual linux -- problem was in locale settings. My server had no UTF-8 locale support and I could not to send SMS on russian (I had KOI-8 or C locale). When I sent SMS received one could not be readed - wrong chars, unreadable message.
After setting locale to ru_RU.utf8 problems are gone.
AFAIK openwrt has no locale support or has no fully supported locales. I find nothing about locale support in "make menuconfig" of openwrt.
So ... is it possible to get full featured SMS in openwrt ? I mean send/receive/checkhendler/eventhendler SMS on Russinan language for example.
Operating system name and version: OpenWRT Version of smsd: 3.1.14 Smsd installed from: sources Name and model of a modem / phone: Huawei E1550 Interface: USB
|
|
#2 Sat Feb 11, 2012 14:04, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
And now ... openwrt has no locale support and there is no need to do that for current. I can receive and read sms on english but can not send and receive sms on russian - this is iconv problem and I cannot make iconv to work. iconv does not copy it self into image only libs are copied (proken package ?). After copying iconv from source tree to openwrt by hands it does not work - segmentation fault when I do iconv -c -s -f UNICODEBIG -t UTF-8 <file>.
So this is not smstools3 problem.
|
|
#3 Tue Feb 14, 2012 05:26, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
After some svn update of trunk iconv works for now. There is another problem: I cannot port all the scripts for encoding SMS to openwrt.
I need received sms in UTF-8 if Alphabet is UCS2. To encode sms on PC I use "sms2unicode $2 | iconv -c -f UTF-16 -t UTF-8 >> $2.txt" in smsevent.
sms2unicode uses od. In openwrt od is only from busybox and it has no option "-t x1". Openwrt od's help looks like:
BusyBox v1.19.3 (2012-02-12 21:34:36 NOVT) multi-call binary.
Usage: od [-aBbcDdeFfHhIiLlOovXx] [FILE]
Print FILE (or stdin) unambiguously, as octal bytes by default
So sms2unicode does not wor with such od. I need help ... :-). Pleace help me to encode SMS in UCS2 to UTF-8.
openwrt has ash, awk, cut, egrep ...
sendsms seems works fine.
B.t.w. Why smsd uses so mutch memory ? It is a biggest process on my router by memory usage. pppd eats less RAM. pppd is more feature rech program. I almost have no RAM margin after starting smsd.
|
|
#4 Tue Feb 14, 2012 08:20, 159 months ago.
|
Member
Registered: Apr 2011
Location: Kupchino, Russian Federation
|
warm wrote B.t.w. Why smsd uses so mutch memory ? It is a biggest process on my router by memory usage. pppd eats less RAM. pppd is more feature rech program. I almost have no RAM margin after starting smsd.
Try to reduce NUMBER_OF_MODEMS in src/Makefile.
|
|
#5 Tue Feb 14, 2012 10:18, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
Thanks it help.
With one modem smsd eats only 5% of RAM vs 15% before with default 64. pppd eats 6% :-).
|
|
#6 Tue Feb 14, 2012 14:26, 159 months ago.
|
Member
Registered: Apr 2011
Location: Kupchino, Russian Federation
|
warm wrote I need received sms in UTF-8 if Alphabet is UCS2. To encode sms on PC I use "sms2unicode $2 | iconv -c -f UTF-16 -t UTF-8 >> $2.txt" in smsevent. ...
Pleace help me to encode SMS in UCS2 to UTF-8.
Why don't you use the incoming_utf8 option instead of this? http://smstools3.kekekasvi.com/index.php?p=configure#g_incoming_utf8
|
|
#7 Tue Feb 14, 2012 14:57, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
Seems because I get Alphabet: UCS2 sms and this option has no effect - it should affect on ISO or GSM alphabet only like documentation tells. I just tried this option and there was no effect. Received message has been saved in UNICODEBIG (aka UCS-2BE in iconv). Here is my config:
|
|
#8 Tue Feb 14, 2012 15:50, 159 months ago.
|
Member
Registered: Apr 2011
Location: Kupchino, Russian Federation
|
warm wrote Seems because I get Alphabet: UCS2 sms and this option has no effect - it should affect on ISO or GSM alphabet only like documentation tells. I just tried this option and there was no effect. Received message has been saved in UNICODEBIG (aka UCS-2BE in iconv).
My bad. Try decode_unicode_text instead. http://smstools3.kekekasvi.com/index.php?p=configure#g_decode_unicode_text
|
|
#9 Tue Feb 14, 2012 15:59, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
It decodes in something unreadable and I do not know type of encoding after this internal decoding. I tried this optoion in the past (and just now) - that is whi this option was commented out in my config
|
|
#10 Tue Feb 14, 2012 16:26, 159 months ago.
|
Member
Registered: Apr 2011
Location: Kupchino, Russian Federation
|
warm wrote It decodes in something unreadable and I do not know type of encoding after this internal decoding. I tried this optoion in the past (and just now) - that is whi this option was commented out in my config
Looks like the internal decoder makes use of wctomb() that in turn depends on current locale (and on libc locale support). As an alternative option you can link smsd against libiconv. In this case resulting encoding will be UTF-8 for sure (as long as libiconv supports UCS-2BE and UTF-8). In order to link against libiconv uncomment the following lines in the src/Makefile:
|
|
#11 Wed Feb 15, 2012 03:03, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
Thanks very match! Now I have smsd with working internal decoder on openwrt. But my package is ugly. To compile smsd I put full path in make file. Makefile of the smstools3 - not a package Makefile: I don't know how to do right in openwrt style ... I think I should use package Makefile with buildroot env variables or some patch but not full path to headers and lib dirs. Also I should write dependenses in package make file but libiconv-full is in feed dir - not in package dir where smstools3 placed. So I don't know how to create package right. May be You can help with this ?
|
|
#12 Wed Feb 15, 2012 08:15, 159 months ago.
|
Member
Registered: Apr 2011
Location: Kupchino, Russian Federation
|
Current smstools build system has no convenient cross-compiling/staging support, so I would suggest to create a patch for Makefile like this: And use the following in the package Makefile: « Last edit by unterwulf on Wed Feb 15, 2012 08:19, 159 months ago. »
|
|
#13 Wed Feb 15, 2012 08:19, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
Spasibo, zavtra poprobuu :-).
|
|
#14 Thu Feb 16, 2012 02:13, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
Yes, it compiled and works. B.t.w. smsd compiled from build tree in making openwrt image ("make" in trunk dir) is less in size and eats less memory then smsd binary compiled alone. For now I have this Makefile (taken from this forum and modified): and patch (patches/10-Makefile.patch): Package has directory src with content from src dir of original tar.gz sources.
|
|
#15 Sat Feb 18, 2012 02:20, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
"decode_unicode_text = yes" turns on internal decoding of incoming messages and it works. Is any option for outgoing messages ?
Can not find the same option for outgoing SMS. I don't like to use script with iconv wich is not a part of iconv-full package in openwrt :-(. Every time copy iconv by hands is bad solution.
|
|
#16 Mon Feb 20, 2012 15:10, 159 months ago.
|
Member
Registered: Apr 2011
Location: Kupchino, Russian Federation
|
warm wrote "decode_unicode_text = yes" turns on internal decoding of incoming messages and it works. Is any option for outgoing messages ?
The Alphabet header is a kind of alternative to that for outgoing messages. I took a quick look at the source code and it seems that UTF-8 is a supported yet not documented value. So try to add the following header to your messages:
|
|
#17 Tue Feb 21, 2012 04:26, 159 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
Thanks again, it works. If I do some mistake and correct it by backspace I get some artefacts on console (UTF-8 IO problem in openwrt with no locale support) I receive text in sms before this mistake :-). Also I get error in logs: When I use iconv I use -c -s keys which prevent invalid chars and there is no error in same case. When I do not misstakes there are no errors  .
|
|
#18 Mon May 21, 2012 16:08, 156 months ago.
|
Member
Registered: May 2012
Location: Belgium
|
Hi 'Warm' (Any one else can also share of course!  ) I'm new to compiling and openwrt but I do need the smstools package. Since you compiled it into a working package (and small mem footprint), would it be possible to share the package? I don't need the src on this install, but I guess that's not too big anyway. This would save me a lot of time! Thx, C. warm wrote Yes, it compiled and works. B.t.w. smsd compiled from build tree in making openwrt image ("make" in trunk dir) is less in size and eats less memory then smsd binary compiled alone.
For now I have this Makefile (taken from this forum and modified): .... .... Package has directory src with content from src dir of original tar.gz sources.
|
|
#19 Tue May 22, 2012 03:44, 155 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
ftp://mumba.tomsk.net/soft/smstools3_3.1.14-6_ar71xx.ipk
Look inside before installing and don't tell anyone my pin codes in configs :-)
|
|
#20 Tue May 22, 2012 04:04, 155 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
B.t.w. my router TP-Link 3020 works unrelaible with USB modem and USB flash. The problem is on hardware. I changed to active USB hab but no success.
It works maximum 46 days (for my) and then something happens ... flash r/w errors or modem hangs up. But nothing happens with router - router works fine.
I think problem is on bad USB chipset on SOHO routers. My 3G modem on Dlink dir-825 (reflashed by openwrt) works no more then 2-3 days, then I plug out and plug in modem and it works 2 days again :-).
So You should not get very relaible USB modem on hardware like small SOHO router. Only PC works relaible.
I want to try some GSM gateway with serial (no USB) interface but I can not find it by the low price - it costs more then my router :-).
|
|
#21 Tue May 22, 2012 08:36, 155 months ago.
|
Member
Registered: May 2012
Location: Belgium
|
thx warm;
gave it a try but I get an incompatibility error message: 'pkg_hash_fetch_best_installation_candidate: Packages for smstools3 found, but incompatible with the architectures configured'
dmesg tells me: Linux version 2.6.39.3 (logic@x) (gcc version 4.3.3 (GCC) ) CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177 AT91: 96 gpio irqs in 3 banks
as AT91 is an 'upgrade' of AT71, I hoped the package would load .. but no luck.
Anybody has a build for my HW? And I would also need libiconv-full, as that's a dependancy.
alternative: anyone knows a 'Build openwrt packages, for dummies'?
C.
|
|
#22 Tue May 22, 2012 08:45, 155 months ago.
|
Member
Registered: Mar 2011
Location: Russian Federation
Topic owner
|
What architecture do You use Atheros AR7xxx/AR9xxx.The package will not work on another architecture or even on native one but with an older or newer libs. Also I use iconv and libiconv as I remember.
It seems You should compile pkg for yourself.
|
|
#23 Tue Feb 26, 2013 16:09, 146 months ago.
|
Member
Registered: Feb 2013
Location: Belarus
|
I do not speak English, but your information helped me a lot. spasibo unterwulf i warm nu i avtoru programmy, Udachy... 
|