Skip to content

Serial port enumerator on Linux - workaround #5

@behines

Description

@behines

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions