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

J1939 vehicle position #553

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

olerem
Copy link
Contributor

@olerem olerem commented Aug 4, 2024

This patch set provide support for the GPSD to J1939 service. I managed to make CmakeList work so far, but i still need help to make Makefile work properly too. How to manage properly gpsd dependecy, currenty i do not know.

@olerem olerem requested review from marckleinebudde and hartkopp and removed request for marckleinebudde August 4, 2024 13:27
@olerem
Copy link
Contributor Author

olerem commented Aug 4, 2024

To make it compile libgps-dev package is required.

lib.c Outdated

Choose a reason for hiding this comment

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

I would have named it timespec_earlier, eh nits.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

libj1939.c Outdated

Choose a reason for hiding this comment

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

SocketCAN failed to connect?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is not doing anything SocketCAN specific and current error message is alighted with existing messages. I'll keep it for now as is. If we decide to change them, then better all of them in one run.

j1939_vehicle_position/j1939_vehicle_position_cmn.h Outdated Show resolved Hide resolved
j1939_vehicle_position/j1939_vehicle_position_srv.c Outdated Show resolved Hide resolved
j1939_vehicle_position/j1939_vehicle_position_srv.c Outdated Show resolved Hide resolved
j1939_vehicle_position/j1939_vehicle_position_srv.c Outdated Show resolved Hide resolved
@marckleinebudde
Copy link
Member

To make it compile libgps-dev package is required.

We need a cmake option for this.

@marckleinebudde
Copy link
Member

@marckleinebudde
Copy link
Member

marckleinebudde commented Aug 5, 2024

Have a look at https://github.com/marckleinebudde/can-utils/tree/j1939_vehicle_position for a WIP github actions fix.

olerem and others added 2 commits December 28, 2024 11:08
Introduce `libj1939_connect_socket` function to handle socket
connections.

Signed-off-by: Oleksij Rempel <[email protected]>
@olerem olerem force-pushed the j1939_vehicle_position branch 2 times, most recently from d61e849 to 4fe8337 Compare December 29, 2024 10:51
…ition Server

This patch adds `j1939-vehicle-position-srv`, a server for sending
vehicle position data over CAN using J1939 or NMEA 2000 protocols. It
retrieves GPS data from gpsd or simulates data if gpsd is unavailable.
By default, it operates in J1939 profile but can switch to NMEA 2000
with the `-p nmea2000` option.

Usage Examples:
1. With gpsd:
   j1939acd -r 64-95 -c /tmp/1122334455667789.jacd 1122334455667789 vcan0 &
   j1939-vehicle-position-srv -i vcan0 -n 0x1122334455667789

2. In simulation mode without gpsd:
   j1939-vehicle-position-srv -i vcan0 -s -p nmea2000

Signed-off-by: Oleksij Rempel <[email protected]>
@olerem olerem force-pushed the j1939_vehicle_position branch from 4fe8337 to 2638b39 Compare December 29, 2024 11:03
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.

3 participants