Giter VIP home page Giter VIP logo

canopensocket's People

Contributors

canopennode avatar geoffrey-vl avatar jdascenzio avatar martinwag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

canopensocket's Issues

CANopenSocket News

Currently CANopenSocket uses an old version of CANopenNode (v1.3-master).

Latest CANopenNode master has now almost all the functionalities from current CANopenSocket/canopend application.

CANopenNode master now includes:

  • module 309(gateway - master functionality), which is microcontroller undependent.
  • everything necessary to compile and run in Linux

So CANopenSocket/canopend is not necessary any more and will be removed in future.

However, my strategy is to keep CANopenNode as tiny as possible. So CANopenSocket can be a place for all other Linux related code and examples. Currently there is canopencomm (and canopencgi) and there are some more plans. There is also a docs directory for online html documentation (generated by doxygen from CANopenNode master, for now).

Missing files

Hi,

I'm playing with the CANopenSocket.html, but is trying to load the JS files from the lib folder, but there's no lib folder, and the files are notin the project.

The files are:

  • CANopen.js
  • CANopenUI.js

Regards,

Master always stay preoperational

Hi,
Im trying to use canopend as a master like this:

canopend can0 -i 1 -c ""

I tried to change the state with

canopencomm 1 cmd

It accept all the commands changing the states but it never goes operational
both canopencomm 1 preop and canopencomm 1 start results in a 7F state and never 05

The slaves instead are working fine.
What Im doing wrong?

thanks,
Francesco

Syntax error with u64

When executing the command
canopencomm 0x71 w 0x1000 0 u64 F000000000000070

I get the following error:

[1] ERROR: 101 - Syntax error.

However, when I execute the command

canopencomm 0x71 w 0x1000 0 u64 0000000000000070

the command executes without issue. I presume i am doing something, but I cannot see it. Any assistance would be appreciated.

docker gateway

Hi,

It's not much of a thing, but I did some tests with running canopen gateway inside a docker container.
It should allow application developers to ease their process.
Its building the canopend daemon from canopensocket repo from source.

Here is the dockerfile: https://github.com/Alphatronics/docker-canopensocket/blob/master/Dockerfile
You can find instructions and pull the image from docker hub: https://hub.docker.com/repository/docker/geoffreyvl/canopensocket
ARMv7 and AMD64 archs are supported.

Let me know if you're interested in having the code shared under the CANopenNode umbrella. Warning: I'm not maintaining this!

Deliminator for command?

I'm wondering if there is a pre-built int deliminator I can use to signify end of command. I have tried using \r\n with no luck. I am sending commands fast enough that they will occasionally stack up and get issued as one command (which of course sends back a syntax error). Any help is appreciated!

make failed

So I am new to CANopen and wanted to run the examples/basicDevice but when I enter make, I am getting an error

../../CANopenNode/socketCAN/CO_main_basic.c:28:30: fatal error: bits/getopt_core.h: No such file or directory

after this I tried to make in the CANopenNode respository and getting the same error as well. (I am running this on Ubuntu Mate)

P.S. I already have a hardware CAN Bus where I am reading the data from a sensor by ESP32 and sending it over CAN to a Linux system. Now I want to implement CANopen on this
WhatsApp Image 2021-03-19 at 14 07 45

canopencomm negative value

Can not pass negative parameter value while writing SDO.
If specified as a decimal e.g. "16 write 0x3300 0 i32 -100" help of the command usage is returned.
If specified as a hex: "16 write 0x3300 0 i32 0xFFFFFFC8" it returns: [1] ERROR: 101 - Syntax error.

make failed

I just follow the steps for making the library but it fails, maybe I am missing something. I am using Debian Jessie (8), and already installed can-utils.
Please see the attached file. It seems the error is related with CAN_ERR_CTRL_ACTIVE identifier. Do I need to install other libraries or dependencies?
Thanks for any clue
Reyan
Make_CANOpenNode

Create virtual SDO server

I want to create a virtual SDO server using CANopenSocket to communicate with my SDO client device.
Is there an example how to do that and use specific eds files related to the server that I want to create ?

Missing od_files

I've been trying to run tutorial for canopend and concretely I'm stuck on following command:
$ app/canopend vcan0 -i 4 -s od4_storage -a od4_storage_auto.

Even when I create od4_storage and od4_storage_auto files in app directory as described, I'm still getting same error as before. I'm not able to get vcan0 into operational state. Help would be highly appreciated. Thank you very much.

Typedef conflict with an std macro

Hi all,
There is a conflict between a typedef in CO_OD.h and a macro defined in math.h
typedef domain_t DOMAIN; (l.53)

I've also notified this on the CANopenNode project repository, but I think it is more important here, regarding the philosophy of the CANopenSocket project.
As it provides a full-exploitable app to use CANopen with user-purpose entry points in the "app.c/h" source, this issue can arrive pretty fast.
For instance, I wanted to log some data with a timestamp in a file (with 1ms period). I just needed the ' round ' function, and so 'math.h'. And boom.

Of course, it is not dramatic at all, but hey, worth the shot to say it.

Regards.

TimerOverflow on ResetComm

After sending CO_RESET_COMM OD_performance[ODA_performance_timerCycleMaxTime] always exceed within rt_thread.

Is there a possibility to 'disable' taskRT.maxTime calculation while device is in BootUp state.
CANrx_taskTmr tasks are up and running in the meantime and if taskMain_process get called after reset 'taskMain.maxTime' differs to much.
It also happens within 'CANrx_taskTmr_process' (long dt = tmrMeasure.tv_nsec - taskRT.tmrVal->tv_nsec)

Thank you

Outdated tutorial?

SDO transfer works with pican2 and can0 quite nice by the information I got from the tutorial. I was wondering if there is a way to add a part which would explain how the CANopenSocket is handling SDO messages longer than 64 bits. I couldn't figure that out at all (or it is because the same problems as now).

String / Domain encoding

Encoding for data types "os - octet string", "us - unicode string" and "d - domain" is currently hex-string. According to 309-3 this should be RFC2045 mime-base64.

Failed compiling CANopenNode in Qt C++

After, execute the examples you recommended as basic introduction, I tried integrating CANopenNode stack into a very simple Qt program, but it failed when compiling with lot of errors, many are in CO_drive.c. I used extern "C" for link with C functions in C++. Please could you give me an idea what I am missing. I am using C++11 in the config flag, and Qt v5.2. I included all headers and sources in the project file.
For example I am getting many errors when compiling the stack/SocketCAN/CO_drive.c. Please attached are the screenshots with some errors, simple main program, and very simple Qt project, in case helps.
My intention is not actually to use the entire CANOpen stack, just listening the CAN frames messages in the network and be able to parse the frames, for PDO I think understand, I am not feeling too bad, but for SDO is more complicated for me.

Thank you so much for your support

CANopenNode Compiling Error

CANopenNode main program simple

test_canopennode.zip

Thanks

Problem while sending SDO request

Hi, I've been to set up CAN communication with one master and two motor drivers and I have certain questions. I may misunderstood some things, but I would kindly appreciate some guidance.

I've connected my PC to PEAK-CAN USB on Linux PC which provided me with all necessary drivers for usage.
As I mentioned, I'm trying to use PC as master CAN node which will send commands to motor drivers which are slave nodes.

I've set up can0 interface on PC and I'm hearing heartbeat from motor drivers. Therefore, communication channel is established.

In basic CANopenSocket tutorial I've been writing/reading SDO commands provided in tutorial but there are few things I'm not quite sure about. With CLI interface I've been providing -s and -a arguments which are paths to empty OD file. It would be great if there's example of valid OD for certain device cause provided empty ODs are not of much usage.
It's also not so clear from the tutorial which node is master node. And how to properly run master or client node and distingusih between them.

I've tried to initiate SDO read with method sdoClientUpload but it always fails in method CO_SDO_initTransfer in CO_OD_find method. Return error code is CO_SDO_AB_NOT_EXIST.
It's quite clear that I don't have valid values written in OD for certain index and subindex, but I've thought that CO_SDOclient_setup sets those Object Dictionary Variables. Could you please provide some guidance.

Main questions are:

  1. How to set up master node? What distinguishes master from client node when running CO_init or method.
  2. How to provide valid OD for certain device?
  3. How to initiate valid SDO client which correctly sets up variables in OD?

Just to make sure, even using provided CLI with correct nodeID and sending SDO read command on socket makes my motor driver heartbeat alternate between 7F, 05 and 85 states which is quite weird. I'm sorry if I missed something but help would mean a lot. Thank you. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.