Linux serial_posix vs. Windows serial_w32
Linux serial_posix vs. Windows serial_w32
My program successfully uploaded on both windows and linux OS using FTDI serial uploader. But upon executing it, the program seems to crash or pause on the linux one. How can this be?
Hello all,
Just to update on this issue. I have solved it already. It seems I missed out to provide modifications on my LMIC library. Problem does not occur beause my my operating system. The cause of the stall is when the program is trying to connect with the LoRaWAN network server. I just add the necessary files for my ACSIP variant. Thank you all for your help.

Go to full postJust to update on this issue. I have solved it already. It seems I missed out to provide modifications on my LMIC library. Problem does not occur beause my my operating system. The cause of the stall is when the program is trying to connect with the LoRaWAN network server. I just add the necessary files for my ACSIP variant. Thank you all for your help.



Re: Linux serial_posix vs. Windows serial_w32
No idea. Without more details hard to help.
Re: Linux serial_posix vs. Windows serial_w32
it is in the Wiki in the FAQ
https://github.com/stm32duino/wiki/wiki/FAQ#linux
https://github.com/stm32duino/wiki/wiki ... itor-fails
create a udev rules file e.g. /etc/udev/rules.d/45-stm32duino.rules add a line like
https://github.com/stm32duino/wiki/wiki/FAQ#linux
https://github.com/stm32duino/wiki/wiki ... itor-fails
create a udev rules file e.g. /etc/udev/rules.d/45-stm32duino.rules add a line like
Code: Select all
ATTRS{idProduct}=="5740", ATTRS{idVendor}=="0483", MODE="664", GROUP="plugdev" SYMLINK+="stm32duino" ENV{ID_MM_DEVICE_IGNORE}="1"
Re: Linux serial_posix vs. Windows serial_w32
I did what you suggest. Created rules in udev, but still the problem occur.ag123 wrote: Tue May 17, 2022 1:17 pm it is in the Wiki in the FAQ
https://github.com/stm32duino/wiki/wiki/FAQ#linux
https://github.com/stm32duino/wiki/wiki ... itor-fails
create a udev rules file e.g. /etc/udev/rules.d/45-stm32duino.rules add a line like
Code: Select all
ATTRS{idProduct}=="5740", ATTRS{idVendor}=="0483", MODE="664", GROUP="plugdev" SYMLINK+="stm32duino" ENV{ID_MM_DEVICE_IGNORE}="1"

maple:
Code: Select all
ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="664", GROUP="plugdev" SYMLINK+="maple", ENV{ID_MM_DEVICE_IGNORE}="1"
Code: Select all
ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="664", GROUP="plugdev" SYMLINK+="stm32duino", ENV{ID_MM_DEVICE_IGNORE}="1"
Code: Select all
ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="664", GROUP="plugdev" SYMLINK+="stm32flash", ENV{ID_MM_DEVICE_IGNORE}="1"
Re: Linux serial_posix vs. Windows serial_w32
Here's a sample of successful uploading via FTDI USB serial programmer on Linux OS:

When I check the serial monitor, the program freeze:

But when I try to upload it via Arduino IDE using windows OS, the program runs smoothly.
Re: Linux serial_posix vs. Windows serial_w32
in Linux
run
look for the vid/pid when your stm32duino or libmaple (roger's core) device is connected.
That same vid/pid needs to be in the udev config file. you can have multiple different definitions for different vid/pids.
restart udev or restart your pc
and make sure you have selected USB (CDC) Serial from the menu as your serial device (stm32duino core).
run
Code: Select all
dmesg
That same vid/pid needs to be in the udev config file. you can have multiple different definitions for different vid/pids.
restart udev or restart your pc
and make sure you have selected USB (CDC) Serial from the menu as your serial device (stm32duino core).
Last edited by ag123 on Sat May 21, 2022 5:16 am, edited 1 time in total.
Re: Linux serial_posix vs. Windows serial_w32
Which core you used?
If it is stm32 core, it sounds strange it use stm32flash or you used a very older version?
If it is stm32 core, it sounds strange it use stm32flash or you used a very older version?
Re: Linux serial_posix vs. Windows serial_w32
Yes I'm using stm32 core version 1.5.0. A very old version because my firmware has a lot of dependencies on that version.fpiSTM wrote: Sat May 21, 2022 4:57 am Which core you used?
If it is stm32 core, it sounds strange it use stm32flash or you used a very older version?
Re: Linux serial_posix vs. Windows serial_w32
On running "dmesg" this is what I got:ag123 wrote: Sat May 21, 2022 4:05 am in Linux
runlook for the vid/pid when your stm32duino or libmaple (roger's core) device is connected.Code: Select all
dmesg
That same vid/pid needs to be in the udev config file. you can have multiple different definitions for different vid/pids.
restart udev or restart your pc
and make sure you have selected USB (CDC) Serial from the menu as your serial device (stm32duino core).
Code: Select all
[ 3536.516276] usb 2-1.2: new full-speed USB device number 3 using ehci-pci
[ 3536.635855] usb 2-1.2: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[ 3536.635859] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3536.635861] usb 2-1.2: Product: FT232R USB UART
[ 3536.635863] usb 2-1.2: Manufacturer: FTDI
[ 3536.635865] usb 2-1.2: SerialNumber: A50285BI
[ 3536.793936] usbcore: registered new interface driver usbserial_generic
[ 3536.793944] usbserial: USB Serial support registered for generic
[ 3536.802621] usbcore: registered new interface driver ftdi_sio
[ 3536.802634] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 3536.802686] ftdi_sio 2-1.2:1.0: FTDI USB Serial Device converter detected
[ 3536.802723] usb 2-1.2: Detected FT232RL
[ 3536.805461] usb 2-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
Re: Linux serial_posix vs. Windows serial_w32
you did not compile with USB (CDC) Serial selected.
USB Serial from your board did not appear in dmesg
you can actually disconnect the FTDI dongle and just connect your stm32 board to usb.
a USB Serial connection should appear in dmesg
USB Serial from your board did not appear in dmesg
you can actually disconnect the FTDI dongle and just connect your stm32 board to usb.
a USB Serial connection should appear in dmesg