Teensy 3.2 Raspberry Pi Glediator

Status
Not open for further replies.

Suplanus

Member
Hi,

i programed my teensy for glediator in arduino on the mac.
Now its connected to raspberry pi but in glediator the serial port is not showing... With arduino nano its working (RX/TX is installed).

2017-02-23_13-36-20.png

Checked the port via lsusb:
Code:
Bus 001 Device 006: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial

Is it needed to install teensyduino?
Sorry but dont know how to install the .linuxarm file. Is it an bash script?
Tried:
sudo sh TeensyduinoInstall.linuxarm

Error:
Code:
TeensyduinoInstall.linuxarm: 1: TeensyduinoInstall.linuxarm: Syntax error: word unexpected (expecting ")")

Thanks for help!
 
I installed the udev rules and successfully installed Teensyduino (./ did the trick with chmod +x).
Now on the pi i can see the Teensy, but Glediator is not showing it.
I hang my arduino nano and the teensy per usb to the pi.
Only the nano is showing up.

Here is a screenshot, with only Teensy connected...

2017-02-23_16-48-56.png
 
If you program your Teensy with something like File > Examples > 04.Communication > ASCIITable, after uploading, can you select /dev/ttyACM0 in Tools > Port, and then open the serial monitor and see the text?
 
I don't know the GLediator program to know how it is picking up "Comm ports"

My guess is the program is only enumerating FTDI devices: That is those who show up on your system as: /dev/ttyUSB0 where 0, could be 1, 2, 3...

That is I believe that the Arduino Nano is using an FTDI chip.

The Teensy does not use FTDI to create a USB port and it creates devices with the name like: /dev/ttyACM0 (again 0, 1, 2, 3)..
Not sure how to change the program to see other devices like this? Also not sure if this program somehow makes uses of FTDI or not....

If not, not sure what would happen if you tried to hack it... Like try to create a symbolic link ot it
something like: ln -s /dev/ttyACM0 /dev/ttyUSB0

Again I have no idea if the above will work with it or not, but...
 
Might also be an issue with RXTX or JSSC (on Raspberry Pi). Those are the two serial libraries Java programs use. I don't know much about Glediator, but my guess is it likely uses RXTX. If Arduino can see the serial port and get text printed in its serial monitor, and the /dev/ttyUSB0 symlink doesn't pan out, then you'll probably have to start looking into possible issues with these two serial libs.

I can tell you Arduino's serial monitor (which uses JSSC) definitely does work, once you have the udev rule installed. I personally tested this on Raspberry Pi some time ago.
 
The symlink works, big thanks to all!
Now i have to fix the driver for glediator to leds in arduino and i think it works...
I show you the result :)
 
I know this is a year old thread but just wondering if someone can someone explain this symlink fix? I am having this exact same issue as described here. Yes, I can confirm Glediator uses RXTX. During my testing I found I can successfully use Glediator on an old windows XP desktop connected to the teensy but when try to use Glediator on my Raspberry Pi 3 it does not see the teensy in the Com ports just like the OPs picture shows. I able to program the teensy from the raspberry pi and when connected and I type "ls /dev/tty*" the teensy is showing as ttyACM0. I also found if I replace the teensy with an Arduino Nano it would should as ttyUSB0 and then show in Glediator and work. The nano and raspberry pi work but they were so much slower than the teensy and old XP. How do I make the teensy show up as a ttyUSB0 device on raspberry pi so I can use teensy and raspberry pi together?
 
I think the idea is, that suppose the teensy shows up as /dev/ttyACM0.
You could run a command something like: sudo ln -sf /dev/ttyACM0 /dev/ttyUSB99
Not sure if it verifies that it is a number, so you could try something like: sudo ln -sf /dev/ttyACM0 /dev/ttyUSBTeensy

Which would create a symbolic link in the /dev directory that hopefully the program will see it. If this works, you could then maybe try creating a Udev rule that would do this automatically for you. I use this for example when I setup a robot and want to make sure the correct hardware is going to the right piece of code... Example on earlier robot I use to /dev/ttyUSB* objects, one was for an XBee and another was SSC-32. Sometimes the order they were created changed and code stopped working... So I used UDev rules to fix it.

From my notes, I typically do it by creating a file in the directory /etc/udev/rules.d directory like: 99-usb-serial.rules

An example one that I had looked like:
Code:
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A800fclo", SYMLINK+="ttyXBEE"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A4014UWE", SYMLINK+="ttySSC-32"
I would figure out the values for vendor, product and serial by, using a command like: udevadm info --query=property --name=ttyUSB0
(in your case change ttyUSB0 to ttyACM0)

For more information on symbolic links and the like, i have used: http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/
 
Awesome! That worked and now Glediator can see the teensy as a COM port and I can control the LEDs. Thank you again so much for your help KurtE. I've been struggling with this for so long. I should have come much sooner. Here is a video of my LED display that the teensy is controlling in case anyone is interested.

https://youtu.be/lQv3cHG1-XQ
 
Status
Not open for further replies.
Back
Top