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

Serial port enumerator on Linux - workaround #5

Open
behines opened this issue Apr 25, 2015 · 1 comment
Open

Serial port enumerator on Linux - workaround #5

behines opened this issue Apr 25, 2015 · 1 comment

Comments

@behines
Copy link

behines commented Apr 25, 2015

This is an FYI. Maybe it will help someone else who is trying to use Guino on Linux.

I've been trying out the Linux version of Guino. I had to recompile everything to make it work, I guess because I have an AMD processor (Turion64x2) instead of Intel. (I was getting an illegal instruction core dump.) But after the recompile, it seems to work.

But then Guino couldn't connect to my Arduino. It is showing up as /dev/ttyACM0 inside the Arduino software, and I can upload sketches, but ttyACM0 was not appearing in the Guino device list. But after doing some reading, I learned that this is an issue with ofSerial - it only enumerates the ttyS* ports. Apparently somebody has written an ofxSerial that does enumerate the USB serial ports as well, so that would probably work, but I didn't want to dive into that right now.

Instead, I hacked an addition of a couple of lines to ofApp.cpp to explicitly stuff ttyACM0 into the list, and that does the trick for me. ttyACM0 now shows up in the device list in Guino, and it works when I select it and connect.

The lines I added are in between the ***'s below. I did this in both places where this code appears in ofApp.cpp.

   vector<ofSerialDeviceInfo> serialDevices = serial.getDeviceList();

    // ***
    vector<ofSerialDeviceInfo>::iterator it;

    it = serialDevices.begin();
    it = serialDevices.insert(it, ofSerialDeviceInfo("/dev/ttyACM0", "ttyACM0", 0));
    // ***

    string deviceLine;
    for(int i=0; i<serialDevices.size();i++){
        ddl->addToggle(serialDevices[i].getDeviceName().c_str());

    }

Hope this is useful. If I run out of things to do, I might try ofxSerial, but it looks like that would require making mods to EasyTransfer in addition to the Guino app itself.

@madshobye
Copy link
Owner

Great thanks.

On Sun, Apr 26, 2015 at 1:49 AM, behines [email protected] wrote:

This is an FYI. Maybe it will help someone else who is trying to use Guino
on Linux.

I've been trying out the Linux version of Guino. I had to recompile
everything to make it work, I guess because I have an AMD processor
(Turion64x2) instead of Intel. (I was getting an illegal instruction core
dump.) But after the recompile, it seems to work.

But then Guino couldn't connect to my Arduino. It is showing up as
/dev/ttyACM0 inside the Arduino software, and I can upload sketches, but
ttyACM0 was not appearing in the Guino device list. But after doing some
reading, I learned that this is an issue with ofSerial - it only enumerates
the ttyS* ports. Apparently somebody has written an ofxSerial that does
enumerate the USB serial ports as well, so that would probably work, but I
didn't want to dive into that right now.

Instead, I hacked an addition of a couple of lines to ofApp.cpp to
explicitly stuff ttyACM0 into the list, and that does the trick for me.
ttyACM0 now shows up in the device list in Guino, and it works when I
select it and connect.

The lines I added are in between the ***'s below. I did this in both
places where this code appears in ofApp.cpp.

vector serialDevices = serial.getDeviceList();

// ***
vector<ofSerialDeviceInfo>::iterator it;

it = serialDevices.begin();
it = serialDevices.insert(it, ofSerialDeviceInfo("/dev/ttyACM0", "ttyACM0", 0));
// ***

string deviceLine;
for(int i=0; i<serialDevices.size();i++){
    ddl->addToggle(serialDevices[i].getDeviceName().c_str());

}

Hope this is useful. If I run out of things to do, I might try ofxSerial,
but it looks like that would require making mods to EasyTransfer in
addition to the Guino app itself.


Reply to this email directly or view it on GitHub
#5.

Mads Høbye
PhD in Interaction Design
Design guru at Fablab RUC
hobye.dk
[email protected]
+45 26223408

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

No branches or pull requests

2 participants