I have the FMB125 module and want to send a codec 8 stream from a python script.
I can connect to the server but when I send the IMEI I lose the connection
As explained in the Teltonika data transmission/reception protocol guide in the "Communicating with server" section, I need to do the following:
Note : The module IMEI is already added to the server, in addition, the module itself can communicate with the server and send data
- Module connects to server=> I open a tcp socket "done succecfully"
- Module sends its IMEI. For example, IMEI 356307042441013 would be sent as 000F333536333037303432343431303133
but when I send the IMEI the server terminates the connection
I am using the folowing code :
HOST = "Server IP"
PORT = Port
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Send data
print('sending "%s"' % data_stream)
# Look for the response
data = client_socket.recv(1024)
print( 'received "%s"' % data)
print ('closing socket')
sending "b'000F333536333037303432343431303133'" received "b''" closing socket
Any help is approciated