Skip to content

apps/modbus: Move modbus to inside industry/#3457

Merged
simbit18 merged 2 commits into
apache:masterfrom
acassis:master
Apr 20, 2026
Merged

apps/modbus: Move modbus to inside industry/#3457
simbit18 merged 2 commits into
apache:masterfrom
acassis:master

Conversation

@acassis

@acassis acassis commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Modbus is a protocol mostly used on industries and since it is a protocol it is not a category to be at root of apps/

Impact

None, only organization

Testing

On NuttX board:

NuttShell (NSH) NuttX-12.13.0                                                     
nsh> uname -a                                                                     
NuttX 12.13.0 b5bb475d5f Apr 15 2026 10:46:51 arm stm32f401rc-rs485               
nsh> modbus -e

On Linux side:

$ mbpoll -a 10 -b 38400 -t 3 -r 1000 -c 4 /dev/ttyUSB1  -R
mbpoll 1.0-0 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'mbpoll -w' for details.

Protocol configuration: Modbus RTU
Slave configuration...: address = [10]
                        start reference = 1000, count = 4
Communication.........: /dev/ttyUSB1,      38400-8E1 
                        t/o 1.00 s, poll rate 1000 ms
Data type.............: 16-bit register, input register table

-- Polling slave 10... Ctrl-C to stop)
[1000]: 	44816 (-20720)
[1001]: 	0
[1002]: 	0
[1003]: 	0
-- Polling slave 10... Ctrl-C to stop)
[1000]: 	38771 (-26765)
[1001]: 	0
[1002]: 	0
[1003]: 	0
-- Polling slave 10... Ctrl-C to stop)
[1000]: 	17140
[1001]: 	0
[1002]: 	0
[1003]: 	0
-- Polling slave 10... Ctrl-C to stop)
[1000]: 	49449 (-16087)
[1001]: 	0
[1002]: 	0
[1003]: 	0
-- Polling slave 10... Ctrl-C to stop)
[1000]: 	11597
[1001]: 	0
[1002]: 	0
[1003]: 	0
-- Polling slave 10... Ctrl-C to stop)
[1000]: 	42530 (-23006)
[1001]: 	0
[1002]: 	0
[1003]: 	0
^C--- /dev/ttyUSB1 poll statistics ---
6 frames transmitted, 6 received, 0 errors, 0.0% frame loss

everything was closed.
Have a nice day !

Modbus is a protocol mostly used on industries and since it is a
protocol it is not a category to be at root of apps/

Signed-off-by: Alan C. Assis <acassis@gmail.com>
@cederom

cederom commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

MODBUS_DISABLE_LOG -> FREEMODBUS_DISABLE_LOG ? :-)

@simbit18

Copy link
Copy Markdown
Contributor

Hi @acassis, you also need to remove add_subdirectory(modbus) from the CMake file

https://github.com/acassis/nuttx-apps/blob/6326c7596af9e0c6008398adf92b36dce594c071/CMakeLists.txt#L63

@acassis

acassis commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

MODBUS_DISABLE_LOG -> FREEMODBUS_DISABLE_LOG ? :-)

I decided to keep the original name as @raiden00pl moved it from modbus to freemodbus. Please note that many MB_* also were kept.

@acassis acassis marked this pull request as ready for review April 16, 2026 13:37
@acassis

acassis commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi @acassis, you also need to remove add_subdirectory(modbus) from the CMake file

https://github.com/acassis/nuttx-apps/blob/6326c7596af9e0c6008398adf92b36dce594c071/CMakeLists.txt#L63

Thank you, I missed that

Comment thread industry/modbus/freemodbus/ascii/mbascii.c Outdated
Modbus is a protocol mostly used on industries and since it is a
protocol it is not a category to be at root of apps/

Signed-off-by: Alan C. Assis <acassis@gmail.com>
@simbit18

simbit18 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

the job Linux (xtensa-01) fails here because
During the Fetch-Source phase

use Apache nuttx master as a reference
use @acassis apps branch as a reference

Since the Apache nuttx master doesn't contain the additional changes required, it rightly fails

I tested it here

https://github.com/simbit18/manual-nuttx-ci/actions/runs/24637035652

using this new apache/nuttx#18568 tool and didn’t encounter any issues

Set it up as follows:

Nuttx repository: acassis/incubator-nuttx
    Nuttx branch: fix_modbus_loc
 Apps repository: acassis/nuttx-apps
     Apps branch: master
    Architecture: all
   Host platform: linux

Workflow -> Manually build NuttX CI for test

I'm merging this PR

@simbit18 simbit18 merged commit 2016c0b into apache:master Apr 20, 2026
30 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants