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. Forums
  3. Bluetooth Optical IR Probe With Raspberry Pi

Bluetooth Optical IR Probe with raspberry pi

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 EO , 20 November, 2020
Forums
Gurux.DLMS

Hi all,

Can anyone suggest the best way to go about using the gurux dlms and a raspberry pi with a Bluetooth based optical IR port to read a meter?

Any suggestions will be really appreciated

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

There are a lot of different optical probes on the market. I'm sorry to say, but all the heads don't work with all the meters. Example Kamstrup probe works well, but it's not cheap.

BR,
Mikko

EO

5 years 6 months ago

Hi,

Hi,

Thanks for your response.

We've been able to confirm that the probe talks to the meter successfully (by sending /?! via Bluetooth serial app. see attached image). Now we need to know how to read data from it using gurux python lib and a raspberry pi. Any information you have around this will be very much appreciated.

Thanks a lot

Image
Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

Read this and check the video.
http://www.gurux.fi/bluetooth

BR,
Mikko

Toni

5 years 6 months ago

Hello, how do I enter the

Hello, how do I enter the password in -P [password], I want to connect to an HEXING meter which worked on the GXDLMS Director, the password on is 00 00 00 00 00 00.

Throws error when I put space while putting the password. How can one go about this.

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

You need to hard-code it. The command-line applications accept only ASCII strings at the moment.
I'll add a command line parameter for hex string to the worklist.

BR,
Miko

Toni

5 years 6 months ago

Ok thank you... Can you offer

Ok thank you... Can you offer some help on how to go about it.

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

A new version is released. You can now give a password in hex format like this:
-P 0x000000000000

BR,
Mikko

Toni

5 years 6 months ago

Hi,

Hi,

thank you for the update, however I tried it with the following settings and yet no communication was established.
INPUT
python main.py -S /dev/rfcomm0 -c 1 -s 1 -a High -P [0x000000000000] -t Verbose

OUTPUT
gurux_dlms version: 1.0.95
gurux_net version: 1.0.17
gurux_serial version: 1.0.15
Authentication: Authentication.HIGH
ClientAddress: 0x1
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 10:49:32 7E A0 07 03 03 93 8C 11 7E
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 10:49:46
DisconnectRequest

This settings were used to communicate with the HEXING meter using the GXDLMS director, also the SNRM request, 7E A0 07 03 03 93 8C 11 7E tallies exactly with that genrated from the python script on the raspberry pi with bluetooth.

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

Can you check what baud rate your Bluetooth is using?
Try to give serial port like this:

python main.py -S /dev/rfcomm0:9600:8None1 -c 1 -s 1 -a High -P [0x000000000000] -t Verbose

BR,
Mikko

Toni

5 years 6 months ago

It still gives the same

It still gives the same response as above.

In the past, I paired it with an HC-05 using an Arduino on 9600 baudrate, I sent /?n\r\n, and I got a response of /HXE5\2HXE12.

That being said, I think the baudrate is 9600

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

HI,

HI,

You need to add -i parameter. I believe it will solve your problem.

BR,
Mikko

Toni

5 years 6 months ago

'''''''''''''''''''''''''''

''''''''''''''''''''''''''''GXDLMS DIRECTOR''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
10:31:34 10:31:34.561 Info Opening
10:31:34 10:31:34.562 Info Serial Port Settings: Port Name: COM6 Baud Rate: 300 Data Bits: 7 Parity: Even Stop Bits: One Flow Control: None Eop: None
10:31:34 10:31:34.583 Info Open
10:31:35 10:31:35.585 Sent 2F 3F 21 0D 0A
10:31:36 10:31:36.587 Received 2F 48 58 45 35 5C 32 48 58 45 31 32 0D 0A
10:31:36 10:31:36.588 Sent 06 32 35 32 0D 0A
10:31:38 10:31:38.589 Info Closing
10:31:38 10:31:38.706 Info Closed
10:31:38 10:31:38.706 Info Opening
10:31:38 10:31:38.706 Info Serial Port Settings: Port Name: COM6 Baud Rate: 9600 Data Bits: 8 Parity: None Stop Bits: One Flow Control: None Eop: None
10:31:38 10:31:38.732 Info Open
10:31:39 Send SNRM request.
TX: 7E A0 07 03 21 93 0F 01 7E
10:31:39 10:31:39.733 Sent 7E A0 07 03 21 93 0F 01 7E
10:31:39 10:31:39.962 Received 7E A0 20 21 03 73 73 98 81 80 14 05 02 00
10:31:40 10:31:40.958 Received 00 C8 06 02 00 C8 07
10:31:40
RX: 7E A0 20 21 03 73 73 98 81 80 14 05 02 00 C8 06 02 00 C8 07 04 00 00 00 01 08 04 00 00 00 01 0B 87 7E
10:31:40 Send AARQ request.
TX: 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
10:31:40 10:31:40.959 Sent 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
10:31:41 10:31:41.228 Received 7E A0 37 21 03 30 6C 7C E6 E7 00
10:31:41 10:31:41.239 Received 00 61 29 A1 09
10:31:41 10:31:41.255 Received 03 02 01 00 A3 05 A1 03 02 01 00 BE 0F 04 0E 08
10:31:41 10:31:41.276 Received 00 06 5F 1F 04 00 00 18 1F 01 00 00 07 71 3E
10:31:41
RX: 7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 0F 04 0E 08 00 06 5F 1F 04 00 00 18 1F 01 00 00 07 71 3E 7E

'''''''''''''''''''''''PYTHON SCRIPT'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

python main.py -S /dev/rfcomm0 -t Verbose -i
gurux_dlms version: 1.0.95
gurux_net version: 1.0.17
gurux_serial version: 1.0.15
Authentication: Authentication.NONE
ClientAddress: 0x10
ServerAddress: 0x1
Standard: Standard.DLMS
TX: 02:25:39 /?!

RX: 02:25:44 /HXE5\2HXE12

Bitrate is : 9600
TX: 02:25:44 06 32 35 32 0D 0A
RX: 02:25:45 252

TX: 02:25:46 7E A0 07 03 21 93 0F 01 7E
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 02:26:01
DisconnectRequest

Toni

5 years 6 months ago

Above is the response from

Above is the response from the GXDLMS director and the python script.

I went with the NO AUTHENTIFICATION option to avoid any password complexity at least. The GXDLMS Director responded to the SNRM request of 7E A0 07 03 21 93 0F 01 7E, but the python script failed to the same request after the handshake. What could have gone wrong here.

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

We'll install Rasporry PI on Thursday and check if we can make this happen. We have a new Optical probe with a Bluetooth connection. Let's see what happens.

BR,

Mikko

Toni

5 years 6 months ago

Hi,

Hi,

How did the optical probe and the raspberry pi test go yesterday.

EO

5 years 6 months ago

hi Mikko,

hi Mikko,

Any update on your test?

It will be very helpful for us if you can share.

Regards

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

This is now tested and it worked as expected. I am afraid that your optical probe can't handle the baud-rate change. What is your optical probe manufacturer and model?

BR,
Mikko

EO

5 years 6 months ago

Hi,

Hi,

Supplier says the device supports Data baud rate between: 300-19200 bit/s

here is a link to the device on alibaba

https://www.alibaba.com/product-detail/Bluetooth-Optical-Probe-with-IEC…

can you share a video of your test? maybe there is something we are doing wrongly.

Regards

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

There are a lot of differences between the optical probes. Your meter is for IEC62056-21, but let's hope you can connect with that.

Did you use this probe with Windows or someone else? Can you try to run python In Windows and can you read the meter?

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