# '/dev/nmea' is not a device file

**URL:** <https://mangoh.discourse.group/t/dev-nmea-is-not-a-device-file/2327>\
**Category:** mangOH Green\
**Created:** [January 23, 2019, 10:11am UTC](https://mangoh.discourse.group/t/dev-nmea-is-not-a-device-file/2327 "2019-01-23T10:11:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AkshayKulkarni](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/akshaykulkarni/32/721_2.png) [@AkshayKulkarni](https://mangoh.discourse.group/u/AkshayKulkarni)\
**Post date:** [January 23, 2019, 10:11am UTC](https://mangoh.discourse.group/t/dev-nmea-is-not-a-device-file/2327/1 "2019-01-23T10:11:23Z")

</div>

Hi there ,  
I had written a legato application which would read gps data from **/dev/nmea** the code was working fine in **wp7502** but the same code when tried with **wp7607** gives out following errors  
–\> **supervisor[658]/supervisor T=main | app.c GetDevID() 650 | ‘/dev/nmea’ is not a device file. Success.**

–\> **supervisor[658]/supervisor T=main | app.c SetCfgDevicePermissions() 754 | Failed to set permissions (rw) for app ‘GNSS’ on device ‘/dev/nmea’**.

It could be good if somebody provides me some pointers to over come this issue

---

<div class="post-metadata">

**Author:** ![gazedbro](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@gazedbro](https://mangoh.discourse.group/u/gazedbro)\
**Post date:** [January 16, 2020, 1:07pm UTC](https://mangoh.discourse.group/t/dev-nmea-is-not-a-device-file/2327/2 "2020-01-16T13:07:02Z")

</div>

Hello, did you get a reply to this? I have exactly the same problem, but it looks like no one else does!

---

<div class="post-metadata">

**Author:** ![gazedbro](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@gazedbro](https://mangoh.discourse.group/u/gazedbro)\
**Post date:** [January 16, 2020, 1:08pm UTC](https://mangoh.discourse.group/t/dev-nmea-is-not-a-device-file/2327/3 "2020-01-16T13:08:49Z")

</div>

Some more detail:  
I managed to get the application up and “running” as a “sand boxed” application. The first connection to the outside world that I need is to the /dev/nmea port.

To do this, according to this page: [https://docs.legato.io/17\_07/defFilesAdef.html  
 ](https://docs.legato.io/17_07/defFilesAdef.html)

(I have double checked for the version of legato that I have (18\_10) and there was no change to this page.)

all I need to do is put the following in the adef file:

requires:

{

device:

{

[r] /dev/nmea /dev/nmea }

}

having done this I get the error:

Jan 6 20:04:04 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[835]/supervisor T=main | app.c GetDevID() 676 | ‘/dev/nmea’ is not a device file. Resource temporarily unavailable.  
Jan 6 20:04:04 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[835]/supervisor T=main | app.c SetCfgDevicePermissions() 775 | Failed to set permissions ® for app ‘processPosition’ on device ‘/dev/nmea’.

(if I “cat /dev/nmea” I get nmea sentences as expected.)

---

<div class="post-metadata">

**Author:** ![kalaivani](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/kalaivani/32/2183_2.png) [@kalaivani](https://mangoh.discourse.group/u/kalaivani)\
**Post date:** [December 25, 2020, 10:47am UTC](https://mangoh.discourse.group/t/dev-nmea-is-not-a-device-file/2327/4 "2020-12-25T10:47:08Z")

</div>

hi can i have ur sample project to read the nmea format

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 25, 2020, 12:32pm UTC](https://mangoh.discourse.group/t/dev-nmea-is-not-a-device-file/2327/5 "2020-12-25T12:32:53Z")

</div>

If NMEA is added to the definition file as a device, it cannot be accessed by the sandbox app:

requires:  
{  
device:  
{  
/dev/nmea /dev/  
}  
}

But, if adding it as a file, it works:

requires:  
{  
file:  
{  
/dev/nmea /dev/  
}  
}

> **[Component Definition .cdef - Legato Docs](https://docs.legato.io/latest/defFilesCdef.html)**

---

<div class="post-metadata">

**Author:** ![kalaivani](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/kalaivani/32/2183_2.png) [@kalaivani](https://mangoh.discourse.group/u/kalaivani)\
**Post date:** [December 26, 2020, 9:44am UTC](https://mangoh.discourse.group/t/dev-nmea-is-not-a-device-file/2327/6 "2020-12-26T09:44:45Z")

</div>

thanks for reply. can i have a source code to get the Nmea values in the terminal

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [December 26, 2020, 10:31am UTC](https://mangoh.discourse.group/t/dev-nmea-is-not-a-device-file/2327/7 "2020-12-26T10:31:25Z")

</div>

Here has an example to open /dev/ttyAT, you can make modification based on that:

> **[UART flow control with WP7608](https://forum.legato.io/t/uart-flow-control-with-wp7608/4597/47)**
>
> I cannot find another way to access RTS and CTS other than my previous suggestion. I think using ioctl() to set CTS is the most proper way and standard way. Currently I have no idea why RTS cannot be read by ioctl(). Below is the code to read the...
