Skip to content
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

Adds SocketCan support to the openmrn hub. #422

Merged
merged 10 commits into from
Sep 2, 2020
Merged

Conversation

balazsracz
Copy link
Collaborator

This enables running the hub on a BeagleBone or a Raspberry Pi with a CAN HAT.
All other options are still usable, including repeating traffic between a SocketCAN port and a TCP client,
or a SocketCAN port and a USB port via GridConnect.

kiwi64ajs and others added 7 commits October 19, 2019 23:39
Removed dead code
This enables running the hub on a BeagleBone or a Raspberry Pi with a CAN HAT.
All other options are still usable, including repeating traffic between a SocketCAN port and a TCP client,
or a SocketCAN port and a USB port via GridConnect.
@balazsracz balazsracz requested a review from bakerstu September 1, 2020 22:35
Copy link
Owner

@bakerstu bakerstu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this make Alex's pull request for the same thing obsolete?

@atanisoft
Copy link
Collaborator

Does this make Alex's pull request for the same thing obsolete?

I looked over what @kiwi64ajs proposed in #327 and I think that there may be a couple pieces that might still be relevant after this PR has been merged. Specifically the addition of the AvaHiMDNS.cxx file for the rpi target (perhaps a symlink?) and the readme describing how to configure/run the hub.

@balazsracz
Copy link
Collaborator Author

ahh bummer. I forgot about that and did not notice it yesterday.
I will work on merging these two PRs. I see there is some unrelated changes popping up in Alex's branch that also need to be cleaned up.

@TrainzLuvr
Copy link
Contributor

I pest0red Balazs about SocketCAN support and he got this PR in overnight.

Meanwhile, I also found Alex's branch couple of days ago and compiled the Hub from his OpenMRN fork. But, I don't think it's working for me over the CAN bus (possibly due to my CAN shield - used an Arduino one, then swapped the transceivers to get 3V3 logic levels).

Hub does work over WiFi/Ethernet though as I can see my UWT-100 and JMRI sending packets to it. Did not connect the ESP32CS yet as I need a longer CAN cable for my test setup.

I am not sure what benefit AvahimDNS support adds, because the connecting devices would need to run mDNS queries via UDP, so this to me seems limited to TCP/IP networks only, unless it is something WiThrottle needs?

@atanisoft
Copy link
Collaborator

I am not sure what benefit AvahimDNS support adds, because the connecting devices would need to run mDNS queries via UDP, so this to me seems limited to TCP/IP networks only, unless it is something WiThrottle needs?

mDNS is used by the UWT-100 and other devices to find the hub without knowing it's IP address.

@TrainzLuvr
Copy link
Contributor

Ah right, WiFi...still TCP/IP. I keep thinking LCC because I see LCC below the WiFi bars and somehow I associate that with CAN bus. :)

# By Alex Shepherd
# Via GitHub
* alex/master:
  Update main.cxx
  Added SocketCAN support to the hub application on the Raspberry Pi
  Added SocketCAN support to the hub application on the Raspberry Pi
  Added SocketCAN support to the hub application on the Raspberry Pi

# Conflicts:
#	applications/hub/main.cxx
@balazsracz
Copy link
Collaborator Author

i merged Alex's changes into this PR.

@balazsracz balazsracz merged commit 8c547bc into master Sep 2, 2020
@balazsracz balazsracz deleted the bracz-hub-socketcan branch September 2, 2020 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants