How do i update the value to be read from the HM-18 via Arduino code (without using the notify channel)

The code I have included successfuly transmits the message across the "notify" channel. I want to update the "read" value of the ffe1 characteristic. The idea here is that I don't want to send out 'notify' packets but instead want to set the value displayed when I read the characteristic vs writing to it.

I am new so maybe my terms aren't 100% correct here.

I can Write to the HM-18 without issue
I can listen to the HM-18's notifications without issue
I can't Read or update any values to be read. When i read the value it always returns "(null)"

#include <SoftwareSerial.h>
SoftwareSerial HM10(9, 8); 

void setup() {
  Serial.print(9600);
  HM10.begin(9600);
}

void loop() {
  HM10.write("AT+CHAR0x2345");
  Serial.write("loop");
  delay(1000);

}

In the image below in the Read/Notify values section, the first 2 values are what happens when I click "read again" and the last 3 are what's being transmitted via the "notify" channel.

My goal would be to see the value when I click "read again"

[edit]

Here’s a video showing my issues

What app are you using on the phone? iphone or Android?

Have you tried the HM-18 with Light Blue? When a characteristic is read and notify, there is a button to select Read Again or Subscribe.

Hey @cattledog

I’m using LightBlue on both devices to read/read again.

The value when read/read again as a utf-8 string or hex is the value is consistently the string “(null) on iOS and some garbled text on android.

The notify value is always the value I’m trying to actually read

I’ve added a video to the OP to show what I mean about the issue and the garbled text.

I don't have an HM10/18 to work with, and have no idea as to what is happening.

Have you tried using the dsd tech phone app?

I suggest that you work with dsd technical support. You may be able to use AT commands to change the characteristic from read/notify to read only.

1 Like

Thanks for the ideas here. no difference from the DSD tech phone app.

I Am doing this. it's decent but i feel like i'm getting the run around for 2 weeks now. different ways of them not saying no without giving me a yes as to whether or not it's available.

Just to close the loop here. Even though it's sold as if this is possible, the device indicates it's writeable/readable, the staff at DSD have verified what I am trying to accomplish won't be possible.

Good to know. Good to share.


i

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.