**** BEGIN LOGGING AT Thu May 07 02:59:57 2020 May 07 07:37:30 Hi, I am new with BBB, I have a question : I would like to control a analog Valve, via USB - Rs232 May 07 07:38:30 What I should to du to configure the BBB USB, that it can control this Valve May 07 07:40:19 The cable is USB in BBB side and the Rs232 in the Valve side May 07 07:42:15 Can anyone help me? May 07 07:45:31 Mari72: well if you plugged a usb2rs232 converter , you should recieve your /dev/ttyUSB0 such May 07 07:48:17 Yes May 07 07:48:56 well then now your talking to your"valve" and you can write to this dev your valve protocol May 07 07:49:49 @rob_w : should I configure the Rs232 protocol? May 07 07:50:56 Without configuration?, can I just Wright my Rs232 protocol? May 07 07:52:02 well if you baudrate etc match , yes May 07 07:52:30 of course you need to setup your rs232 so the valve reads you .. baudrate, stopbits etc May 07 07:54:29 Should I setup the Rs232 outside my protocol? May 07 07:55:10 u dowhat suits u best May 07 07:55:38 either use librarys to setup and open the rs232 or you use stty cmdline May 07 07:56:09 u can now simple google examples on how to drive a rs232 May 07 07:56:35 Perfect May 07 07:57:59 It's mean, when it pulled with the USB, I should just setup the Rs232 than just writing my protocol May 07 07:58:17 Right? May 07 07:58:55 yeah i guess May 07 07:59:20 what is it that ur unsure ? May 07 07:59:55 i got a rs232 via your adapter, if that is plugged and your "valve" aka client is running , then you might talk to it May 07 08:00:20 after plugging your adapter and recieving your /dev/* it is generic and not bbb specific anymore May 07 08:03:01 Are the not specific configuration, while I use USB for re232 May 07 08:03:27 dunno what u mean? May 07 08:03:42 I use USB not the Pins May 07 08:04:12 your bbb obviouly knows the adapter and load the driver and creates your /dev/* .. then u can start using it May 07 08:04:17 For this Punkt there isn't a specific configuration for USB? May 07 08:05:02 its a matter of the usb adapter and the bbb kernel to know about it and load it ..which seeems fine May 07 08:07:09 Ok perfect thanks, I will try now to setup the Rs232 in cmd than it should send th data to the valve May 07 09:31:49 zmatt: did you ever try aes67 AoIP on the BBB? May 07 09:35:27 zmatt: a friend of mine tried to run a Raspi 3B+ as a PTPv2 grandmaster, that didn't work out well. May 07 09:38:30 lol May 07 09:38:44 we do use PTP and have it working pretty decently (with hardware timestamping) May 07 09:38:59 yeah, that seem to be key May 07 09:39:13 the raspi 3b+ has ethernet over usb and no timestamping in hardware... May 07 09:39:20 lol May 07 09:41:06 some effort was involved though, the kernel api is weird and the driver needed some fixes May 07 09:41:29 but the hardware does support it, right? May 07 09:41:47 yes May 07 09:43:43 it can timestamp PTP packets (both layer 2 and over UDPv4) with high accuracy May 07 09:44:41 lemme see if I pushed all stuff I did in the cpts driver to our github repo May 07 09:45:45 I do see that patches 8, 9, 12, and 14-17 are all related to cpts and timestamping: https://github.com/dutchanddutch/bb-kernel/tree/am33x-v4.14/patches/local May 07 09:45:52 it's been a while May 07 09:47:23 and there's still more bugs in the cpts driver that I know I want to fix but haven't had time yet May 07 09:47:41 and I should also try to see if some fixes can be cleaned up and upstreamed May 07 09:47:46 but again, haven't really had time May 07 09:48:01 oh great, and I have uncommitted changes /o\ May 07 10:14:23 Mouser just delivered another BBB, the stacking cape connectors and a few other bits, looks like I can now complete my GPSDO cape May 07 10:14:46 and I immediately found a bug on the PCB ;) It's not good to repurpose one of the eMMC pins as a GPIO ;) May 07 10:15:02 lol May 07 10:16:19 not a real problem. nothing that cannot be fixed with an X-acto knife and a bit of thin copper wire. May 07 10:16:35 thinkfat_: maybe print out the P9 and P8 tabs of my pins spreadsheet (https://goo.gl/Jkcg0w), they neatly fit on 1 page each (e.g. both sides of one sheet) and includes helpful cautions ;) May 07 10:17:22 I did, I did! I just botched the schematics. The P8 GPIOs are shifted up one row and I didn't spot it. May 07 10:19:27 :D May 07 10:32:08 Hello, i want enable all UART in beagle bone AI, please suggest me steps. May 07 10:33:31 please any one help me May 07 11:36:23 hmmm, why isn't the driver for the ad5963r dac automatically loaded? May 07 11:52:02 either because DT has no device with the appropriate declaration, or if it's an out-of-tree module then maybe you forgot to run depmod after installing it May 07 11:52:47 (also, if initramfs is used, update that after installing a module and/or running depmod. or just don't use initramfs) May 07 11:53:22 I get zero results (apart from nonsense) for that part number btw, so I'm guessing it contains a typo? May 07 11:58:15 yes May 07 11:58:19 ad5693r May 07 11:58:29 two numbers mixed up May 07 11:59:56 if I load the module (which is in-tree) manually, the driver probes.. so I guess the devicetree is OK May 07 12:00:12 and there's a line i2c:ad5693r in modules.alias... May 07 12:00:42 oh, i2c, I remember there being a headache with that May 07 12:01:16 you have compatible = "adi,ad5593r"; ? May 07 12:01:28 ehh sorry May 07 12:01:29 wait what May 07 12:01:36 oh I'm looking at the wrong driver May 07 12:01:58 I have compatible = "ad5693r" May 07 12:02:04 ad5696-i2c.c doesn't declare any of_device_id May 07 12:03:22 that's not a proper compatible-string May 07 12:03:34 you're currently using a hacky compat/fallback mechanism May 07 12:04:46 https://i2c.wiki.kernel.org/index.php/OF_Modalias May 07 12:06:38 see ad5593r.c for an example of a similar driver which does declare an of_device_id May 07 12:07:25 it should be compatible = "adi,ad5693r"; but the driver will need a declaration for it May 07 12:07:44 so that's why the lm75 driver is properly loaded for the mcp980x temperature sensor I have, but not the adc... May 07 12:08:18 yep, so the driver seems broken... May 07 12:08:36 thinkfat_: what "modalias" does your device report in sysfs? I wonder if they've fixed it nowadays May 07 12:09:45 yeah it's using of: modaliases, not i2c: May 07 12:10:24 for i in /sys/bus/i2c/devices/*/modalias; do echo "$i: - $(cat $i)"; done May 07 12:10:47 ehh, the ": " and " - " is redundant, pick one separator of choice :P May 07 12:11:36 on kernel 4.19.94-ti-r42 I get of: modaliases only May 07 12:11:45 https://pastebin.com/0Vb8CEFG May 07 12:12:07 so that means the i2c_device_id declarations in the driver are not used for loading the driver May 07 12:12:18 of_device_id declarations are required May 07 12:12:27 so, broken driver May 07 12:12:46 but I guess the old mechanism is still used as fallback to probe drivers May 07 12:13:01 yeah, or at least driver that hasn't been updated yet May 07 12:13:11 it should be a trivial fix May 07 12:13:15 it's just some identifiers May 07 12:13:49 yep, but it's even easier for me to add the driver to /etc/modules ;) May 07 12:14:22 :P May 07 12:14:59 at least fix your compatible to have the "adi," prefix... I'm pretty sure that shouldn't interfere with the fallback mechanism, but then at least your DT declaration is correct even if the driver isn't yet May 07 12:15:35 yep, already done May 07 12:15:58 hm, no driver for the tdc7200 May 07 12:16:57 I guess that means "spidev" May 07 12:20:22 yay, spidev May 07 12:20:39 would be nice if there were an async version of it May 07 12:21:02 or rather, if it supported async transfers May 07 12:27:40 yeah, I wonder anyway. I need to start a measurement, then wait for an interrupt, then read the result May 07 12:27:56 basic enough May 07 12:28:03 I guess that means I need a method to wait for interrupts on a gpio in userspace May 07 12:28:05 uio? May 07 12:28:24 you could use uio but you can also just use the sysfs gpio interface May 07 12:28:31 hm, yes. May 07 12:28:36 latency is not an issue May 07 12:28:41 if you configure the 'edge' attribute you'll get an (E)POLLPRI on the value file descriptor May 07 12:28:50 I don't know which is faster, if either May 07 12:29:37 I've seen 40-80 us latency last time I tested but that was aaaaaaages ago May 07 12:30:05 (and I think using uio but I honestly don't really remember) May 07 12:30:48 should you have an interest in the uio route for some reason, this is how you set one up: https://github.com/mvduin/py-uio/blob/master/dts/gpio-irq.dtsi May 07 12:30:53 microseconds range is totally fine, as long as I can select() May 07 12:31:16 wow that's oldschool :) May 07 12:31:46 but yeah, it should show up in exceptfds when using select() May 07 12:31:54 (when using sysfs that is) May 07 12:32:03 when using uio the file descriptor simply becomes readable May 07 12:32:35 I don't want do use multithreading for no good reason May 07 12:32:51 yeah I mean using the old select() instead of a more modern replacement May 07 12:33:11 and the program I'm porting runs on a cortex-m0+ with no rtos, so I don't see the point May 07 12:33:19 well, yes, poll() then, whatever May 07 12:34:14 I personally usually use sd-event these days for my event loops (or my own C++ wrapper thereof), since libsystemd is generally available and it allows different kinds of events to be received (e.g. timers on CLOCK_REALTIME and CLOCK_MONOTONIC, fd events, signals, child processes) May 07 12:35:04 it's not perfect but mostly adequate May 07 13:33:41 zmatt: is pinctrl-* mandatory for uio? May 07 13:34:32 thinkfat_: pinctrl applies uniformly to all devices that use pins May 07 13:35:23 uio specifically doesn't know or care May 07 13:42:23 ok May 07 13:42:28 the bindings have changed a bit May 07 13:42:33 ? May 07 13:42:39 compatible = "linux,uio-pdrv-genirq"; May 07 13:42:54 oh they finally added an actual compatible-string to the driver? May 07 13:43:16 nope May 07 13:43:28 still needs to be specified via module parameter May 07 13:43:44 at least in 4.19 May 07 13:44:08 for which I use https://github.com/mvduin/py-uio/blob/master/etc/modprobe.d/uio.conf May 07 13:45:11 hm, the patch I found was from 2017, I assumed it was merged meanwhile... May 07 13:45:15 and it's still like that in current mainline: https://elixir.bootlin.com/linux/v5.6.11/source/drivers/uio/uio_pdrv_genirq.c#L264 May 07 13:45:19 patch? May 07 13:45:24 no patch is needed May 07 13:45:29 this is a mainline driver May 07 13:45:41 https://lore.kernel.org/patchwork/patch/833109/ May 07 13:45:51 the patch that introduced the binding documentation May 07 13:46:00 I sort of assumed the driver would follow that... May 07 13:46:09 but it's not been merged, apparently May 07 13:46:47 all of its properties are generic DT properties anyhow May 07 13:51:34 just define zero or more mmio regions with "reg", an optional interrupt, and the usual pinctrl properties (for state "default") if it has any associated pins May 07 13:53:26 compatible-string set to whatever you set the of_id property of the module to (I'd suggest plain "uio"), and I personally add a custom "symlink" property to create a symlink in /dev/ (rcn also uses that same udev rule in current images) May 07 13:54:45 well yes May 07 13:54:50 did that, no workee May 07 13:55:05 I see the module gets loaded, but nothing in /dev/uio and nothing in /sys/class/uio either May 07 13:56:40 https://pastebin.com/70b8YbbT May 07 13:57:16 you have the modprobe.d rule to set its of_id ? May 07 13:58:12 yes May 07 13:58:25 updated initramfs, if you're using initramfs ? May 07 14:00:22 momentchen... May 07 14:02:13 (easy fix: don't use initramfs. every beaglebone image in quite a few years has worked just fine without it, and boots faster and no need to ever rebuild it) May 07 14:02:18 got it May 07 14:02:22 put the rule in the wrong place May 07 14:02:25 ah May 07 14:03:36 perfect May 07 14:03:54 I have my /dev/uio/tdc7200-irq file, that should do it May 07 14:04:14 so you're opting for uio over sysfs? :) May 07 14:07:05 yes. May 07 14:07:35 less hassle with hardware changes with symbolic names May 07 14:11:25 oh I use symbolic names for gpios May 07 14:11:51 e.g. https://github.com/mvduin/overlay-utils/blob/master/gpio-demo.dtsi with appropriate udev rule that creates symlinks May 07 14:13:39 which would yield as result: https://pastebin.com/YKW7Wcqu May 07 14:15:27 very useful since gpios often end up moving around in pcb revisions May 07 14:27:11 indeed May 07 14:30:09 I wrote a small eventloop framework in 2009 that used select() in the mainloop. I guess I'll dust it off and rewrite it to use poll, that's probably good enough for what I need May 07 14:31:15 yeah I had a similar thing around epoll but I now avoid it for anything new and usually ended up having to rewrite existing things once I ran into its limitations May 07 14:31:42 no use in reinventing the wheel May 07 14:32:17 yeah, I anyway don't get why somebody would bother with systemd.... May 07 14:32:20 :-) May 07 14:33:35 because it's actually really useful? May 07 14:33:56 I suppose... otherwise it'd have died by now May 07 14:34:11 it also does a great job at minimizing startup time May 07 14:35:09 systemd-networkd has also been a clear improvement over everything I've previously used May 07 14:36:08 and if your system uses systemd anyway, there's little reason to not use libsystem in services May 07 14:36:20 we use sd-bus too for dbus communication May 07 14:37:01 (which has replaced random ad-hoc ways for our services to communicate) May 07 17:05:10 m May 07 20:32:38 Hello! I was trying to find the operating temperatures for the BBBW but I could not find any official documetnation other than that of the octavo processor. can perhaps someone shed some light or point me to the right direction **** ENDING LOGGING AT Thu May 07 22:58:43 2020 **** BEGIN LOGGING AT Thu May 07 23:00:15 2020 May 08 01:37:32 (y) Idle minds are the devils workshop D: May 08 01:46:55 Hey Honkie! May 08 01:47:07 KenUnix in da 'hizzy! May 08 01:48:34 See the new BBB SRM. Came out yesterday. May 08 01:48:54 What? May 08 01:48:56 Serious? May 08 01:49:02 What version? May 08 01:49:49 Yes, go grab your copy here (top item) https://github.com/beagleboard/beaglebone-black May 08 01:50:10 Yesterday version May 08 01:52:33 Nice...but what version. They have the rev. c already. May 08 01:53:01 Oh. I got it. It is an updated version of the Rev. C version. May 08 01:53:13 This is C2 May 08 01:55:05 Aw. May 08 01:55:07 Okay. May 08 01:55:42 I am trying to use Adafruit_PCA9685 w/ smbus2 right now. it is beating me b/c I cannot find the replica of get_i2c_device in smbus2. May 08 01:55:58 brb May 08 01:58:08 Well, you got me May 08 01:58:36 Can you download the SRM from Git? May 08 02:01:22 Oh. May 08 02:01:23 No. May 08 02:01:55 I am trying to exchange items in the old source from this fellow Tony to work w/ smbus2 for the ServoCape. May 08 02:01:56 I'll try and find the original link May 08 02:02:20 exchange items? May 08 02:03:36 Yes. May 08 02:03:43 Rememberr I was complaining about sleep not working in ubuntu? Well I wrotemy own in 'c' and it runs on ubuntu, debian and BBB May 08 02:04:12 Want a copy? May 08 02:04:18 I am developing something right now from what was already done that no longer works on the BBBW for the ServoCape. May 08 02:04:37 KenUnix: I got your email earlier. May 08 02:04:49 Enjoy it? May 08 02:04:57 Nope. I have not tried it just yet. May 08 02:05:17 Was it for file searching? May 08 02:05:56 Before I go looking for the SRM i'll push a copy of sleep to pastebinit. Some need 'c' things. May 08 02:06:15 KenUnix: https://github.com/beagleboard/beaglebone-black/raw/master/BBB_SRM.pdf May 08 02:11:29 Thanks is it the C2 version ? May 08 02:12:15 set_: there's no equivalent to get_i2c_device, you don't create an object for an i2c device, you create one for the bus and pass the device address as separate argument to the various calls May 08 02:12:58 set See above link from zmatt to download C2 version of SRM May 08 02:14:11 zmatt, Remember my slep headaches with ununto 20.04? I wrote my own simplifid version in 'c'. May 08 02:14:20 It at :https://pastebin.com/xWF1retp May 08 02:14:40 zmatt, Remember my sleep headaches with ununto 20.04? I wrote my own simplifid version in 'c'. May 08 02:14:46 KenUnix: did the patched libc not fix the problem? May 08 02:14:54 no May 08 02:15:56 KenUnix: you did install it with "sudo apt install libc6=2.31-0ubuntu8+lp1871129~1" ? May 08 02:19:32 Here's what it did: The following packages will be REMOVED: libc6-devThe following packages will be DOWNGRADED: libc6 May 08 02:19:48 sleep still broke May 08 02:20:00 KenUnix: weird May 08 02:20:14 since that package had been specifically made to fix the problem May 08 02:20:24 Did you look at my silly sleep.c May 08 02:20:33 yes it's terrible May 08 02:20:42 Thank you May 08 02:21:13 just use sleep() or usleep() May 08 02:21:18 Should I dare to ask why? May 08 02:21:27 because you're causing 100% cpu load May 08 02:21:35 as opposed to sleep which causes 0% cpu load May 08 02:22:10 it also doesn't support fractional-second sleep May 08 02:22:38 Well sleep is broke. How do I avoid 100% cpu load? I don't need fractions May 08 02:23:10 Look I knocked this out this afternoon May 08 02:23:28 use sleep() or usleep() (the C functions) May 08 02:24:15 If usleep worked in the first place I wouldn't ne here May 08 02:24:27 usleep is broken too? May 08 02:24:42 Let me try it, hold May 08 02:24:56 that would probably break soo many applications May 08 02:25:01 it sounds highly unlikely May 08 02:25:08 WSL would be completely broken if that were the case May 08 02:26:58 though I guess it's possible if libc now converts usleep() into the broken call May 08 02:27:37 but then you should really try to downgrade libc to an older version, since it means sleeping is broken in so many programs May 08 02:29:30 I almost got it. Down to one error. May 08 02:35:08 zmatt, OK I set the usleep timer to 10,000 much less load May 08 02:35:32 KenUnix: just usleep( tsec * 1000000 ); May 08 02:35:37 instead of using time() and looping May 08 02:36:33 ok wait May 08 02:44:10 OK zmatt. Thanks. Here is what I ended up with https://pastebin.com/3pdL0c4r May 08 02:45:30 KenUnix: does plain sleep() not work btw? sleep( tsec ); May 08 02:48:02 Yea that works too. May 08 02:52:08 so no panic needed? May 08 02:53:04 it's really dumb though, this means nanosleep() works in WSL but clock_nanosleep() doesn't work for CLOCK_REALTIME (even though it apparently works for CLOCK_MONOTONIC) May 08 02:53:38 hmm wait though, what clock does nanosleep() use anyway? May 08 02:54:42 and why did glibc switch to using clock_nanosleep(CLOCK_REALTIME, ...) ... hmm May 08 02:56:01 Hey. False alarm. I more errors that are going to take much more work. May 08 02:56:03 Boo! May 08 02:56:05 and.. May 08 02:56:07 yea boy! May 08 02:56:33 they probably deprecated usleep and call internally nanonsleep this is because of POSIX.1-2001 declaring it obsolete and POSIX.1-2008 removing it from the specification. May 08 02:56:53 GenTooMan: nanosleep() is fine **** ENDING LOGGING AT Fri May 08 02:59:59 2020