Page 1 of 3

A simple com sender

Posted: Wed Sep 25, 2024 11:28 pm
by Nico595
Hello,

I try send string from PC to the device with PC App USB example. It's my first job with PC App.
I removed all about the receive buffer because the first step for me is send data.

I have two string: "dU" to up the level and "dT" to down the level of the device. Work fine with HyperTerm but nothing with PC App.

My Windows port com is Com Serial to USB (COM17) named AT91 to serial, my USB Serial driver.
App_Comm_Test1.jpg
App_Comm_Test1.jpg (67.65 KiB) Viewed 13931 times
App_Comm_Test2.jpg
App_Comm_Test2.jpg (68.43 KiB) Viewed 13931 times


Thank you for your advice.

Re: A simple com sender

Posted: Thu Sep 26, 2024 9:29 am
by stefan.erni
Hi Nico

Can you ad this " \r\n" = CR + LF → Used as a new line character in Windows


"dU" replace with "dU\r\n "


or post Your App?

regards


Stefan

Re: A simple com sender

Posted: Thu Sep 26, 2024 10:24 am
by Nico595
Hi Stefan,

Thank you so much for your answer :)

I try this now.

I hope the Com Port VID and PID is not locked by Flowcode.

Re: A simple com sender

Posted: Thu Sep 26, 2024 10:45 am
by Nico595
No result with new line character. I have only a new line in the console.

I can connect HyperTerm to my device without problem and send this string. Work fine with a simple com terminal software.
I don't understand why the string is not sent in the com by the Flowcode Pc App.

Of course if the VID and PID are filtered by Flowcode, I can't use my AT91 driver.
PC Dev Uno 3ch temp logger_test1.fcsx
(45.84 KiB) Downloaded 301 times

Re: A simple com sender

Posted: Thu Sep 26, 2024 12:05 pm
by stefan.erni
Hi Nico

I changed the commands to my hardware, choosed to comport4
and pressed the button. my recorder started and stopped after 9sec.
So Your APP is working.
Maybe a config problem from the comport Nr ?
2024-09-26_12-56-58.PNG
2024-09-26_12-56-58.PNG (2.5 KiB) Viewed 13895 times
2024-09-26_12-56-29.PNG
2024-09-26_12-56-29.PNG (23.89 KiB) Viewed 13895 times
2024-09-26_12-54-25.PNG
2024-09-26_12-54-25.PNG (71.45 KiB) Viewed 13895 times

Re: A simple com sender

Posted: Thu Sep 26, 2024 12:26 pm
by Nico595
Thank you Stefan,

I think the Flowcode App is locked with the USB driver, we can't drive other devices and other card of those defined by Flowcode.

If a member of the Flowcode Team can confirm it ?

Re: A simple com sender

Posted: Thu Sep 26, 2024 2:51 pm
by Nico595
I connected the logic analyser on the UART. I send all packets from the USB rx to the UART tx.

It's very strange, I receive data but no good.

Nothing with the SendByte macro of the com port component.
The last string with the SendString macro of the com port component.
And some bit with the SendBinary macro of the com port component.

When I test after that with the HyperTerm, I receive perfectly all data. So it's a problem from the PC App.

I hungry, I will eat now ^^.

Re: A simple com sender

Posted: Thu Sep 26, 2024 2:54 pm
by BenR
Hello,

Flowcode doesn't create any kind of lock on VID/PID etc and should work with just about anything. I'm wondering if 3s is enough for the BT pairing to be established reliably. Could you instead have a button to connect, then another button to do the data send and then a third button to disconnect. This way you can connect and then keep trying to send data and then disconnect once the process has been done.

Re: A simple com sender

Posted: Thu Sep 26, 2024 3:02 pm
by Steve-Matrix
A few other thoughts.

There are sometimes issues when a COM port greater than 9 is accessed. You should be able to change the COM port used by your device to a lower one to see if that fixes the issue.

And have you looked at the "Serial Comms Worked Example - PC Developer" on the App Developer sample projects page? This is a very basic example, but might be a good starting point for testing your hardware.

Re: A simple com sender

Posted: Thu Sep 26, 2024 3:14 pm
by Nico595
Thank you for your answer Ben. I will try with 3 buttons, Connect step, Send string and Disconnect.

Hi Steve, Thank you for this information. I have com port 17 on the Lanner and com port 8 on the Shuttle with FC10. It's not simple on the Lanner because I have not FC10, it's my old machine with FC5. But if the number of the com port can be a problem, I will work on the Shuttle. However I have the same packets with the Shuttle on the com port 8.

I will continue to investigate