gisce / iec870ree

IEC-870-5-102 for REE Spanish Electric meters
GNU Affero General Public License v3.0
13 stars 11 forks source link

Retransmit frame to get acknowlegment #7

Closed mstfbirinci closed 5 years ago

mstfbirinci commented 6 years ago

link_state_request, remote_link_reposition, authentication or read_integerated_total methods send frames, but sometimes we can not get any response and connection is stalled.

I think, if we can not get any response for any frame, we should retransmit the frame until getting acknowledment or should try max 5 times.

Did you faced with this problem? What do you think about this?

ecarreras commented 6 years ago

We didn't found this problem, but your proposal it's a good improvement. We will think about it with @MiquelIR

MiquelIR commented 6 years ago

Hi @mstfbirinci ! Are you getting this stalling using the current version of the code?

It's true that it fell onto some stalled state before but I think we fixed that with the disconnection process.

If you are still getting it we can look into it to find some viable solutions.

mstfbirinci commented 6 years ago

Hi @ecarreras @MiquelIR

For example, it send link_state_request frame and didn't get any response. After the 60 sec(queue timeout) it raised queue.empty exception.

I think, it caused by gsm signal loss.

ecarreras commented 6 years ago

Currently we are not testing it with GSM, only in IP meters, but when we will work with GSM we will try it and if there is a problem we will fix it.

MiquelIR commented 5 years ago

@mstfbirinci Hi! I don't know if you are still using or checking this project but I coded a modification to allow those retries you asked for. It's on here #10

It's pretty simple but it resends the 2 handshake messages.

ecarreras commented 5 years ago

Fixed #10