Re: [beagleboard] Network IP address assignments

2018-12-05 Thread Richard
Many many thanks.
~Richard

On Wednesday, December 5, 2018 at 3:51:04 PM UTC-5, RobertCNelson wrote:
>
> On Wed, Dec 5, 2018 at 2:38 PM Richard > 
> wrote: 
> > 
> > Hi! I'm having difficulty understanding and modifying the BBBW network 
> configuration. 
> > 
> > At boot on the BBBW, somehow, these IP addresses are assigned 
> >   SoftAP0: 192.168.8.1 
>
> /etc/default/bb-wl18xx (changeable) 
>
> >   lo: 127.0.0.1 
> >   usb0: 192.168.7.2 
>
> /etc/network/interfaces, mostly hard-coded now.. 
>
> >   usb1: 192.168.6.2 
>
> hard-coded... /opt/scripts/boot/am335x_evm.sh 
>
> >   wlan0: 192.168.1.xxx 
> > 
> > But I can't figure out where each of these addresses comes from, nor -- 
> more interestingly -- how to change them. If there is a single place where 
> this happens, I've not found it. And if there is any documentation, I've 
> not found it, either. [There's lots of documentation about debian network 
> configuration on the Internet. Pick your favorite, but it may or may not 
> apply to the BBBW. In fact, it probably doesn't.] 
> > 
> > I do know how to use connmanctl (to set wlan0), but it explicitly 
> ignores SoftAP0,  usb0, and  usb1 because of the line 
> >   NetworkInterfaceBlacklist=SoftAp0,usb0,usb1 
> > in /etc/connman/main.conf 
> > 
> > So my questions are: 
> > (a)  How and where is each of these assigned? 
> > (b)  If I want to change one of them permanently, what do I do? 
> > and while asking these questions, here's a related one: 
> > (c)  How can I change the name and password for the BeagleBone- 
> access point that goes with SoftAP0? 
>
> /etc/default/bb-wl18xx 
>
> 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/9d3fd48e-59f7-475d-a8fd-528b1b272502%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Network IP address assignments

2018-12-05 Thread Robert Nelson
On Wed, Dec 5, 2018 at 2:38 PM Richard  wrote:
>
> Hi! I'm having difficulty understanding and modifying the BBBW network 
> configuration.
>
> At boot on the BBBW, somehow, these IP addresses are assigned
>   SoftAP0: 192.168.8.1

/etc/default/bb-wl18xx (changeable)

>   lo: 127.0.0.1
>   usb0: 192.168.7.2

/etc/network/interfaces, mostly hard-coded now..

>   usb1: 192.168.6.2

hard-coded... /opt/scripts/boot/am335x_evm.sh

>   wlan0: 192.168.1.xxx
>
> But I can't figure out where each of these addresses comes from, nor -- more 
> interestingly -- how to change them. If there is a single place where this 
> happens, I've not found it. And if there is any documentation, I've not found 
> it, either. [There's lots of documentation about debian network configuration 
> on the Internet. Pick your favorite, but it may or may not apply to the BBBW. 
> In fact, it probably doesn't.]
>
> I do know how to use connmanctl (to set wlan0), but it explicitly ignores 
> SoftAP0,  usb0, and  usb1 because of the line
>   NetworkInterfaceBlacklist=SoftAp0,usb0,usb1
> in /etc/connman/main.conf
>
> So my questions are:
> (a)  How and where is each of these assigned?
> (b)  If I want to change one of them permanently, what do I do?
> and while asking these questions, here's a related one:
> (c)  How can I change the name and password for the BeagleBone- access 
> point that goes with SoftAP0?

/etc/default/bb-wl18xx

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/CAOCHtYiDfhsu_J9_hsP98L3n%3DQ8cT-9eSuqgFLH8pYVgsx2kyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Network IP address assignments

2018-12-05 Thread Mike Brandon
Sorry, copied and pasted from my application code that is driving the
network configuration...the {0} in NetworkInterfaceBlackist is eth0

Mike

On Wed, Dec 5, 2018 at 3:45 PM Mike Brandon  wrote:

> In my limited experience, I ran into a lot of issues trying to modify the
> network settings as you are running into. I *believe* that the network
> settings are being controlled by conman. So I added to /
> etc/connman/main.conf the following:
>
> NetworkInterfaceBlacklist=SoftAp0,usb0,usb1,{0},can0,can1
>
> Then I was able to control network settings as expected in 
> /etc/network/interfacesalthough I did end up installing dhcpcd and am now 
> utilizing that to control my network although I don't think I have worked out 
> all of the kinks. BTW I am running Debian 8.7 IoT image.
>
>
> Mike
>
>
>
>
> On Wed, Dec 5, 2018 at 3:38 PM Richard  wrote:
>
>> Hi! I'm having difficulty understanding and modifying the BBBW network
>> configuration.
>>
>> At boot on the BBBW, somehow, these IP addresses are assigned
>>   SoftAP0: 192.168.8.1
>>   lo: 127.0.0.1
>>   usb0: 192.168.7.2
>>   usb1: 192.168.6.2
>>   wlan0: 192.168.1.xxx
>>
>> But I can't figure out where each of these addresses comes from, nor --
>> more interestingly -- how to change them. If there is a single place where
>> this happens, I've not found it. And if there is any documentation, I've
>> not found it, either. [There's lots of documentation about debian network
>> configuration on the Internet. Pick your favorite, but it may or may not
>> apply to the BBBW. In fact, it probably doesn't.]
>>
>> I do know how to use connmanctl (to set wlan0), but it explicitly ignores
>> SoftAP0,  usb0, and  usb1 because of the line
>>   NetworkInterfaceBlacklist=SoftAp0,usb0,usb1
>> in /etc/connman/main.conf
>>
>> So my questions are:
>> (a)  How and where is each of these assigned?
>> (b)  If I want to change one of them permanently, what do I do?
>> and while asking these questions, here's a related one:
>> (c)  How can I change the name and password for the BeagleBone-
>> access point that goes with SoftAP0?
>>
>> These questions arose from my concern about having two BBBWs on the same
>> computer or even just the same LAN: how do I make sure that they don't use
>> the same IP address?
>>
>> Version info:
>> Debian 9.6 stretch
>> Linux beaglebone 4.14.67-ti-r73 #1 SMP PREEMPT Thu Aug 30 00:08:52
>> UTC 2018 armv7l GNU/Linux
>> BeagleBoard.org Debian Image 2018-08-30
>>
>> Many thanks,
>> Richard
>>
>> --
>> 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/7a46cb3b-e237-4022-af10-69ea85b4c7dc%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/CAEDwv9wvFUa_ku3%2BtY_%2BMOhjiCxZ5QLAF%3DX0oxLhQRt6EtRrag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: Debian 9: autorun on boot with systemd does not work

2018-12-05 Thread Jim F
Harke,

You should try running your script from the cli using the exact same
command you use for the exec start line in your service file. It should
give you the same errors you are seeing. That would be good. If not, the
problem is that your environment doesn't match. It will probably end up
being your PYTHONPATH. In that case you may want to write a short bash
script which sets the path and runs your python script, and using that for
your exec start command.

Fundamentally your python doesn't know where the libraries you want are
installed. PYTHONPATH is the environment variable which tends python where
to look. Copy the one from your environment and export it in your bash
script.

Jim

On Wed, Dec 5, 2018, 2:50 PM Harke Smits  wrote:

> login as: debian
> debian@Beaglebone's password:
>
> The programs included with the Debian GNU/Linux system are free software;
> the exact distribution terms for each program are described in the
> individual files in /usr/share/doc/*/copyright.
>
> Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
> permitted by applicable law.
> Last login: Wed Dec  5 18:01:26 2018 from
> 2001:982:c7c1:1:a96e:5bfc:cb2a:81a7
> debian@beaglebone:~$ sudo systemctl status aceme
> [sudo] password for debian:
> ● aceme.service - to invoke aceme.py automatically
>Loaded: loaded (/etc/systemd/system/aceme.service; enabled; vendor
> preset: enabled)
>Active: failed (Result: exit-code) since Wed 2018-12-05 19:39:44 UTC;
> 3min 50s ago
>   Process: 986 ExecStart=/home/debian/eme/acemev35.py (code=exited,
> status=1/FAILURE)
>  Main PID: 986 (code=exited, status=1/FAILURE)
>
> Dec 05 19:39:40 beaglebone systemd[1]: Started to invoke aceme.py
> automatically.
> Dec 05 19:39:44 beaglebone python[986]: Adafruit_BBIO: version 
> initialized
> Dec 05 19:39:44 beaglebone acemev35.py[986]: Traceback (most recent call
> last):
> Dec 05 19:39:44 beaglebone acemev35.py[986]:   File
> "/home/debian/eme/acemev35.py", line 21, in 
> Dec 05 19:39:44 beaglebone acemev35.py[986]: import serial
># serial control module
> Dec 05 19:39:44 beaglebone acemev35.py[986]: ImportError: No module named
> serial
> Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Main process exited,
> code=exited, status=1/FAILURE
> Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Unit entered failed
> state.
> Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Failed with result
> 'exit-code'.
> debian@beaglebone:~$
>
>
> here is the status of aceme.service immediately after booting. It is clear
> that serial is loaded on my system, as I use it extensively in the same
> program script loaded.
> login as: debian
> debian@Beaglebone's password:
>
> The programs included with the Debian GNU/Linux system are free software;
> the exact distribution terms for each program are described in the
> individual files in /usr/share/doc/*/copyright.
>
> Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
> permitted by applicable law.
> Last login: Wed Dec  5 18:01:26 2018 from
> 2001:982:c7c1:1:a96e:5bfc:cb2a:81a7
> debian@beaglebone:~$ sudo systemctl status aceme
> [sudo] password for debian:
> ● aceme.service - to invoke aceme.py automatically
>Loaded: loaded (/etc/systemd/system/aceme.service; enabled; vendor
> preset: enabled)
>Active: failed (Result: exit-code) since Wed 2018-12-05 19:39:44 UTC;
> 3min 50s ago
>   Process: 986 ExecStart=/home/debian/eme/acemev35.py (code=exited,
> status=1/FAILURE)
>  Main PID: 986 (code=exited, status=1/FAILURE)
>
> Dec 05 19:39:40 beaglebone systemd[1]: Started to invoke aceme.py
> automatically.
> Dec 05 19:39:44 beaglebone python[986]: Adafruit_BBIO: version 
> initialized
> Dec 05 19:39:44 beaglebone acemev35.py[986]: Traceback (most recent call
> last):
> Dec 05 19:39:44 beaglebone acemev35.py[986]:   File
> "/home/debian/eme/acemev35.py", line 21, in 
> Dec 05 19:39:44 beaglebone acemev35.py[986]: import serial
># serial control module
> Dec 05 19:39:44 beaglebone acemev35.py[986]: ImportError: No module named
> serial
> Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Main process exited,
> code=exited, status=1/FAILURE
> Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Unit entered failed
> state.
> Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Failed with result
> 'exit-code'.
> debian@beaglebone:~$ sudo nano /etc/systemd/system/aceme.service
>   GNU nano 2.7.4File:
> /etc/systemd/system/aceme.service
>
> [Unit]
> Description=to invoke aceme.py automatically
> Requires=graphical.target
>
> [Service]
> Type=simple
> ExecStart=/home/debian/eme/acemev35.py
>
> [Install]
> WantedBy=multi-user.target
>
> [ Read 11 lines ]
> The service file above..
>
>
> Grtz,
> Harke
>
> On Wed, 5 Dec 2018 at 05:16, Jim F  wrote:
>
>> I actually think what you need to do is something along the following
>> line. I don't think the shebang line 

Re: [beagleboard] Network IP address assignments

2018-12-05 Thread Mike Brandon
In my limited experience, I ran into a lot of issues trying to modify the
network settings as you are running into. I *believe* that the network
settings are being controlled by conman. So I added to /
etc/connman/main.conf the following:

NetworkInterfaceBlacklist=SoftAp0,usb0,usb1,{0},can0,can1

Then I was able to control network settings as expected in
/etc/network/interfacesalthough I did end up installing dhcpcd and
am now utilizing that to control my network although I don't think I
have worked out all of the kinks. BTW I am running Debian 8.7 IoT
image.


Mike




On Wed, Dec 5, 2018 at 3:38 PM Richard  wrote:

> Hi! I'm having difficulty understanding and modifying the BBBW network
> configuration.
>
> At boot on the BBBW, somehow, these IP addresses are assigned
>   SoftAP0: 192.168.8.1
>   lo: 127.0.0.1
>   usb0: 192.168.7.2
>   usb1: 192.168.6.2
>   wlan0: 192.168.1.xxx
>
> But I can't figure out where each of these addresses comes from, nor --
> more interestingly -- how to change them. If there is a single place where
> this happens, I've not found it. And if there is any documentation, I've
> not found it, either. [There's lots of documentation about debian network
> configuration on the Internet. Pick your favorite, but it may or may not
> apply to the BBBW. In fact, it probably doesn't.]
>
> I do know how to use connmanctl (to set wlan0), but it explicitly ignores
> SoftAP0,  usb0, and  usb1 because of the line
>   NetworkInterfaceBlacklist=SoftAp0,usb0,usb1
> in /etc/connman/main.conf
>
> So my questions are:
> (a)  How and where is each of these assigned?
> (b)  If I want to change one of them permanently, what do I do?
> and while asking these questions, here's a related one:
> (c)  How can I change the name and password for the BeagleBone- access
> point that goes with SoftAP0?
>
> These questions arose from my concern about having two BBBWs on the same
> computer or even just the same LAN: how do I make sure that they don't use
> the same IP address?
>
> Version info:
> Debian 9.6 stretch
> Linux beaglebone 4.14.67-ti-r73 #1 SMP PREEMPT Thu Aug 30 00:08:52 UTC
> 2018 armv7l GNU/Linux
> BeagleBoard.org Debian Image 2018-08-30
>
> Many thanks,
> Richard
>
> --
> 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/7a46cb3b-e237-4022-af10-69ea85b4c7dc%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEDwv9xUdzSRJBxcNiy6U4KMtHs5Caa%2BR_1J-Xa9wn8Qfiv9ZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Network IP address assignments

2018-12-05 Thread Richard
Hi! I'm having difficulty understanding and modifying the BBBW network 
configuration.

At boot on the BBBW, somehow, these IP addresses are assigned
  SoftAP0: 192.168.8.1
  lo: 127.0.0.1
  usb0: 192.168.7.2
  usb1: 192.168.6.2
  wlan0: 192.168.1.xxx

But I can't figure out where each of these addresses comes from, nor -- 
more interestingly -- how to change them. If there is a single place where 
this happens, I've not found it. And if there is any documentation, I've 
not found it, either. [There's lots of documentation about debian network 
configuration on the Internet. Pick your favorite, but it may or may not 
apply to the BBBW. In fact, it probably doesn't.]

I do know how to use connmanctl (to set wlan0), but it explicitly ignores 
SoftAP0,  usb0, and  usb1 because of the line
  NetworkInterfaceBlacklist=SoftAp0,usb0,usb1
in /etc/connman/main.conf

So my questions are:
(a)  How and where is each of these assigned?
(b)  If I want to change one of them permanently, what do I do?
and while asking these questions, here's a related one:
(c)  How can I change the name and password for the BeagleBone- access 
point that goes with SoftAP0?

These questions arose from my concern about having two BBBWs on the same 
computer or even just the same LAN: how do I make sure that they don't use 
the same IP address?

Version info:
Debian 9.6 stretch
Linux beaglebone 4.14.67-ti-r73 #1 SMP PREEMPT Thu Aug 30 00:08:52 UTC 
2018 armv7l GNU/Linux
BeagleBoard.org Debian Image 2018-08-30

Many thanks,
Richard

-- 
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/7a46cb3b-e237-4022-af10-69ea85b4c7dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: Debian 9: autorun on boot with systemd does not work

2018-12-05 Thread Harke Smits
login as: debian
debian@Beaglebone's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Dec  5 18:01:26 2018 from
2001:982:c7c1:1:a96e:5bfc:cb2a:81a7
debian@beaglebone:~$ sudo systemctl status aceme
[sudo] password for debian:
● aceme.service - to invoke aceme.py automatically
   Loaded: loaded (/etc/systemd/system/aceme.service; enabled; vendor
preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-12-05 19:39:44 UTC;
3min 50s ago
  Process: 986 ExecStart=/home/debian/eme/acemev35.py (code=exited,
status=1/FAILURE)
 Main PID: 986 (code=exited, status=1/FAILURE)

Dec 05 19:39:40 beaglebone systemd[1]: Started to invoke aceme.py
automatically.
Dec 05 19:39:44 beaglebone python[986]: Adafruit_BBIO: version 
initialized
Dec 05 19:39:44 beaglebone acemev35.py[986]: Traceback (most recent call
last):
Dec 05 19:39:44 beaglebone acemev35.py[986]:   File
"/home/debian/eme/acemev35.py", line 21, in 
Dec 05 19:39:44 beaglebone acemev35.py[986]: import serial
 # serial control module
Dec 05 19:39:44 beaglebone acemev35.py[986]: ImportError: No module named
serial
Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Main process exited,
code=exited, status=1/FAILURE
Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Unit entered failed
state.
Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Failed with result
'exit-code'.
debian@beaglebone:~$


here is the status of aceme.service immediately after booting. It is clear
that serial is loaded on my system, as I use it extensively in the same
program script loaded.
login as: debian
debian@Beaglebone's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Dec  5 18:01:26 2018 from
2001:982:c7c1:1:a96e:5bfc:cb2a:81a7
debian@beaglebone:~$ sudo systemctl status aceme
[sudo] password for debian:
● aceme.service - to invoke aceme.py automatically
   Loaded: loaded (/etc/systemd/system/aceme.service; enabled; vendor
preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-12-05 19:39:44 UTC;
3min 50s ago
  Process: 986 ExecStart=/home/debian/eme/acemev35.py (code=exited,
status=1/FAILURE)
 Main PID: 986 (code=exited, status=1/FAILURE)

Dec 05 19:39:40 beaglebone systemd[1]: Started to invoke aceme.py
automatically.
Dec 05 19:39:44 beaglebone python[986]: Adafruit_BBIO: version 
initialized
Dec 05 19:39:44 beaglebone acemev35.py[986]: Traceback (most recent call
last):
Dec 05 19:39:44 beaglebone acemev35.py[986]:   File
"/home/debian/eme/acemev35.py", line 21, in 
Dec 05 19:39:44 beaglebone acemev35.py[986]: import serial
 # serial control module
Dec 05 19:39:44 beaglebone acemev35.py[986]: ImportError: No module named
serial
Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Main process exited,
code=exited, status=1/FAILURE
Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Unit entered failed
state.
Dec 05 19:39:44 beaglebone systemd[1]: aceme.service: Failed with result
'exit-code'.
debian@beaglebone:~$ sudo nano /etc/systemd/system/aceme.service
  GNU nano 2.7.4File:
/etc/systemd/system/aceme.service

[Unit]
Description=to invoke aceme.py automatically
Requires=graphical.target

[Service]
Type=simple
ExecStart=/home/debian/eme/acemev35.py

[Install]
WantedBy=multi-user.target

[ Read 11 lines ]
The service file above..


Grtz,
Harke

On Wed, 5 Dec 2018 at 05:16, Jim F  wrote:

> I actually think what you need to do is something along the following
> line. I don't think the shebang line makes a difference (rather, I know
> this) if you pass the python script directly to the python binary.
>
> ExecStart=/usr/bin/python2.7 /path/to/my_file.py
>
> You should post your errors if Seth's or my comments don't get you on
> track.
>
> Jim
>
> On Wed, Dec 5, 2018 at 12:23 AM Mala Dies  wrote:
>
>> Okay and Hello Once More,
>>
>> Seth here. I think (know) Jim F was on to something w/ your software and
>> setting up .service files for running on boot.
>>
>> For example: Here is another test example to try out to learn more about
>> .service files and starting files on boot on the BBB (or other related
>> bbb.io boards).
>>
>> ...
>>
>> #!/usr/bin/python
>>
>> import Adafruit_BBIO.GPIO as GPIO
>> import time
>>
>> #your awesome software
>>
>> ...
>>
>> Now...that example, like w/ what Jim F was typing out, is an example not
>> for your use. You will need to replace all the software w/ your software
>> but do use the first line.
>>
>> 

Re: [beagleboard] Re: Debian 9: autorun on boot with systemd does not work

2018-12-05 Thread Harke Smits
Hello Jim and Seth,

Thank you for your support. The service test scripts all run fine. My own
scripts persist in the error given above. My own service loads but aborts
at import serial, which, I guess, has not so much to do with serial, as
with something else. I will try and upload the relevant data and errors.
Keep you posted.
Thanks again (it getting very annoying though), cheers,
Harke


On Wed, 5 Dec 2018 at 05:16, Jim F  wrote:

> I actually think what you need to do is something along the following
> line. I don't think the shebang line makes a difference (rather, I know
> this) if you pass the python script directly to the python binary.
>
> ExecStart=/usr/bin/python2.7 /path/to/my_file.py
>
> You should post your errors if Seth's or my comments don't get you on
> track.
>
> Jim
>
> On Wed, Dec 5, 2018 at 12:23 AM Mala Dies  wrote:
>
>> Okay and Hello Once More,
>>
>> Seth here. I think (know) Jim F was on to something w/ your software and
>> setting up .service files for running on boot.
>>
>> For example: Here is another test example to try out to learn more about
>> .service files and starting files on boot on the BBB (or other related
>> bbb.io boards).
>>
>> ...
>>
>> #!/usr/bin/python
>>
>> import Adafruit_BBIO.GPIO as GPIO
>> import time
>>
>> #your awesome software
>>
>> ...
>>
>> Now...that example, like w/ what Jim F was typing out, is an example not
>> for your use. You will need to replace all the software w/ your software
>> but do use the first line.
>>
>> Oh...here is an example of that file above in Python in a .service file
>> w/ the name Pluck.py as the file name. Oh and let us call the .service file
>> Pluck.service.
>>
>> [Unit]
>> Description=Some Amount of Understanding for Your File
>>
>> [Service]
>> ExecStart=/home/debian/Pluck.py
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>> Now...try to run your .service file that should be saved in
>> /etc/systemd/system/ as Pluck.service.
>>
>> ...
>>
>> Then, type this command: sudo systemctl enable Pluck.service
>>
>> Then, type this command: sudo systemctl start Pluck.service
>>
>> That should do it!
>>
>> If not, please reply w/ any relative ideas that are preventing your use
>> of a file on boot, e.g. errors and why the started .service file is not
>> working on boot.
>>
>> Seth
>>
>>
>>
>> On Tuesday, December 4, 2018 at 3:24:25 AM UTC-6, Harke Smits wrote:
>>>
>>> Looks like we are close. But the error codes are persistent. I can not
>>> copy/paste but serial does not load. Whatever I place in the first line of
>>> the python file.
>>> I tried: #!/bin/env/python and other shebangs (I learn!) but the error
>>> remains exactly the same. Btw: I use python2.x
>>> Any clue what to try next please?
>>> Cheers,
>>> Harke
>>>
>>>
>>> On Mon, 3 Dec 2018 at 23:18, Mala Dies  wrote:
>>>
 Harke,

 Did you, in the software example you created, add #!/usr/bin/python3 to
 the top of your program and then use this command: sudo chmod a+x
 YourFile.py? Now, you should be able to run your .service file like before
 from the example I had given.

 Seth

 On Monday, December 3, 2018 at 6:28:19 AM UTC-6, Harke Smits wrote:
>
> Thank you for your support Seth! I do not think I am running anything
> special. Just one Python script, 400 lines of my code, many thousends in
> libs, I guess. From QTerminal command line it runs perfectly. From within 
> a
> service not.
> Looking at your proposal: do you really intend to write: ExecStart=
> /path/myprog.py instead of: ExecStart=python /path/myprog.py
> That wonders me.
>  I "sudo nano" the service file and then write it in the
> /etc/systemd/system/ folder. Nothing else I do.
> Is that sufficient?
> Thanks a lot again.
> Regards,
> Harke
>
>
>
>
> On Mon, 3 Dec 2018 at 05:17, Mala Dies  wrote:
>
>> Hello Harke,
>>
>> Seth here. Um, are you trying to run a specific piece of software
>> only or are you trying to run multiple pieces of software?
>>
>> Seth
>>
>> P.S. I know you have to make a file accessible at
>> /etc/systemd/system/ w/ the proper instructions 
>> in
>> that .service file. Now, to make it run should be easy, i.e. if this is
>> just one piece of software.
>>
>> [Unit]
>> Description=More of what will happen!
>>
>> [Service]
>> ExecStart= /your/path/to/the/.py/file.py
>>
>> [Install]
>> WantedBy=multi-user.target
>>
>> ^
>> |
>> |
>>
>> Try this!
>>
>>
>>
>> On Saturday, December 1, 2018 at 5:48:51 AM UTC-6, Harke Smits wrote:
>>>
>>> Hi Seth,
>>>
>>> In the meantime I think I tried just about any combination I can
>>> think of.
>>> Mostly I get the following error codes after demanding the status;
>>> Loaded
>>> Active: failed
>>> Process: 1002 ... code = exited, status=203/EXEC
>>> Main PID: 

[beagleboard] Facing problems booting via NFS

2018-12-05 Thread Juho R

*Hi,*


*I know there is many topics about NFS and TFTP. But I still could not find 
why my board is not booting via NFS.. Have been trying couple of days many 
many different ways now and I have no clue where it goes wrong and its 
getting frustrating now.*


*I believe there might be something wrong with my uEnv.txt...*


*I think TFTP boot works fine and loads zImage and .dtb. Could anybody 
point me in right direction? Any help or tip for better information source 
is appreciated.*

*I have used this tutorial to set up TFTP and NFS servers: 
http://linuxkernel51.blogspot.com/2015/08/boot-beaglebone-black-with-nfs.html 
*

*uEnv.txt and kernel log attached.*

U-Boot 2018.01-geac41e26ac (Nov 30 2018 - 12:20:11 +)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - bad CRC, using default environment

 not set. Validating first E-fuse MAC
Net:   cpsw, usb_ether
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unable to read file boot.scr **
374 bytes read in 5 ms (72.3 KiB/s)
Loaded env from uEnv.txt
Importing environment from mmc0 ...
Running uenvcmd ...
CUSTOM NET BOOTTINGGG ...
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.11.32; our IP address is 192.168.11.65
Filename 'zImage'.
Load address: 0x8200
Loading: #
 #
 #
 #
 #
 #
 #
 #
 #
 #
 #
 #
 1.8 MiB/s
done
Bytes transferred = 3846656 (3ab200 hex)
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.11.32; our IP address is 192.168.11.65
Filename 'am335x-boneblack.dtb'.
Load address: 0x8800
Loading: 
 1.7 MiB/s
done
Bytes transferred = 36841 (8fe9 hex)
## Flattened Device Tree blob at 8800
   Booting using the fdt blob at 0x8800
   Loading Device Tree to 8fff4000, end 8fe8 ... OK

Starting kernel ...

[0.00] Booting Linux on physical CPU 0x0
[0.00] Linux version 4.14.79-g3438de3474 (oe-user@oe-host) (gcc 
version 8.2.0 (GCC)) #1 PREEMPT Wed Dec 5 09:53:57 UTC 2018
[0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), 
cr=10c5387d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[0.00] OF: fdt: Machine model: TI AM335x BeagleBone Black
[0.00] Memory policy: Data cache writeback
[0.00] efi: Getting EFI parameters from FDT:
[0.00] efi: UEFI not found.
[0.00] cma: Reserved 48 MiB at 0x9d00
[0.00] CPU: All CPU(s) started in SVC mode.
[0.00] AM335X ES2.1 (sgx neon)
[0.00] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[0.00] Kernel command line: console=ttyS0,115200 root=/dev/nfs rw 
nfsroot=192.168.11.32:/srv/nfs/bbb ip=192.168.11.65
[0.00] PID hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Dentry cache hash table entries: 65536 (order: 6, 262144 
bytes)
[0.00] Inode-cache hash table entries: 32768 (order: 5, 131072 
bytes)
[0.00] Memory: 456928K/524288K available (8192K kernel code, 318K 
rwdata, 2520K rodata, 1024K init, 265K bss, 18208K reserved, 49152)
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xffc0 - 0xfff0   (3072 kB)
[0.00] vmalloc : 0xe080 - 0xff80   ( 496 MB)
[0.00] lowmem  : 0xc000 - 0xe000   ( 512 MB)
[0.00] pkmap   : 0xbfe0 - 0xc000   (   2 MB)
[0.00] modules : 0xbf00 - 0xbfe0   (  14 MB)
[0.00]   .text : 0xc0008000 - 0xc090   (9184 kB)
[0.00]   .init : 0xc0c0 - 0xc0d0   (1024 kB)
[0.00]   .data : 0xc0d0 - 0xc0d4fa40   ( 319 kB)
[0.00].bss : 0xc0d4fa40 - 0xc0d921e4   ( 266 kB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[0.00] Preemptible hierarchical RCU implementation.
[0.00]  Tasks 

Re: [beagleboard] Re: 1-wire on BB Blue

2018-12-05 Thread TJF
Hi Jim!

I cannot answer your questions, but perhaps point you to a further 
solution: Some years ago I needed multiple Dallas temperature sensors input 
for a project, and tested the kernel driver. I found out that (at this 
time) the kernel driver doesn't support simultaneous measurements from 
multiple sensors, and therefor doesn't meet my needs. So I developed my own 
driver, which can be found at https://github.com/DTJF/libpruw1. This driver 
runs on a PRU and depends on libpruio (at the other PRU) for pinmuxing. You 
can choose any GPIO pin for the W1 bus.

libpruio is prepared for the BBBlue, just use the matching header file: 
https://github.com/DTJF/libpruio/blob/master/src/c_include/pruio_pins_blue.h. 
So it should be possible to get it running, but t'is untested jet, since I 
have no Blue hardware.

Regards

-- 
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/45658bb2-423c-47b1-8bf1-d24d1c90a1ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Beaglebone Black SPI with GPIO CS

2018-12-05 Thread jamesgao
Excellent, thank you! I got my GPIO CS pins to work. For reference (in case 
anyone needs the same information), here's my dts file:



/dts-v1/;
/plugin/;

/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* identification */
part-number = "BB-SPICAPE-01";
version = "00A0";

fragment@0 {
target = <>;
__overlay__ {
P9_17_pinmux { status = "disabled"; }; 
P9_18_pinmux { status = "disabled"; }; 
P9_21_pinmux { status = "disabled"; }; 
P9_22_pinmux { status = "disabled"; }; 
P8_10_pinmux { status = "disabled"; }; 
};
};

fragment@1 {
target = <_pinmux>;

__overlay__ {
#address-cells = <1>;
#size-cells = <1>;

bb_spi0_pins: pinmux_bb_spi0_pins {
pinctrl-single,pins = <
0x150 0x30 /* spi0_sclk.spi0_sclk, INPUT_PULLUP | MODE0 */
0x154 0x30 /* spi0_d0.spi0_d0, INPUT_PULLUP | MODE0 */
0x158 0x10 /* spi0_d1.spi0_d1, OUTPUT_PULLUP | MODE0 */
0x15c 0x10 /* spi0_cs0.spi0_cs0, OUTPUT_PULLUP | MODE0 */
0x098 0x17 /* P8 10 gpio2_4.spi0_cs1 OUTPUT_PULLUP | MODE7 */
>;
};
};
};

fragment@2 {
target = <>; /* spi0 is numbered correctly */

__overlay__ {
#address-cells = <1>;
#size-cells = <0>;

status = "okay";
pinctrl-names = "default";
pinctrl-0 = <_spi0_pins>;

cs-gpios = <0>, < 4 0>;

spi0@0{
#address-cells = <1>;
#size-cells = <0>;
compatible = "linux,spidev";
reg = <0>;
spi-max-frequency = <1600>;
};

spi0@1 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "linux,spidev";
reg = <1>;
spi-max-frequency = <1600>;
};
};
};

};



On Tuesday, December 4, 2018 at 2:12:17 PM UTC-8, RobertCNelson wrote:
>
> On Tue, Dec 4, 2018 at 4:03 PM > wrote: 
> > 
> > Here's the output: 
> > 
> > git:/opt/scripts/:[0726131c362e3adfcf359f3e1debf5ff156e5bec] 
> > eeprom:[A335BNLT000CyywwBBo] 
> > model:[TI_AM335x_BeagleBone_Black] 
> > dogtag:[Machinekit Debian Image 2018-09-16] 
> > bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 
> 2018.09-2-g0b54a51eee]:[location: dd MBR] 
> > kernel:[4.14.69-ti-rt-r75] 
> > uboot_overlay_options:[enable_uboot_overlays=1] 
> > 
> uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/BB-SPICAPE-01-00A0.dtbo]
>  
>
> > uboot_overlay_options:[disable_uboot_overlay_audio=1] 
> > 
> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
>  
>
> > uboot_overlay_options:[enable_uboot_cape_universal=1] 
> > pkg check: to individually upgrade run: [sudo apt install --only-upgrade 
> ] 
> > pkg:[bb-cape-overlays]:[4.4.20181120.0-0rcnee0~stretch+20181120] 
> > pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517] 
> > pkg:[kmod]:[23-2rcnee1~stretch+20171005] 
> > 
> pkg:[roboticscape]:[0.4.4-git20180608.0-0rcnee0~stretch+20180609]:[GOT_REPLACED_BY_NEXT]
>  
>
> > WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED] 
> > pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328] 
> > groups:[machinekit : machinekit adm kmem dialout cdrom floppy audio dip 
> video plugdev users systemd-journal i2c bluetooth netdev gpio pwm eqep 
> admin spi tisdk weston-launch xenomai cloud9ide] 
> > cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 
> root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M 
> net.ifnames=0 quiet] 
> > dmesg | grep pinctrl-single 
> > [1.424240] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 
> size 568 
> > [1.565570] pinctrl-single 44e10800.pinmux: pin PIN84 already 
> requested by ocp:P9_22_pinmux; cannot claim for 4803.spi 
> > [1.576764] pinctrl-single 44e10800.pinmux: pin-84 (4803.spi) 
> status -22 
> > [1.583861] pinctrl-single 44e10800.pinmux: could not request pin 84 
> (PIN84) from group pinmux_bb_spi0_pins  on device pinctrl-single 
> > dmesg | grep gpio-of-helper 
> > [1.445942] gpio-of-helper ocp:cape-universal: ready 
> > END 
>
> Ah i see what your doing now.. 
>
> Take a look at these 4 examples, your missing the "cape-universal" 
> disable pins in fragment0, but you see how to use the 3rd cs-gpio in 
> these exmples.. 
>
> P9_22_pinmux { status = "disabled"; }; /* RX3 */ 
>
>
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-mBC1-ETH-CLICK.dts
>  
>
>
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-mBC2-ETH-CLICK.dts
>  
>
>
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-mBC3-ETH-CLICK.dts
>  
>
>
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-mBC4-ETH-CLICK.dts
>  
>
> 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/974ffa56-723b-4717-ba57-927c05ecfe52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] I2C busses mixed up?

2018-12-05 Thread Harke Smits
Hello Learned group,

I have an I2C problem that I confuses me: I have activated I2C1 in 
uEnv.txt. That works. Now i2cdetect -y -r i (for i = 0,1,2) gives a quick 
response. However, i2c2 behaves like i2c1. i=1 shows nothing connected, 0 
shows some UU's and 2 shows devices I can recognise: I can see the 
addresses for the rtc and the motor cape. These are designed to work with 
i2c1, so the rtc and motor cape do not work. 
What happens here and how can I resolve that?
Many thanks in advance,
Harke

-- 
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/8ccfec38-f530-4f5d-a949-07c4a0874613%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.