Search found 79 matches

by Cezary
Sun Mar 10, 2024 9:40 pm
Forum: Bugs - Linux
Topic: Opening the same serial port multiple times
Replies: 7
Views: 1466

Re: Opening the same serial port multiple times

I run one program that opens the port, e.g. "/dev/ttyUSB0" and keeps it open. Then I run the second program, which also tries to open the "/dev/ttyUSB0" port: id = OpenSerialPort(#PB_Any, "/dev/ttyUSB0", ...) statement returns a non-zero value. But (what I didn't notice...
by Cezary
Fri Mar 08, 2024 10:09 pm
Forum: Bugs - Linux
Topic: Opening the same serial port multiple times
Replies: 7
Views: 1466

Re: Opening the same serial port multiple times

Fred, within a single application it is now fine - once a specific port is opened, it cannot be reopened without first closing it. Previously, I protected against this possibility in my application by creating a list of opened ports. Now I can skip making such a list. Unfortunately, I also run more ...
by Cezary
Mon Feb 26, 2024 3:28 pm
Forum: Bugs - Linux
Topic: Opening the same serial port multiple times
Replies: 7
Views: 1466

Re: Opening the same serial port multiple times

Fred,
of course I will check. Thank you.
by Cezary
Tue Feb 20, 2024 8:43 pm
Forum: Announcement
Topic: PureBasic 6.10 LTS is out !
Replies: 335
Views: 42109

Re: PureBasic 6.10 beta 6 is out !

Fred wrote: Mon Feb 19, 2024 10:02 am Just waiting for you to report some more :D
Is there any chance to improve this:
https://www.purebasic.fr/english/viewtopic.php?p=605500
by Cezary
Thu Aug 10, 2023 1:44 pm
Forum: Bugs - Linux
Topic: Opening the same serial port multiple times
Replies: 7
Views: 1466

Re: Opening the same serial port multiple times

After searching the web, I found that in Linux the serial port needs to be locked using ioctl(fd, TIOCEXCL) and/or flock(fd, LOCK_EX | LOCK_NB). Unfortunately, I don't know how to do it in PB, and I don't know which header file contains the definition of TIOCEXCL.
Any idea, please?
by Cezary
Wed Aug 09, 2023 9:48 pm
Forum: Bugs - Linux
Topic: Opening the same serial port multiple times
Replies: 7
Views: 1466

Re: Opening the same serial port multiple times

Would anyone like to do this test? You only need one USB->RS232 converter to test this code: Debug OpenSerialPort(#PB_Any, "/dev/ttyUSB0", 1200, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 256, 256) Debug OpenSerialPort(#PB_Any, "/dev/ttyUSB0", 1200, #PB_SerialPort...
by Cezary
Tue Jul 25, 2023 7:05 am
Forum: Bugs - Linux
Topic: ComboBoxGadget changes its size
Replies: 4
Views: 661

Re: ComboBoxGadget changes its size

In fact, the height of the control also increases slightly.
by Cezary
Mon Jul 24, 2023 11:28 am
Forum: Bugs - Linux
Topic: ComboBoxGadget changes its size
Replies: 4
Views: 661

Re: ComboBoxGadget changes its size

Shardik,
thanks for checking.
It seems the same problem can be seen in the PB IDE, e.g. menu "Compiler" - "Compiler Options" dialog.
by Cezary
Sun Jul 16, 2023 8:53 pm
Forum: Bugs - Linux
Topic: ComboBoxGadget changes its size
Replies: 4
Views: 661

ComboBoxGadget changes its size

After an item is added to combobox, its width is increased: OpenWindow(0, 100, 100, 300, 200, "Test") ComboBoxGadget(1, 50, 50, 150, 22) ComboBoxGadget(2, 50, 100, 150, 22) AddGadgetItem(2, -1, "") Repeat: Until #PB_Event3D_CloseWindow = WaitWindowEvent() Can anyone confirm the i...
by Cezary
Sat Jul 08, 2023 4:49 pm
Forum: Bugs - Linux
Topic: Opening the same serial port multiple times
Replies: 7
Views: 1466

Opening the same serial port multiple times

Dear forum users, I noticed a strange operation of the OpenSerialPort() command. Execution of such code: Debug OpenSerialPort(#PB_Any, "/dev/ttyUSB0", 1200, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 256, 256) Debug OpenSerialPort(#PB_Any, "/dev/ttyUSB0", 1200, #P...
by Cezary
Sat Jul 08, 2023 4:36 pm
Forum: Coding Questions
Topic: Serial port baudrate higher than 115200
Replies: 10
Views: 2158

Re: Serial port baudrate higher than 115200

technopol,

460800 bps works fine for me with a typical USB-RS485 dongle, no errors even with very long upload/receive streams (around 200 kbytes).
by Cezary
Sat May 06, 2023 6:10 pm
Forum: Announcement
Topic: PureBasic 6.02 LTS is out !
Replies: 89
Views: 17638

Re: PureBasic 6.02 beta 3 is out !

mk-soft, thanks for the answer. It works quite well on Windows, I thought Linux might as well. In my application, a very large part of the tasks must be performed without interruption, and the user interface unfortunately has its rights. I don't see any other way than using a thread. As for the debu...
by Cezary
Sat May 06, 2023 5:12 pm
Forum: Announcement
Topic: PureBasic 6.02 LTS is out !
Replies: 89
Views: 17638

Re: PureBasic 6.02 beta 3 is out !

Fred, thanks for the purebasic_gtk3! As I can see now, all I need to do is install only libgtk-3-dev (am I right?). Additionally opening multiple project files is lightning fast! Unfortunately, the debugger still doesn't work with threads as it should. The program correctly stops on a trap within th...
by Cezary
Tue Jan 24, 2023 2:39 pm
Forum: Linux
Topic: Simple install of PureBasic (Ubuntu, Mint, Raspberry)
Replies: 44
Views: 33173

Re: Simple install of PureBasic (Ubuntu, Mint, Raspberry)

I see this thread has been revived, so I'll add something. I'm trying to use PB 6.01 beta in Mint Cinnamon 21.1 and debugger isn't working properly (built-in IDE and standalone). After trap or STOP stops execution and takes step (F8), the debugger loses control and the program stops responding. It i...
by Cezary
Sat Dec 31, 2022 2:00 pm
Forum: Tricks 'n' Tips
Topic: Statemachine vs. Thread
Replies: 5
Views: 544

Re: Statemachine vs. Thread

Axolotl, you are right: we need to use the right solution for the specific problem. To be honest - I use state machines very often, especially in the embedded applications where using an OS is not necessary. It is always worth getting to know a different point of view to learn something, especially ...