Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database Driver Issues #157

Closed
Mamadou99 opened this issue Dec 4, 2015 · 6 comments
Closed

Database Driver Issues #157

Mamadou99 opened this issue Dec 4, 2015 · 6 comments
Labels

Comments

@Mamadou99
Copy link

Hi Everybody , i'm using the huawei ec156 for gammu. I have configured gammurc and gammu --identify is working . I've installed gammuSMSD too .
But :

  • It tells me :"Error starting gammuSMSD service" when i do "gammu-smsd -s -c smsdrc n gammuSMSD"
  • when i do "gammu-smsd -c smsdrc" it tells me :
    Log filename is smsdlog
    "gammu-smsd[7236]: Unknown DB Driver
    Failed to read config: Unknown error."
    Here is my smsdrc configuration :
    [smsd]
    service = sql
    PIN = 1234
    logfile = smsdlog
    debuglevel = 0
    user = root
    password =
    pc = localhost
    database = degloubin
    driver = native_mysql

I'm using windows and mysql.
I wanted to know where are the problems.
Thanks !

@Armagetron
Copy link
Contributor

Have you build Gammu for Windows yourself?

@nijel
Copy link
Member

nijel commented Dec 8, 2015

Probably the db driver is not compiled in, what is output of gammu-smsd -v?

@nijel nijel added the question label Dec 8, 2015
@Mamadou99
Copy link
Author

Thanks For the answer. I use Gammu For Windows, the one downloadable on the website.
This is the output of gammu-smsd -v :
" Gammu-smsd version 1.33.0
Built 11:54:08 on May 29 2013 using GCC 4.7, MinGW 3.11
Compiled in features:
OS support :

  • WINDOWS_SERVICE
  • GETOPT
  • GETOPT_LONG
  • EVENT_LOG

Backend services :

  • NULL
  • FILES
  • ODBC "

Thanks Again

@Armagetron
Copy link
Contributor

You have to install the MySQL ODBC driver and change the driver to obdc, then this build should work with MySQL on Windows.

Your other option is to build gammu yourself with the appropriate mysql driver.

@Mamadou99
Copy link
Author

I saw that building gammu is with Cmake, but how to build it with a mysql driver ?

  • I already have mysql in my computer
  • I tried to compile the source version but there was a lot of errors. If cygwin is easier, i would really like to know the steps.
    Is it possible to add mysql as a backend service with the windows version of gammu ?

Excuse me for responding very late it's because i didn't have satisfying results in my settings and i was hesitating about "bothering" you again... Sorry again

@Armagetron
Copy link
Contributor

First of all, I assume that you are using Visual Studio to build gammu on Windows. Open the Developer Command Prompt (Start menu, Visual Studio, Tools).

You got 2 options:

  1. You can try installing the MySQL ODBC driver and talk to MySQL using ODBC. You can find the instructions for the setup here: http://dev.mysql.com/doc/connector-odbc/en/

ODBC support comes with Visual Studio and is present in your current build. The connector should work fine but needs to be separately installed (like an addon for mysql so that the server speaks this protocol).

  1. You can build gammu with the mysql library. Assume that mysql is installed in some folder (C:\mysql for example). Then you need to tell cmake where to find the library and include dir. To do so, invoke cmake from your build dir as follows:
C:\gammu\build>cmake.exe -DMYSQL_INCLUDE_DIR=C:\mysql\include -DMYSQL_LIBRARIES=C:\mysql\lib\libmysql.lib ..

Sadly, the lib depends on the dll. So you have to make sure, that the dll is within your PATH. I hope that helps.
Don't hesitate to ask!

@nijel nijel closed this as completed Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants