Cross-post from the mangOH forum - as I think this is generic to Legato, and not specific to mangOH?
As described in the cross-post, I got it to build - but it doesn’t work.
le_adc_ReadValue() returns -6; which is LE_FAULT = “Unspecified internal error”
Any ideas
Awnell,
Please, upgrade your system with last version of legato (16.04.0) and use cm adc read EXT_ADC1 or 2. It work.
Best regards,
Sylvain
Thanks.
Can you confirm that what I’ve done is correct - so it’s just the update that I need?
How do I check the current Legato version on the target?

and use cm adc
But that’s a command-line tool, isn’t it
What I need is to read the ADC from within an application.
How do I check the current Legato version on the target?
OK - I found it: legato.io/legato-docs/latest/too … egato.html
root@swi-mdm9x15:~# legato version
16.01.0.Beta_aa0684bddf31f5ea2d457b53d2218972_modified
root@swi-mdm9x15:~#

and use cm adc
But that’s a command-line tool, isn’t it
Yes, it is:
root@swi-mdm9x15:~# cm adc
ADC usageTo print known adc channels:
cm adc listTo read and print the value from an adc channel:
cm adc read channel
where “channel” is one of the names returned by listroot@swi-mdm9x15:~# cm adc list
Available ADC channels:
EXT_ADC1
EXT_ADC2
root@swi-mdm9x15:~# cm adc read EXT_ADC1
Read EXT_ADC1 failed.
root@swi-mdm9x15:~# cm adc read EXT_ADC2
Read EXT_ADC2 failed.
root@swi-mdm9x15:~#
So if this command fails, I guess that explains why my app also failed?
Note that the documentation is incomplete: legato.io/legato-docs/latest/too … get_cm_adc - it refers to “the names returned” but doesn’t say how to get them returned!
after doing the update, the cm adc read command does now seem to work;
but the cm adc list is broken!
root@swi-mdm9x15:~# cm adc
ADC usageTo print known adc channels:
cm adc read channel
where “channel” is one of the ADC nameroot@swi-mdm9x15:~# cm adc list
Invalid command for adc service.root@swi-mdm9x15:~# cm adc read EXT_ADC1
EXT_ADC1:43077root@swi-mdm9x15:~# cm adc read EXT_ADC2
[ 375.439462] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1300c8, irq:187
[ 375.445597] qup_i2c qup_i2c.0: I2C slave addr:0x3a not connected
[ 375.462017] gpio_check_and_wake: wake-n_gpio77 STATE=WAKEUP
EXT_ADC2:301
[ 375.486189] gpio_check_and_wake: wake-n_gpio77 STATE=SLEEP
root@swi-mdm9x15:~#
There doesn’t seem to be a package yet for Developer Studio - so my app refuses to start because its Legato version doesn’t match the version running on the target
There doesn’t seem to be a package yet for Developer Studio
I had Developer Studio 4.0; it needs to be updated to 4.1 - then a Legato 16.4.0 Package becomes available to install …
By George - I do believe we’ve got it
So to get this working required:
- Firmware 16.04.0 - which was only released on 9 June;
- Developer Studio 4.1 - dated 8 June.
Does this mean that I’m the first (outside SiWi) to get this working?!
I have faced this type of problem any body have solution ?
i think this problem is hardware side ?