# ModalAI uORB topic file handle location

Source: https://forum.modalai.com/topic/1783/modalai-uorb-topic-file-handle-location
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2023-02-06 16:38:19 UTC by Dan
Replies: 9 · Views: 2991

## Dan · 2023-02-06 16:38:19 UTC

Hi ModalAI,

PX4 mentions that you can see the topic handles in `/obj`. This directory doesn't exist on our VOXL2. Do you have any documentation to point me to where and how ModalAI handles uORB topics differently and where this file handle location is for VOXL2.

Thanks,
Dan

## Reply by Eric Katzfey (ModalAI staff) · 2023-02-06 16:55:27 UTC

@Dan I'm not familiar with the ```/obj``` directory. That must be a Nuttx specific thing. What exactly are you trying to find out? Can you use the PX4 ```listener``` command?

## Reply by Dan · 2023-02-07 15:17:28 UTC (in reply to Eric Katzfey)

@Eric-Katzfey 
Re: ModalAI uORB topic file handle location

Hi Eric. Thanks for getting back to me.

Quite possibly this is a Nuttx thing. I can use the listener just fine however I'm interested to dive a bit deeper into how you ship this data comes across from the DSP and whether I can potentially access that data directly without using uORB. I know I can use uORB to subscribe and get a file descriptor but I thought I'd ask and see if there are alternatives.

Is there documentation on ModalAI uORB implementation for the DSP?

## Reply by Eric Katzfey (ModalAI staff) · 2023-02-07 15:47:47 UTC (in reply to Dan)

@Dan It's not really documented anywhere other than the source code. The best place to look is at the muorb module code. That is what implements the uorb communicator interface to allow advertisements, subscription requests, and topic data to flow between the DSP and the Linux side.

## Reply by Dan · 2023-02-07 15:50:33 UTC (in reply to Eric Katzfey)

@Eric-Katzfey 

OK great. Thanks Eric. I'll take a look and come back here if I have any further questions.

## Reply by Eric Katzfey (ModalAI staff) · 2023-02-07 15:51:39 UTC (in reply to Dan)

@Dan BTW: MUORB stands for multiprocessor UORB just in case you were wondering.

## Reply by Dan · 2023-02-07 16:11:33 UTC (in reply to Eric Katzfey)

@Eric-Katzfey 

I was actually. That's useful - Thanks!

## Reply by Dan · 2023-02-07 16:42:11 UTC

@Eric-Katzfey 

Please correct me if my understanding is wrong. I just want to catch you whilst our time zones overlap.

I've just briefly looked through the code for MuORB and uORB. It seems that MuORB registers as a communicator with the uORB Manager and provides a bunch of callbacks that eventually invoke particular functions in the manager when the respective action happens (subscribe, callback, advertise, unsubscribe). I see `process_remote_topic()` calling `orb_advertise()` which ends up calling `uORB::Utils::node_mkpath(nodepath, messageName)` which in the implementation is:
```
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
int uORB::Utils::node_mkpath(char *buf, const char *orbMsgName)
{
	unsigned len;

	unsigned index = 0;

	len = snprintf(buf, orb_maxpath, "/%s/%s%d", "obj", orbMsgName, index);

	if (len >= orb_maxpath) {
		return -ENAMETOOLONG;
	}

	return OK;
}
```
This path (notice the `/obj`) then goes into `node_open()` which should create a file descriptor using `px4_open()` with the name `/obj/<topic_name><index>`. 

Can you see point me to where I'm going wrong in my understanding as we've discussed before this directory doesn't exist on VOXL2.

## Reply by Eric Katzfey (ModalAI staff) · 2023-02-07 17:00:44 UTC (in reply to Dan)

@Dan You have to look for the definition of the px4_open function. On Nuttx it is defined as the OS open function. Otherwise it is defined as an external function. Look at src/lib/cdev/posix/cdev_platform.cpp

## Reply by Dan · 2023-02-07 19:47:43 UTC (in reply to Eric Katzfey)

@Eric-Katzfey 

Thanks again Eric. Looks like that was the part I was missing. I'll take a look.
