Raspberry PICO not working with message port, named hardware

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Message
Author
User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Raspberry PICO not working with message port, named hardware

#21 Post by jph »

Just one thought Corjan ?
Are you actually forcing the port open ? - or transmitting blind and listening for a response ?

I believe it needs 'opening' each time the session starts.
When we add the device to AM we are only - I believe - adding the port and no other details.
It will then need to be physically 'opened' so it can check the baud rate required.

I am probably not putting that across well - - - - - - sorry - it's a case of me knowing a little, but not enough.

I can't help wondering if it is a case of AM trying to be too 'stealthy' ?

Joe
Joe. CISSP, MSc.

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: Raspberry PICO not working with message port, named hardware

#22 Post by Corjan »

Trying to get it to work here.
Am I correct in saying that you need an external USB->Serial converter board (FTDI) to get this to work in the first place?


Corjan

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Raspberry PICO not working with message port, named hardware

#23 Post by jph »

Hi Corjan, no absolutely not.

Just the on board USB VCP.

No changes at all to the messageport lib.

It will work out of the box - providing you access the port first with something set to 115200 - like the arduino serial monitor even - just open and close it - you dont need to send anything, or any terminal program - again no need to send anything - just open and close. AM will then see the device and work perfectly.

Joe
Joe. CISSP, MSc.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Raspberry PICO not working with message port, named hardware

#24 Post by jph »

Let me clarify that.

Load your messageport sketch to the arduino IDE,
Flash the Pico from the arduino IDE, it will now have a com port visible, note the port number.
Ensure Arduino ide serial monitor is set to 115200 and the com port is checked in the arduino IDE tool > port menu
Open and immediately close the serial monitor,

Now load AM, install device on the com port you noted, AM will now work with PICO.

Then close AM, Un plug and reconnect the usb from the pico, but dont do anything else like we did before with the serial monitor,
Open AM, it will never connect.

Close AM, open serial monitor or any terminal prog at 115200 on the correct port and then close the terminal prog,
restart AM, all works again.

You can close and restart AM and all will be fine, until you unplug the device, then AM will not connect at all until the above is done again.

Joe
Joe. CISSP, MSc.

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: Raspberry PICO not working with message port, named hardware

#25 Post by Corjan »

Hi,


Yeah, that is exactly what I tried, but for some reason it won't respond.
Added some debugging lines, and data seems to arrive to Pi correctly. But for some reason it doesn't respond.


Will do some more tinkering. First lets update the Arduino env,

Corjan

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: Raspberry PICO not working with message port, named hardware

#26 Post by Corjan »

Hi again,


Got it to work.
Somehow the 'Serial.availableForWrite()' function returns 0 for me...

More digging to do :)


Corjan

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Raspberry PICO not working with message port, named hardware

#27 Post by jph »

Weird !

Looks like there is some light at the end of the tunnel though :mrgreen:

You are a star, as always. :D
Joe. CISSP, MSc.

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: Raspberry PICO not working with message port, named hardware

#28 Post by Corjan »

Hi,


Got the original issue fixed. Seems like you have to enable DTR and RTS for this to work.
Not sure why, but I'm not asking questions here :) It is also way putty does internally, so there must be a good reason.


Corjan

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Raspberry PICO not working with message port, named hardware

#29 Post by jph »

Oh wow, that is superb news. :D

Pico and STM32 Nucleo boards are the best this to happen in messageport world.
What on earth is going on with DTR RTS I don't know. But the main thing is you have sorted it out.
Huge thanks for the time and effort. AM Leaps forward again.

Nice one sir.
Joe
Joe. CISSP, MSc.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Raspberry PICO not working with message port, named hardware

#30 Post by jph »

Hi Corjan, found an interesting little piece by Jan Axelson (of USB Complete fame)
http://janaxelson.com/usb_virtual_com_port.htm

Still baffled on the DTR RTS as they are not set into a handshake mode with their natural handshake partners. But that is academic only ;) - It is just interesting.
Joe. CISSP, MSc.

Post Reply