Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 18:56 13 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Setting HC-12.

Author Message
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 06:20am 23 Apr 2020
Copy link to clipboard 
Print this post

Hi All,

Seem to have got myself stuck trying to setup an HC-12.

It's one of the USB dongle ones.
Wanted to try & get my PC connected to a Sensirion Particle sensor that talks @ 115,200.

Tried changing the baud rate with @robert.rozee 's utility & it returned weird characters.

Now it's getting the same weird responses with everthing I try.

Only thin I seem to be able to do is connect to it in mmedit @ 115,200 & send AT commands & get ERROR as the response.

Being USB, it has a momentary SET button that you hold down to set commands, but even just AT returns ERROR. AT+DEFAULT is the same.

All I can tell is it is at 115200 as the ERROR message is readable.

Any Suggestions?
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2465
Posted: 08:24am 23 Apr 2020
Copy link to clipboard 
Print this post

have you tried tying the SET pin to ground? without doing this, you can not configure the HC-12.

now where you find that pin on the USB dongle version is another matter...

************************************************************************************

addendum: oops, i should have read the rest of your post! my next suggestion is that the SET button may be flaky.


cheers,
rob   :-)
Edited 2020-04-23 18:27 by robert.rozee
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 10:05am 23 Apr 2020
Copy link to clipboard 
Print this post

Hi Robert,

I did recover it.
Needed to hold the set button in on power up & keep it there to reconfig back from 115k.


The HC-12's docs are still a bit cloudy.

From how I interpret them the command mode would be at the set baud rate IF the set line is pulled low after power up.

BUT, it forces 9600 if it's kept low from power up.

Initially I was worried I'd bricked it as the command mode didn't respond as expected when I pulled set low after power up

Also, do you know if matters how the AT commands are terminated?
As in CR Vs CR/LF?

Re the SET button being Flaky...

It's ok, but difficult to keep it held in, plug the device into a USB lead, & ensure you don't break the connection at some point in time.


Would be curious to know from others if they've had success at 115k.
I'm only needing circa under 10m & the idea is to set the particle sensor outside & connect as below.

SPS30 sensor @115k --> HC-12 -----------> HC-12/CP2102 USB -----> PC Test Software.


I do have a laptop that lives outside in the Solar Cabinet that I RDP or VNC to, but the Evaluation software won't run on it as it's only Win7 32 Bit.
64 Bit OS seems required although not mentioned anywhere.


Cheers

Phil.
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 872
Posted: 06:54am 25 Apr 2020
Copy link to clipboard 
Print this post

Phil & Rob (+ et al),
I've got a couple of the USB HC-12s. Easy to pull apart by running a fingernail (or something thinner) down the glued join.
Inside is a standard HC-12 attached to a carrier board that translates the USB connections to the HC-12 (plus LEDs, connection to the coil antenna etc).
There is a reset button which is connected to pin #5 of the HC-12.
Rob is obviously too modest to chime in but he has done some enhancements to the basic manual which are very helpful.
(If he doesn't chip in with a link shortly I can go looking - I've only got the PDF I downloaded).

Cheers, Andrew

(I'm only using it at the out-of-the-box 9600 but I think it should work OK at the other permitted speeds, eg 115200)
Edited 2020-04-25 16:56 by Andrew_G
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 08:19am 25 Apr 2020
Copy link to clipboard 
Print this post

  Andrew_G said  (I'm only using it at the out-of-the-box 9600)….


That's where all mine usually sit.

I've been playing with my Sensirion SPS30 particle sensor in the office for a few weeks now with their Eval software, but want to stick it outside now.

Catch is that it's UART interface is locked at 115200, so I need a bridge to USB talking at that rate.

It also does I²C, but that doesn't help at this point.

Just hoping the HC-12 can do 10-15m in a sh*tty environment @ 115 to get me to the next step.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025