COM port not being read

Hello y'all.

I have some time using Arduino and I have developed a project based on an Arduino Nano for a friend that monitors data and sends it over the Serial Monitor. The code has a test routine I put in the firmware when you send "marco" over the COM it returns "Polo". Let's call the project "Arduino 1" to ease things.

Later on, for testing purposes, I built a copy of the setup using another Arduino Nano with the exact same peripherals and firmware, which I used as a tester. Let's call this Arduino 2.

Both Arduino 1 and 2 work just fine on my PC. They were not plugged in at the same time in any PC as this doesn't make sense in this experiment. Each Arduino (1 and 2) works alone and separately as Arduino 2 was just for test purposes as I was developing a Java interface to read and display the data acquired from the COM port while Arduino 1 was with my friend.

After delivering the Arduino 1 to my friend, it doesn't work on his PC. So I took his PC home to run some tests. Let's call my PC as PC1 and my friend's PC as PC2 to ease things.

Arduino 2 works just fine on PC2. But Arduino 1 doesn't. It never returns the "Polo" when setting the correct COM ports.

And here's the tricky part: BOTH Arduino 1 and 2 work fine on PC1. But only Arduino 2 works on PC2. This is a problem once my goal is to have Arduino 1 working fine on PC2!

To make sure, I have installed the same version of Arduino IDE (1.8.13) from PC1 on PC2 and also the COM drivers, but so far I have no idea of what might be happening.

Another test I did was to take another Arduino (let's call it Arduino 3) and upload the same firmware. The bare Arduino 3 worked just fine on PC2. But when I replaced it on the Arduino 2 setup. It stopped communicating with PC2 as well, but still communicates with PC1!

Something in the setup might be preventing the Arduino 1 from working in PC2, but at the same time it's working properly on PC1. Any ideas?

The 3 arduino nanos are those Rev 3 afaik.

Thank you in advance!

My head is spinning from your description. Please draw a picture- what is connected to what? Can you compile and upload a sketch from the friend's PC? And what is running on the PC?

Hello and thanks for trying to help. I have edited the post to make things clearer. If you still have any questions, please let me know and I'll do my very best to clarify them! :slight_smile:

Well that explanation is not clear at all.

Do all your Arduinos have the same usb to serial interface chip?
It sounds like they don’t and you are missing a driver.

All you did was toss the salad more. Draw a picture, because I still can't visualize the connections, reconnections and what does the third Arduino have to do here?

Try compiling and uploading the blink sketch from your friend's PC to all of the Arduinos. This will at least verify that the drivers are all correct.

I am not picturing what the PC is doing in your description. Is it a participant in the exchange or just a terminal?

Please don't ever go back and edit a post. It makes nonsense of the replies. Just make a new post.

Might I suggest you start with the basics and the posts / links below especially DRIVERS !

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

  • Your OS and version can be valuable information, please include it along with extra security you are using.
  • Always list the version of the IDE you are using and the board version if applicable.
  • Use quote or add error messages as an attachment NOT a picture.
  • How to insert an image into your post. ( Thanks @Robin2 )
  • Add your sketch where applicable but please use CODE TAGS ( </> )
  • Add a SCHEMATIC were needed even if it is hand drawn
  • Add working links to any specific hardware as needed (NOT links to similar items)
  • Remember that the people trying to help cannot see your problem so give as much information as you can

COMMON ISSUES

  • Ensure you have FULLY inserted the USB cables.
  • Check you have a COMMON GROUND where required. ( Thanks @Perry)
  • Where possible use USB 2.0 ports or a USB 2.0 POWERED HUB to rule out USB 3.0 issues.
  • Try other computers where possible.
  • Try other USB leads where possible.
  • You may not have the correct driver installed. CH340/341 or CP2102
  • There may be a problem with the board check or remove your wiring first.
  • Remove any items connected to pins 0 and 1.

COMPUTER RELATED

  • Close any other serial programs before opening the IDE.
  • Ensure you turn off any additional security / antivirus just to test.
  • There may be a problem with the PC try RESTARTING it.
  • You may be selecting the wrong COM port.
  • Avoid cloud/network based installations where possible OR ensure your Network/Cloud software is RUNNING.
  • Clear your browsers CACHE.
  • Close the IDE before using any other serial programs.
  • Preferably install IDE’s as ADMINISTRATOR or your OS equivalent

ARDUINO SPECIFIC BOARDS

  • CH340/341 based clones do not report useful information to the “get board info” button.
  • NANO (Old Types) some require you to use the OLD BOOTLOADER option.
  • NANO (ALL Types) See the specific sections lower in the forum.
  • NANO (NEW Types) Install your board CORE’s.
  • Unless using EXTERNAL PROGRAMMERS please leave the IDE selection at default “AVRISP mkII”.
  • Boards using a MICRO usb connector need a cable that is both DATA and CHARGE. Many are CHARGE ONLY.

CREATE editor install locations.

  • On macOs ~/Applications/ArduinoCreateAgent-1.1/ArduinoCreateAgent.app/Contents/MacOS/config.ini
  • On Linux ~/ArduinoCreateAgent-1.1/config.ini
  • On Windows C:\Users[your user]\AppData\Roaming\ArduinoCreateAgent-1.1

Performing the above actions may help resolve your problem without further help.
Language problem ?
Try a language closer to your native language:

Thanks to all those who helped and added to this list.
[/quote]

Hi!

All Arduinos are from the same Arduino nano set I bought a couple of years ago. They all work on my PC (PC1) but not on my friend's PC.

Define "work".
We really want to help you but your are talking in riddles and not clarifying your question.

You have basically said:
I have wired stuff up and it doesn't work.
For anyone to help you they will need to know how you actually wired it up and what is actually happening. Look up the forum guidelines (sticky at top of every section). It tells you how to best form a question, what information to include, how to post a picture and how to use code tags.

At the very least, post a schematic. (Please, NOT a pretty Fritzing picture). I am unclear what the PC is doing in your description, how "not work" presents or how you have all of the various parts connected.

So does your friend's PC have the drivers installed for the USB to Serial chip used on these Nanos? That is normally the driver for the GH340G?

see
https://forum.arduino.cc/t/driver-for-chinese-nano/623821

Compiling and uploading from your friend's PC would answer this quite conclusively.

1 Like

I will try this ASAP and let you know!

Answering your question. This Arduino project communicates with PC via serial monitor using some pre-defined commands. So, for instance, when I send "marco" via Serial, I get "Polo" from Arduino as a communication test. Similarly, there are other commands that involve data aquisition, programming modes and SDcard memory cleaning.

If you have any other questions please let me know. Thanks for trying to help! :slight_smile:

"Marco" from the other Arduino or from the PC? You haven't said yet what is the PC's purpose in this.

Does anything work on PC2?

Hello!

The firmware is planned to communicate a single Arduino nano to a single PC via serial port, so I can send a set of instructions via Arduino IDE serial monitor using the PC and the Arduino would perform a specific task such as printing the current temperature measured by the sensor, flush the stored data from memory, erasing data and so on... The marco/polo command is like a handshake command. So when I type and send "marco" via serial monitor, the Arduino should return "Polo" in the serial monitor.

What happens is that although Arduinos 1 and 2 are the same Nano model and have the exact same code uploaded, Arduino 1 only communicates (aka returns Polo) properly on PC1. If I plug Arduino 1 to PC2 instead and send "marco" to it I just get no answer at all!

As I said, Arduino 2 performs successfully this marco/Polo test on both PCs . One thing I noticed is that PC1 operates in an Win7 Ultimate in English, while PC2 has a Win7 Professional in Portuguese. Just to clarify, both Arduinos had their code uploaded on my Win7 in English.

Could that be a reason somehow? I was wondering if the firmware compilation could have any difference regarding ASCII codes for both.

Thank you in advance!

Why did it take 13 iterations of the question to begin to make any sense of what you are trying to do?

Is there only one Arduino sketch?

Please post the complete sketch following the advice in How to get the best out of this forum about using code tags.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.