Speakjet Control Code Mode

Hi All, I’ve been experimenting with a SpeakJet IC and it’s all working pretty much as expected except I simply can not put it into “Serial Control Mode” so I can access the registers, EEPROM etc. This is done by sending an escape code with a node number to the SpeakJet

sjSerial.print ("\0");

along with the “code” to get it to change things. At it’s simplest I just send the code

sjSerial.print (“V”); //ack (SpeakJet says “ready”)

and then

sjSerial.print (“X”); //exit

to exit SCM.

The SpeakJet just ignores the code above when I send to it, ie it doesn’t say “ready”. It doesn’t attempt to “say” the characters I assume it’s doing “something”, just not what I want. I’ve tried all sorts of variations, sending the characters as HEX, DEC etc, delays between sending the chars, but no joy. I’ve pretty much run out of idea’s on what else to do. I’ve tried sending the reset code “W” and the stop/start codes “S” and “T” but these too are just ignored.

I can send it

sjSerial.println ("\xFD"); //gun shot sound

and it does play the gun shot sound so it recognises the escape character OK.

I’m using the #include <SoftwareSerial.h> lib.

The documentation for the SpeakJet is here…

If anyone has any idea’s I would love to hear them, I’m absolutely stumped.

When the SCP module detects the Escape character ( \ ), the next character received (the control value) is used to set the serial port's operating mode.

That looks to me like you have to send TWO characters - a backslash and another character, and the device puts them together. Instead of "\0", try sending "\0".

To send the backslash you'd have to escape it too.

"\\0"

@PaulS and @Delta_G yes that's solved it. The \ is the required combination that works.

Odd though I did think I tried the double escape quite early on but maybe I didn't have something else quite right.

Thanks!

Delta_G: To send the backslash you'd have to escape it too.

"\\0"

That's going to send a backslash and a NULL, not a backslash and a 0 that the other end can then interpret as a NULL.