collin80 / SavvyCAN

QT based cross platform canbus tool
MIT License
1.04k stars 288 forks source link

Connecting to socketcand #471

Open vekexasia opened 2 years ago

vekexasia commented 2 years ago

hello, i'm trying to connect to a socketcand in my other network apparently discovery is not working but i was trying to use connection string.

I didnt seem to find the format so looking at the code it seemed to me that can://ip:port would work.

Unfortunately despite the fact that it says "connected" the console shows this:

Created TCP Socket to Kayak device can://ip:port
Reconnecting to TCP Host *ip*
Reconnecting to TCP Host *ip*

in loop.

If i try to do telnet ip port i get <hi> back.

QrackEE commented 1 year ago

Hi,

Long time since your reporting, but I just got started with all the CAN tooling (and unfortunately need to find a way to work cross Linux/Windows platforms...). Anyway, today I found following combination string to be working so that it connects to non-broadcast-found sockets:

<channel>@<hostname_string> (can://<ip>:<port>)

where <hostname_string> can be basically anything - important part is to have IP:PORT in brackets.

My follow up later is that often I get

Created TCP Socket to Kayak device Reconnecting to TCP Host Opening CAN on Kayak Device!

with no following

Switching to rawmode...

Which makes my socketcand daemon (given random Fuzzer data being generated)

unknown command '< send 300 1 15 >'.

I've found this problem reported in #478 (without effect of crash for me. That issue mentions #475 which is merged, so perhaps the problem is masked by no longer having a crash?). I plan to follow up on that, but don't hold your breath.

gamebeast2k commented 10 months ago

Hi, the connect issue is still here. (Build: Dec 20 2023) trying under win11 and win10

Savvycan dont anser the < hi > from remote with < open can0 >

Last Message is: (Opening CAN on Kayak Device!) Found here: https://github.com/collin80/SavvyCAN/blob/da5e5027e3aa14edc52c3fbc5342382856b06b8f/connections/socketcand.cpp#L221

Wiresharklog: Remote send : < hi > (Data: 3c206869203e) Savvycan : ... send nothing 10sec later Savvycan : timeout reconnect

Settings: Socketcand (autodectected srv) can0@xxx (can://11.22.33.44:29536)

With (nc 11.22.33.44 29536) remote: < hi > local: < open can0 > remote: < ok > local: < rawmode > remote: < ok > remote: < frame 5E1 1703956223.642968 7A2A0060FE000000 > ....... works!