**** BEGIN LOGGING AT Sat Sep 26 02:59:57 2020 Sep 26 03:00:30 PRU, M4, AM5729, EVE, and I think there is one more. Sep 26 03:00:40 Off to check. Sep 26 03:00:48 renrelkha: hmm, the ecap driver does have a "capture" attribute in sysfs Sep 26 03:00:58 set_: AM5729 is the SoC itself Sep 26 03:01:19 DSP! Sep 26 03:01:25 Oh. Sep 26 03:01:41 (containing dual-core Cortex-A15, two PRU subsystems with two PRU cores each, two C66x DSP cores, two dual-core Cortex-M4 subsystems, and four EVEs) Sep 26 03:01:47 iirc Sep 26 03:01:54 Right-O. Sep 26 03:02:29 Okay. I was not understanding. Now, I know. So, I can look up Cortex-A15 now instead of the SoC alone. Sep 26 03:02:31 Thank you. Sep 26 03:02:43 zmatt: honestly i will have to look up what ecap and sysfs, why it has attributes and what the capture one does to even understand why you would tell me that. lol Sep 26 03:03:09 I will do it and return service if necessary! Sep 26 03:03:14 renrelkha: pulse measurement is something that comes up periodically where I know the beaglebone has excellent ability yet there doesn't seem to be any software example. I might just make one Sep 26 03:03:27 renrelkha: yeah I was more just thinking out loud... I shouldn't have addressed that to you Sep 26 03:03:27 Yes!Q Sep 26 03:03:47 Ha. Sep 26 03:03:55 the attribute might imply the ecap kernel driver has some sort of support for using it in capture mode (as opposed to using it in pwm mode) Sep 26 03:03:59 but I haven't checked that Sep 26 03:04:42 ecap kernel driver? Hmm. I should read into that idea to e-learn more. Sep 26 03:05:42 what type of ecap is it? Sep 26 03:05:58 okay never mind, it seems every pwm output has a "capture" attribute so whatever it is, it's something generic and not related to using ecap in capture mode Sep 26 03:06:05 set_: ehm, what? Sep 26 03:06:32 "ecap" is the name of a particular peripheral (of which the AM335x has four instances) Sep 26 03:07:03 I see some person in '11 called the ecap a module and called it a OMAP-L138 Driver. Sep 26 03:07:08 designed for pulse width or pulse distance Sep 26 03:07:27 Oh. WOw. I was unaware of what it actually did. Sep 26 03:08:02 ecap is designed for pulse width measurement and pulse distance measurement, though it can also be configured into a pwm output Sep 26 03:08:10 the kernel driver only supports pwm mode Sep 26 03:08:21 Oh. Sep 26 03:08:41 I found this here: https://processors.wiki.ti.com/index.php/OMAP-L138_eCAP_Capture_Driver_User_Guide <<< This ends in Dec. 2020. Sep 26 03:08:44 and the OMAP-L138 is another TI SoC that has an ecap Sep 26 03:08:49 zmatt: i do like this to read rc receiver pwm with arduino https://pastebin.com/WK634ZTu Sep 26 03:09:10 I think they are ripping that off the interwebs this time for good in Dec. Sep 26 03:09:11 Dang. Sep 26 03:09:26 Okay. OMAP-L138 is another SoC. Oops. Sep 26 03:09:35 Gotcha. Sep 26 03:09:38 renrelkha: even on an arduino that's probably not the most accurate way to perform a timing measurement Sep 26 03:09:56 pretty sure it also has timers that can be used in capture mode Sep 26 03:11:09 on a beaglebone it would be terrible... even with an rt kernel I'd expect dozens if not hundreds of microseconds of jitter, with a non-rt kernel all bets are off Sep 26 03:11:37 https://elinux.org/EBC_Exercise_13_Pulse_Width_Modulation_3.2 is something I found but it is for an older kernel. Sep 26 03:11:44 while using a hardware timer for the measurement would be highly accurate Sep 26 03:12:46 zmatt: i will investigate that Sep 26 03:13:15 I should definitely make an example for using ecap in capture mode via uio... it's not hard, but only if you already know how to do it Sep 26 03:13:59 and I have the impression I'm one of the very very few people who use uio for peripherals other than PRU on the BBB Sep 26 03:16:06 in most cases is the blue equivenent to the black with a robot cape? Sep 26 03:16:13 renrelkha: also that code looks like it could desynchronize if it triggers on a noise spike, since you're toggling state instead of checking the actual pin state Sep 26 03:16:50 I know there are *some* differences between BBB+robotics cape and BBBlue but I don't know the details Sep 26 03:21:00 same numbers arrrggg! Sep 26 03:21:04 zmatt: i do see desync issues occasionally. i guess i did not expect anything would trigger the interrupt other than the signal from receiver. i really had no idea what the cause could be. that has been put on the back burner a while now because of the inconsistencies i was seeing. i am just a hobbiest Sep 26 03:21:51 that does not spell very well sometimes Sep 26 03:22:07 renrelkha: in general it's just not a good idea to *assume* that the line has toggled exactly once for each interrupt Sep 26 03:22:40 does the receiver have a minimum output pulse width? Sep 26 03:24:39 it might just output a short spike under some circumstances Sep 26 03:24:45 the project was to read any receiver that was plugged in and allow to use any rc remote as a joystick for pc game. specificly for wifes grandpa to play flight sim games with the older tx he has. i am not sure if the receiver i was using minimum is Sep 26 03:26:03 oh right rc servo signals are also pulse width... so then surely ardupilot on the bbblue has some way to receive such signals? does that not happen to be compatible with this sensor also? Sep 26 03:26:10 i just did some research found hey use pin change interrupts and worked from there till i got something that kinda worked Sep 26 03:26:48 when using a pin change interrupt you should generally always check the actual pin state Sep 26 03:27:25 it was my first time working with interrupts Sep 26 03:27:51 fair, avoiding race conditions requires a particular mindset Sep 26 03:28:07 the ardupilot uses the pru to read the sbus signal from receiver. it outputs sbus or servo pwm not both at same time Sep 26 03:28:37 ah Sep 26 03:33:00 i did alot of corporate web programming i understand that alot but this low level hardware stuff has just been hobby for a few years so i struggle with things that are probably glaringly obvious to most that would be in here isung a bbblue Sep 26 03:36:12 not to me. I feel fresh. Sep 26 03:36:31 Info. is new to me as I read it for the first, second, and third times. Sep 26 03:36:32 Ha. Sep 26 03:36:57 that's because you're somehow immune to gaining understanding :P Sep 26 03:37:04 Sometimes repitition is the SoC best friend. Sep 26 03:37:06 Ha. Sep 26 03:37:09 and yep! Sep 26 03:37:34 i.e. like a while statement. Sep 26 03:38:15 Sorry for earlier. I mistook eqep for ecap. Sep 26 03:38:51 set_: how much would you sell your broken blue for Sep 26 03:38:59 No. Sep 26 03:39:11 Well. Sep 26 03:39:30 After I get a new one, if that ever happens (hopefully sooner than later), I will revisit that idea. Sep 26 03:39:44 because i have a broken one also Sep 26 03:39:49 Oh. Sep 26 03:39:50 but has good usb port Sep 26 03:40:19 Are you trying to buy my busted USB BBBlue or are you just asking for clarity? Sep 26 03:40:38 buy maybe Sep 26 03:40:49 For instance...the local repair shop said $65.00 for a repair. Sep 26 03:40:57 But...that seems high. Sep 26 03:41:01 Too high. Sep 26 03:41:13 i agree but i do not know the extent of damage either Sep 26 03:41:28 Okay about purchasing it. I can send you a photo if necessary. Sep 26 03:41:52 lets see Sep 26 03:41:56 I will revisit that idea once a new one is in my possession. Sep 26 03:42:01 Okay. Please hold. Sep 26 03:43:09 i understand Sep 26 03:44:44 zmatt: is there a way I can just look at what is in the memory of the pru when they are halted? I have tried just working with the position value Sep 26 03:44:52 and I cannot get the numbers to match Sep 26 03:45:36 you can look at what's in pru memory regardless of whether it's halted or not, that's exactly what you're doing when you use .map() Sep 26 03:46:02 what code are you using on pru and in python? Sep 26 03:46:15 and what result are you getting? Sep 26 03:48:55 https://app.conceptboard.com/board/55o6-xohx-t1qs-5q95-3zes might work. Sep 26 03:48:57 my results Sep 26 03:48:58 https://pastebin.com/fHgK5LnR Sep 26 03:49:33 renrelkha: Did that app work. My google upload will not allow me to download for some reason. Sep 26 03:49:53 I cannot put it on imgur b/c of not being able to download. Sep 26 03:50:08 MattB000ne: that definitely looks like garbage Sep 26 03:51:01 OH, having the fields in this order is somewhat hazardous since the pru compiler does not impose any alignment Sep 26 03:51:02 Did you mark the board? Ha. Sep 26 03:51:19 ok sending my code now Sep 26 03:51:21 one sec Sep 26 03:51:27 if you reverse the order of these fields they will all be naturally aligned Sep 26 03:51:30 The co. that might fix it said they will have to add a trace too. Sep 26 03:52:28 that is all ground i think Sep 26 03:52:30 you can iirc get ctypes to make a packed struct, but it's better to avoid misalignment anyway Sep 26 03:52:34 Oh. Sep 26 03:52:36 Okay. Sep 26 03:52:55 Hmm. Did you see the USB connector to the side? Sep 26 03:53:02 no Sep 26 03:53:07 It is there. Sep 26 03:54:20 I circled the issue to me and then circled the greater concern inside that circle. Sep 26 03:54:29 w/ another circle. Sep 26 03:54:50 set_: i believe all of the big pads are mainly attaching the port to the board Sep 26 03:54:52 my c code Sep 26 03:54:54 https://pastebin.com/RRUQWU0w Sep 26 03:55:26 none of the actual data pins look damaged on the board itself Sep 26 03:55:50 Hmm. Okay. What about the smaller, little leads that are circled in the the black circle? Sep 26 03:55:59 MattB000ne: yeah start by sorting the fields to put the largest at the front Sep 26 03:56:07 to make them all naturally aligned Sep 26 03:56:14 ok Sep 26 03:56:42 and you can remove the commented-out versions since they are both definitely wrong Sep 26 03:56:47 I do not know what to call the small leads that attach to the board outside of the pads. Sep 26 03:57:06 set_: you could try to steal a usb port from something else and put it on Sep 26 03:57:22 I still have the usb port. Sep 26 03:57:37 yeah but i think the data leads are broken Sep 26 03:57:40 MattB000ne: and why does your indenting continue to be so terrible? how could you look at this eyesore and not feel the need to fix it :P Sep 26 03:57:40 I should be able to reuse it, right? Sep 26 03:57:44 Oh. Sep 26 03:57:45 Okay. Sep 26 03:57:56 i may be wrong Sep 26 03:58:00 THey are. Sep 26 03:58:05 I was going to clean in up once I get it working Sep 26 03:58:15 my tabbing is not consistent in vim for some reason Sep 26 03:58:21 It is foggy in the photo but the leads have snapped off. Sep 26 03:59:28 I mean...would I just place it on the board and then run it through an oven? Sep 26 04:00:04 i just try to use a solder iron Sep 26 04:00:17 MattB000ne: to fix indentation of the entire file in vim use the command: gg=G Sep 26 04:00:35 Dang. My tips are large and my solder is large and thick. I might need to research it more. Sep 26 04:00:38 is pretty tiny tho Sep 26 04:00:44 Right. Sep 26 04:01:05 MattB000ne: or visually select (shift-V) the lines you want to reindent and press = Sep 26 04:01:32 i have a little butane solder iron that has a heat gun part Sep 26 04:01:37 if you dont put the tip on Sep 26 04:01:46 I mean, that is like a fraction of 1/16". It is so tiny, it is about to touch each other. Soldering might be out. Hmm. Sep 26 04:01:50 that would maybe bet better to try Sep 26 04:02:01 Just a heat gun? Sep 26 04:02:27 A quick try and my board my be ruined. I will think of what i can do and if I will sell it. Sep 26 04:02:54 https://hackaday.com/tag/drag-soldering/ Sep 26 04:03:20 You rule. Sep 26 04:03:44 That is nice info. Drag soldering! Sep 26 04:04:01 It is a pricey mistake or I can charge the co. when they goof up. Sep 26 04:04:05 Ha. Sep 26 04:04:22 zmatt: rearranging gives me the different garbage Sep 26 04:04:31 brb Sep 26 04:04:53 https://pastebin.com/kAmNUyyh Sep 26 04:06:00 self.pruvars = self.pruss.dram2.map( pru_vars ) is how I map Sep 26 04:06:16 MattB000ne: and how did you define pru_vars ? Sep 26 04:06:40 btw it's good practice to use camelcase for types like PruVars Sep 26 04:06:46 instead of pru_vars Sep 26 04:07:15 https://pastebin.com/mNZ0e7ps Sep 26 04:07:37 ok Sep 26 04:07:55 uhh, structure? not Structure ? Sep 26 04:08:06 did you rename it while importing? Sep 26 04:08:14 from ctypes import c_uint32 as uint32, c_uint8 as uint8, c_uint64 as uint64, Structure as structure Sep 26 04:08:20 but why? Sep 26 04:08:36 I think having it capital was giving me problems Sep 26 04:08:45 let me change Sep 26 04:09:04 it's a name, names have meaning for humans, they don't affect function Sep 26 04:09:32 the main reason to rename the c_uint32 etc is because their names are just ugly :P Sep 26 04:10:03 (and because there's nothing C-specific about the concept of an uint32) Sep 26 04:10:22 renrelkha: Is that kapton tape they use? Sep 26 04:10:24 i changed it Sep 26 04:10:49 it is like it is not going to the same place Sep 26 04:10:50 set_: that is what it says Sep 26 04:10:58 i have not done it myself Sep 26 04:11:01 Sorry. I just read the biggest headline on it! Sep 26 04:11:03 I tried moving it to core 1's private ram too Sep 26 04:11:06 Yep. Sep 26 04:11:17 I will try it. I have some kapton tape actually. Sep 26 04:11:32 nice Sep 26 04:11:36 I bought it for my thermister. Sep 26 04:12:17 My 3D printer is an oldie but a goodie. I use the Replicape (or at least I tried). Sep 26 04:12:24 I have had some issues while they are developing things. Sep 26 04:12:26 MattB000ne: does loading the C program onto core1 change the values to zero? Sep 26 04:13:16 Plus...I had to drill a motor to make it work. Ha. The thing broke. Then and so on. Finally. I am here and ready for that endeavor again. Sep 26 04:13:18 ANd... Sep 26 04:13:28 The Replicape people are promoting a new build. Sep 26 04:13:32 set_: my printer is el cheapo i am just using whatever controller it came with Sep 26 04:13:49 works fine for me Sep 26 04:13:51 I did at first. I made a new controller build for it. Sep 26 04:13:57 w/ the BBB. Sep 26 04:14:20 MattB000ne: in the Makefile there's a line "#LDFLAGS += --map_file=$@.map" .. can you remove the #, compile your program again, and pastebin the .map file it produces? Sep 26 04:14:55 My old board had no thermistor support (I think). So, I removed it, added a heated bed, and tried the new source and hardware. Sep 26 04:15:05 BBB! Sep 26 04:15:47 All the guessing and workarounds gets hard on a brother but I am in it. I will just keep trying. It uses Klipper and OctoPrint. Sep 26 04:15:48 ok one second Sep 26 04:17:16 And w/ their source, there are some workarounds for using the RepliCape as a CNC too. Sep 26 04:17:35 set_: that is amazing Sep 26 04:17:49 Speaking of...where is this board from Seeed Studio for MachineKit? Sep 26 04:18:02 if the pru crashed would I ever know Sep 26 04:18:17 for the hell of it i reset the EM100 Sep 26 04:18:26 and now I am getting different behavior Sep 26 04:20:09 there are very few circumstances the core can crash, but if it does it will halt and if you print core.state it will say "halted, crashed" Sep 26 04:20:47 (core.state.crashed will be true) Sep 26 04:23:33 https://pastebin.com/GSA3DxR4 Sep 26 04:24:49 I have an endless loop in my firmware if I hault I would never run anything after the loop right Sep 26 04:25:34 if you have an endless loop it will never run anything after the loop. if you halt then it doesn't run anymore period Sep 26 04:27:46 hmm it's saying uninitialized... I thought it always got zero-initialized but maybe I'm wrong. easy way to check is by printing the shared memory vars after loading the core but before starting the core Sep 26 04:27:50 they should be zero Sep 26 04:28:26 ok I can try that Sep 26 04:29:03 if not, add an explicit initializer (= {} will work for any struct if using C++) Sep 26 04:29:13 or manually zero-fill it Sep 26 04:32:02 zero at start Sep 26 04:34:23 then dunno and i'm kinda out of energy for debugging for you Sep 26 04:36:15 i will stare at it Sep 26 04:36:19 it seems position is wokring now Sep 26 04:36:25 i think the EM100 is not stopping Sep 26 04:36:32 and may be messing stuff up Sep 26 04:36:45 can the UART send and recieve at the same time Sep 26 04:36:59 i need to send a valid command back Sep 26 04:37:23 I try to send something from python before haulting to avoid an overflow Sep 26 04:37:32 maybe that messes something up Sep 26 04:37:33 i dunno Sep 26 04:37:35 I am beat Sep 26 04:37:38 thanks for your effort Sep 26 04:37:45 waving the flag Sep 26 04:37:50 I am not getting garbage Sep 26 04:37:54 now for some reason which is good Sep 26 04:37:56 i will take it Sep 26 04:38:01 you should definitely have your python program stop the EM100 from sending stuff, btu doesn't it do that automatically when you send a command? Sep 26 04:38:36 when I try to do it from python i get FIFO overun Sep 26 04:38:37 and the next time you start your program python will reinitialize the uart anyway so any overflow that happened while the core was not running is irrelevant Sep 26 04:39:00 ah Sep 26 04:39:01 hm Sep 26 04:39:09 i have to hard reset Sep 26 04:40:09 I guess I didn't think of this use case when I made the python uart api Sep 26 04:40:26 though I think it should work if you send the command immediately after initializing Sep 26 04:40:37 but maybe python is too slow even for that, not sure Sep 26 04:41:28 I may have the core run for a fixed amount of time so it can terminate the stream Sep 26 04:41:34 for a shoddy work around Sep 26 04:41:46 you don't need to involve the core in a shoddy workaround Sep 26 04:41:58 otherwise I cannot stop it Sep 26 04:43:26 put this between initializing the uart and the write: Sep 26 04:44:35 pruss.uart.io._tx_fifo_space = 16 # FIXME workaround for py-uio limitation Sep 26 04:45:58 that should prevent .write for throwing an exception Sep 26 04:47:04 I'll think about how to fix this properly Sep 26 04:48:32 ok yeah it did not work Sep 26 04:48:40 ? Sep 26 04:48:55 when python tries to write the stop command Sep 26 04:48:58 it throws the error Sep 26 04:49:09 what does your code look like? Sep 26 04:49:12 I added your line right after initialize Sep 26 04:49:25 its big an ugly Sep 26 04:49:32 just this bit Sep 26 04:49:49 to stop the EM100 from sending Sep 26 04:50:45 https://pastebin.com/5ML6STy5 Sep 26 04:51:03 ... and then? Sep 26 04:51:23 this is what is not working Sep 26 04:51:25 https://pastebin.com/pGVhdEau Sep 26 04:51:33 i get zeros when it starts and zeros when it end Sep 26 04:51:46 I even hard coded just 1, 2 and 3 for variables Sep 26 04:51:49 now nothing changes Sep 26 04:51:54 this is not a mere write to stop the EM100 from sending Sep 26 04:52:04 I assumed you were doing this in cleanup after the core has halted Sep 26 04:52:15 I tried after the core halt Sep 26 04:52:16 same thing Sep 26 04:52:28 i figure to do it while the core was clearing the FIFO Sep 26 04:52:34 so i could stop it before it overflowed Sep 26 04:54:35 I don't know what you mean, but yes it won't work like this Sep 26 04:56:20 you're also not supposed to allow the uart.io object to exist while pru is using the uart, even if you might get away with it Sep 26 04:56:44 anyway, I'm done with your stuff for today Sep 26 04:56:54 ok Sep 26 04:57:06 good night Sep 26 05:02:50 zmatt: i think this is how the ardupilot reading the receiver with pru Sep 26 05:02:54 https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL_Linux/RCInput_AioPRU.cpp Sep 26 05:17:55 https://github.com/ArduPilot/ardupilot/blob/master/Tools/Linux_HAL_Essentials/pru/aiopru/RcAioPRU_BBBLUE_bin.h Sep 26 05:18:24 Yep. Sep 26 05:18:58 https://github.com/ArduPilot/ardupilot/blob/master/Tools/Linux_HAL_Essentials/pru/aiopru/RcAioPRU.p Sep 26 05:19:00 It seems that fellow Mirkix is in charge of the ARM side of ArduPilot. Sep 26 05:57:11 https://www.walmart.com/ip/Sky-Viper-Journey-GPS-Video-Streaming-Drone/648591391 Sep 26 14:19:07 soooo I stripped out the code and have the struct working Sep 26 14:19:26 now to slowly put the old code back in until it breaks Sep 26 14:20:35 slowly getting the ability to exist without the milk from zmatt teat Sep 26 16:37:10 Hi Sep 26 16:38:11 can someone help me choosing right BeagleBone board for putting AGL image into it? Sep 26 16:45:11 what's agl Sep 26 16:45:19 automotive grade linux Sep 26 16:47:25 a bit of a weird question... does whatever this AGL is not specify which hardware it supports? Sep 26 16:47:55 typically you'd choose hardware based on your hardware requirements, since all of them run linux Sep 26 16:48:35 and all beaglebones except the AI have the same SoC anyway Sep 26 16:49:30 except a handful of early ones that accidentally got the am3352 Sep 26 16:49:38 because the chips were mislabeled Sep 26 16:50:11 I'm waiting for those to become collectors' items Sep 26 16:50:19 then I'll be rich, muahahaha Sep 26 16:50:25 yeah but those were ancient prototypes, not relevant for people buying new beaglebones Sep 26 16:50:42 no, just a fun fact Sep 26 17:03:22 a bit of beagle bone lore from mru Sep 26 17:03:43 why won't they give c regular strings Sep 26 17:03:48 why why why Sep 26 17:03:58 huh? Sep 26 17:04:17 this is painful it is like growing up with electricity than having it taken away Sep 26 17:04:31 mru: that but about the different SoC Sep 26 17:04:50 huh for the strings Sep 26 17:04:53 C has strings Sep 26 17:05:09 char arrays Sep 26 17:05:16 same thing Sep 26 17:05:32 well I do not have to worry about terminal chars Sep 26 17:05:45 with strings as I did with python Sep 26 17:05:53 more you have to worry about in C Sep 26 17:06:10 but with python you have to worry about everything else Sep 26 17:06:11 because C doesn't hide memory allocation from you Sep 26 17:06:21 which is a good thing then you have 8KB of memory Sep 26 17:06:23 *when Sep 26 17:06:29 like has this number suddenly morphed into a string? Sep 26 17:06:53 python doesn't have implicit conversion to string Sep 26 17:06:55 that's javascript Sep 26 17:07:00 right Sep 26 17:07:35 but you can't tell from the code what something really is Sep 26 17:07:41 no type safety Sep 26 17:08:04 what you think is an int might have been assigned some other object while you weren't looking Sep 26 17:08:26 I would of been better served learning C first struggling with it then moving on Sep 26 17:08:35 I started with basic Sep 26 17:08:36 sure, which can be a pro or a con... and python does have syntax for optional type annotations, along with separate static type checkers Sep 26 17:09:02 python is strict/lax in all the wrong ways Sep 26 17:09:18 MattB0ne: honestly it helps to do assembly programming to have a mental model of how a cpu actually works... and pru is one of the nicest processors for assembly programming Sep 26 17:09:24 yeah don't get me wrong, I don't like python Sep 26 17:09:31 but for different reasons Sep 26 17:09:52 I particularly hate implicit variable declaration Sep 26 17:09:53 it is in vogue now though Sep 26 17:10:12 at least for data science Sep 26 17:11:23 zmatt: on that Fifo thing with the uart. you were saying I should close my python connection and have my pru start and receive data and the reinitialize? Sep 26 17:11:42 reinitialize in python Sep 26 17:12:07 to avoid the overflow error Sep 26 17:12:18 no not "to avoid the overflow error" Sep 26 17:13:34 but because py-uio's uart io class assumes it is the exclusive user of the uart and the uart's design pretty much precludes having two independent pieces of software interact with it (not even if one only sends and one only receives) Sep 26 17:22:02 to deal with the overflow error I should implement a way to allow ignoring such errors Sep 26 17:26:06 ok so hard reset for now Sep 26 18:58:03 MattB0ne: https://github.com/mvduin/py-uio/commit/b3040ba1a831 Sep 26 18:59:36 MattB0ne: https://pastebin.com/kixGiwWM Sep 26 19:15:28 just pushed a small fix Sep 26 19:23:04 cool Sep 26 19:23:11 will check it out Sep 26 19:25:35 MattB0ne: instead of sleeping you can also just proceed with sending a command, but then you need to take into account that the first result from readline() may be the response (or some part thereof) from the command used to interrupt transmission. for example: https://pastebin.com/xzArqgF0 Sep 26 19:25:50 doing so is arguably more elegant Sep 26 19:26:15 actually you might need to discard two lines Sep 26 19:28:58 i.e. https://pastebin.com/qQjDGJey Sep 26 19:29:36 the slower the baudrate the more likely it is to hit these cases Sep 26 20:33:51 zmatt: can you give me an idea of the computation time for a bch8 code on a typical modern-day x86_64 system like an i7? Sep 26 20:34:37 we have a 256 MiB flash and are computing bch8 out-of-band data. it takes at least an hour using the code in our archives. is that normal? (reasonable?) Sep 26 20:35:06 2048-byte blocks, 64-byte oob block Sep 26 20:35:24 slightly slower than a 32-bit CRC Sep 26 20:36:01 i'm not familiar with the time to compute a 32-bit crc - can you relate? Sep 26 20:37:07 like, for a 256MB image? a few seconds Sep 26 20:37:30 so there is something seriously inefficient with our code.. Sep 26 20:37:48 yeah an hour sounds terrible Sep 26 20:37:55 ok thanks man. Sep 26 20:38:09 I might actually have bch8 code somewhere Sep 26 20:38:18 if you don't mind sharing.. Sep 26 20:39:36 i've just begun to look at this code and see what's taking so long. they're reading 2048-bytes at a time from a file then operating on that; i was thinking it would speed up to read the entire file into memory first, but that probably is not the issue. Sep 26 20:39:57 or that is like 0.001 percent of the issue.. Sep 26 20:44:14 hmm I found a bitwise implementation of bch8 and bitwise and nibblewise implementations of bch4 Sep 26 20:44:28 but like, it's not a hard thing, it works exactly like a CRC Sep 26 20:45:00 and a bytewise implementation just means a larger (256-entry) lookup table Sep 26 20:46:12 i thought bch8 works on 512 bytes at a time? Sep 26 20:46:16 as input Sep 26 20:46:23 to minimize the use of 114-bit arithmetic it's also possible to compute two separate 52-bit codes and combine them at the end with the chinese remainder theorem Sep 26 20:46:34 that's just the size of the input Sep 26 20:46:42 like, the size over which you're computing the "CRC" Sep 26 20:47:26 which can be up to 8191 bits Sep 26 20:47:55 (including the code itself) Sep 26 20:48:03 i don't know the details of how to compute these things, so i'm losing you. Sep 26 21:00:16 yates: https://pastebin.com/cfxDt8HU Sep 26 21:00:33 sorry, https://pastebin.com/u7TEhQA4 Sep 26 21:01:44 this is what I mean by bytewise: the inner loop iterates over bytes, shifts the code by 8, performs a table lookup based on 8 bits Sep 26 21:08:00 yates: a bitwise implementation of bch8_reduce would be https://pastebin.com/6xJAYCCt ... it would probably not generally be written using a 2-entry lookup table, but I did so to make it easier to see the analogy with the bytewise version Sep 26 21:37:01 yates: rewritten example: https://pastebin.com/X6CkefLQ Sep 26 21:39:17 note that bch8_reduce_byte_bitwise(), bch8_reduce_byte_nibblewise(), and bch8_reduce_byte() should all be equivalent except for having different trade-offs between performance and lookup table size Sep 26 21:40:18 I've only given the first two entries of the lookup table, but that suffices for bch8_reduce_byte_bitwise() which can be used to generate the remaining entries of the lookup table (as indicated by comment) Sep 26 21:41:37 there are definitely ways to optimize this further if necessary Sep 26 21:49:01 wait, a bch8 code is 104 bits (13 bytes), not 112 bits (14 bytes) Sep 26 21:49:02 fixed Sep 26 22:04:30 yates: *poke* :P Sep 27 02:26:21 What does "network error: connection timed out" mean when attempting to sign in on 192.168.7.2 on Win w/ PuTTY? Sep 27 02:26:40 I have two, separate boards stating the same thing now. Sep 27 02:26:47 ethernet not plugged in Sep 27 02:26:49 ? Sep 27 02:27:04 No ethernet on these BBB.io boards. BBBW and BBGW! Sep 27 02:27:54 I am not using Wifi, I am just trying to attach these boards to my 'puter via USB now. Sep 27 02:28:20 I cannot sign in for some reason b/c I cannot get to the sign in screen on my terminal. Sep 27 02:28:56 I will turn off the boards now. I will power them down mechanically and see if that works. Sep 27 02:29:48 Well, one works now! Sep 27 02:34:11 thats good Sep 27 02:34:50 All my LEDs are blinking like usual. I am not sure why this board is not booting. Sep 27 02:35:10 Maybe it will take a long time. I am going to stay patient. Sep 27 02:44:23 do you have a microsd you can boot from Sep 27 02:45:27 Yes. Sep 27 02:45:55 try that maybe Sep 27 02:46:05 I just "undid" the SD from the BBGW, pushed the SD back in, and booted. I will let you know what happens. Sep 27 02:46:24 maybe the sd is bad Sep 27 02:46:26 The LEDs are acting differently. Sep 27 02:46:28 Could be. Sep 27 02:46:35 I can check that idea too. Sep 27 02:46:56 does that version have internal flash also Sep 27 02:47:33 I mean. I could have it onboard but I erased the internal flash/eMMC onboard the BBGW. Sep 27 02:47:56 So, it boots directly to the SD Card w/ that form of uboot onboard the SD card. Sep 27 02:48:08 ic Sep 27 02:48:29 Yep. Sep 27 02:48:49 I wanted to set up wifi, and update, and then upgrade the board. Sep 27 02:49:14 Oh well. Sep 27 02:49:26 It could be the USB cord. It is a bit loose. Sep 27 02:52:01 I found a better cable. We shall see. Sep 27 02:55:35 It could be that I am drawing too much power and not supplying enough. Sep 27 02:56:06 I unplugged the Cam. Sep 27 02:58:37 does it work now Sep 27 03:01:50 Nope. Sep 27 03:02:23 I will try another 'puter. **** ENDING LOGGING AT Sun Sep 27 03:02:40 2020