Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Import Gurux DLMS Into My Android Project

Import Gurux DLMS into my Android project

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By dataco , 20 May, 2021
Forums
Gurux DLMS for Android

Hi,

How can I import Gurux DLMS library into my Android project.

I don't have found the JAR or AAR file on GitHub

Thank you

Massimo

Profile picture for user Kurumi

Kurumi

5 years ago

Hi Massimo,

Hi Massimo,

You can do it by add this to dependencies:

implementation 'com.github.gurux:gurux.dlms.android:-SNAPSHOT'

BR,
Mikko

dataco

5 years ago

Thanks Mikko !

Thanks Mikko !

The communcation is ok in my app. I communicate with the meter using BT probe

Wich functions must I call to decrypt the response of the DLMS meter ?
For example to decrypt the register 1

GXDLMSDirector 8.2.2104.2901
Log created 14:29:31
14:29:34 Read object type Register index: 1
7E A0 11 03 03 30 26 0E E6 E6 00 05 01 02 6D 60 03 25 7E
14:29:34
7E A0 17 03 03 32 AE 66 E6 E7 00 0C 01 00 09 06 01 01 01 08 01 FF 7A 30 7E
14:29:34 Read object type Register index: 3
7E A0 11 03 03 52 32 4E E6 E6 00 05 01 02 6D 70 82 35 7E
14:29:35
7E A0 15 03 03 54 E8 59 E6 E7 00 0C 01 00 02 02 0F 00 16 1E CC 34 7E
14:29:35 Read object type Register index: 2
7E A0 11 03 03 74 06 0A E6 E6 00 05 01 02 6D 68 4B A9 7E
14:29:35
7E A0 14 03 03 76 43 47 E6 E7 00 0C 01 00 06 00 00 26 90 80 60 7E

Profile picture for user Kurumi

Kurumi

5 years ago

Hi,

Hi,

You create an object like this:
GXDLMSRegister reg = new GXDLMSRegister("LOGICAL_NAME");
//Read scaler and unit.
readObject(reg, 3);
//Read value.
readObject(reg, 2);
Objec value = reg.getValue();
You can find readObject from GXMain.java.

BR,
Mikko

dataco

5 years ago

Thanks.

Thanks.

In my developer tool(Windev mobile), I must integrate a jar or aar file. I can't directly integrate java file.

I dont't see any jar file into you library. Do you have one ?

Profile picture for user Kurumi

Kurumi

5 years ago

Hi,

Hi,

You need to compile android lib or add this to dependencies:

implementation 'com.github.gurux:gurux.dlms.android:-SNAPSHOT'

BR,
Mikko

delanou

4 years 6 months ago

Hey Mikko! I've added the

Hey Mikko! I've added the dependency you point out in the comment above into build.gradle file on a new Empty Activity Project (Android Studio) like this:

plugins {
id 'com.android.application'
}

android {
compileSdk 30

defaultConfig {
applicationId "com.example.myapplication"
minSdk 21
targetSdk 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.github.gurux:gurux.dlms.android:-SNAPSHOT'

testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

but when I try to sync I get the following message: "Failed to resolve: com.github.gurux:gurux.dlms.android:-SNAPSHOT".

- The version of Android Studio I am using is 2020.3.1 Patch 3 (SDK 21, Android 5.0 +) and the version of Gradle is 7.0.2 -

Am I doing something wrong?

Thanks,
Nico.

Profile picture for user Kurumi

Kurumi

4 years 6 months ago

In reply to Hey Mikko! I've added the by delanou

Hi Nico,

Hi Nico,

Please, create a new topic if you have a new question. Create a new topic and I'll answer this.
http://www.gurux.fi/ForumRules

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin