**** BEGIN LOGGING AT Sat Dec 11 02:59:56 2021 Dec 11 06:25:34 Otay...I got the BBBlue on but the pru needs to be attached or not to the receiver? Dec 11 06:25:38 I am using librobotcontrol. Dec 11 06:26:05 I am trying DSM2 RX on the BBBlue and a DSM2 TX to control it. Dec 11 06:26:18 Anyway, when people wake up, please say something. Dec 11 14:23:32 zmatt: my ring buffer keeps overflowing!!!! Dec 11 14:25:02 i tried option 1 of the two pastebins and just changed the data emmitter to just a write of the string with no delays and stuff. I can run for about 2 minutes before the ring buffer causes the PRU to abort Dec 11 14:26:33 if I run without sending data over the TCP it runs fine. The key from my testing is that widx updates properly. when I do not send data widx updates with the same frequency as ridx and I never have a problem with the buffer spilling over Dec 11 14:28:53 when it crashes I notice that widx updates less and less frequently and eventually ridx == widx and the code blows up. I am not sure what causees widx to slow down that is controlled by the PRU right? Dec 11 14:33:05 when just deleting msg from the buffer ridx and widx run in lock step. When it is going to blow up the jumps in the widx counter increases in increments of a few 100 to 8000 or so over the course of 2 minutes before crashing. How can I avoid this ? Dec 11 14:33:44 Hello, i'm trying to connect a TFT ili 9341 to my BBB i ve modified the device tree as bellow and added the PWM backlight and the ili9341 drivers Dec 11 14:34:10 https://pastebin.com/vCDJRUTQ Dec 11 14:37:11 here is the output of dmesg Dec 11 14:37:13 https://pastebin.com/DqXgUzzU Dec 11 18:40:08 mattb0ne: I guess I underestimated how much data is being buffered by the kernel, so the write() calls never end up doing buffering in python but instead pass the data to the OS every time (which is slow)... solution is to do batching in the writer, like I showed in another pastebin Dec 11 18:48:06 ok Dec 11 18:48:14 will try that Dec 11 21:34:39 zmatt: I do not understand how the batch code works Dec 11 21:34:52 how does it even interface with the ring buffer Dec 11 21:35:29 what do you mean? that part hasn't changed at all Dec 11 21:36:27 oh Dec 11 21:36:29 note that to keep things as simple as possible I also changed the message format slightly Dec 11 21:36:42 but I also provided matching client code Dec 11 21:36:45 i guess how the write from recv_messages connect to the other code Dec 11 21:37:24 instead of doing a .write() per message I just gather the data to be written into one big string and write that Dec 11 21:38:08 I also save time by not updating the user interface for each message but only once per batch Dec 11 21:38:49 that way make the update rate adaptive: the more time the user interface update takes, the larger the next batch will be Dec 11 21:38:50 ok that makes sense since I do not need that resolution anyway Dec 11 21:39:42 ok I think i get it Dec 11 21:40:05 what was throwing me off was that it was split as two separate pastebins Dec 11 21:40:11 but they are meant to go together Dec 11 21:40:20 one for the server and one for the client you mean? Dec 11 21:40:41 I mean, you can batch on either side independently of the other side Dec 11 21:41:06 yeah thoes last two pastes Dec 11 21:41:37 the only sense in which they "go together" is that both of them use the same message format "timestamp_cycles,force,angle\n" Dec 11 21:42:15 while you previously used "time,timestamp_label,force_angle\r" Dec 11 21:43:41 but the choice to batch or not is an implementation detail, the client doesn't know or care whether the server uses batching, the server doesn't know or care whether the client uses batching Dec 11 21:43:57 it's just done to improve performance Dec 11 23:13:43 Can anyone relate on my thread please ? Dec 11 23:14:04 here is the kernel log https://pastebin.com/DqXgUzzU Dec 11 23:15:00 and the device tree: https://pastebin.com/KS2fiNSJ Dec 11 23:15:25 in fact i'm trying to use a ili9341 TFT display with BBB Dec 11 23:15:30 Guest1268: first of all, when I said to remove the master@0 node in &i2c I mean the entire node including contents, not move its nonsensical properties to the parent node Dec 11 23:16:22 and it looks like your gpio controllers are failing to register for some reason Dec 11 23:16:29 so something is very broken Dec 11 23:16:58 hmm, it's getting EPROBE_DEFER Dec 11 23:18:11 hmm okay it looks like they do eventually get registered, but... ugh what a mess Dec 11 23:18:51 :/ Dec 11 23:19:05 yeah dunno what's going on here, probably something particular to these 5.x kernels, I haven't yet tried to run one on a beaglebone yet Dec 11 23:19:52 all these parse errors suggest to me maybe the format for gpio references has also changed, which would be incredibly rude but they already broke backwards compatibility in other ways so who knows Dec 11 23:20:04 hummm okay Dec 11 23:20:29 it used to be policy to maintain backwards compatibility, but I guess they stopped caring Dec 11 23:21:28 what kernel shall i use ? Dec 11 23:22:46 I mean, that's up to you. the kernel series used on current beagleboard.org images is the 4.19-ti series Dec 11 23:23:42 okay Dec 11 23:23:54 why are there #address-cells and #size-cells properties in your lcd node? that doesn't make sense, an lcd panel is not a bus Dec 11 23:24:33 i took the from the internet Dec 11 23:28:26 https://pastebin.com/1gXJpMr5 your dts with broken indentation fixed and nonsense properties removed :P Dec 11 23:28:43 (and I moved the backlight declaration closer to the lcd panel) Dec 11 23:29:31 that's not going to fix your problems obviously, but at least it makes the dts easier to read Dec 11 23:29:51 Thanks :) Dec 11 23:30:32 do you have a github project with a maintained 4.19 kernel ? Dec 11 23:30:47 me personally? why do you ask? Dec 11 23:31:21 not a personal project ? Dec 11 23:31:42 i mean a project that i can integrate to my buildroot Dec 11 23:32:00 note that I'm just a random beaglebone user, if you meant to ask whether beagleboard.org has a maintained 4.19 kernel then the answer is yes Dec 11 23:32:11 but *I* don't have a github project with a maintained 4.19 kernel no Dec 11 23:33:46 also, I don't know anything about buildroot or how it deals with different kernels Dec 11 23:35:03 from what i understand that the problem of interfacing with the ili9341 comes from the kernel that i'm using Dec 11 23:35:06 the primary repo for the 4.19-ti kernel series used on beagleboard.org images is https://github.com/RobertCNelson/ti-linux-kernel-dev/tree/ti-linux-4.19.y which contains patches and scripts that directly build a debian package for the kernel Dec 11 23:36:18 Guest1268: I have no idea what your problems are, but there's clearly issues with your dts and the errors seem to imply there's a problem with your gpio declarations (even though they look fine to me), so my wild guess is that maybe they changed the structure of gpio references Dec 11 23:37:43 hmm, the gpio controllers still have #gpio-cells=<2> so maybe that's not it Dec 11 23:37:51 then I have no idea what's going on Dec 11 23:38:48 :/ i will check the driver of ili9431 too Dec 11 23:38:55 thanks anyways :D Dec 11 23:39:22 it looks like most if not all of these errors are temporary ones though Dec 11 23:40:38 your driver seems to load: Dec 11 23:40:41 [ 4.283029] graphics fb0: fb_ili9341 frame buffer, 320x240, 150 KiB video memory, 16 KiB buffer memory, fps=50, spi1.0 at 25 MHz Dec 11 23:42:20 yes it is loading the device ... i have the /dev/fb0 Dec 11 23:42:23 these "errors" from of_get_named_gpiod_flags() seem to be erroneous... are they logged as actual errors or are they logged as debug messages? Dec 11 23:42:50 but the backlight is not working Dec 11 23:43:38 well there's nothing in the kernel log (or at least the part you pastebinned) that suggests why Dec 11 23:44:15 does the backlight device show up but not work, or does it not show up at all? Dec 11 23:44:44 in /sys/class/backlight/ Dec 11 23:44:54 it is empty Dec 11 23:45:12 the /sys/class/backlight is empty Dec 11 23:45:23 hmm, like it's still getting EPROBE_DEFER or something Dec 11 23:45:32 yeah dunno Dec 11 23:48:03 how can i change it to PWM1B ? Dec 11 23:48:28 the pwm_bl_pins Dec 11 23:49:11 change the second argument of the pwms property of the backlight from 0 to 1, and indeed fix the pinmux Dec 11 23:50:37 pwm1b is available on P9.16 (also mux mode 6) Dec 11 23:52:17 AM33XX_PADCONF(AM335X_PIN_GPMC_A3, PIN_OUTPUT_PULLDOWN, MUX_MODE6)    /* P9_16: ehrpwm1a, MODE6 */ Dec 11 23:52:26 and Dec 11 23:52:38 pwms = <&ehrpwm1 1 500000 0>; Dec 11 23:53:44 yup, except the comment on the pinmux is wrong obviously since it's ehrpwm1b Dec 11 23:53:58 yeah xD Dec 11 23:58:46 ouch Dec 11 23:59:09 i think that pin-ctrl is enable-gpios Dec 11 23:59:13 on 5.10.23 Dec 11 23:59:21 https://elixir.bootlin.com/linux/v5.10.23/source/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml Dec 11 23:59:27 enable-gpios is a separate thing Dec 11 23:59:41 only relevant if your backlight has an enable gpio (separate from the pwm) Dec 12 00:00:33 it's an optional property Dec 12 00:02:38 humm okay :/ Dec 12 00:55:04 zmatt: Dec 12 00:55:13 that map line is no good Dec 12 00:55:24 which one? Dec 12 00:55:42 mat(str,txdata).join(',') + '\n' Dec 12 00:55:50 oh you're right Dec 12 00:55:54 getting map object does not have join Dec 12 00:56:03 I tested the client but not the server Dec 12 00:56:03 trying to rewrite it but not getting what I want Dec 12 00:56:13 no biggie Dec 12 00:56:20 i will eventually get it Dec 12 00:56:28 may need multiple lines though =( Dec 12 00:56:33 wrap the map() in a list(), i.e. list( map( str, txmsg ) ).join(',') + '\n' Dec 12 00:56:45 or replace both lines by what's in the comment immediately below it Dec 12 00:58:03 ok Dec 12 00:58:13 honestly the variant in the comment might be clearer Dec 12 00:58:28 although that's up to you Dec 12 00:59:21 AttributeError: 'list' object has no attribute 'join' Dec 12 00:59:28 uhh what Dec 12 00:59:29 hold on Dec 12 01:00:01 ahhh Dec 12 01:00:17 txdata += '\n'.join( map( str, txmsg ) ) Dec 12 01:00:53 ehh Dec 12 01:00:57 txdata += ','.join( map( str, txmsg ) ) + '\n' Dec 12 01:01:43 in python it's separator.join( list ) while in javascript it's list.join( separator ) Dec 12 01:05:36 got ya Dec 12 01:11:45 server side is working welll Dec 12 01:12:08 zmatt you are too good Dec 12 01:12:30 I will tackle the client tomorrow Dec 12 01:12:48 the client should just run Dec 12 01:13:10 yeah I need to drop it in but I want some cake Dec 12 01:13:11 lol Dec 12 01:13:14 and watch TV Dec 12 01:13:31 that's fair, cake is important **** ENDING LOGGING AT Sun Dec 12 02:59:56 2021