Page 1 sur 1

Question about serial protocol

Publié : dim. mars 12, 2017 11:25 pm
par antst
Hello,

I hope it is OK that I use english. Looks like the most of knowledge about G2 automakers is here.

I made my own version of serial/radio interface for automower. (not wifi-based, but rather on 433MHz link on HC-12 modules, which has better range than wifi, and in this case PCB with size of about 1x2 cm (which cost couple of EUROs only) is added to automower).

But I have some issue I don't understand. Maybe this is not even issue.

All serial commands start with 0F. For basic commands then it follows with 2-byte command code, then whatever it is. (For example status 0F01F10000)
Replies are supposed to start with 0F then the same 2-byte command code and then reply body.
But in my case, every second reply omits starting 0F. Is it how it is supposed to be?

For example, I send
0F01F10000
get reply
01F10C00

then send again
01F10000
get reply
0F01F10C00

then again
0F01F10000
get reply
01F10C00

And it follows this pattern (I check from terminal)

I am trying to figure out, is it how it is supposed to be, or it is something wrong in my particular case.

I tried to sniff traffic of TweakAM-PC, seems to be the same. And looks like TweakAM-PC is skipping those replies that don't start with OF.
But, from other side, I checked my hardware chain, before attaching to my 220AC and it works smooth, so I don't thing this is problem of my serial/radio hardware.

How it is supposed to be? Is it correct behaviour? Is it known issue?

I am trying to write my own code, as
1) I don't have any windows around (I tried TweakAM-PC in virtual machine), but I have dedicated host for home automation, so I want to control it from here, preferably with MQTT interface.
2) as I don't have wi-fi, having server as on TweakAM-Web isn't an option either (and waste of resources, as I already have dedicated host for those things anyway)
3) for me it looks more natural to have so simple as possible hardware on the Automower. Even from service point of view. And I like the fact, that my long-range solution cost less than 10 EUROs in total :)


Question about serial protocol

Publié : lun. mars 13, 2017 12:03 pm
par chercheur
Hello Anton :-)

Nice to read you here (we just discussed your HC-12 deployment on homematic-forum.de & per email) :-)
BTW....I'm waiting for my HC-12 pair.

Now, I can't remember having noticed this [u]every time[/u] while checking those HEX commands and their return codes...
I'll give it a try again as soon as the modules will be configured.

You should post your question on www.forum.myautomower.de too as they did also discuss this subject in the past.


Question about serial protocol

Publié : dim. mars 26, 2017 12:59 pm
par chercheur
Hello.
I've now installed my 2 HC-12 modules and they are working great.
2 things :

[u]1) Regarding your question [/u]
For me it always sends back 5 HEX bytes
- Heure : 0F 36 B5 00 00 -> answer 0F 36 B5 03 00
- Minutes : 0F 36 B3 00 00 -> answer 0F 36 B3 07 00
- Secondes : 0F 36 B1 00 00 -> answer 0F 36 B1 30 00
I'm using HTERM to send & receive the data

[u]2) But I have an issue with the clock ?![/u] It always stays at 3 hour 7 minutes....do you have the same behaviour ???

Tx