No Input posible on Linux Mint

I have read Is there anyway to send manually typing messages to arduino through serial port in platformio? bit did not help.
Computer 1 MAX OS X 10.14.6 PlatformIO latest version from this march
Computer 2 LINUX Mint latest version PlatformIO latest version from this march
same sketch on both copied by copying the project folder, compiled on each Computer and uploaded to identical hardware (have two of them)
The sketch first asks enter 0 or 1 to define if sender or if receiver
On MAC that works fine, on Linux the input seams to be ignored.
change hardware between the two, nothing changed.
Need a hint
Thanks Rainer
P.S. microcontroller are Arduino Nano new bootloader

I use Linux Mint, and have done for years with very few problems at all. I’m able to read and write to and from the USART with no trouble using PlatformIO and the Arduino IDE/Serial Monitor.

Can you post your code and platformio.ini file please and I’ll see what I can find. Thanks.

Cheers,
Norm.

Thanks for reply. you con find ini and cpp in one file under https://zen-works.de/fileadmin/downloads/code.txt
As I wrote there are no problems on my MAC with exactly the same code

Tanks Rainer

Trying all four combinations of monitor_rts = 0/1 and monitor_dtr = 0/1 in the platformio.ini makes no difference?

On Mac there’s also the curiosity of /dev/cu.xxx (callup) and /dev/tty... devices, so try setting the monitor_port explicitly on either of those.

OK I’lltry tomorror. Just to remeberonthe MAC I see the output (the quetion to enet 1 or 0, on tke Linux Ionly see the question

Hi @muekno.

I downloaded your source file and set up a new Nano project using your platformio.ini file, and main.cpp. I compiled, uploaded and opened the “serial monitor” as follows:

  • pio run
  • pio run -t upload
  • pio device monitor

I didn’t change anything in your platformio.ini file. The device monitor picked up the 115200 8-N-1 and correctly detected my port as being /dev/ttyUSB0. On initialising, it printed the message “radio hardware is not responding!!” because I don’t have that particular device. It then entered the endless loop as per your code.

I then edited main.cpp and commented out the following, to prevent it from attempting to initialise a device I don’t have:

 /* NORM ---->
	// initialize the transceiver on the SPI bus
	if (!radio.begin())
	{
		Serial.println(F("radio hardware is not responding!!"));
		while (1)
		{
		} // hold in infinite loop
	}

	// print example's introductory prompt
	Serial.println(F("RF24/examples/GettingStarted"));
<----- NORM */

When I uploaded this version, the device monitor printed “Which radio is this? Enter ‘0’ or ‘1’. Defaults to ‘0’”, I pressed the ‘1’ key, and it responded with:

radioNumber = 1
*** PRESS 'T' to begin transmitting to the other node

Obviously, pressing ‘T’ has no effect! I found I get a better feedback when I ran the device monitor as pio device monitor --echo so I could then see what I was typing, rather than typing “blind”.

So, it seems that your code works fine, but maybe something in the radio.begin function is causing the hangup and that function, for some reason, is not returning on Linux Mint? Perhaps, although it did return on my system, and printed the error message, even though I don’t have the hardware.

HTH

Cheers,
Norm.

Hello Norman thanks for your work.
My actuell project is a remote control for a RC car. This code is just a test to see if sender and receiver.
So it is not so important and I skipped the test and the pre final code on sender an receiver can communicate.
But in other cases it may be importent that it works. Funy that on the MAC ist works an I get a status massage, but not on Mint. I like Mint on my notebook and the PlatformIO there is used when I have two devices communicating and had no problemvso long.

Cheers
Rainer

1 Like