HM-10 programming mode for data transmission

Hi, I'm using HM-10 for BLE connectivity with two arduino UNO. In programming., i should write the code like when my master finishes transmission with the slave, it should make the HM-10 to sleep immediately, and whenever it wanted to send it should wake the HM-10 and do transmission with slave for efficient power consumption. Now my question is, whenever i'm doing data transmission, i'm not able to put AT commands to HM-10 module. if i'm trying to send AT commands those AT commands are also getting transmitted by the master to slave as a data. now what should i do? which mode i can use for sending data as well as AT commands.

How about posting your code here for a start.

Prithiviraj_pandian: i should write the code like when my master finishes transmission with the slave, it should make the HM-10 to sleep immediately, and whenever it wanted to send it should wake the HM-10 and do transmission with slave for efficient power consumption.

The HM-10 is so frugal it might be better to try and use it to cut the power to Arduino.

Now my question is, whenever i'm doing data transmission, i'm not able to put AT commands to HM-10 module.

This is normal. Bluetooth can be in either AT mode or communication mode. But not both. This means you can only configure bluetooth by wires, and it must be out of comms mode in order to do that.

if i'm trying to send AT commands those AT commands are also getting transmitted by the master to slave as a data.

I think instead is a better word here.

now what should i do?

As above, think again about where the real power issues are.

UKHeliBob:
How about posting your code here for a start.

I’m using a very basic code for sending AT commands in between the data tranmission. the code is attached below.

BLE_sleep_test_slave.ino (600 Bytes)

he code is attached below.

OK, but how about actually posting your code here to avoid the need for everyone to download it ?

Something like this maybe

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX

void setup()
{
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  Serial.println("started");
  mySerial.begin(115200);
  pinMode(5, INPUT_PULLUP);
  delay(1000);
}
void loop()  // run over and over
{
  mySerial.println("test I am slave ");
  delay(1000);
  while (mySerial.available() != 0)
  {
    Serial.write(mySerial.read());
  }
  while (Serial.available() != 0)
    mySerial.write(Serial.read());
  if (digitalRead(5) == LOW)
  {
    mySerial.write("AT+SLEEP");
    mySerial.write("\n");
  }
}

Hi am using HM10 module and connecting it to arduino uno board. it works for AT command i get a response OK. but AT+DISC command is not working. I have used AT+RESET command then my board is not getting power up. Anyone suggest me a solution in this regard

Shalinivit: it works for AT command i get a response OK. but AT+DISC command is not working. I have used AT+RESET command then my board is not getting power up.

where is this portion in the program?

Shalinivit: it works for AT command i get a response OK. but AT+DISC command is not working.

You might need to check that you have a kosher HM-10. You might have a fake, like the CC41A, which I understand has a reduced instruction set. I have no idea what AT+DISC is supposed to do, but I can't find it in the Bolutek manual.