Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 16:37 29 Mar 2024 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 : Yet More HC-12 Talk

Author Message
Timbergetter

Regular Member

Joined: 08/10/2018
Location: Australia
Posts: 55
Posted: 02:44am 17 Jan 2023
Copy link to clipboard 
Print this post

I recently acquired another couple of HC-12 radio modules for an upcoming project.  I have not touched these modules for about four years so spending a bit of time reacquainting myself with their features was in order.  I have discovered something that might be related to clone / genuine issues, or maybe not.

On older HC-12s I was apparently able to change the communication protocol for Data bits, Parity and Stop bits using the AT+Udps command.  I remember at the time that I thought it was a bit odd that this command was able to both change settings and echo back that a successful change had occurred, but there was no command that would simply report the current settings status without attempting to change anything.  On the two new modules the AT+Udps commands do not cause a response message other than “OK”.  One possibility is that hc.com have removed the ability to change these settings and presumably hard coded the module to the common settings of 8 bits, no parity and 1 stop bit.

As a side note, I have discovered that all my modules respond to an AT+D command with what appears to be a date that is formatted yyyymmdd.  My guess is that this is probably tied to the date of manufacture.  This might be a useful feature when pairing modules for maximum compatibility.  I am not certain that any or all my modules are genuine and it occurs to me that this date response code might be also helpful in weeding out clones.  I have another batch of sub $3 modules (clones) arriving soon so it will be interesting to discover how these present.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9030
Posted: 03:43am 17 Jan 2023
Copy link to clipboard 
Print this post

In the latest HC12 manual, I cannot see any reference to AT+Udps, so I think you are correct, and that the factory now permanently sets them to 8N1, which is certainly the most common.  That does pose a problem though, if you happen to NOT want to use 8N1  

Do you have the latest manual?
I have version 2.6
If you want, I can upload it to this thread.
Smoke makes things work. When the smoke gets out, it stops!
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 839
Posted: 04:52am 17 Jan 2023
Copy link to clipboard 
Print this post

Hi Grogs,
I trust all is well?
Could you please upload the manual - I only have Rob's ver 2.3B of 01/2016.
Also, is it worth plugging Rob's configuration software? Its better if it comes from the source.

Cheers,

Andrew
 
Timbergetter

Regular Member

Joined: 08/10/2018
Location: Australia
Posts: 55
Posted: 05:27am 17 Jan 2023
Copy link to clipboard 
Print this post

Thanks Grogster, I wasn't aware of the update so I would welcome an upload here.
I suspect the half-baked option to modify the settings caused far more user problems than the constraint of fixed protocol.
Cheers,
TG
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9030
Posted: 06:08am 18 Jan 2023
Copy link to clipboard 
Print this post

Hello chums.

I have attached the 2.6 manual.


HC-12 USER MANUAL V2.6_180905 (2).pdf


@ Andrew_G: Yes, fully recovered from my dose of the coof.  Feeling just fine again now.  Only mild flu-like symptoms, and basically nothing more then a head-cold as far as I was concerned.  Cough and running nose were the most annoying, but all were gone in about one week.

  Quote  Also, is it worth plugging Rob's configuration software? Its better if it comes from the source.


Yes indeed.  Plug away.  I'm sure Rob would not mind.  I use the HC12 config utility pretty much all the time.  If Rob sees this thread, perhaps he will chime in and add a link to the latest version.
Edited 2023-01-18 16:10 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2282
Posted: 01:07pm 18 Jan 2023
Copy link to clipboard 
Print this post

the HC-12 configuration utility is here:
http://www.thebackshed.com/docregister/ViewDoc.asp?DocID=16

compiled for win32, source code (delphi5) included, i think this is the latest version.

here is the usage blurb from github:

"Small win32 utility to configure the HC-12 Wireless Serial Port Communication Module. Module should be attached to a USB to TTL serial bridge, with the SET pin tied to ground. If the SET pin is grounded before power is applied, the module will default back to the required 9600 baud".


btw, as the HC-12 just passes the data straight through in each direction, i'm not sure it needs to know about number of data bits, parity, or stop bits. all it needs to know is the baud rate, in order to calculate when to sample bit centres on the RxD pin (ie, synchronize its own internal data clock), and then treat everything as a continuous stream of bits. it could be the manufacturer has gone from using the onboard micro's hardware UART (that needs to know about the data format), to using a more flexible software implementation with the removal of the AT+Udps command coinciding with this.


cheers,
rob   :-)
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 839
Posted: 01:49am 20 Jan 2023
Copy link to clipboard 
Print this post

Thanks Grogs and Rob.

I've downloaded both the manual and config program. I use HC-12s on most of my projects and have now adopted the 'out of the box' settings as they seem (to me) to be a good compromise. I only use genuine ones bought from Grogs, and his little programming device! (the non-genuine ones are at the bottom of my pile of used gear - well labelled).

In the new house (September this year?) I'll experiment with some pairs at different speeds etc.

Cheers,

Andrew
 
Print this page


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

© JAQ Software 2024