Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: HC-12 Wireless Serial Module Post ReplyPost New Topic
Page of 12 Next >>
Author
Message << Prev Topic | Next Topic >>
robert.rozee
Guru
Guru


Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 1395
Posted: 12 January 2016 at 4:27am | IP Logged Copy link to clipboard   Quote robert.rozee

hi,
for anyone who is interested, attached is a copy of an HC-12 graphical configuration utility i've been working on. i have also edited the HC-12 user manual into a more 'english' form that is hopefully a little more understandable.

the HC-12 module can be had for less than us$10 (including delivery) for a pair on ebay. of note is that configuration is saved in onboard flash, so you can configure a pair of modules once and thereafter pretty much treat them as a 3-wire TTL serial data cable that can be up to 1800m long (on a good day with a tail wind).

feedback and corrections to any errors are welcome.


cheers,
rob :-)




2016-01-12_042418_HC12_config.zip



Back to Top View robert.rozee's Profile Search for other posts by robert.rozee
 
TassyJim
Guru
Guru
Avatar

Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2988
Posted: 12 January 2016 at 7:26am | IP Logged Copy link to clipboard   Quote TassyJim

I don't have any HC12's yet but when they arrive, your utility will make life easier.
It leaves more time for the interesting stuff.

Thanks
Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
Geoffg
Guru
Guru
Avatar

Joined: 06 June 2011
Location: Australia
Online Status: Offline
Posts: 2495
Posted: 12 January 2016 at 7:42am | IP Logged Copy link to clipboard   Quote Geoffg

For US$10 a pair that is a cheap serial communication link. Using your utility and being able to treat them as a simple serial link makes it so convenient.

I am amazed at the products that come out of China. They are often very good but at the same time tragically crippled by their documentation.

__________________
Geoff Graham - http://geoffg.net
Back to Top View Geoffg's Profile Search for other posts by Geoffg Visit Geoffg's Homepage
 
Zonker
Guru
Guru
Avatar

Joined: 18 August 2012
Location: United States
Online Status: Offline
Posts: 704
Posted: 12 January 2016 at 11:51am | IP Logged Copy link to clipboard   Quote Zonker

Thanks Rob for your fine configuration utility program..! Setting up the radios will be much easier now...
Back to Top View Zonker's Profile Search for other posts by Zonker
 
MicroBlocks
Guru
Guru
Avatar

Joined: 12 May 2012
Location: Thailand
Online Status: Offline
Posts: 2202
Posted: 12 January 2016 at 12:22pm | IP Logged Copy link to clipboard   Quote MicroBlocks

Great job Rob!
A simple to use utility that prevents a lot of headaches. Works great!
I am using it now with my USB-Serial module and have a console to a uMite open.


__________________
Microblocks. Build with logic.
Back to Top View MicroBlocks's Profile Search for other posts by MicroBlocks
 
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 6580
Posted: 12 January 2016 at 12:27pm | IP Logged Copy link to clipboard   Quote Grogster

You can't select above channel 4(434.6MHz) - is that by design?

I am guessing you wrote the utility, to not allow setting of illegal frequencies for our Australian/New Zealand regulations, but that also means that other people from other countries can't select a frequency that they might be able to use.

I don't care, cos I stick to the regs, but others might need that flexibility.

Nice easy to use utility, Rob, and I think I might even get in a couple of those modules to play with. I don't suppose you know what the spectral cleanliness is like on these modules? I have a 2GHz spectrum analyzer, so I can check the carrier for harmonics, especially at the 100mW power...

__________________
Smoke makes things work. When the smoke gets out, it stops!
Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 
robert.rozee
Guru
Guru


Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 1395
Posted: 12 January 2016 at 12:39pm | IP Logged Copy link to clipboard   Quote robert.rozee

Grogster wrote:
You can't select above channel 4(434.6MHz) - is that by design?


you see that little check box marked "LPD433 lock"? try unchecking it

i would be extremely interested in any RF testing folks could do, so as to be able to expand on the user manual. also, please do report any spelling errors spotted (in config utility and user manual). i'm already up to version 2.3B of the manual after re-reading it a few times.

i am also keen to hear how well the serial port enumeration works. i'm reading the windows registry to build the list of ports and am not 100% sure how well it detects real serial ports.


cheers,
rob :-)
Back to Top View robert.rozee's Profile Search for other posts by robert.rozee
 
Grogster
Guru
Guru
Avatar

Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 6580
Posted: 12 January 2016 at 12:58pm | IP Logged Copy link to clipboard   Quote Grogster

D'OH!

My bad - I wondered about that checkbox, but did not think to untick it - silly boy.(me, that is)

Looking at the photo of the module in your manual, it looks to have some kind of output RF filtering, but how good or bad it is, does depend on what the spectrum analyser makes of it. I will get a couple in from eBay and hook one up and post the resultant waveform + any other data. This is not exactly lab-testing that is done for compliance, but it would give us some kind of idea of it's spectral output purity.



Edited by Grogster on 12 January 2016 at 12:59pm


__________________
Smoke makes things work. When the smoke gets out, it stops!
Back to Top View Grogster's Profile Search for other posts by Grogster Visit Grogster's Homepage
 
TassyJim
Guru
Guru
Avatar

Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2988
Posted: 12 January 2016 at 8:14pm | IP Logged Copy link to clipboard   Quote TassyJim

robert.rozee wrote:

i am also keen to hear how well the serial port enumeration works. i'm reading the windows registry to build the list of ports and am not 100% sure how well it detects real serial ports.


cheers,
rob :-)


Finding real serial ports cam be a pain at times.
This is the routine that MMEdit uses (Windows only)


    ' _OPEN_EXISTING = 3

    ' _INVALID_HANDLE_VALUE = -1 ' signed INT64 FFFFFFFF
    ' _INVALID_HANDLE_VALUE = 4294967295 ' unsigned

    redim portlist$(65)
    pf=0
    for PortNumber = 1 to 64
        lpFileName$ = "\\.\COM"; PortNumber
        dwCreationDistribution = _OPEN_EXISTING
        hTemplateFile = _NULL
        calldll #kernel32, "CreateFileA", _
            lpFileName$            as ptr, _
            dwDesiredAccess        as ulong, _
            dwShareMode            as ulong, _
            lpSecurityAttributes   as ulong, _
            dwCreationDistribution as ulong, _
            dwFlagsAndAttributes   as ulong, _
            hTemplateFile          as ulong, _
            hFileHandle            as ulong

        if hFileHandle <> _INVALID_HANDLE_VALUE then
            pf=pf+1
            portlist$(pf)=mid$(lpFileName$,5)
            calldll #kernel32, "CloseHandle", _
                hFileHandle as ulong, _
                result      as long
            print lpFileName$
        end if
    next PortNumber


Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
robert.rozee
Guru
Guru


Joined: 31 December 2012
Location: New Zealand
Online Status: Offline
Posts: 1395
Posted: 13 January 2016 at 2:28pm | IP Logged Copy link to clipboard   Quote robert.rozee

TassyJim wrote:

Finding real serial ports cam be a pain at times.
This is the routine that MMEdit uses (Windows only)


    for PortNumber = 1 to 64
        lpFileName$ = "\\.\COM"; PortNumber
        dwCreationDistribution = _OPEN_EXISTING
        hTemplateFile = _NULL
        calldll #kernel32, "CreateFileA", _



what sort of time delay do you see from using this method? it does seem like there are a number of approaches, all quite different, and all having varying (non-overlapping) degrees of success. i just did another search with google and found the only universal answer to the question, is that there is no universal method!

i do like the simplicity of your method, but it does have a couple of caveats with higher port numbers, the possibility of ports not named COMn, and apparently some bluetooth devices masquerading as comm port devices when they are not.

i used the registry approach mainly because delphi 5 (the rather ancient RAD environment i use) has quite nice support for accessing the registry.


cheers,
rob :-)
Back to Top View robert.rozee's Profile Search for other posts by robert.rozee
 
TassyJim
Guru
Guru
Avatar

Joined: 07 August 2011
Location: Australia
Online Status: Offline
Posts: 2988
Posted: 13 January 2016 at 8:58pm | IP Logged Copy link to clipboard   Quote TassyJim

Hi Rob,
My method is slow, especially if you go looking for 64 ports.
It does only find ports that are not in use. That may be an advantage.
It does find the old COM1 etc, not just USB ports.
(It finds the modem built in to my laptop)

I am also playing with a port monitor to listen for the Windows messages when USB devices are inserted/removed. That also has problems with some serial ports.

TeraTerm seems to have a fast and reliable method but I haven't work it out yet.

Jim

__________________
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
Back to Top View TassyJim's Profile Search for other posts by TassyJim Visit TassyJim's Homepage
 
HankR
Senior Member
Senior Member


Joined: 02 January 2015
Location: United States
Online Status: Offline
Posts: 200
Posted: 14 January 2016 at 1:30am | IP Logged Copy link to clipboard   Quote HankR

robert.rozee wrote:
feedback and corrections to any errors are welcome.


Rob,

Your work in creating a config. utility will help a ton.

As far as the documentation goes, I have questions or suggestions for revisions on just about every one of the 8 pages.

Just about all of it involves improvements that could be made to the original language which is kind of awkward in many places and which you might not have wanted to bother to fiddling around with.

I might just do a rewrite myself and send it to you to see if I've got it right.

Hank
Back to Top View HankR's Profile Search for other posts by HankR
 


Page of 12 Next >>
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.3438 seconds.
Privacy Policy     Process times : 0.02, 0, 0, 0.33