<Guest9144>
I am booting BBB revision c from emmc , i am seeing two usb interfaces when i do ifconfig
<Guest9144>
but when i ping to ip of interface from my laptop , it is not pinging
<zmatt>
"i am seeing two usb interfaces when i do ifconfig" ? ... do you mean on your laptop?
<Guest9144>
no on BBB
<Guest9144>
in minicom
<zmatt>
what OS are you running on your laptop?
<Guest9144>
ubuntu 18.04
<zmatt>
jkridner: btw, bbb.io seems broken... its http: redirects to https: but its https certificate does not include bbb.io among its (many) domain names
<zmatt>
Guest9144: can you share the output of "ip addr" on your laptop? (don't paste the output directly into chat, ues a paste service like pastebin.com)
<Guest9144>
ok
<zmatt>
("ip addr" is the modern replacement of "ifconfig", which is an obsolete utility)
<Guest9144>
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
<zmatt>
Guest9144: *sigh* I explicitly said "don't paste the output directly into chat, ues a paste service like pastebin.com"
<Guest9144>
ok
<zmatt>
anyway, this is showing your laptop is not seeing either of the two usb network interfaces at all... are you using minicom via the usb interface or are you using e.g. an ftdi serial cable?
<Guest9144>
FTDI
<zmatt>
maybe try a different usb cable?
<zmatt>
since it seems it's not being detected as usb device at all
<Guest9144>
but lsusb listing that cable
<zmatt>
I don't mean a different serial cable, I mean the usb cable to the beaglebone itself
<zmatt>
or are you saying the beaglebone is showing up in lsusb?
<Guest9144>
oh i have not connected any USB cable
<zmatt>
...
<Guest9144>
i have connected USB to serial cable
<zmatt>
so why did you imagine you could ping a usb network interface on the beaglebone? :P
<Guest9144>
oh..let me find and connect and ping you the result..
<zmatt>
you normally don't need a usb-to-serial cable with the beaglebone, that's typically just a last resort means to debug issues if you can't reach the beaglebone in any other way
<zmatt>
or to debug boot issues
<Guest9144>
ok
<Guest9144>
yes , it pinging
<Guest9144>
thanks a lot
<Guest9144>
if we do not use minicom
<zmatt>
use ssh
<Guest9144>
ok. i will use ssh
<Guest9144>
thanks
<Guest9144>
a lot
<zmatt>
ssh debian@beaglebone.local or ssh debian@192.168.7.1 or whatever its IP is (I don't actually remember, I always use beaglebone.local)
<zmatt>
and in case you're wondering why there are two usb network interfaces...
<Guest9144>
i am able to ssh
<zmatt>
one uses a usb standard protocol (CDC-ECM or CDC-NCM depending on image version), the other is microsoft's proprietary RNDIS protocol because as usual microsoft didn't bother to actually properly implement usb standards
<zmatt>
so Windows needs RNDIS, Mac needs CDC-ECM/NCM, linux supports all of them
<Guest9144>
this is true for debian based system as well ?
demirok has joined #beagle
<zmatt>
the beaglebone implements both to be able to support different operating systems... but linux systems (debian, ubuntu, doesn't matter) support both RNDIS and CDC-ECM/NCM hence it will see both interfaces
<zmatt>
(it doesn't really matter which one you use)
<Guest9144>
oh ok.....
<Guest9144>
thanks for the detail explaination..
<zmatt>
(192.168.7.2 uses microsoft's proprietary RNDIS protocol, 192.168.6.2 uses the usb standard protocol)
<Guest9144>
ok , thanks..
ft has joined #beagle
<set_>
How do I get pwm to work on the BBB w/ /dev/bone/pwm/1/b/? I tried w/ echo on the command line and the LED does not light.
<set_>
I also tried w/ a python3 source I found years back. It seems the source runs but the LED does not light up.
<zmatt>
uhh it works the same as pwm outputs have always worked... /dev/bone/pwm/ just contains some symlinks for convenience
<zmatt>
is the pin configured to pwm using config-pin ?
<set_>
I tried w/ config-pin and w/out config-pin. Neither work so far.
<zmatt>
(P9.16 in case of pwm/1/b )
<set_>
So, should I use /dev/bone/pwm/1/b/ for source or should I use another file location?
<zmatt>
and ls -ld /dev/pwm/ehrpwm1b ? (I'm hoping those symlinks also still exist)
<set_>
I will check.
<set_>
No such file.
<zmatt>
ugh, annoying
<zmatt>
realpath /dev/bone/pwm/1/b
<set_>
This >>> /sys/devices/platform/ocp/48000000.interconnect/48000000.interconnect:segment@300000/48302000.target-module/48302000.epwmss/48302200.pwm/pwm/pwmchip5/pwm1
<zmatt>
okay that looks correct
<zmatt>
the python script you pastebinned doesn't do anything though... you're just defining functions, not doing anything with them. (and most of them look at least partially broken)
<set_>
Oh.
<set_>
I know.
<set_>
I have another file that handles the use of the functions.
<set_>
Let me update the script(s). I will show you both of them real quickly.
<set_>
Pastebin just had a pop up w/ an illegal infected site. I will try another way.
<zmatt>
you didn't have permission issues earlier, so if you're suddenly having them now you presumably just fucked something up :P
<set_>
Aw!
<zmatt>
or you're getting a permission issue because you got the path wrong and you're effectively trying to create a file in sysfs
<set_>
Oh.
<set_>
I will check. I noticed that to add PosixPath to Strings, the / character is used.
<set_>
in pathlib.
<set_>
Oh...yea. I see now. I am trying to create the file /period by mistake.
<set_>
and it is already there in the /dev/bone/1/b/ file.
<set_>
Sorry. /dev/bone/pwm/1/b/ file.
<set_>
is my file incorrect b/c of what you said, of course, and that I am not accounting for errors?
<zmatt>
I see you typing words, but I don't really know what they mean. did you see my link to a simple pwm library in python + example usage?
<set_>
Yes.
<set_>
I saw it.
<set_>
it does not look too simple.
<set_>
I will try it.
<zmatt>
the implementation of the library doesn't have to look too simple, as long as its works properly... what matters is whether the usage is simple :P
<set_>
You are right. Usage over "too simple." Okay...thank you. I will test it.
<set_>
I will test it now, i.e. in a bit.
<zmatt>
and the library actually is pretty simple, but the configure() method just has a bunch of cases to cover and it tries to do recent error-checking
<set_>
Oh.
<zmatt>
but ultimately all the configure() method does is write values to period, duty_cycle, and enable
<set_>
I saw the methods. I am not too familiar w/ methods as of now. I guess this is why I am calling it not too simple.
<set_>
Oh.
<zmatt>
right, what you're saying is "I don't actually know how to program so anything looks complicated to me" :P
<set_>
Blah. Okay. You are right. I do not know everything!
<set_>
You were right, blah-blah-blah, and now things are working. Thank you again!
<set_>
Now, I need to figure out how you did it.
demirok has quit [Quit: Leaving.]
demirok has joined #beagle
vagrantc has joined #beagle
Shadyman has joined #beagle
otisolsen70 has quit [Quit: Leaving]
Guest66 has joined #beagle
<Guest66>
I have a PocketBeagle with the Grove kit cape. I purchased a two relay board and I need assistance in configuring cape ports for outputs to control relays. Thx
<set_>
GPIO.
<set_>
Oops. Sorry. Wrong board.
<Guest66>
It appears that all of the cape connects are configured as inputs except busses
<set_>
You got a RelayCape?
<zmatt>
set_: pocketbeagle, not beaglebone
<zmatt>
Guest66: gpios default to input yet
<set_>
Oh. Aw! Okay.
<zmatt>
*yes
<Guest66>
It does have connector A2 connected to both AIN2/GPIO44 and AIN3/GPIO45 but there are only examples for using these pins as inputs
<zmatt>
any gpio can be freely changed between input and output
<Guest66>
Speed Grove 2 Channel SPDT Relay board
<set_>
Oh. Okay.
<zmatt>
what language/environment are you using for writing your software?
<Guest66>
I have no software guide to reconfigure the ports to be used as outputs.
<Guest66>
python
<Guest66>
Seeed Software the comes with Grove kit
<zmatt>
okay I don't really know anything about grove
<Guest66>
IoT version
<zmatt>
something that makes it easier to find gpios is this udev rules file: https://pastebin.com/MMC6u7pR if you save it as /etc/udev/rules.d/gpio-symlinks.rules and then reboot then it'll create named symlinks for gpios in /dev/gpio/ (named after the pocketbeagle header pins)
<Guest66>
Also the A5 port uses P2_35, GPIO 86/AIN5 and P1_2, GPIO 87/AIN6 connections
<set_>
It is sometimes difficult to understand GPIO in sysfs on the PocketBeagle or any am335x w/ the .dts files. I know b/c, like @zmatt says, "set_ does not know how to program."
<set_>
But...
<set_>
I learned about GPIO sort of. /sys/class/gpio/gpio87 on the am335x on the BBB is like this 0 - 3 chips, then 32 * chip + the pin number.
<set_>
Let me go and check if it is that way on the PocketBeagle.
<Guest66>
the Seeed software creates drivers that manage bits which removes the user from bit banging data and OE controls for the GPIO's and prevents hardware conflicts for neophytes. The flip side is there is insufficient documentation to program hardware directly.
<zmatt>
Guest66: with that udev rule in place, working with gpios in python is trivial even without any gpio library: https://pastebin.com/kKb5EiFn
Guest66 has quit [Ping timeout: 252 seconds]
<set_>
I never got the pocketbeagle. I am going to get pocketbeagle one day. I see the price went up!
<set_>
I finally got some good solder. I was using 0.064. No good for electronics.
<set_>
I needed 0.032.
<set_>
Now, it just works!
<set_>
No more mess.
<set_>
@zmatt: Um...
<set_>
Is it okay if I share you library you made? I started a post on the forums but rcn-ee wanted me to update the plea for support.
<zmatt>
for pwm you mean?
<set_>
I am not sure if he wanted me to...
<set_>
yes sir.
<set_>
I was not sure if I needed to share the update and if so, would I need to give you credit, i.e. license or something (name or whereabouts)?
<set_>
And wanted me to update people on my...oh. Okay.
<zmatt>
with the remark that it's barely tested and still subject to being updated
<set_>
I would rather not tell people and keep it to myself but you wrote it and have full auth. over what needs to be done w/ it.
<set_>
A-Okay.
<zmatt>
like, I just quickly wrote it today in response to your pwm issues, since I figured that writing some working code would be less work then figuring out whatever it is you're doing
<set_>
Right. I understood that fact.
<set_>
So, I will wait to return service on the forums w/ the updated lib. (in case people are wanting to learn more about pathlib, files, and Linux).
<set_>
Oh...
<set_>
and methods!
<zmatt>
also, note that this code was written for simplicity, not for performance... then again if you wanted performance you wouldn't be using python so *shrug*
<set_>
Ha.
<set_>
I understand.
<set_>
Cython3?
<set_>
People still love C/C++. Even Python3.
buzzmarshall has joined #beagle
<set_>
@zmatt: Would you like the entire lib. I found from that fellow Mr. or Dr. Yoder?
<set_>
It would probably make more sense than my snippets of degradation of his works.
<set_>
I cut out the glob.glob section of one function and then left out the tuple in a table for config-pin.