-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server not work with a real charge point #307
Comments
You need to implement your own logic where the template code you copied from the wiki says " // ... handle event" and "return null". |
hi @bantu, thanks for the answer. I am doubting if that is really the problem, since the handle event logic that you mention, I understand that it is at the OCPP (application protocol) level, however, looking at the network traffic with wireshark, the handshake at the TCP (transport layer) is not carried out. In this way, the connection to the websocket cannot be made. I have done more tests. Start a client on another machine with the same library and the result is the same. The client generates TCP requests to establish a connection with the server, but the server does not respond to the TCP requests (the TCP handshake does not take place): On the other hand, when the client and server are on the same machine, the connection is made without problems... |
@bdevia Sounds like you have network problems in general. |
@bantu the truth is that I don't think it's a network problem, since with the library https://github.com/mobilityhouse/ocpp, the connection works perfectly: Have you performed tests between client and server on different machines? I'm thinking that it may be a problem with my own equipment (architecture for example) that causes the library to not work at the network level. |
it looks like your two tests are on two different ip networks (172.15.200.0/24 vs. 192.168.41.0/24)
yes, in the past |
I have already found the problem, when it set the host as "localhost", the server does not enable the service for the IP of the private network as in other services. In this way, it is advisable to change the host directly to the IP instead of "localhost". |
Hi, I've been testing with your library to create a mainframe following the examples shown in the quickstart: https://github.com/ChargeTimeEU/Java-OCA-OCPP/wiki/Getting-started
When running the server and the client (simulated), the connection is made perfectly, however, when I try to test between the server and a real charge point (GWJ3004W) the connection is not made.
When analyzing the network traffic, I can notice that the CP sends TCP requests to establish the connection but the server does not respond to them:
As you can see, it is not a network problem either. My private IP is 172.15.200.101, while the charge point is 172.15.200.100.
I have tried other libraries and it has worked, so I rule out CP as the problem. The charge point operates with OCPP-j 1.6, so the server runs with that version of the protocol.
Server code:
package com.example;
import java.util.UUID;
import eu.chargetime.ocpp.JSONServer;
import eu.chargetime.ocpp.ServerEvents;
import eu.chargetime.ocpp.feature.profile.ServerCoreEventHandler;
import eu.chargetime.ocpp.feature.profile.ServerCoreProfile;
import eu.chargetime.ocpp.model.SessionInformation;
import eu.chargetime.ocpp.model.core.AuthorizeConfirmation;
import eu.chargetime.ocpp.model.core.AuthorizeRequest;
import eu.chargetime.ocpp.model.core.BootNotificationConfirmation;
import eu.chargetime.ocpp.model.core.BootNotificationRequest;
import eu.chargetime.ocpp.model.core.DataTransferConfirmation;
import eu.chargetime.ocpp.model.core.DataTransferRequest;
import eu.chargetime.ocpp.model.core.HeartbeatConfirmation;
import eu.chargetime.ocpp.model.core.HeartbeatRequest;
import eu.chargetime.ocpp.model.core.MeterValuesConfirmation;
import eu.chargetime.ocpp.model.core.MeterValuesRequest;
import eu.chargetime.ocpp.model.core.StartTransactionConfirmation;
import eu.chargetime.ocpp.model.core.StartTransactionRequest;
import eu.chargetime.ocpp.model.core.StatusNotificationConfirmation;
import eu.chargetime.ocpp.model.core.StatusNotificationRequest;
import eu.chargetime.ocpp.model.core.StopTransactionConfirmation;
import eu.chargetime.ocpp.model.core.StopTransactionRequest;
public class OCPPServerExample {
}
It is worth mentioning that the charge point is configured to connect to the central system through the address ws://172.15.200.101:8887/
Am I making some mistake? Has anyone faced this problem?
I hope you can help me, thank you.
The text was updated successfully, but these errors were encountered: