hi, i have been worked on raspberry pi + RealDash CAN
raspberry pi has ip 192.168.0.99 and listens on the port 35000 using python script
#!/usr/bin/env python3
import asyncio
async def handle_echo(reader, writer):
writer.write(b'0x55,0x33,0x22,0x11') # how to send ?
await writer.drain()
print("Close the connection")
writer.close()
async def main():
server = await asyncio.start_server(
handle_echo, '192.168.0.99', 35000)
addr = server.sockets[0].getsockname()
async with server:
await server.serve_forever()
asyncio.run(main())
in the RealDash Application i do
GARAGE->CONNECTION->ADD->RealDash CAN->WIFI/LAN
ADAPTER IP ADDRESS: 192.168.0.99
ADAPTER PORT: 35000
open CAN MONITOR on the RealDash Application
I get the result from python script
Received '' from ('192.168.0.100', 48871)
Send: ''
Close the connection
Received '' from ('192.168.0.100', 48875)
Send: ''
Close the connection
Received '' from ('192.168.0.100', 48878)
Send: ''
Close the connection
Received '' from ('192.168.0.100', 48879)
Send: ''
Close the connection
Received '' from ('192.168.0.100', 48880)
Send: ''
Close the connection
Received '' from ('192.168.0.100', 48881)
Send: ''
Close the connection
how to send data to RealDash CAN by the python3?
how to understand this code which was written for Arduino and write a similar code for python?
const byte serialBlockTag[4] = { 0x44, 0x33, 0x22, 0x11 };
Serial.write(serialBlockTag, 4);