Skip to main content
Home
for DLMS smart meters

Main navigation

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

Breadcrumb

  1. Home
  2. Port List Not Updated After Permission

Port List not updated after permission

By Bhaumik, 30 May, 2024
Forums
Gurux DLMS for Android

Hi Mikko,

I am performing connect-disconnect load operations on smart meter using an Android app via the serial interface.

When I connect the cable to the mobile phone, it prompts for permission to access the port. After granting permission, the latest port does not update in the GXSerial port list. Currently, we have to restart the mobile application to see the latest port.

After granting permission, all latest ports should update in the list without restarting the mobile app.

Can you please suggest how I can achieve this using Gurux.Serial.Android?

Thank you.

Profile picture for user Kurumi

Kurumi

1 year 5 months ago

Hi, Are you listening…

Hi,

Are you listening onPortAdded event? That is called when a new port is added.

BR,
Mikko

solomihir

1 year 5 months ago

Hello @Kurumi, I am facing…

Hello @Kurumi,

I am facing specific issue with detecting device at runtime. I am using GXSerial class for getting available ports and this class is also responsible for creating broadcast receiver for device attached, device detached and permission intent events.

Now in GXSerial Class, we are registering a broadcast receiver (GXUsbReciever). The problem lies here. When the UsbManager.ACTION_USB_DEVICE_ATTACHED action is called the receiver will call addPort since there is no permission for this device. It will generate an intent for getting permission. Once permission is granted by the user, action ("gurux.serial") given in the intent will be received in the broadcast receiver. This broadcast receiver will have an intent where we will parse the device from the intent. Where device is null and even if device permission is granted and addPort is called. Nothing will be changed since device is null.

Please check the image attached.

Image
Profile picture for user Kurumi

Kurumi

1 year 5 months ago

Hi, This is fixed. Get the…

Hi,

This is fixed. Get the latest version.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 10/29/2025 - 08:51
    gurux.dlms.c 9.0.2510.2901
  • Thu, 10/16/2025 - 09:59
    gurux.dlms.java 4.0.83
  • Wed, 10/08/2025 - 10:21
    gurux.dlms.c 9.0.2510.0801
  • Fri, 09/26/2025 - 10:02
    gurux.dlms.cpp 9.0.2509.2601
  • Fri, 09/26/2025 - 09:45
    gurux.dlms.c 9.0.2509.2601

New forum topics

  • Guidance on using the source codes
  • How to get/convert user readable format data from readRowsByRange
  • Insufficient memory to continue the execution of the program.
  • The client instance code failed to connect to the electricity meter for authentication
  • Unable to Release Request when closing connection with meter.
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin