You are not logged in.

#1 2019-05-30 10:12:26

sekret
Member
Registered: 2013-07-22
Posts: 284

[solved] Arduino IDE - Serial Monitor doesn't work correctly

Hey guys,

next week I'll hold an Arduino tutorial, so I prepared some exercises, among which the students are supposed to display messages on the Serial Monitor. I haven't been using it with my last project, so this issue might be older, I'm not really sure.

Here's an example code:

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("hello world");
}

The Serial Monitor is supposed to show that message.

Running it on an Arduino Uno with a completely fresh Arduino IDE, I get this output (in red), as soon as I open the Serial Monitor:

Exception in thread "EventThread /dev/ttyUSB0" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
	at processing.app.Serial.serialEvent(Serial.java:185)
	at jssc.SerialPort$LinuxEventThread.run(SerialPort.java:1299)

What works is sending messages to the Arduino, as shown in the example 04. Communication -> SerialEvent. So the Serial Monitor isn't completely broken...

Is this a bug in the IDE? Could I have done something wrong?

Any help is really appreciated!

Last edited by sekret (2019-05-30 17:59:57)

Offline

#2 2019-05-30 10:42:47

frostschutz
Member
Registered: 2013-11-15
Posts: 1,416

Re: [solved] Arduino IDE - Serial Monitor doesn't work correctly

It should be a bug ... I haven't done Arduino in about 2-3 months and it definitely worked before, and now I see your exact same error message.

Also the serial monitor works just about fine when using 'screen /dev/ttyUSB0 <baudrate>' or any other serial monitor tool.

Last edited by frostschutz (2019-05-30 10:45:21)

Offline

#3 2019-05-30 10:57:12

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,393

Re: [solved] Arduino IDE - Serial Monitor doesn't work correctly

My system is not yet updated, and things work:

koko@Gozer# pacman -Q jdk8-openjdk arduino

8.u212-1
arduino 1:1.8.9-1

--EDIT--
Upgraded, same problem as you.
Rolling back to 1:1.8.9-1 "fixes" it.

Personally, i found tail -f /dev/ttyUSB0 handy wink

Last edited by kokoko3k (2019-05-30 14:01:43)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#4 2019-05-30 17:54:02

sekret
Member
Registered: 2013-07-22
Posts: 284

Re: [solved] Arduino IDE - Serial Monitor doesn't work correctly

Thanks guys and sorry for forgetting my installed version, it's the most recent 1:1.8.9-3. I'll try to find out what causes this and file a bug. Looks like a problem with the current PKGBUILD.

Offline

#5 2019-05-30 17:59:46

sekret
Member
Registered: 2013-07-22
Posts: 284

Re: [solved] Arduino IDE - Serial Monitor doesn't work correctly

Oh crap, there already is a bug report... I feel so stupid right now... Sorry guys! As a senior Linux user I should have known better...

https://bugs.archlinux.org/task/62704

Offline

#6 2019-05-30 18:05:12

frostschutz
Member
Registered: 2013-11-15
Posts: 1,416

Re: [solved] Arduino IDE - Serial Monitor doesn't work correctly

sekret wrote:

Oh crap, there already is a bug report... I feel so stupid right now... Sorry guys!

it's nothing to apologize over... without your thread I wouldn't even know about the problem, cause I don't arduino every day :-)

thanks

Offline

Board footer

Powered by FluxBB