Serial Port device names

Yes i agree, but as company side we need to be careful deleting resources as we know some people will still be using the old version of that board library. So we will do this very slowly and carefully. :smiley:

@tcbetka @wx4cb

Thanks again for all the concerns, and yes we will figure out a way to avoid doing a hard delete on resources and progress with this.

Sounds great. I’ll test the new library today. Hopefully it will make it so that I do not have to force-kill the IDE to get the serial monitor to work again.

TB

Hello @ansonhe97

I am testing the new library. I uninstalled the old one (v1.0.0) and installed the one with version 1.7.2, as you showed in the updated wiki. It does work–however there are some issues yet:

  1. Both SerialUSB and SerialDBG both work now, to print output to the Arduino IDE’s serial monitor. I am not sure why this is, or whether or not it’s the effect you wanted with the newer library. But both work equally in terms of function in my code–I just don’t get IDE recognition of SerialDBG, in terms of syntax highlighting. For example, see line #22 in the editors in my attached screen shot:

  1. Serial2 is now recognized AND works as well as Serial1 (yay!), using the new pin diagram as you’ve updated it. This is great news and means we will have two UART ports to play with for peripheral components. So that issue seems to be resolved.

  2. For the life of me, I cannot determine whether or not SerialUSB (or now SerialDBG) is working correctly to SEND serial characters. It wasn’t working with a sketch that I wrote, so I tried it using the SoftwareSerialExample sketch in the Seeeduino Zero examples list. Not only doesn’t that give me anything sent over the SerialUSB port (I cannot read anything on ttyACMO from the Linux side), but I don’t even get any sort of output from that sketch. Therefore I cannot make any determination as to whether or not SerialUSB/SerialDBG is actually working correctly. Maybe @wx4cb can check on this issue on his end, when he gets back home tomorrow.

  3. Perhaps the most concerning issue for me then is that the IDE still freezes a fair bit of the time, and then must be force-killed after you use the serial monitor for a number of repeated attempts to send a character over the serial port. It doesn’t seem to matter whether I use the SerialUSB or now the SerialDBG object–it will just freeze if I try to close the serial monitor, and then I must force-fill the whole IDE in order to reset it. It used to freeze after I sent only a few characters, but now it seems like I can send as many characters as I want at a time, and make as many attempts as I would like. But then when I try to close the serial monitor by clicking the ‘X’ at the upper right corner…the serial monitor doesn’t close, and the whole IDE freezes. I believe @wx4cb experienced this issue in his evaluation as well, so it seems like it’s not just here with my board. Are you able to reproduce this issue?

Anyway, I am going to test some of the code I have written using a different Arduino. I want to verify that it is all working in that code using the Odyssey board.

TB

An update, with some modest success in further exploration of item #3 in my first post (just above)! I grepped your library for the serialEvent callback and found the serialEventRun() method in this file:

/home/tb/snap/arduino/14/.arduino15/packages/Seeeduino/hardware/samd/1.7.2/cores/arduino/main.cpp

I used the Arduino example “serialEvent” sketch, and changed that method’s name to serialEventRun, and am able to echo back text on the SerialUSB port. Note however that this DOES NOT echo back while using the SerialDBG port. It simply does not work with the SerialDBG object–but it’s odd that I am able to get the same output printing with the SeriaDBG and SerialUSB objects. I can only echo back while using the SerialUSB object, but can output equally well with both the SerialUSB and SerialDBG objects. Very odd.

Maybe @wx4cb can also verify my findings on this as well.

TB

you will probably find that SerialDBG is an output only port maybe. no clue. but if you can only get output from it and not input.

i’m just working on mine now. and just to be clear @tcbetka, it’s SerialUSB and Serial1 Serial 2? do we know which one is related to which port yet?

1 Like

ok.

same sketch as before except changed to Serial 1/2/USB.

exactly same cable setup as before - nothing done with that board between then and now.

As you can see i’m able to access ttyACM0 (usb port) and also ttyS4 (Serial1) perfectly fine in linux.

However, i’m now getting framing errors on Serial2 which is the 4 pin header.

image

I’ll have to try CuteCom–I was just trying to cat the ttyACM0 file, from the command line. So it was probably just me that couldn’t access the serial data from the Linux side–I probably just screwed up. I didn’t try ttyS4 though (Serial1), so maybe I’ll give that a try next time as well.

As to the ports, yup: SerialUSB (monitor), Serial1 and Serial2. There’s the SerialDBG thing in there as well, but I certainly can’t seem to send characters over it…so I plan to just use SerialUSB.

So it looks to me as though the only real issue still remaining from my list two days ago, is #4: The IDE locking up. I was still getting several IDE lock-ups though, and some framing errors yet. I wonder if the two are related somehow? Are you seeing those on your end at all @wx4cb?

TB

1 Like

@tcbetka you should be able to access /dev/ttyACM0 and ttyS4 as long as your user is in the “dialout” group and it’s permissions are 766 (chmod 766 /dev/ttyS4 etc)

as for framing errors. yea i had no problems with the usb or the ttyS4 port (40 pin header uart reading the 28 pin headers uart), the only issue again is with the 4 pin headers uart - which worked perfectlyt fine under the other library but not this library.

I don’t know if it’s something i’m doing wrong, but i went back to the other library and the code worked perfectly fine after I reverted back to Serial/Serial1/SerialUSB

as far as the DBG port/class i wouldn’t even worry about it

Well, you don’t need to be in the dialout group if you try to access the port (file) as root of course.

I agree on the SerialDBG thing–it’s irrelevant for me. I will just use SerialUSB. As for your code not working with this (newer) library, I can’t explain that. Serial2 works great for me with the new library, and the updated pin-outs. I can’t recall though whether or not I put a logic analyzer on Serial2 to check for the same framing errors I have seen on Serial1, so I’ll need to re-check that when I’m in the lab again a bit later on today. I think I checked that port, but I can’t recall now for certain.

TB

1 Like

yea there’s definately something going on with that 4 pin header on mine. with this library

it looks like it’s not clearing the input buffer or anything like that

.

if you got some example code and a wiring diagram maybe i can replicate it

Do you have a logic analyzer–maybe those are framing errors? Given the number of duplicate characters seen though, I would expect that you might see some problems with the IDE hanging as well. Have you?

it doesn’t seem to be hanging, that i can tell, and no i don’t have a logic analyser

Well my IDE hangs when I’ve tried to send characters repeatedly over the serial monitor. So that’s sending them over SerialUSB, and not Serial2. So I guess I shouldn’t expect there to be an issue then on your end with that port, as the IDE’s serial monitor should have nothing to do with it.

I’ll put my LA on Serial2 Tx a bit later today to see if I can see any issues. I’ll also check Serial1 again too, now that I’m using the new library.

that’s what I mean, paste in your sketch here and i;ll see if i can duplicate it

Oh, I reverted to just using the example serial communication sketches included in the IDE. I took my code out of the equation early last week. I forget exactly which sketch I used, as I’m not in my lab right now though. But I tried more than one of the examples, and got pretty much the same behavior. I just changed the Serial object names to suit me.

That code was using a GPS module anyway, so unless you had the same one, it would have been difficult to duplicate the circuit. Also, there were five source files…not just the sketch. So I decided to simplify the evaluation by using “standard” code–examples from the Arduino IDE library.

well with a simple output sketch i’ve found this: “Serial” is also SerialUSB ???


image
image

You got output on the Serial object? HUH?!? I have never once gotten anything off that port on this board–no matter which library I’ve tried. But you’re using the same library as I am now (1.7.2), and I’m choosing the same board in the list as you’ve shown.

Something is really weird here.

1 Like