Re: nuttx user question

2024-04-30 Thread Alan C. Assis
Hi David, I think we can start creating the missing functions, like eMBMasterASCIIStart(), I think we could use eMBMasterRTUStart() as reference. Probably we will need to modify some timing values, since ASCII delays more time to transmit data. Best Regards, Alan On Tue, Apr 30, 2024 at 12:36

Re: nuttx user question

2024-04-30 Thread David Welshon
Ok, I have the device setup. I can help test whenever needed. David On Wed, Apr 24, 2024 at 7:17 AM Alan C. Assis wrote: > Hi David, > > I'm glad to help! > > More people could want this feature, so it is important to fix. > > Best Regards, > > Alan > > On Tuesday, April 23, 2024, David Welshon

Re: nuttx user question

2024-04-24 Thread Alan C. Assis
Hi David, I'm glad to help! More people could want this feature, so it is important to fix. Best Regards, Alan On Tuesday, April 23, 2024, David Welshon wrote: > Thank you btw! > > On Tue, Apr 23, 2024 at 9:22 PM David Welshon > wrote: > > > I can help test. I'll have to get a device tomor

Re: nuttx user question

2024-04-23 Thread David Welshon
Thank you btw! On Tue, Apr 23, 2024 at 9:22 PM David Welshon wrote: > I can help test. I'll have to get a device tomorrow from work first. I'll > let you know when I have it setup. > > On Tue, Apr 23, 2024 at 8:09 PM Alan C. Assis wrote: > >> David, >> >> I fixed the header, but it seems someo

Re: nuttx user question

2024-04-23 Thread David Welshon
I can help test. I'll have to get a device tomorrow from work first. I'll let you know when I have it setup. On Tue, Apr 23, 2024 at 8:09 PM Alan C. Assis wrote: > David, > > I fixed the header, but it seems someone did a partial port of FreeModbus, > it is missing many functions for modbus ASC

Re: nuttx user question

2024-04-23 Thread Alan C. Assis
David, I fixed the header, but it seems someone did a partial port of FreeModbus, it is missing many functions for modbus ASCII: mb_m.c: In function 'eMBMasterInit': mb_m.c:176:33: error: 'eMBMasterASCIIStart' undeclared (first use in this function); did you mean 'eMBMasterTCPInit'? 176 |

Re: nuttx user question

2024-04-23 Thread David Welshon
now it can't find the header file it seems make[2]: Entering directory '/home/david/nuttxspace/apps/modbus' CC: mb_m.c arm-none-eabi-gcc -c -Wstrict-prototypes -Wno-attributes -Wno-unknown-pragmas -Wno-psabi -Os -fno-strict-aliasing -fomit-frame-pointer -fno-common -Wall -Wshadow -Wundef -ffunct

Re: nuttx user question

2024-04-23 Thread Alan C. Assis
Whoa, you are totally right! Currently it is this way: ifeq ($(CONFIG_MODBUS_SLAVE),y) CSRCS += mb.c endif ifeq ($(CONFIG_MB_RTU_MASTER),y) CSRCS += mb_m.c endif But I think it should be: ifeq ($(CONFIG_MODBUS),y) ifeq ($(CONFIG_MODBUS_SLAVE),y) CSRCS += mb.c endif

Re: nuttx user question

2024-04-23 Thread David Welshon
HI Alan. The problem is my hardware is using the ASCII protocol. When I disabled ASCII and enabled RTU it compiled. What I would like is ASCII protocol. It seems like mb_m.c is for modbus master and something like the following should be in the makefile in the modbus folder but I could be wrong.

Re: nuttx user question

2024-04-23 Thread Alan C. Assis
Hi David, Actually ASCII and RTU enable equivalent/symetric functions. If you search for CONFIG_MB_ASCII_MASTER inside apps/modbus/ you will see it just calls the ASCII related functions. The config for RTU will call the binary (RTU) related functions. Try to disable ASCII master and enable RTU

Re: nuttx user question

2024-04-23 Thread David Welshon
When I changed from Modbus ASCII master selected to MOdbus RTU master it compiled. Is there extra configuration required for ASCII? On Tue, Apr 23, 2024 at 1:38 PM Alan C. Assis wrote: > I just verified the apps/modbus/Makefile and noticed that mb.c is only > compiled when CONFIG_MODBUS_SLAVE is

Re: nuttx user question

2024-04-23 Thread Alan C. Assis
I just verified the apps/modbus/Makefile and noticed that mb.c is only compiled when CONFIG_MODBUS_SLAVE is selected. It means you are enabling the modbus slave or the modbus example (that assume to be slave). So, don't enable CONFIG_EXAMPLES_MODBUS, only EXAMPLES_MODBUSMASTER Maybe we need to r

Re: nuttx user question

2024-04-23 Thread David Welshon
Thanks for the help and great videos and articles Alan! I just went through the video tutorial again. Unfortunately, modifying my own config as well as the nucleo-f4x1re:f401-nsh configurations per the video still can't find the functions On Tue, Apr 23, 2024 at 12:45 PM Alan C. Assis wrote: >

Re: nuttx user question

2024-04-23 Thread Alan C. Assis
Hi David, These functions are there (see apps/modbus/mb.c for instance). Did you follow this video tutorial: https://www.youtube.com/watch?v=FmJLrG4Ldow Best Regards, Alan On Tue, Apr 23, 2024 at 12:41 PM David Welshon wrote: > I am trying to get modbus mastermode rs485 example working on >