Jump to content

USB to CAN adaptor


Recommended Posts

Hi Gabriel, 

You haven't given much information....

I don't own the same board as you and I know nothing about your CAN module.
The current Armbian builds include the kernel gs_usb driver module which is apparently required for your CAN module.
If you are using a current build then it is probable that you can activate the kernel driver module with "sudo modprobe gs_usb".    This should enable the module, unless it needs some options configured (Google it).

To confirm that the driver is loaded "sudo modprobe gs_usb --first-time" should return "modprobe: ERROR: could not insert 'gs_usb': Module already in kernel"


After this you should be able to use the driver.

Not required....    but using the Armbian build system, it is possible to include the driver module permanently into the kernel if you compile it after modifying CONFIG_CAN_GS_USB=m to CONFIG_CAN_GS_USB=y in your board's kernel config file.  If you did this then it wouldn't need modprobe to activate it.

Good luck
Kat

Link to comment
Share on other sites

1 hour ago, schwar3kat said:

Hi Gabriel, 

You haven't given much information....

I don't own the same board as you and I know nothing about your CAN module.
The current Armbian builds include the kernel gs_usb driver module which is apparently required for your CAN module.
If you are using a current build then it is probable that you can activate the kernel driver module with "sudo modprobe gs_usb".    This should enable the module, unless it needs some options configured (Google it).

To confirm that the driver is loaded "sudo modprobe gs_usb --first-time" should return "modprobe: ERROR: could not insert 'gs_usb': Module already in kernel"


After this you should be able to use the driver.

Not required, but using the Armbian build system, it is possible to include the driver module permanently into the kernel if you compile it after modifying CONFIG_CAN_GS_USB=m to CONFIG_CAN_GS_USB=y in your board's kernel config file.  If you did this then it wouldn't need modprobe to activate it.

Good luck
Kat

 

Hi Kat, sorry, i have a orangepi zero 2 running Armbian 22.02.0-trunk.0046 with kernel Linux 4.9.255-sun50iw9, usb to can board https://github.com/bigtreetech/U2C , i tried run modprobe comand and this is the return modprobe: FATAL: Module gs_usb not found in directory /lib/modules/4.9.255-sun50iw9 . I'm can install gs_usb without compile new build? i very new with linux. Thx for your help

Link to comment
Share on other sites

1 minute ago, schwar3kat said:

You appear to be using a legacy kernel and a custom build.   Where did you get it? 
It is unlikely that legacy kernels support gs_usb otb.
I don't know of a way to add this after compile.

I suggest that you try https://www.armbian.com/orange-pi-zero-2/

Armbian 22.05 Jammy Kernel 5.15.y
 

i download in archive, i tried to use the new version, but the boards stuck in armbian boot img, i try again but use usb-serial to see any msg error on boot sequence

Link to comment
Share on other sites

Hi Gabriel,

I just checked the config for your legacy kernel.  CAN is not available, nor is the driver.  I suspect that you will need to use current kernel for this driver.
You can search these forums to see if there are issues with the current kernel and if there are perhaps ways to get it working. 
It may be that issues with the new kernel have not been resolved for your board, or you may find that someone has got it working.

If you want to learn and get involved then the Armbian build system is an ideal platform for you to develop solutions, providing an easy way to apply patches and stream improvements into the build via Github pull requests.

I don't have your board, so won't be of much help.

Link to comment
Share on other sites

4 minutes ago, schwar3kat said:

Hi Gabriel,

I just checked the config for your legacy kernel.  CAN is not available, nor is the driver.  I suspect that you will need to use current kernel for this driver.
You can search these forums to see if there are issues with the current kernel and if there are perhaps ways to get it working. 
It may be that issues with the new kernel have not been resolved for your board, or you may find that someone has got it working.

the Armbian build system is an ideal platform for you to develop solutions, providing an easy way to apply patches and stream improvements into the build via Github pull requests.

I don't have your board, so won't be of much help.

very thx for the help, i try the new kernel and i can bring up can0 interface, but, my board doesn't have hdmi output, and green led on board don't turn on, only red light is on, but by serial-usb i can configure every thing, i'm going study more about whats causes this, again, very thx for your help

Link to comment
Share on other sites

1 hour ago, Gabriel Zanetti said:

my board doesn't have hdmi output, and green led on board don't turn on, only red light is on

You could perhaps use armbian-config System Nightly switch to the nightly build to see if the issues have been fixed. 

Link to comment
Share on other sites

On 8/10/2022 at 1:19 AM, Gabriel Zanetti said:

i'm going to study more about this topic

This topic may be of interest.  It sounds similar to your issue.  Perhaps ask how what they solved it and if it fixes the HDMI and WiFi. 
Perhaps you can get the DTB from them and try it on your board.
Seems that there might be other boards with the same issue...  if this is the same issue.  
It seems that there are different variants of the boards, and that AXP805 regulator control is different.

 

I see a solution for the above problem for a different board here.  It's a device tree change to use i2c instead of RSB.
https://github.com/armbian/build/pull/3964

 

Link to comment
Share on other sites

@Gabriel Zanetti

I got it to work on an orange pi zero 2 but you need to compile your own image. The can bus needs to be activated in the kernel:

 

 ./compile.sh BOARD=orangepizero2 BRANCH=legacy RELEASE=bullseye BUILD_MINIMAL=yes BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=yes COMPRESS_OUTPUTIMAGE=sha,gpg,xz

 

After the kernel configure menu comes up activate CAN in the network section and take a deep dive into the sub menus to activate usb can adapter gs_usb

 

This works with candelight as well as klipper USB CAN bridge.

Link to comment
Share on other sites

On 8/15/2022 at 11:26 AM, ALIGMSTEN said:

@Gabriel Zanetti those parts are currently missing from 5.1x.y dts, compiling an image will not help you without patching for hdmi and wifi if those are what you need.

 

i was imagine that, but i don't know how to implement dfs in custom kernel, for now i using official debian provided by orange pi, with new kernel and all functions works fine, thanks for all help you guys.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines