Question about serial protocol
Publié : dim. mars 12, 2017 11:25 pm
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 :)
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 :)