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

Integrate Raspberry Pi #3

Open
1 of 2 tasks
boonto opened this issue Jun 25, 2019 · 14 comments
Open
1 of 2 tasks

Integrate Raspberry Pi #3

boonto opened this issue Jun 25, 2019 · 14 comments
Assignees
Labels
enhancement New feature or request

Comments

@boonto
Copy link
Contributor

boonto commented Jun 25, 2019

  • Refactor to prepare for future raspberry support
  • Integrate
@boonto boonto self-assigned this Jun 25, 2019
boonto added a commit that referenced this issue Jul 31, 2019
reworked package structure and classes for more generic wired/wireless robots
added calliope as generic wired robot for serial monitor usage only
removed launcher class
extracted help popup time to properties
boonto added a commit that referenced this issue Aug 1, 2019
replaced faulty image
fixed freezing bug resulted from restructuring
updated help dialog size for german language
fixed wrong reconnection after unplugging cable
boonto added a commit that referenced this issue Aug 1, 2019
replaced faulty image
fixed freezing bug resulted from restructuring
updated help dialog size for german language
fixed wrong reconnection after unplugging cable
@boonto boonto added the enhancement New feature or request label Nov 26, 2019
@othreed
Copy link

othreed commented Mar 12, 2020

What is the status of the Pi integration?
We are eagerly looking for a way to use open roberta on our classroom Pi computers :)

@boonto
Copy link
Contributor Author

boonto commented Mar 12, 2020

This issue is about integrating Raspberry Pis as programmable robots to the Lab, at least the Connector side of it.

The Lab and the Connector can be used on Raspberry Pis already (as a self hosted server or as a client). Does this answer your question or did I misinterpret it? Setting everything up should be covered in the Wiki, in case anything else is unclear I am happy to help.

@othreed
Copy link

othreed commented Mar 12, 2020

Hi, we are using the raspberry pi as workstations for the students. We would like to get our old NXT robots to connect the the PI's running Raspian.

@boonto
Copy link
Contributor Author

boonto commented Mar 12, 2020

Sadly, the NXT is not supported in the Connector due to some limitations of the NXT libraries.
I am not sure if it will work but you can check out the old NXT USBProgram. Maybe it will work out of the box, if it doesn't, additional steps from our side might be required. Please give us some feedback if you tried, as I can only check myself next week.

@othreed
Copy link

othreed commented Mar 12, 2020

The NXT USBProgamm throws an Exception. you can see the Issue here

I would be great to be able to use the NXTs in our classroom inside the open-roberta environment because we still have 15 complete Sets and the school will not buy newer EV3 models.

@othreed
Copy link

othreed commented Mar 19, 2020

I installed the Connector on our schools Raspberry Pi 4 running buster. Besides our old NXTs we also have 2 EV3 sets.

The jar connector opens but does not show the attached EV3.

This is the log output:
0-03-19 09:41:17,651 [main] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:17,701 [pool-1-thread-1] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:17,723 [pool-1-thread-3] INFO d.f.i.r.c.wireless.mDnsDetector detectRobots - Looking in eth0 /fe80:0:0:0:dea6:32ff:fe55:337%eth0 2020-03-19 09:41:17,848 [main] INFO d.f.i.r.main.OpenRobertaConnector <init> - Using locale default en 2020-03-19 09:41:20,184 [main] INFO d.fhg.iais.roberta.main.UpdateHelper checkForUpdates - Current version: v1.1.0 2020-03-19 09:41:20,945 [pool-1-thread-3] INFO d.f.i.r.c.wireless.mDnsDetector detectRobots - Looking in eth0 /192.168.178.75 2020-03-19 09:41:22,263 [AsyncHttpClient-5-1] INFO d.fhg.iais.roberta.main.UpdateHelper onCompleted - A newer version is available 2020-03-19 09:41:23,957 [pool-1-thread-3] INFO d.f.i.r.c.wireless.mDnsDetector detectRobots - Looking in eth0 /192.168.178.70 2020-03-19 09:41:24,351 [main] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:24,433 [pool-1-thread-1] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:24,456 [pool-1-thread-1] INFO d.f.i.r.c.wireless.mDnsDetector detectRobots - Looking in eth0 /fe80:0:0:0:dea6:32ff:fe55:337%eth0 2020-03-19 09:41:24,854 [pool-1-thread-2] INFO d.f.i.r.c.wired.RndisDetector detectRobots - Could not find RNDIS robot: java.net.ConnectException: connection timed out: /10.0.1.1:80 2020-03-19 09:41:25,437 [pool-1-thread-2] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:26,439 [pool-1-thread-2] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:27,440 [pool-1-thread-2] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:27,472 [pool-1-thread-1] INFO d.f.i.r.c.wireless.mDnsDetector detectRobots - Looking in eth0 /192.168.178.75 2020-03-19 09:41:28,441 [pool-1-thread-3] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:28,927 [AWT-EventQueue-0] INFO d.f.i.roberta.ui.main.MainController actionPerformed - User performed action about 2020-03-19 09:41:29,441 [pool-1-thread-2] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:29,471 [pool-1-thread-4] INFO d.f.i.r.c.wired.RndisDetector detectRobots - Could not find RNDIS robot: java.net.ConnectException: connection timed out: /10.0.1.1:80 2020-03-19 09:41:30,443 [pool-1-thread-2] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:30,495 [pool-1-thread-1] INFO d.f.i.r.c.wireless.mDnsDetector detectRobots - Looking in eth0 /192.168.178.70 2020-03-19 09:41:31,444 [pool-1-thread-4] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:32,446 [pool-1-thread-2] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file! 2020-03-19 09:41:33,447 [pool-1-thread-4] WARN d.f.i.r.util.WiredRobotIdFileHelper load - Could not find /home/ole/OpenRobertaConnector/wired-robot-ids.txt, using default file!

Any Ideas on how I could solve the issue?

Thanks :)

@boonto
Copy link
Contributor Author

boonto commented Mar 19, 2020

I don't see anything obvious in the log.

So you have a running EV3 with LejosV1 connected to a Raspberry Pi 4?

@othreed
Copy link

othreed commented Mar 20, 2020

Yes, LeJos 0.9.1 beta is running on the EV3.
lsusb shows:
Bus 001 Device 009: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget

The Open Roberta Connector App runs but the connect and scan buttons are greyed out.

@bjost2s
Copy link
Contributor

bjost2s commented Mar 20, 2020

Just to make it complete, which version of the Open Roberta Firmware comes with your LeJos 0.9.1 ?

@boonto
Copy link
Contributor Author

boonto commented Mar 20, 2020

I just tested it again on a fresh Raspberry Pi 4 setup, these are some of the important outputs:

lsusb output when connected:

Bus 001 Device 020: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget

dmesg --follow output after connecting:

[73393.293204] usb 1-1.3: new high-speed USB device number 20 using xhci_hcd
[73393.424283] usb 1-1.3: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 3.16
[73393.424291] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[73393.424296] usb 1-1.3: Product: RNDIS/Ethernet Gadget
[73393.424301] usb 1-1.3: Manufacturer: Linux 2.6.33-rc4 with musb_hdrc
[73393.426783] cdc_subset: probe of 1-1.3:1.0 failed with error -22
[73393.429377] cdc_ether 1-1.3:1.0 usb0: register 'cdc_ether' at usb-0000:01:00.0-1.3, CDC Ethernet Device, 12:16:53:64:5c:12

RNDIS USB connection with ip addr show:

6: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 12:16:53:64:5c:12 brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.6/24 brd 10.0.1.255 scope global dynamic noprefixroute usb0
       valid_lft 863588sec preferred_lft 755588sec
    inet6 fe80::bf46:c31c:d6e5:3e03/64 scope link 
       valid_lft forever preferred_lft forever

Connector log some time after connecting the EV3 (only the important bits):

2020-03-20 13:09:17,481 [pool-1-thread-3] INFO  d.f.i.r.c.wired.RndisDetector detectRobots - Could not find RNDIS robot: java.net.ConnectException: connection timed out: /10.0.1.1:80
2020-03-20 13:09:20,976 [main] INFO  d.f.i.r.c.wired.ev3.Ev3Connector <init> - Robot ip 10.0.1.1
2020-03-20 13:09:20,985 [main] INFO  d.f.i.r.connection.AbstractConnector run - Starting LEGO EV3: ORA04 connector with server address lab.open-roberta.org:443
2020-03-20 13:09:21,185 [main] INFO  d.f.i.roberta.ui.main.MainController setState - Setting state to WAIT_FOR_CONNECT_BUTTON_PRESS

And the "usb0" network interface shows up in the "Wireless & Wired Network Settings" (right-click on the button) with "Automatically configure empty options".
Everything works for me. Can you check your outputs and report any discrepancies?

@othreed
Copy link

othreed commented Mar 20, 2020

I see some difference in dmesg and ip addr show

Our school setup uses the Raspbian PiServer to boot the individual Pi4 via Network PXE.
This might be the problem.

lsusb

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 012: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget
Bus 001 Device 004: ID 046d:c078 Logitech, Inc.
Bus 001 Device 003: ID 046a:0011 Cherry GmbH G83 (RS 6000) Keyboard
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

dmesg --follow

[107996.597085] cdc_ether 1-1.3:1.0 usb0: unregister 'cdc_ether' usb-0000:01:00.0-1.3, CDC Ethernet Device
[107999.450421] usb 1-1.3: new high-speed USB device number 12 using xhci_hcd
[107999.582090] usb 1-1.3: New USB device found, idVendor=0525, idProduct=a4a2, bcdDevice= 3.16
[107999.582111] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[107999.582124] usb 1-1.3: Product: RNDIS/Ethernet Gadget
[107999.582136] usb 1-1.3: Manufacturer: Linux 2.6.33-rc4 with musb_hdrc
[107999.587350] cdc_ether 1-1.3:1.0 usb0: register 'cdc_ether' at usb-0000:01:00.0-1.3, CDC Ethernet Device, 12:16:53:4e:3e:e3

ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether dc:a6:32:55:03:37 brd ff:ff:ff:ff:ff:ff
inet 192.168.178.70/24 brd 192.168.178.255 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.178.75/24 brd 192.168.178.255 scope global secondary noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fe80::dea6:32ff:fe55:337/64 scope link
valid_lft forever preferred_lft forever
10: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 12:16:53:4e:3e:e3 brd ff:ff:ff:ff:ff:ff

@boonto
Copy link
Contributor Author

boonto commented Mar 20, 2020

usb0 in your ip addr show is the important one. It seems to be in the DOWN state.
Can you try to run sudo ifconfig usb0 up?

@othreed
Copy link

othreed commented Apr 20, 2020

It works!

On my PiServer I added the following to the /etc/network/interfaces

auto usb0
allow-hotplug usb0
iface usb0 inet static
address 10.0.1.10
netmask 255.255.255.0

Now all the Raspberry Pi PXE clients in our classroom can work with the EV3s

IMG_8123

Thanks for the support

@boonto
Copy link
Contributor Author

boonto commented Apr 20, 2020

Awesome! Sadly, there is nothing we can do to prevent these issues as it is different for each OS installation and dependent on manual configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants