Forum > Packages and Libraries
TLazSerial : serial port component for Lazarus (windows and linux).
CM630:
Is it possible to detect if the connection is lost?
When I unplug the serial adapter from the PC, .active remains True. LazSerial1Status is not triggered.
Some more info: It occurs that there is something wrong, maybe with the driver of one of the devices (Prolific USB to serial). When the device is disconnected while a connection with it is open, it does not disappear from Regitry: Computer\HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM.
Another device with CH430 does not have this problem.
LaurentDelaon:
Bonjour Jean-PIerre,
J'essaie de transmettre des trames binaires avec LazSerial a un teensy4.0 via serial UART.
Bauds=38400.
Les trames de 10 bytes pas de soucis.
Les trames de 170octets sont souvent ratées par le teesny...
Je le voie car j'ai mis un CRC et a la réception il est Nok.
Je transmets une trame toutes les 1 s. donc je suis dans les clous : le T4.0 peut aller jusqu' a 4000000bauds...
As tu rencontré ce problème qui ne vient pas lazSerial selon moi (socat via terminal les trames sont ok).
J'ai aussi fait des essais de transmission en hexa et en decoupant par paquets mais cela double la taille des trames et les paquet doivent être a mis environ taille 40. En plus cela charge (beaucoup) le programme émetteur qui a d'autre choses à faire....
Merci de ton retour.
Laurent.
Jurassic Pork:
Hello,
who is Jean-Pierre ? it is not me -> J.P = Jurassic Pork
May be see here
Friendly J.P (not Jean-Pierre)
LaurentDelaon:
Thank's JP for your reply.
I haven't found this post but it seem concern usb not uart.
But it seem also strangely similar to my issue...
regards.
Laurent.
Mistral:
May be it'll be usefull for someone, I wish to share my experience. I'm trying to use TLazSerial in my program and I had difficulties with reading data (OnRxData didn't fire).
My program using threads for every serial port, so not only reading not in main thread, but writing too.
I found that function CallEvent called through Synchronize(@CallEvent), so it's working in main thread. I commented it and just simply call CallEvent and now it's working for me as expected.
Navigation
[0] Message Index
[#] Next page
[*] Previous page