local_dani_21
Well-known member
First try USB-Bridge between teensy 3.1 and RPi (jessie)
I found some time to play: I installed the newest Bridge on my Arduino IDE 1.0.6, installed the bridgeclient on the RPi (running jessie) as described on github. I also connected a FTDI-cable to have at least some output from the teensy over Serial1 and connected the teensy 3.1 and the RPi using a standard USB cable. When running the following sketch
the serial console says
but it never gets past this message.
On the RPi, when connecting the Teensy 3.1, /var/log/messages says
And when running
I get
root@pi:/usr/bin# cat /tmp/env.txt gives
Do you see anything I've missed doing?
I found some time to play: I installed the newest Bridge on my Arduino IDE 1.0.6, installed the bridgeclient on the RPi (running jessie) as described on github. I also connected a FTDI-cable to have at least some output from the teensy over Serial1 and connected the teensy 3.1 and the RPi using a standard USB cable. When running the following sketch
Code:
/*
Running process using Process class.
This sketch demonstrate how to run linux processes
using a Teensy3.1 and a Raspberry Pi B (jessie) - much alike the setup an an Arduino Yún, but more powerful.
created 5 Jun 2013
by Cristian Maglie
modified by Daniel Süsstrunk using a
modified Bridge by Paul Stoffregen
This example code is in the public domain.
http://arduino.cc/en/Tutorial/Process
*/
#include <Process.h>
void setup() {
Serial1.begin(57600);
delay(3000);
Serial1.println("Trying to start bridge...");
// Initialize Bridge
Bridge.begin(Serial);
Serial1.println("Started up bridge.");
// run various example processes
runCurl();
runCpuInfo();
}
void loop() {
// Do nothing here.
}
void runCurl() {
// Launch "curl" command and get Arduino ascii art logo from the network
// curl is command line program for transferring data using different internet protocols
Process p; // Create a process and call it "p"
p.begin("curl"); // Process that launch the "curl" command
p.addParameter("http://arduino.cc/asciilogo.txt"); // Add the URL parameter to "curl"
p.run(); // Run the process and wait for its termination
// Print arduino logo over the Serial
// A process output can be read with the stream methods
while (p.available() > 0) {
char c = p.read();
Serial1.print(c);
}
// Ensure the last bit of data is sent.
Serial1.flush();
}
void runCpuInfo() {
// Launch "cat /proc/cpuinfo" command (shows info on Atheros CPU)
// cat is a command line utility that shows the content of a file
Process p; // Create a process and call it "p"
p.begin("cat"); // Process that launch the "cat" command
p.addParameter("/proc/cpuinfo"); // Add the cpuifo file path as parameter to cut
p.run(); // Run the process and wait for its termination
// Print command output on the Serial.
// A process output can be read with the stream methods
while (p.available() > 0) {
char c = p.read();
Serial1.print(c);
}
// Ensure the last bit of data is sent.
Serial1.flush();
}
Code:
Trying to start bridge...
On the RPi, when connecting the Teensy 3.1, /var/log/messages says
Code:
Dec 9 19:55:56 pi kernel: [ 87.129442] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
Dec 9 19:55:56 pi kernel: [ 87.233030] usb 1-1.3: New USB device found, idVendor=16c0, idProduct=0483
Dec 9 19:55:56 pi kernel: [ 87.233067] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Dec 9 19:55:56 pi kernel: [ 87.233083] usb 1-1.3: Product: USB Serial
Dec 9 19:55:56 pi kernel: [ 87.233097] usb 1-1.3: Manufacturer: Teensyduino
Dec 9 19:55:56 pi kernel: [ 87.233110] usb 1-1.3: SerialNumber: 506980
Dec 9 19:55:56 pi kernel: [ 87.242840] cdc_acm 1-1.3:1.0: This device cannot do calls on its own. It is not a modem.
Dec 9 19:55:56 pi kernel: [ 87.242960] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
And when running
Code:
ps aux | grep -i bridge
Code:
root 2372 0.0 0.0 1844 224 ? S 19:55 0:00 /bin/sh /usr/bin/run-bridge-udev
root@pi:/usr/bin# cat /tmp/env.txt gives
Code:
ID_BUS=usb
UDEV_LOG=3
DEVNAME=/dev/ttyACM0
ACTION=add
ID_VENDOR_FROM_DATABASE=Van Ooijen Technische Informatica
ID_SERIAL_SHORT=506980
SEQNUM=898
USEC_INITIALIZED=4299514133
ID_USB_DRIVER=cdc_acm
ID_TYPE=generic
MAJOR=166
MTP_NO_PROBE=1
DEVPATH=/devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/tty/ttyACM0
ID_MODEL_ENC=USB\x20Serial
ID_USB_INTERFACES=:020201:0a0000:
ID_MODEL=USB_Serial
DEVLINKS=/dev/serial/by-id/usb-Teensyduino_USB_Serial_506980-if00 /dev/serial/by-path/platform-bcm2708_usb-usb-0:1.3:1.0
ID_MM_DEVICE_IGNORE=1
ID_SERIAL=Teensyduino_USB_Serial_506980
SUBSYSTEM=tty
ID_MODEL_ID=0483
MINOR=0
ID_MODEL_FROM_DATABASE=Teensyduino Serial
ID_PATH=platform-bcm2708_usb-usb-0:1.3:1.0
ID_VENDOR_ENC=Teensyduino
ID_PATH_TAG=platform-bcm2708_usb-usb-0_1_3_1_0
ID_VENDOR=Teensyduino
PWD=/
ID_USB_INTERFACE_NUM=00
ID_VENDOR_ID=16c0
ID_REVISION=0100
Do you see anything I've missed doing?
Attachments
Last edited: