Transfer data between C1 boards

Post Reply
barakp
Posts: 11
Joined: Tue Dec 25, 2018 6:51 am
languages_spoken: english
ODROIDs: C1+
Has thanked: 1 time
Been thanked: 0
Contact:

Transfer data between C1 boards

Unread post by barakp » Sun Apr 14, 2019 11:58 pm

Hi,

I need to transfer data between two C1+ boards (3 Mbps of data).
between the two boards I have some device that limits that data to maximum 5 Mbps so I cant transfer data above this limit.

I have to use serial or analog interfaces.
First I used SPI to send the data, when one board is the master and then I realized that the second board of the C1+ cant act like a slave so I moved on.
Second I used the UART port but I tested the maximum speed of data and got something around 1Mbps.
Third I wanted to send the data from one board to another using one board as SPI master and sample the Clock and data with the second board using GPIO pins but the read operation of the GPIO pins is too high for my specs.

Now I want to try send data from one board using USB and receive this data to the second board using USB too, is this possible? if my data is about 3 Mbps, that bandwidth on the bus is actual 3 Mbps or the actual data rate of USB 2.0?

Barak.

User avatar
mad_ady
Posts: 6365
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 145 times
Been thanked: 106 times
Contact:

Re: Transfer data between C1 boards

Unread post by mad_ady » Mon Apr 15, 2019 12:38 am

You can use usb networking (g_ether module) that will add a usb0 network interface. Just add ip addresses and you can transfer data over usb as if it were ethernet. If you want to throttle data rate to 3Mbps (instead of ~200Mbps which would be the maximum you can get) you can use tc (traffic control).

barakp
Posts: 11
Joined: Tue Dec 25, 2018 6:51 am
languages_spoken: english
ODROIDs: C1+
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Transfer data between C1 boards

Unread post by barakp » Sun Apr 21, 2019 3:11 pm

Thanks, I tried use USB to Etherent 3.0 adapter with RT8153 chipset but I have no link detected even I have connected cable.
Also I see the USB device detected using lsusb
Bus 001 Device 004: ID 0bda:8153 Realtek Semiconductor Corp.

Odroid C1 linux kernel supports this device?

Thanks a lot!

User avatar
mad_ady
Posts: 6365
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 145 times
Been thanked: 106 times
Contact:

Re: Transfer data between C1 boards

Unread post by mad_ady » Sun Apr 21, 2019 3:19 pm

I didn't mean using a usb-ethernet adapter. Just using a microusb cable from one board to the other (one connected to the otg port).
See this thread for details: https://r.tapatalk.com/shareLink?url=ht ... are_type=t

Or, if you're not using ethernet on either board you could hook up an ethernet patch cord between them.
These users thanked the author mad_ady for the post:
barakp (Sun Apr 21, 2019 7:49 pm)

barakp
Posts: 11
Joined: Tue Dec 25, 2018 6:51 am
languages_spoken: english
ODROIDs: C1+
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Transfer data between C1 boards

Unread post by barakp » Sun Apr 21, 2019 7:30 pm

Thank you for your help!

I set up everything but I have the same issue that mentioned in your link.

I loaded g_ether, set ip addresses and tried to ping between the boards but I get "Destination Host Unreachable", I checked the MAC addresses on both sides and they both correct.

Do you know how to solve it?

User avatar
mad_ady
Posts: 6365
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 145 times
Been thanked: 106 times
Contact:

Re: Transfer data between C1 boards

Unread post by mad_ady » Sun Apr 21, 2019 8:19 pm

Oh, sorry - I completely forgot about that issue. It seems g_ether doesn't work with C1+...
Regarding your usb-ethernet adapter - what does dmesg say when you plug it in?
There are modules for these drivers:

Code: Select all

adrianp@spica:~$ zcat /proc/config.gz | grep -i 815
CONFIG_USB_RTL8150=m
CONFIG_USB_RTL8152=m
CONFIG_BACKPORT_USB_RTL8150=m
CONFIG_BACKPORT_USB_RTL8152=m

barakp
Posts: 11
Joined: Tue Dec 25, 2018 6:51 am
languages_spoken: english
ODROIDs: C1+
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Transfer data between C1 boards

Unread post by barakp » Sun Apr 21, 2019 8:24 pm

[ 2314.463697] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
[ 2314.568118] hub 1-1.3:1.0: USB hub found
[ 2314.569045] hub 1-1.3:1.0: 4 ports detected
[ 2314.843460] usb 1-1.3.1: new high-speed USB device number 5 using dwc_otg

And when I use lsusb:
Bus 001 Device 005: ID 0bda:8153 Realtek Semiconductor Corp.
Bus 001 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 003: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

User avatar
mad_ady
Posts: 6365
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 145 times
Been thanked: 106 times
Contact:

Re: Transfer data between C1 boards

Unread post by mad_ady » Sun Apr 21, 2019 9:24 pm

From what I've searched the rt8152 should support 8153 devices as well. Try modprobing it (modprobe rt8152) and reinserting the dongle. Check dmesg to see if anything changed.
You can tty to compile a newer driver from realtek: https://www.pcsuggest.com/install-rtl8153-driver-linux/, but the C1's kernel is quite old and you may fail.
There is a mainline kernel for C1 that should solve this and the g_ether issues, but it has other known issues: (look for armbian stretch option) https://www.armbian.com/odroid-c1/

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 0 guests