Hi sir
I started the client C library with stm32 and read meter with serial. Now I want to connect to AMI with gprs module. What should I do send and recieve data ami gurux? And how do I implement TCP?
The meters are connected to the serial port and must be read serially. According to what you said in the comments, I have to use an autoconnect(), but I have no idea how???????
If you are using autoconnect your stm32 will establish the connection to the AMI at the given time. If you are using a dynamic IP address the server can't establish the connection for the meter. Autoconnect is used for dynamic connections.
If I have understood this correctly there are two options.
1. Your stm32 works as a router and it sends data from AMI to meter and vice versa. It doesn't modify the data. This is easier to implement.
2. You add a server for the stm32. Your AMI can communicate with it. This is harder to implement, but AMI can communicate with WRAPPER for stm32, and stm32 communicates with HDLC with the meters.
You can also use different PDU sizes between the AMI and meter connection.
meter ---- serial(HDLC )---->arduino----tcp ip(WRAPPER) --->AMI
I want every time data comes from the server (tcp ip wrapper), Arduino recievedit and reads the command from the meter with the serial(HDCL) and sends the answer under WRAPPER to ami.
You need to create a server and client for the stm32. Then server preRead you will ask this value from the meter and return the meter's reply to the AMI.
The meters are connected to
The meters are connected to the serial port and must be read serially. According to what you said in the comments, I have to use an autoconnect(), but I have no idea how???????
Hi,
Hi,
You can collect data from the meter and send it as a push message for the Gurux AMI.
You can use Arduino TCP/IP module to send the data using TCP/IP.
BR,
Mikko
In fact, I want to read and
In fact, I want to read and send data every time I receive a request from the server
And do this with the autoconnetc()
?
Hi,
Hi,
If you are using autoconnect your stm32 will establish the connection to the AMI at the given time. If you are using a dynamic IP address the server can't establish the connection for the meter. Autoconnect is used for dynamic connections.
BR,
Mikko
im use ip static,Can I define
im use ip static,Can I define it in Ardino client or do I have to integrate usury client and server?
Hi,
Hi,
If I have understood this correctly there are two options.
1. Your stm32 works as a router and it sends data from AMI to meter and vice versa. It doesn't modify the data. This is easier to implement.
2. You add a server for the stm32. Your AMI can communicate with it. This is harder to implement, but AMI can communicate with WRAPPER for stm32, and stm32 communicates with HDLC with the meters.
You can also use different PDU sizes between the AMI and meter connection.
BR,
Mikko
meter ---- serial(HDLC )----
meter ---- serial(HDLC )---->arduino----tcp ip(WRAPPER) --->AMI
I want every time data comes from the server (tcp ip wrapper), Arduino recievedit and reads the command from the meter with the serial(HDCL) and sends the answer under WRAPPER to ami.
Hi,
Hi,
You need to create a server and client for the stm32. Then server preRead you will ask this value from the meter and return the meter's reply to the AMI.
BR,
Mikko