05:39 | jduck | anyone seen issues with lots of usb devices connected to a cubox? |
05:40 | cbxbiker61 | do you have a powered hub? |
05:40 | jduck | yes. many :) |
05:41 | jduck | http://j.mp/droidarmy35 |
05:42 | cbxbiker61 | what the heck are you doing? |
05:45 | jduck | testing/research |
05:46 | jduck | one of the usb ports on the cubox flakes out on occasion requiring a reboot |
05:47 | cbxbiker61 | jduck, yeah i think more than one person here has discovered that those ports don't seem to be created equal |
05:47 | jduck | also the cubox tries to boot from usb mass storage endpoints exposed by various devices :-/ |
05:49 | cbxbiker61 | jduck, a patched u-boot should fix that up, you'd have to look into the startup section |
05:49 | jduck | i'm downloading some things atm |
05:54 | jduck | cbxbiker61: so you think it's a hardware limitation and not software related? |
05:55 | cbxbiker61 | quite possibly |
05:56 | jduck | it'd be nice to at least modify the linux kernel to avoid causing the chip to go offline :-/ |
05:56 | jduck | (if at all possible) |
05:57 | cbxbiker61 | jduck, software can quite often be written to work around hardware issues, but i don't know if anyone has quantified the problem |
05:57 | jduck | in my experimentation i think the lower port gets messed up with only about 20 or so devices |
05:58 | jduck | upper port can get to like 30 something before it messes up |
05:58 | jduck | i wasn't able to get over 50 or so |
05:58 | jduck | i think i can put something together to stress test maybe |
06:00 | jduck | usb limitations seems to be a fairly common problem that many people seem to overlook and rarely document :-/ |
06:00 | jduck | i have an expensive server motherboard that has similar limits, but my older server box was able to support many many more |
06:01 | jduck | cbxbiker61: any thoughts on where to disable this usb drive booting? |
06:02 | cbxbiker61 | to do that, you'll need to clone the u-boot tree from solidrun git and find it in the source code |
06:03 | jduck | aww. i was hoping for a config change :) |
06:03 | cbxbiker61 | it's been a while since i looked at the boot code, so i can't remember the source file |
06:05 | cbxbiker61 | jduck, with the arm soc devices, i don't think they imagined people connecting 20 or 30 devices, so not too surprising you may see issues |
06:06 | jduck | honestly i don't think anyone thinks of someone doing this :-/ |
06:07 | jduck | the potential areas where these problems arise/can be fixed are very interesting to me |
06:07 | cbxbiker61 | well the guy who wrote the usb spec must've thought of it a bit, but theoretical limits are just that |
06:10 | jduck | yeah i'm curious where the practical limits come into play :-/ |
06:10 | jduck | is it the bios? the chip design? bootloader? meh i suck at this low level stuff |
07:06 | jnettlet | jduck, if you are daisy chaining multiple hubs then there are some known errata concerning that and the usb host chipset the Cubox has. |
07:07 | jduck | sort of, not daisy chaining as there's a standard-specified max depth of like 7 |
07:07 | jduck | there are diagrams in the slides i linked |
07:08 | jduck | basically a cubox becomes the host machine (root hub) in this case, then i'm using ethernet to communicate to the cuboxen |
07:08 | jnettlet | well the difference you are seeing is that the two ports are in fact two different types of devices. |
07:08 | jnettlet | The lower port is a standard usb 2.0 host port, the top port is an OTG device configured for host mode |
07:09 | jduck | ok |
07:10 | jnettlet | and there are errata concerning the chipidea chip that freescale uses. Most are worked around but stressing USB can trigger some odd behaviour I am still trying to clean up. |
07:10 | jnettlet | For instance we have to disable ehci stream mode. But that would effect your setup |
07:10 | jnettlet | s/would/wouldn't/ |
07:10 | jnettlet | still on my first cup of coffee |
07:11 | jduck | my idea was to use a facedancer to simulate tons of usb devices connecting |
07:11 | jnettlet | okay |
07:11 | jduck | since afaik the usb host can't tell the difference between one device with tons of endpoints and a whole downstream hub setup |
07:12 | jnettlet | jduck, okay so here is where a couple of kernel config options come into play |
07:12 | jduck | at least this way i can isolate things instead of plugging/unplugging droids :-/ |
07:13 | jnettlet | You should try and disable CONFIG_USB_EHCI_TT_NEWSCHED and see if it helps stability for you. |
07:14 | jnettlet | and there is one other setting I hacked in for testing at one point. Hold on and let me check my logs |
07:15 | jnettlet | but that option fixed the lockups if I remember correctly. I never got to finish my testing so I haven't incorporated the changes in our kernels yet. |
07:16 | cbxbiker61 | morning jnettlet, is the patchset for kodi ready? |
07:17 | jnettlet | cbxbiker61, almost :) My overnight test crashed and I need to look at it. |
07:20 | jnettlet | jduck, here is the other hack that we have on the Novena to help with usb device disconnects. https://github.com/xobs/novena-linux/commit/2aa35df930ed5de228fa6ef7ac574a8f66419f4a |
07:21 | jnettlet | cbxbiker61, today is a holiday in Israel so I should have less distractions :) and I am feeling a bit better this morning. |
07:21 | jnettlet | I want to update to the new galcore binary interface as well. |
07:21 | cbxbiker61 | that's good |
07:22 | jnettlet | jduck, if those changes help you out let me know so I can roll them back into my kernel and images. |
07:23 | jduck | ok, will do. |
07:26 | jnettlet | thanks for showing up. I had spent a solid 3 days on this and then got pulled into other projects and never finished my research. |
07:26 | jduck | we'll see if the same thing happens to me :-/ |
07:27 | jnettlet | although my findings did help stabilize the bluetooth chip on the Novena, or at least xobs has brought it up again. |
07:27 | jduck | are there known problems with the sdcard slot and huge sd cards? |
07:27 | jnettlet | jduck, you may also want to test the mainline kernel. I know there has been a slew of patches to the chipidea driver. |
07:27 | jnettlet | jduck, not that I know of. The largest I have tested is 64GB |
07:28 | jduck | hrm ok this is 32gb and for some reason didn't boot |
07:29 | jnettlet | I am running a few here and they are fine. |
07:30 | jnettlet | jduck, oh and concerning the USB booting. That is the iMX6 recovery boot process. If your sdcard doesn't have a valid boot block then the iMX6 soc will attempt to boot from the USBOTG port |
07:31 | jnettlet | you may be able to turn that off by burning a fuse on the microsom, but I wouldn't recommend that. |
07:31 | jduck | i'm using the "Armbian" image and it's complaining hard :-/ |
07:32 | jnettlet | I am not familiar with that image. If you wouldn't mind can you give our Jessie image a try. Only the cli version has been rolled out. |
07:32 | jduck | it's telling me bad CRC and missing u-boot.img .. duno wtf |
07:32 | jnettlet | https://images.solid-build.xyz/IMX6/Debian/ |
07:33 | jduck | which do you prefer? 1019 ? |
07:33 | jnettlet | the most recent |
07:33 | jnettlet | yes |
07:34 | jnettlet | these images are apt-get upgradeable to any new packages we release as well. |
07:34 | jduck | ofc |
07:34 | jduck | happy to flash this as the armbian thing is sadly a dud |
07:35 | jnettlet | great. Any feedback is welcome |
07:41 | jduck | it booted |
07:42 | jduck | but i see all the same errors in the bootloader. i guess maybe because it's trying to mmc ? |
07:43 | jnettlet | jduck, oh that is u-boot poking around looking for files. we look in / and /boot of the first partition, and a couple of files are looked for at raw disk sectors |
07:45 | jnettlet | jduck, the bad CRC is because a custom environment hasn't been saved to the sdhc card, so it loads the default one I setup in u-boot |
07:45 | jnettlet | mostly stupid u-boot logging |
07:45 | jnettlet | that project likes to make every failure so dramatic |
07:46 | jduck | seems so |
07:46 | jduck | but then again, could probably turn some knobs and have most of that crap go away |
07:46 | jduck | (at the cost of some lost flexibility?) |
07:47 | jduck | sad to not see kernel boot in usb serial console :( |
07:49 | jnettlet | jduck, it should boot on the serial console. Probably remove quiet from the /boot/uEnv.txt cmdline |
07:50 | jnettlet | you may want to increase the loglevel as well |
07:51 | jnettlet | too bad you can't set different loglevels for serial and hdmi |
07:54 | jduck | that did it. thx |
07:55 | jnettle | 07:55 * jnettlet is here to please |
08:17 | jduck | ok armbian is working now too. seems like just crap config |
08:28 | jnettlet | jduck, so how many usb devices do you currently have hooked up? |
08:34 | jduck | hrm i think like 60 |
10:04 | topi` | jnettlet: so you're back ? |
10:04 | jnettlet | topi`, was I ever truly gone? |
10:05 | topi` | jnettlet: I don't know :) it was my impression that you had vacations |
10:05 | topi` | I wish I had vacations... |
10:05 | jnettlet | topi`, no actually my bouncer had just fallen off of freenode.net...which is kind of like a vacation. |
10:06 | jnettlet | I did travel for a couple of weeks, and will be traveling next week also |
10:11 | topi` | :) |
10:11 | topi` | do you get extensive body scans when you travel to Israel, like the rest of us? :) |
10:13 | topi` | I just ordered a small (1") display unit made by Sharp (it's not TFT, but it needs buffering) , do you have any ideas how to interface it with the HB? It's a SPI device and adafruit.com has some instructions |
10:16 | topi` | ugh, the adafruit driver is made in C++ |
10:17 | jnettlet | topi`, it should just be a matter of wiring it up and using their driver. |
10:17 | jnettlet | Do you have a link? |
10:18 | jnettlet | last time yes I got the full security check. When I travel with my wife it is usually easier |
10:18 | topi` | https://github.com/adafruit/Adafruit_SHARP_Memory_Display |
10:18 | topi` | do you look .. suspicious? :) |
10:19 | topi` | a guy carrying lots of electronics... hmm |
10:19 | jnettlet | yeah, my bags can't look good going through x-rays |
10:20 | topi` | jnettlet: how do I access the SPI signals through Linux? |
10:22 | topi` | that SHARP driver is more friendly than regular TFT drivers - it seems not to be timing critical, you just push pixels through SPI |
10:22 | jnettlet | topi`, oh good question. Let me doublecheck we are turning on spidev |
10:22 | topi` | the drawback on that display is that it is very expensive (adafruit asks $39) |
10:23 | jnettlet | 800x480? |
10:25 | jnettlet | topi`, yep you need spidev enabled, which we don't do. I will get that fixed up in our packaged kernels |
10:25 | jnettlet | you build your own though right? |
10:27 | jnettlet | topi`, here is a C library with python bindings that I think will work better. https://github.com/wrobell/smemlcd |
10:28 | jnettlet | and yes it works through spidev |
10:29 | topi` | I'll have a look at spidev. Is it just a matter of enabling it in the kernel config? |
10:29 | jnettlet | yes |
10:30 | topi` | OK, if that driver works with the Raspi, then it's going to work wiht HB as well |
10:31 | topi` | an arduino is an entirely different matter... even doing simple operations take hundreds of nanoseconds on those slow clocks |
10:31 | topi` | it might require a microsecond to just calculate an arithmetic shift left :) |
10:32 | jnettlet | lol |
10:32 | jnettlet | yeah they aren't barn burners |
10:32 | topi` | I'm eyeing on the STM32 family for "smartifying" my house |
10:33 | topi` | there are products like TI CC3200 that allow you to connect via wifi and there's enough flash to run a python interpreter on the same chip |
10:33 | suihkulokki | IIRC fbtft driver is for such small displays connected via spi/i2c |
10:34 | topi` | suihkulokki: that Sharp part is not a TFT, but some kind of eink display |
10:35 | topi` | those are used in some wearables |
10:35 | cbxbiker61 | $10 esp8266 huzzah is ideal for home automation, built-in networking |
10:36 | cbxbiker61 | adafruit huzzah |
10:36 | cbxbiker61 | i'm using them quite a bit |
10:36 | topi` | ok |
10:37 | topi` | I wonder how much Adafruit asks for shipping to EU |
10:38 | jnettlet | I have no idea |
10:38 | topi` | problem is, for orders that exceed 22 EUR I have to submit customs declaration and some firms like UPS charge you $25 even if you take care of customs yourself! |
10:38 | cbxbiker61 | topi, a small order is quite expensive, best to order larger quant |
10:39 | topi` | I hate ordering stuff overseas because of the customs |
10:39 | cbxbiker61 | lots of good stuff though, good display modules, etc |
10:39 | cbxbiker61 | you can hack the cheaper esp8266 modules, it's just that the adafruit module is a lot easier to work with |
10:40 | topi` | I can believe it |
10:40 | topi` | but it's easier to shop from dealextreme, they're friendly enough to forge the value of shipment to $10.00 every time :) |
10:40 | jnettlet | topi`, check european amazon sites. I know that adafruit has their store listings there |
10:41 | topi` | that's a good hint |
14:47 | kasvain | hey. i managed to load cubox uart bin, and i get the installer script open. after i do the Install U-Boot to SPI flash, it tells /dev/mtd0 (SPI Flash) is invalid |
14:48 | kasvain | i have u-boot.bin at /boot/ on the usb stick |
14:48 | kasvain | what i'm missing? |
14:51 | kasvain | if i do ls /dev, can't see mtd0 there |
14:54 | kasvain | is the nand flash really broken or does the uart binary do the detection |