vbouchaud / gsmlib Goto Github PK
View Code? Open in Web Editor NEWgsm-utils: GSM mobile phone access applications
License: Other
gsm-utils: GSM mobile phone access applications
License: Other
Hello. I gather you're the (not so) new upstream but it looks as though the various distributions (except Debian?) haven't caught on. I suspect this is because they prefer to have an actual release available. Would it be possible to put one out? If nothing is known to be broken, this shouldn't be too much effort. If you do, I can ensure that this is applied on Gentoo. I come here from the FreeSWITCH project, who have been bundling gsmlib in their source tree, but would prefer to rely on distributions if it becomes more widely available.
When using
echo test | gsmsendsms -C "$service_center" -b 19200 -d "$device" "$mobile_number"
I get a
ME/TA error 'invalid PDU mode parameter' (code 304)
Running it under strace
, I see that the ERROR 304 comes in response to:
write(3, "AT+CMGS=18\0\r", 12) = 12
Note the spurious NUL character there.
This diff:
diff --git a/gsmlib/gsm_util.cc b/gsmlib/gsm_util.cc
index 373592c..f054929 100644
--- a/gsmlib/gsm_util.cc
+++ b/gsmlib/gsm_util.cc
@@ -164,7 +164,7 @@ bool gsmlib::hexToBuf(const std::string &hexString, unsigned char *buf)
std::string gsmlib::intToStr(int i)
{
std::ostringstream os;
- os << i << std::ends;
+ os << i;
return os.str();
}
makes that character and the error go away. I don't know enough of C++ to know why that std:ends
was there in the first place.
That's tested with the current git HEAD (cd5442d) on Debian unstable (libstdc++6:amd64 7.2.0-16), though the problem was initially seen on Debian jessie (libstdc++6:amd64 4.9.2-10, libgsmme1c2a:amd64 1.10+20120414.gita5e5ae9a-0.2)
It's possible that it is a regression as I didn't get the error on Debian squeeze with the same GSM modem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.