Px4_simple_app advertiser fails on discovery board

I want to do some simulation using stm32f4 discovery board. But I’m not sure why I can’t advertise a new topic there.
Even with unchanged stable version when I try to run “px4_simple_app” I am getting following message:

nsh> [1B][Ksercon: Registering CDC/ACM serial driver
sercon: Successfully registered the CDC/ACM serial driver
nsh: mount: mount failed: No such file or directory
nsh: tone_alarm: command not found

NuttShell (NSH)
nsh> [1B][Kpx4_simple_app
INFO [px4_simple_app] Hello Sky!
WARN [uorb] node_open as advertiser failed.
ERROR [px4_simple_app] Got no data within a second
ERROR [px4_simple_app] Got no data within a second
ERROR [px4_simple_app] Got no data within a second
ERROR [px4_simple_app] Got no data within a second
ERROR [px4_simple_app] Got no data within a second
INFO [px4_simple_app] exiting
nsh> [1B][Kÿ

Does anybody know how can I solve this to simply do advertise on discovery board? Or am I doing something wrong?

I’m guessing you don’t have the sensors module running?
The app is waiting for updates to the sensor_combined topic - https://github.com/PX4/Firmware/blob/master/src/examples/px4_simple_app/px4_simple_app.c#L87

Thanks for the answer.
I hadn’t run any command after boot and discovery board does not have SDcard.

I could get rid of:
WARN [uorb] node_open as advertiser failed.
by sending : uorb start -a
after boot. I assume that advertise works correct now!

How can I run sensor_combined or any other module?
How to make sure if they are running or not?

You need sensors running for sensor_combined to be published. You can see what’s running with ps and which topics are published with uorb top.

Thank you for prompt reply.
Here is PS output:
0 0 FIFO TASK READY Idle Task()
3 100 FIFO TASK RUNNING init()

and here is my uorb top output:

nsh> [1B][Kuorb top
uorb top
[1B][H[1B][Kupdate: 1s, num topics: 3

So (How can I run “sensors”?)

It’s sensors start, but you’ll also need relevant drivers running to actually get data. The sensors module reads from the drivers (accel_report, gyro_report, etc) and publishes sensor_combined.

I think this is not included in discovery default build. Am I right?

nsh> [1B][Ksensors start
sensors start
nsh: sensors: command not found

And also there is no driver for discovery on-board sensors in default build?

Does any of the drivers in source code work with discovery board so I can add them to my cmakelitsts file?

I’m not that familiar with the discovery board, but it’s not really that well supported. We don’t have drivers specifically for the accel and gyro, but the ones we do have might be able to work with little to no modification.

We might be getting sidetracked here. Do you actually want to read from sensors and publish attitude (like px4_simple_app) or are you just interested in the mechanics of using uorb and writing a new app?

Actually I am working on a tracking sensor and I want to write an I2C driver for it and add it to the code.
I have discovery board connected to my sensor with I2C and wrote a driver like what code has for lidar lite. I was able to read from sensor but when I want to advertise with following code:

struct it_lps_s itlps_report = {};
orb_advertise(ORB_ID(it_lps), &itlps_report);

Nuttx crashes while in orb_advertise with following Message:

nsh> [1B][KITLPS -X start
IndoAssertion failed at file:irq_unexpectedisr.c line: 86 task: ITLPS
sp: 20001ea4
IRQ stack:
base: 20001f10
size: 00000ffc
20001ea0: 10006b24 20001ea4 10006ee8 000003fc 08013421 0802b834 00000056 10006b24
20001ec0: 08013655 10006b24 080134f1 00000010 08021231 08021215 080211c9 20001f58
20001ee0: 00000002 0801e319 0801e345 00000000 0801a9ad 0801ae1f 00000064 00000000
20001f00: 00000000 00000000 08013655 10006b24 10000010 00000001 00000000 00000000
sp: 10006bf8
User stack:
base: 10006ee8
size: 000003fc
10006be0: 00000000 00000000 00000000 00000000 00000000 10006cc8 00000064 00000000
10006c00: 00000000 00000000 080291c3 10006c6c 10006cac 00000000 00000000 0801ae1f
10006c20: 0000000c 10006b30 0802b5ad 08011d95 00000000 00000000 00000000 00000000
10006c40: 00000000 00000000 10006ca4 08011d61 0800ad9b 080291bc 10006ce0 00000040
10006c60: 100053a0 08011d95 10006ca4 0801afa5 08022ac9 00000011 10006ce0 0000003f
10006c80: 00000000 00000000 0800ac2d 10006ce0 00000000 20000498 10006d7c 0800ad9b
10006ca0: 080291bc 080291b8 0803eeff 00000000 00002600 10004d2c 10004d2c 08024dd3
10006cc0: 10006d7c 0800ac2d 100053d0 00000000 100053c0 20000498 20001f58 08010105
10006ce0: 6a626f2f 646e692f 6172746f 706c5f71 00000073 100053d0 00000000 0801010b
10006d00: 08024efd 08009df1 08025169 100053c0 080094db 08009e09 100053c0 00000000
10006d20: 08024dad 0801453b 10004d2c 0800abf5 00002600 10006d7c 100053a0 08024dd3
10006d40: 10004d20 08024dad 080094e9 00002600 10006d7c 00000003 00000000 0801453b
10006d60: 0000004b 0800958f 00000003 20000498 00000001 080094e9 10006c0c 20000498
10006d80: 00000000 0000004b 08009617 00000000 00000000 20000498 08009617 0800958f
10006da0: 6a626f2f 646e692f 6172746f 706c5f71 08003073 0000001d 20001f14 00000000
10006dc0: 0800ff5f 0800fe7d 20001f58 08010105 10005660 20001f14 0801010b 0800fb67
10006de0: 00000000 08008f6d 100053a0 20000498 10006e78 00000001 00000000 08009617
10006e00: 00000001 00000000 0000004b 00000000 080250ff 08020d77 10006e40 08008f41
10006e20: 08008fa5 100053a0 20000498 10006e78 00000001 08008f6d 0000004b 00000001
10006e40: 10006e78 08008f85 08004ceb 20000498 10006e78 10005830 00000000 08008fa5
10006e60: 00000000 10005200 00000000 08004267 10005208 08004ceb 00000000 00000000
10006e80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
10006ea0: 00000001 20000524 20000520 10005200 00000000 08004267 00000001 100051f0
10006ec0: 00000003 00000000 00000000 080046d5 00000000 00000000 00000000 08010c7f
10006ee0: 00000000 00000000 ffffffff ffffffff ffffffff ffffffff 00009100 00000410
R0: 0801a9ad 00000004 e000ed04 80000000 0801a9ad 0801ae1f 00000064 00000000
R8: 00000000 00000000 10006b30 00000064 0000000a 10006bf8 0801a9c3 08013ab8
xPSR: 81000000 BASEPRI: 00000000 CONTROL: 00000000
EXC_RETURN: ffffffe9

I can’t find why it happens. I thought may be there is other sensors that I can work on with discovery board before working on mine.

Do you have any idea if I can fix these and continue with discovery or I have to switch to another board?

I’m sure you can fix these. Take a look at this debugging page - https://dev.px4.io/advanced-gdb-debugging.html