[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread TJF
Am Mittwoch, 19. August 2020 22:40:03 UTC+2 schrieb andrew...@gmail.com:
>
> I get this error when running your code. I can read the adc just fine.
>
> AssertionError: P9_24 configuration failed (b'pinmux missing')
>
>
Your system is not prepared for pinmuxing (check error messages 
).
 
Note: I did already mentinon this above.

The command lsmod should list (beside others)

Module  Size  Used by
> uio_pdrv_genirq16384  0
> libpruio   16384  0
> uio_pruss  16384  0
> uio20480  2 uio_pruss,uio_pdrv_genirq
>

The command systemctl status libpruio-lkm.service should output something 
like

● libpruio-lkm.service - Load libpruio loadable kernel module
>Loaded: loaded (/etc/systemd/system/libpruio-lkm.service; enabled; 
> vendor preset: enabled)
>Active: active (exited) since Thu 2020-08-13 20:57:24 CEST; 6 days ago
>   Process: 420 ExecStartPost=/bin/chown root:pruio 
> /sys/devices/platform/libpruio/state (code=exited, status=0/SUCCESS)
>   Process: 384 ExecStart=/sbin/modprobe libpruio (code=exited, 
> status=0/SUCCESS)
>  Main PID: 384 (code=exited, status=0/SUCCESS)
> Tasks: 0 (limit: 4915)
>CGroup: /system.slice/libpruio-lkm.service
>

Usually this should happen after you installed the libpruio-lkm.deb package 
and made yourself a member of the pruio system group.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6765146c-9cba-4bf1-aba4-ff65c04fe190o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread andrew . harres
I get this error when running your code. I can read the adc just fine.

AssertionError: P9_24 configuration failed (b'pinmux missing')

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2f86c928-b2e9-4158-9888-e4a6677d69aao%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread TJF
Am Mittwoch, 19. August 2020 21:56:23 UTC+2 schrieb andrew...@gmail.com:
>
> I can't find a reference to the setPin function in the python library
>

Check out example pruss_toggle.py 

.


> I assume I should be able to do this:
> from libpruio import *
>
> io = pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0)
>
> pruio_setPin(io, P9_24, 0)
>

That should work. I used a different syntax (don't know why -- perhaps to 
be closer to the other languages syntax):

from libpruio import * 
>
...
>
io = pruio_new 
> (PRUIO_DEF_ACTIVE,
>  
> 4, 0x98, 0)
> try:
>## The pointer dereferencing, using contents member
>IO = io.contents
>if IO.Errr: raise AssertionError("pruio_new failed (%s)" % IO.Errr)
>
...
>
  if (IO.setPin(io, P9_24, 0)):
> raise AssertionError("P9_24 configuration failed (%s)" % IO.Errr)
> ...
>
  if (pruio_config 
> (io,
>  
> 1, 0, 0, 0)):
> raise AssertionError("config failed (%s)" % IO.Errr)
> ...
>
 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c754404d-4735-4fef-8fe7-87c6d8bc5ed0o%40googlegroups.com.


[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread andrew . harres
I can't find a reference to the setPin function in the python library

I assume I should be able to do this:
from libpruio import *

io = pruio_new(PRUIO_DEF_ACTIVE, 4, 0x98, 0)

pruio_setPin(io, P9_24, 0)

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2fb7bef9-c66a-4141-96fa-2a550d47501ao%40googlegroups.com.


Re: [beagleboard] IDE (eclipse) for Beaglebone on Windows

2020-08-19 Thread jonnymo
Try downloading
the gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-linux-gnueabihf toolchain and
set the Cross Settings to reference this:
https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/

Just unpack the file and reference it in Exlipse.
Ex:
Prefix: arm-linux-gnueabihf-
Path: "Path to the toolchain"
Ex:

PATH: 
H:\Development\BeagleBoard\Toolchain\gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-linux-gnueabihf\bin

Set Tool Chain Editor to:
  Current toolchains: Cross GCC
   Current builder: CDT Internal Builder

This works for me with Eclipse 2019

Cheers,

Jon




On Wed, Aug 19, 2020 at 11:52 AM NAGABHOOSHANAM VEMULA <
nagabhooshana...@gmail.com> wrote:

> Hi,
> In continuation of this discussion.  I am progressing, but yet to make the
> environment to work.
> With this eclipse, I am successful to build and run c program (Hello
> world) in the native/host platform, windows machine.
> But I am unable to add cross -compile option to "*arm-linux-gnueabihf*-"
> as per the video below.
> Ofcourse video was made for linux host.
> http://exploringbeaglebone.com/chapter7/  ( i am working on wondows host)
>
> I am thinking settings at::  Project-properties->Settings->Tool Settings,
> But it looks be not correct .
>
> I guess my eclipse 2020-06 version has changed a bit on setting options
> (unable to find a location, where to change).
> Anyone using this new version on windows host?, where to make changes for
> *arm-linux-gnueabihf*-
>
> My environment,
> 1) Installed Eclipse 2020-06 version (latest) for C/C++ Development, as
> IDE.
> 2) installed JDK 14.02 as required for eclipse.
> 3) installed tdm64-gcc-5.1.0-2 (MinGW gcc ) for cross compiler support
> 4) Using WIndows 10 machine as host
>
> Thanks in advance.
>
> Thanks and regards,
> Nagabhooshanam Vemula
> Project-properties->Settings->Tool Settings
>
>
> On Wednesday, August 19, 2020 at 12:45:44 AM UTC+5:30 jonn...@gmail.com
> wrote:
>
>> In Eclipse, just create a Run Configuration and set it to 'SSH' for your
>> target which is basically like SCP.  This should deploy the code and run it
>> on the remote target.
>>
>> Jon
>>
>> On Tue, Aug 18, 2020 at 11:47 AM NAGABHOOSHANAM VEMULA <
>> nagabhoo...@gmail.com> wrote:
>>
>>> Thanks John,
>>>  As per your clarification, It helped me, let me proceed with eclipse on
>>> Windows and use scp to file transfers to target system.
>>>
>>> Thanks Dave, Yes, I am using WSL, the link is
>>> https://www.microsoft.com/store/productId/9N6SVWS3RX71
>>>
>>>
>>> Thanks and regards,
>>> Nagabhooshanam Vemula
>>> email :  nagabhoo...@gmail.com
>>> +91 83741 82839 <+91%2083741%2082839>- HYD
>>>
>>>
>>> On Tue, Aug 18, 2020 at 11:47 PM jonnymo  wrote:
>>>
 Yes, you can cross compile from Windows 10 to the Beaglebone but your
 best option would be Eclipse since you can compile on Windows and then scp
 the code over from Eclipse.  You can use Visual Studio but you would end up
 having to build on the remote target and not on Windows.  However, with
 Visual Studio you could use something like VisualGDB but will cost an extra
 $99 US. You can download and use it for a month for free though.

 Here are a couple of links that might help.
 http://exploringbeaglebone.com/chapter7/
 http://jkuhlm.bplaced.net/hellobone/

 https://www.youtube.com/watch?v=af-1hDfoRcg

 https://elinux.org/images/d/df/Using_VS_and_VS_Code_for_Embedded_Development.pdf


 Using VisualGDB although I am not sure if this is needed any more.
 https://visualgdb.com/tutorials/beaglebone/qt5/cross-compile/


 Cheers,

 Jon

 On Tue, Aug 18, 2020 at 10:54 AM  wrote:

> Are you running Ubuntu under the Windows Subsystem for Linux?  (  WSL
> )
>
> If so WSL1 or WSL2? Also,  if so I wasn’t aware you could run a
> GUI this way.Can GNOME 3 be run under WSL?
>
>
>
>
>
> *From:* beagl...@googlegroups.com  *On
> Behalf Of *NAGABHOOSHANAM VEMULA
> *Sent:* Tuesday, August 18, 2020 12:42 PM
> *To:* BeagleBoard 
> *Subject:* [spam] [beagleboard] IDE (eclipse) for Beaglebone on
> Windows
>
>
>
> Hi,
>
> As a newbie to Linux, looking for IDE and debuggers.
>
>
>
> my setup,
>
> a) I have windows10 PC with ubuntu as application, (ubuntu on Windwos)
>
> b) Connected to Beaglebone with SSH,
>
> c) beaglebone has an internet-over-USB connection.
>
>
>
> I am inclined towards an IDE and debugger (like eclipse) instead of Vi
> editor
>
>
>
> My question:
>
> 1) What are the various IDE options on Windows (eclipse and any other?)
>
> 2) Can we install any IDE on my Ubuntu--on-Windows? (may be stupid
> question)
>
> 3)  If I install eclipse IDE on windows. Does it help to connect to
> targetboard?
>
> to run the program and debug.
>
>
>

Re: [beagleboard] IDE (eclipse) for Beaglebone on Windows

2020-08-19 Thread robert.sty...@gmail.com
I feel for Nagabhooshanam

I have found getting the cross compiler working on Windows very difficult 
(compared to Linux, but no picnic there either). 

I usually resort to the tools provided by the silicon manufacture 
 and end up with several Eclipse based 
IDEs.

On Wednesday, 19 August 2020 at 19:52:18 UTC+1 nagabhoo...@gmail.com wrote:

> Hi,
> In continuation of this discussion.  I am progressing, but yet to make the 
> environment to work.
> With this eclipse, I am successful to build and run c program (Hello 
> world) in the native/host platform, windows machine.
> But I am unable to add cross -compile option to "*arm-linux-gnueabihf*-"  
> as per the video below.
> Ofcourse video was made for linux host. 
> http://exploringbeaglebone.com/chapter7/  ( i am working on wondows host)
>
> I am thinking settings at::  Project-properties->Settings->Tool Settings, 
> But it looks be not correct .
>  
> I guess my eclipse 2020-06 version has changed a bit on setting options 
> (unable to find a location, where to change). 
> Anyone using this new version on windows host?, where to make changes for 
> *arm-linux-gnueabihf*-
>
> My environment,
> 1) Installed Eclipse 2020-06 version (latest) for C/C++ Development, as 
> IDE.
> 2) installed JDK 14.02 as required for eclipse. 
> 3) installed tdm64-gcc-5.1.0-2 (MinGW gcc ) for cross compiler support
> 4) Using WIndows 10 machine as host
>
> Thanks in advance.
>   
> Thanks and regards, 
> Nagabhooshanam Vemula
> Project-properties->Settings->Tool Settings
>
>
> On Wednesday, August 19, 2020 at 12:45:44 AM UTC+5:30 jonn...@gmail.com 
> wrote:
>
>> In Eclipse, just create a Run Configuration and set it to 'SSH' for your 
>> target which is basically like SCP.  This should deploy the code and run it 
>> on the remote target.
>>
>> Jon 
>>
>> On Tue, Aug 18, 2020 at 11:47 AM NAGABHOOSHANAM VEMULA <
>> nagabhoo...@gmail.com> wrote:
>>
>>> Thanks John,
>>>  As per your clarification, It helped me, let me proceed with eclipse on 
>>> Windows and use scp to file transfers to target system.
>>>
>>> Thanks Dave, Yes, I am using WSL, the link is 
>>> https://www.microsoft.com/store/productId/9N6SVWS3RX71
>>>
>>>
>>> Thanks and regards, 
>>> Nagabhooshanam Vemula
>>> email :  nagabhoo...@gmail.com
>>> +91 83741 82839 <+91%2083741%2082839>- HYD
>>>
>>>
>>> On Tue, Aug 18, 2020 at 11:47 PM jonnymo  wrote:
>>>
 Yes, you can cross compile from Windows 10 to the Beaglebone but your 
 best option would be Eclipse since you can compile on Windows and then scp 
 the code over from Eclipse.  You can use Visual Studio but you would end 
 up 
 having to build on the remote target and not on Windows.  However, with 
 Visual Studio you could use something like VisualGDB but will cost an 
 extra 
 $99 US. You can download and use it for a month for free though.

 Here are a couple of links that might help.
 http://exploringbeaglebone.com/chapter7/ 
 http://jkuhlm.bplaced.net/hellobone/
  
 https://www.youtube.com/watch?v=af-1hDfoRcg 

 https://elinux.org/images/d/df/Using_VS_and_VS_Code_for_Embedded_Development.pdf
  
  
 Using VisualGDB although I am not sure if this is needed any more. 
 https://visualgdb.com/tutorials/beaglebone/qt5/cross-compile/


 Cheers,

 Jon

 On Tue, Aug 18, 2020 at 10:54 AM  wrote:

> Are you running Ubuntu under the Windows Subsystem for Linux?  (  WSL 
> ) 
>
> If so WSL1 or WSL2? Also,  if so I wasn’t aware you could run a 
> GUI this way.Can GNOME 3 be run under WSL?
>
>  
>
>  
>
> *From:* beagl...@googlegroups.com  *On 
> Behalf Of *NAGABHOOSHANAM VEMULA
> *Sent:* Tuesday, August 18, 2020 12:42 PM
> *To:* BeagleBoard 
> *Subject:* [spam] [beagleboard] IDE (eclipse) for Beaglebone on 
> Windows
>
>  
>
> Hi,
>
> As a newbie to Linux, looking for IDE and debuggers.
>
>  
>
> my setup, 
>
> a) I have windows10 PC with ubuntu as application, (ubuntu on Windwos)
>
> b) Connected to Beaglebone with SSH,
>
> c) beaglebone has an internet-over-USB connection.
>
>  
>
> I am inclined towards an IDE and debugger (like eclipse) instead of Vi 
> editor 
>
>  
>
> My question:
>
> 1) What are the various IDE options on Windows (eclipse and any other?)
>
> 2) Can we install any IDE on my Ubuntu--on-Windows? (may be stupid 
> question)
>
> 3)  If I install eclipse IDE on windows. Does it help to connect to 
> targetboard?
>
> to run the program and debug.
>
>  
>
> Please guide me, Thanks in advance
>
> .
>
>  
>
> -- 
> For more options, visit http://beagleboard.org/discuss
> --- 
> You received this message because you are subscribed to the Google 
> Groups 

Re: [beagleboard] IDE (eclipse) for Beaglebone on Windows

2020-08-19 Thread NAGABHOOSHANAM VEMULA
Hi,
In continuation of this discussion.  I am progressing, but yet to make the 
environment to work.
With this eclipse, I am successful to build and run c program (Hello world) 
in the native/host platform, windows machine.
But I am unable to add cross -compile option to "*arm-linux-gnueabihf*-"  
as per the video below.
Ofcourse video was made for linux host. 
http://exploringbeaglebone.com/chapter7/  ( i am working on wondows host)

I am thinking settings at::  Project-properties->Settings->Tool Settings, 
But it looks be not correct .
 
I guess my eclipse 2020-06 version has changed a bit on setting options 
(unable to find a location, where to change). 
Anyone using this new version on windows host?, where to make changes for 
*arm-linux-gnueabihf*-

My environment,
1) Installed Eclipse 2020-06 version (latest) for C/C++ Development, as IDE.
2) installed JDK 14.02 as required for eclipse. 
3) installed tdm64-gcc-5.1.0-2 (MinGW gcc ) for cross compiler support
4) Using WIndows 10 machine as host

Thanks in advance.
  
Thanks and regards, 
Nagabhooshanam Vemula
Project-properties->Settings->Tool Settings


On Wednesday, August 19, 2020 at 12:45:44 AM UTC+5:30 jonn...@gmail.com 
wrote:

> In Eclipse, just create a Run Configuration and set it to 'SSH' for your 
> target which is basically like SCP.  This should deploy the code and run it 
> on the remote target.
>
> Jon 
>
> On Tue, Aug 18, 2020 at 11:47 AM NAGABHOOSHANAM VEMULA <
> nagabhoo...@gmail.com> wrote:
>
>> Thanks John,
>>  As per your clarification, It helped me, let me proceed with eclipse on 
>> Windows and use scp to file transfers to target system.
>>
>> Thanks Dave, Yes, I am using WSL, the link is 
>> https://www.microsoft.com/store/productId/9N6SVWS3RX71
>>
>>
>> Thanks and regards, 
>> Nagabhooshanam Vemula
>> email :  nagabhoo...@gmail.com
>> +91 83741 82839 <+91%2083741%2082839>- HYD
>>
>>
>> On Tue, Aug 18, 2020 at 11:47 PM jonnymo  wrote:
>>
>>> Yes, you can cross compile from Windows 10 to the Beaglebone but your 
>>> best option would be Eclipse since you can compile on Windows and then scp 
>>> the code over from Eclipse.  You can use Visual Studio but you would end up 
>>> having to build on the remote target and not on Windows.  However, with 
>>> Visual Studio you could use something like VisualGDB but will cost an extra 
>>> $99 US. You can download and use it for a month for free though.
>>>
>>> Here are a couple of links that might help.
>>> http://exploringbeaglebone.com/chapter7/ 
>>> http://jkuhlm.bplaced.net/hellobone/
>>>  
>>> https://www.youtube.com/watch?v=af-1hDfoRcg 
>>>
>>> https://elinux.org/images/d/df/Using_VS_and_VS_Code_for_Embedded_Development.pdf
>>>  
>>>  
>>> Using VisualGDB although I am not sure if this is needed any more. 
>>> https://visualgdb.com/tutorials/beaglebone/qt5/cross-compile/
>>>
>>>
>>> Cheers,
>>>
>>> Jon
>>>
>>> On Tue, Aug 18, 2020 at 10:54 AM  wrote:
>>>
 Are you running Ubuntu under the Windows Subsystem for Linux?  (  WSL ) 

 If so WSL1 or WSL2? Also,  if so I wasn’t aware you could run a GUI 
 this way.Can GNOME 3 be run under WSL?

  

  

 *From:* beagl...@googlegroups.com  *On 
 Behalf Of *NAGABHOOSHANAM VEMULA
 *Sent:* Tuesday, August 18, 2020 12:42 PM
 *To:* BeagleBoard 
 *Subject:* [spam] [beagleboard] IDE (eclipse) for Beaglebone on Windows

  

 Hi,

 As a newbie to Linux, looking for IDE and debuggers.

  

 my setup, 

 a) I have windows10 PC with ubuntu as application, (ubuntu on Windwos)

 b) Connected to Beaglebone with SSH,

 c) beaglebone has an internet-over-USB connection.

  

 I am inclined towards an IDE and debugger (like eclipse) instead of Vi 
 editor 

  

 My question:

 1) What are the various IDE options on Windows (eclipse and any other?)

 2) Can we install any IDE on my Ubuntu--on-Windows? (may be stupid 
 question)

 3)  If I install eclipse IDE on windows. Does it help to connect to 
 targetboard?

 to run the program and debug.

  

 Please guide me, Thanks in advance

 .

  

 -- 
 For more options, visit http://beagleboard.org/discuss
 --- 
 You received this message because you are subscribed to the Google 
 Groups "BeagleBoard" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to beagleboard...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/beagleboard/5444751e-64a6-48a4-8a9d-eaf04c1e81c9n%40googlegroups.com
  
 
 .

 -- 
 For more options, visit http://beagleboard.org/discuss
 --- 
 You received this message because you 

[beagleboard] Re: reliability and support

2020-08-19 Thread NAGABHOOSHANAM VEMULA
Hi Bhagyasri,

I think your question may find an answer as part of the previous 
discussion. please see this...
https://groups.google.com/g/beagleboard/c/2X2xkSIhgOQ/m/zVQoVtYzBgAJ

On Wednesday, August 19, 2020 at 7:05:59 PM UTC+5:30 bhag...@gmail.com 
wrote:

> Hi ,
>
> This bhagysri, Senior Hardware Engineer. I want to use Beagle pocket in 
> one of my projects. I want to know about reliability and support i.e,how 
> many years of Production guarantee can we expect ?
>
> Regards
> Bhagyasri
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/8f900995-7413-4b5e-83a3-4bdb9e8e46aen%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-19 Thread Pavel Yermolenko
Hi Robert,
I don't know what the problem was, but after rebooting the Ubuntu host 
machine (and also BBB) it works.
Sincerely,
Pavel.

P.S. the kernel is: 4.14.108-ti-r119

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/21586137-d07f-4a86-9539-7218ea3ce931o%40googlegroups.com.


[beagleboard] Re: Sensors for weather station?

2020-08-19 Thread Dennis Lee Bieber
On Tue, 18 Aug 2020 14:29:43 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Ren W
 wrote:

>
>AdaFruit sells such a thing (AM2302 ), 
>but the protocol looks iffy (I'm using Bonescript, not Python). SparkFun 
>has a bunch of options also, but they all look like "internal" sensors, 
>i.e. not meant for exposure. 
>I've seen other projects go with an all-in-one weather sensor kit sold by 
>Davis; it looks like a bit much. And rather pricey. 
>
>I'm curious to hear what other enthusiasts use... Thanks! 

Pretty much ANY sensors will need you to provide a suitable housing
(even that AM2302 is not warded against splashes. You want a white housing
(white to reflect sunlight) with downward slanting louvers on all sides for
air-flow, but which will block rain splatters from the stuff on the inside
(obviously a rain gauge will be outside -- most of them work on a trip
system that counts each time a bucket exceeds some mass and empties).

You likely won't want to run all that many wires either -- especially
if each sensor is using a different protocol*.

I really think what I'd do is obtain an Arduino (or Adafruit Circuit
Python Metro card), as both are microcontrollers capable of strict timing
tasks. Wire all sensors to this card, and use a simple program that just
loops reading each sensor, and then formatting the data into a simple
string that could be sent over a serial port. The Arduino/Metro would be
mounted in the top of the sensor housing, and would require a source of
power, and a (long run) serial line (due to length, one might want to run a
slow baud rate to reduce line noise effects). Four wires: 5V, GND, Tx, Rx.
(Actually, if you have the unit continuously sending data, and have not
command mode, you could drop one of the serial lines).


*   The protocol used by DHT-type sensors is rather timing critical. I'm
pretty sure Python will not keep up on its own, and suspect Bonescript will
have the same problem. I vaguely recall once trying to code a bit-banged
version in C, and I'm not certain I was able to get reliable readings on a
BBB -- the OS overhead and process swapping got in the way. You could write
something that runs on a PRU to get reliable timing.

The basic/simplest reading process consists of sending the START
signal, then timing (simple loop counting loop cycles) the first signal
transition from the DHT. This gives you the timing baseline, late 1s and 0s
tend to be longer or shorter than the baseline (check spec sheet). Each bit
transition needs to be counted/timed. After you've obtained the timing for
all bits you can make the determination of 1 or 0, package them into bytes,
and return them as a value.

If one has access to a system clock, it does remove the need to count
loop cycles. I can't locate my C attempt; my Python attempt -- which as I
recall wasn't fast enough -- years ago, was:

-=-=-=-
"""
DHT11.pySimple Humidity and Temperature Sensor
April 2, 2016   Dennis L Bieber

This file defines a class to read DHT11 sensors using the
Adafruit_BBIO library.

Minimal error checking is performed, timeout testing is
performed as CPU-hog polling loops are being used to
detect transitions (the Adafruit_BBIO wait_for_edge()
block indefinitely and seemed to be hanging on some calls)

NOTE: time.clock() appears to have a very coarse resolution,
so timeouts need be significant
"""

import Adafruit_BBIO.GPIO as IO
import time

class DHTError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return "DHT Sensor Error: %s" % value

class DHT11(object):
def __init__(self, pinStr, timeout=1.0):
self._pinStr = pinStr
self._timeout = timeout

def readC(self):
#   return humidity and degC
#   spec sheet recommends reading twice as the first
#   might return stale data
(h, t) = self._read()
return self._read()

def readF(self):
#   return humidity and degF
(h, t) = self.readC()
return (h, (t * 9.0) / 5.0 + 32.0)

def _read(self):
time.sleep(2.0) #to ensure device cycles

#   prepare receive buffer
data = [0, 0, 0, 0, 0]

#   wait, if needed, for bus to go high
#   (if it is low, some device has it)
#   this is the only timeout check implemented
ts = time.clock()
IO.setup(self._pinStr, IO.IN)
while not IO.input(self._pinStr):
if (time.clock() - ts) > self._timeout:
raise DHTError("Timeout waiting for bus available")

#   send wake-up signal; spec is minimum 18msec
IO.setup(self._pinStr, IO.OUT)
IO.output(self._pinStr, IO.LOW)

time.sleep(0.020)

IO.output(self._pinStr, IO.HIGH)
IO.setup(self._pinStr, IO.IN)

#   wait for start of response
ts = time.clock()

[beagleboard] Re: Real time clock options for use with Beaglebone?

2020-08-19 Thread Carl James
I see this is an old thread but as its still a recurrent question for 
BeagleBone users I thought I'd chip in...

The *SanCloud BeagleBone Enhanced WiFi 1G + RTC i*s a pin-to-pin compatible 
enhancement of the BeagleBone Black. It comes with *an integrated RTC board 
including a CR2032 battery and/or supercap *(user modification) option. The 
SBC can be purchased with an onboard antenna or support an external 
antenna. A product summary page is here: 
https://www.sancloud.com/beaglebone-enhanced-bbe and each of the different 
board variants can be seen /purchased from the online store at 
https://www.sancloud.com/store   

On Tuesday, June 4, 2013 at 5:20:33 AM UTC+1 Juanjo wrote:

> It seems to be Turkish. Google Translate may help you ;)
>
> On topic, I've using DS1339-33 with it's respective XTAL and Lithium Cell 
> battery; works a charm an Linux as the drivers in it. Don't need much of 
> resolution since I do sync with NTP once in a while so by now I'm using a 
> 20ppm XTAL.
>
> Just follow the App Note and connect it to i2c2 
>
> On Saturday, June 1, 2013 2:41:26 AM UTC-4, ehi...@gmail.com wrote:
>>
>> Unfortunately, the link is to a website written in Klignon...
>
>
>>
>> On Tuesday, January 29, 2013 5:48:45 AM UTC-8, Gökhan Tarim wrote:
>>>
>>> I think you could see this web site : 
>>> http://www.mcu-turkey.com/beaglebone-ile-ds1307-kontrolui2c-uygulamasi/
>>>
>>> 22 Ocak 2013 Salı 22:33:58 UTC+2 tarihinde Andrew Frazer yazdı:

 I need to be able to keep track of the 'real' time between system 
 restarts.  My system needs to be stand-alone,  and has no visbility of any 
 NTP servers, so it seems to me that a RTC is really the only option for 
 me. 
 Its a pity that there is no battery backed up clock on teh beaglebone, but 
 thats life.  You can't have everything.  

 An option i am considering is adding a simple DS1307 on the I2C bus.. 
 Very similar to what was suggested at

 http://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi/set-rtc-time

 Does anyone have any other suggestions..



-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/a8ad2a00-12e5-430d-a7bc-0d85c1387c0cn%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-19 Thread Robert Nelson
On Wed, Aug 19, 2020 at 9:25 AM Pavel Yermolenko  wrote:
>
> But I just bought it. Could TX and RX alternation damage the USB adapter?
> After all, if it was completely interrupted, the communication will not work 
> at all.
> Probably "partly" broken. But how to check it ?

IDK, i have that same adafruit adapter, it's came up as CP210x device right?

https://www.adafruit.com/product/954

Make sure you have 3 wires hooked up, GND, TX, and RX..

What kernel (uname -r) is running on your beagle? I can test that locally..

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYgF8Pi4eLdTZWYV2pBbspXcLfKwL_N0%2BW%2BOaQpbwZ2Erg%40mail.gmail.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-19 Thread Pavel Yermolenko
But I just bought it. Could TX and RX alternation damage the USB adapter?
After all, if it was completely interrupted, the communication will not 
work at all.
Probably "partly" broken. But how to check it ?

On Wednesday, August 19, 2020 at 4:13:05 PM UTC+2, RobertCNelson wrote:
>
> On Wed, Aug 19, 2020 at 9:06 AM Pavel Yermolenko  > wrote: 
> > 
> > Resolved. 
> > But there is another problem: difficult to login. You must press the key 
> several times before the symbol appears. It is therefore difficult to check 
> whether the password has been entered correctly. 
>
> That's not normal.. Broken usb adapter? 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/bcdd4412-1ea2-4623-ab1a-adbb6c3a0630o%40googlegroups.com.


Re: [beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-19 Thread Robert Nelson
On Wed, Aug 19, 2020 at 9:06 AM Pavel Yermolenko  wrote:
>
> Resolved.
> But there is another problem: difficult to login. You must press the key 
> several times before the symbol appears. It is therefore difficult to check 
> whether the password has been entered correctly.

That's not normal.. Broken usb adapter?

Regards,

-- 
Robert Nelson
https://rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYjYRPXFrV0hE_DGTtBUbScC-Az2F5TUegHmDwj%2BfvKR1w%40mail.gmail.com.


[beagleboard] Re: Cannot see U-Boot# prompt in terminal

2020-08-19 Thread Pavel Yermolenko
Resolved.
But there is another problem: difficult to login. You must press the key 
several times before the symbol appears. It is therefore difficult to check 
whether the password has been entered correctly.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/d5da65b1-357a-4828-b477-1762a11b33fbo%40googlegroups.com.


[beagleboard] reliability and support

2020-08-19 Thread bhagi407
Hi ,

This bhagysri, Senior Hardware Engineer. I want to use Beagle pocket in one 
of my projects. I want to know about reliability and support i.e,how many 
years of Production guarantee can we expect ?

Regards
Bhagyasri

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/92601733-903d-43db-a512-0776a4eb1a9bo%40googlegroups.com.


Re: [beagleboard] USB3 on BBAI

2020-08-19 Thread 'Roger Quadros' via BeagleBoard

  
  
David,

On 18/08/2020 21:35, David Nolan wrote:


  
  Hi Roger,


Thanks for your email. Apologies for the delay getting back
  to you. Yes, I'm connecting the camera to the Type-C port. The
  camera has a Micro B connector so what I have right now is a
  cable with a USB Type-C on one end and a Micro-B connector on
  the other side. Unfortunately my laptop doesn't have a USB
  Type-C connector so I can't check it on my own laptop. The
  camera supports USB 3 according to the manufacturer. 

  


This is not the right way of connecting a device to the Type-C port.
You will need a Type-C to Type-A adapter to connect non type-C
peripherals.
The Adapter is important because it will tell the Type-C logic on
the board to switch to DFP (Downstream facing port mode) and so turn
on VBUS.

You should not need to run the script. AFAIK the port is in
dual-role mode "otg" and should automatically switch to host on
connecting the right adapter.
In case you have a type-c thumb drive you should be able to test
this out.

  


My Apologies, I was incorrect on P5, it's connected to P9,
  the cape connector on the same side of the board as the Type-C
  connector. 


Your point that the camera should be able to take power
  from USB Type-C connector perhaps could be pointing to an
  issue. I'm not able to get any power out of that port. Is
  there some setting I have to make, or a jumper or something to
  get that to work? Mine seems to only take power in on the
  Type-C connector.
  


Right. That's why you need to use the type-C to type-A adapter.
e.g.
https://www.amazon.com/Anker-Adapter-Converts-Technology-Compatible/dp/B01COOQIKU?ref_=fsclp_pl_dp_5

cheers,
-roger

  


Thanks,
David
  
  
  
On Fri, Aug 14, 2020 at 12:56
  AM Roger Quadros  wrote:

Hi
  David,
  
  On 13/08/2020 19:21, Dave wrote:
  > Hi there,
  > 
  > I'm trying to connect a USB3 camera I have to the BBAI
  (uname -r gives 4.14.108-ti-r131).
  
  How are you connecting the camera to the Type-C port? Does the
  camera support Type-C?
  If not what type-C to Type-A adaptor are you using? Does it
  support USB3.0? Did you verify it with your laptop's type-C
  port for example?
  
  > 
  > I've run "sudo /opt/scripts/boot/bbai_usb_host.sh" to
  change the USB port from a client into a host. I'm powering my
  camera from the 5V on the beaglebone on P5, pin 8. However the
  camera is not getting detected when connected. I know the
  camera works as if I connect it to the USB2 port it all works
  perfectly.
  
  What is P5?
  
  Camera should be able to take power from the USB port. Why the
  custom power connection?
  
  > 
  > lsusb gives:
  > 
  > Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0
  root hub
  > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0
  root hub
  > Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0
  root hub
  > Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0
  root hub
  > 
  > The relevant messages from dmesg I get are as follows:
  > 
  > [  578.405741] xhci-hcd xhci-hcd.2.auto: remove, state 4
  > [  578.405797] usb usb4: USB disconnect, device number 1
  > [  578.410192] xhci-hcd xhci-hcd.2.auto: USB bus 4
  deregistered
  > [  578.410264] xhci-hcd xhci-hcd.2.auto: remove, state 4
  > [  578.410312] usb usb3: USB disconnect, device number 1
  > [  578.414352] xhci-hcd xhci-hcd.2.auto: USB bus 3
  deregistered
  > [  578.422839] dwc3 4889.usb: changing max_speed on
  rev 5533202a
  > [  579.151738] using random self ethernet address
  > [  579.151765] using random host ethernet address
  > [  579.283590] Mass Storage Function, version: 2009/09/11
  > [  579.283620] LUN: removable file: (no medium)
  > [  579.347612] using random self ethernet address
  > [  579.347640] using random host ethernet address
  > [  579.374212] usb0: HOST MAC 28:ec:9a:eb:df:84
  > [  579.374471] usb0: MAC 28:ec:9a:eb:df:85
  > [  579.388618] usb1: HOST MAC 28:ec:9a:eb:df:86
  > [  579.389016] usb1: MAC 28:ec:9a:eb:df:87
  > [  579.516850] IPv6: ADDRCONF(NETDEV_UP): usb0: link is
  not ready
  > [  579.589767] 

[beagleboard] Re: libpruio (fast and easy D/A - I/O)

2020-08-19 Thread TJF
Am Dienstag, 18. August 2020 23:32:17 UTC+2 schrieb andrew...@gmail.com:
>
> I'm unable to use the config-pin:
> Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_24_pinmux/state
>

config-pin is based on the cape universal device tree blobs. They consime a 
lot of memory and slow down then boot process. You disabled them in uEnv.txt
.


> I know there is a way to configure gpios with the libpruio c library, but 
> I cannot find anything in the documentation about the uarts.
>

You can configure GPIOs, but also *any* other pin configuration. Set the 
required pins to their UART mode by libpruio and make sure that the 
matching driver is loaded (lsmod ...). Or configure the UART pins in a 
custom device tree blob (
http://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/ChaPins.html#sSecCustom
).

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/5ccdaece-aecb-4c0a-995a-9db9aec84b60o%40googlegroups.com.