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 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 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 ago

Hi, This is fixed. Get the…

Hi,

This is fixed. Get the latest version.

BR,
Mikko

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 06/19/2025 - 09:33
    Gurux.DLMS.Python 1.0.185
  • Wed, 06/18/2025 - 15:11
    Gurux.DLMS.Python 1.0.184
  • Wed, 06/18/2025 - 10:05
    Gurux.DLMS.Python 1.0.183
  • Wed, 06/18/2025 - 09:06
    GXDLMSDirector 9.0.2506.1801
  • Wed, 06/18/2025 - 08:41
    Gurux.DLMS.Net 9.0.2506.1801

New forum topics

  • Unable to read parameter values from Landis+Gyr E550 meter using GXDLMSDirector - NoAccess status
  • data.SetComplete(false); But all data recieved
  • Crash (endless loop)
  • Server is not able to download object list with maxPduSize 64 or 128 (or anything below 156-bytes PDU size)
  • Day profile action item add error (String is not recognized as valid DateTime value)
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin