|
You will still be using busybox utils like cat and grep unless you also install coreutils and maybe some other packages. But a cursory test shows the busybox symlink commands work just fine from bash.
|
# ? May 2, 2024 19:39 |
|
|
# ? May 5, 2024 21:17 |
|
ryanrs posted:You will still be using busybox utils like cat and grep unless you also install coreutils and maybe some other packages. But a cursory test shows the busybox symlink commands work just fine from bash. yeah, they usually do i still wonder if there's any benefit to using "[" vs. "[[" if you're only using busybox though. seems to me since they're both technically builtins there'd be no performance advantage to using either over the other, but since double brackets also have extended functionality idk why you'd ever use singles, other than maybe compatibility reasons?
|
# ? May 2, 2024 19:51 |
|
speaking of busybox, does anyone use toybox? it's what google uses in android instead of busybox, because they know the busybox people are serious about the GPL lol i'd guess a lot of it is just BSD/AOSP-licensed busybox equivalents, but maybe it does some things better by dint of being newer? idk. the only exposure i have to it is using it in pretty drat old versions of android (7-10), and once you root those they usually install busybox for you lol. even termux comes with busybox iirc e: hmm latest release is from 2023, although it seems to be kinda actively developed Beeftweeter fucked around with this message at 22:50 on May 2, 2024 |
# ? May 2, 2024 22:38 |
|
How are temperatures cooler in Linux for my laptop than Windows? God drat Windows sucks lmfao.
FlapYoJacks fucked around with this message at 22:56 on May 2, 2024 |
# ? May 2, 2024 22:54 |
|
Maybe poorly tuned Linux thermal management is running the fans faster than it should?
|
# ? May 2, 2024 23:15 |
|
50 background svchost.exe threads each using 0.05% CPU keeping your CPU package running in a higher C-state all the time
|
# ? May 2, 2024 23:54 |
|
windows is checking for start menu mods every 10ms
|
# ? May 3, 2024 00:31 |
|
Perplx posted:windows is checking for start menu mods every 10ms App those ads being served real-time in the start menu.
|
# ? May 3, 2024 00:50 |
|
forever pinging Microsoft servers awaiting the exact instant to nag you about yet another copilot product
|
# ? May 3, 2024 06:54 |
|
Dell Laptop Platform Profile Patches Being Worked On For Linux
|
# ? May 3, 2024 08:04 |
|
Beeftweeter posted:speaking of busybox, does anyone use toybox? I use Busybox still, and don't have any plans to change in my designs. Busybox is GPL2, so it's not really a big deal to include in a product IMO. I have to make sources available for it (along with any modifications that I made to Busybox) on request, but that's not really a big deal. I don't have to give my entire product source-code, or my signing-keys, or anything like that. It's been a while since I've checked, but I think that Busybox still has a lot more applets than Toybox. And a more active development community.
|
# ? May 3, 2024 19:18 |
|
Poopernickel posted:I use Busybox still, and don't have any plans to change in my designs. Busybox is GPL2, so it's not really a big deal to include in a product IMO. I have to make sources available for it (along with any modifications that I made to Busybox) on request, but that's not really a big deal. I don't have to give my entire product source-code, or my signing-keys, or anything like that. i spent an hour or two trying to get toybox to compile with WASI (using a-shell on my ipad, you can compile and execute WASM) and couldn't lol. but i was able to get a few of the applets to compile with the ios sdk, using llc to compile to bytecode and then lli to interpret anyway yeah there definitely aren't as many features or applets, or features within applets. even printf is barebones compared to busybox but i wasn't able to get it all to compile, and since i had to do it manually per applet i just didn't do more than 2 lol. it does seem like some of them are actually more fully featured than their busybox counterparts, but only a few, mostly ones that you'd expect android oems might want (dd, tar, etc.). since you do embedded work it might be worth a look-see e: just to clarify, as you might've inferred you can compile each applet as a standalone application Beeftweeter fucked around with this message at 02:35 on May 4, 2024 |
# ? May 4, 2024 02:28 |
|
FlapYoJacks posted:How are temperatures cooler in Linux for my laptop than Windows? God drat Windows sucks lmfao. my experience is that the CPU will run a lot less with linux (for instance, just think about running apt upgrade vs. whatever the hell makes windows update take 45 minutes on an nvme drive) but battery life is still somehow worse
|
# ? May 4, 2024 03:27 |
|
oh toybox has a status page (updated april 8), maddeningly though if you click on any of the commands it just links you to a sometimes nonexistent man page though i guess if the goal is to make mostly identical implementations then that's kinda cool the roadmap and faq are kinda interesting too
|
# ? May 4, 2024 03:33 |
|
ostree is the gold standard for os upgrades and it is bizarre that none of the other desktop oses have anything that comes close. mobile things have a/b partitions which work similarly and are technically more secure in some rather insane threat scenarios i guess. but yeah if silverblue wants to update itself it builds a deduplicated second /usr in the background from the bits it downloads and then it prompts you to reboot into it at time convenient for you. if the reboot fails then the kernel and /usr are rolled back. and each new build of silverblue is built from scratch on fedora's build servers so you don't have several years of god-knows-what crap being dragged around.
|
# ? May 4, 2024 03:39 |
Yeah there's really only three downsides to OSTree. 1: Non-RPMs are difficult to install, forcing you to build an rpm to overlay. This can be an issue with kernel mods or such. 2: The default overlay command doesn't let you run a newly installed application until you reboot into the new image. Though applying the --apply-live flag applies it to the current booted image now so you can avoid this 3: Updates take longer to prepare than a traditional package manager. That said, the updates area all prepared while the system is booted in the background and when you reboot it's just as fast as if no update was needed since you just booting into a different, complete, image. So you actually have more system uptime when doing updates.
|
|
# ? May 4, 2024 04:18 |
|
Mystery Linux Puzzle Calling all bluetooth protocol nerds: I've captured some hex! I'm trying to get bluetooth working on my wifi router. It has a TI CC2540T on a TTL serial port, not USB. It uses serial, similar to board-mounted GPS modules. I do not think it has RTS and CTS hooked up (traces might exist on the pcb, but the SoC pins aren't configured for it right now). When I connect to /dev/ttyMSM1 at 115200, I get periodic packets of garbage, but I think it's a binary protocol, not e.g. wrong baud rate. I converted one of these bursts (not the one pictured above) into hex, and it looks like two packets: code:
So I think this is a hci_uart protocol, used to send bluetooth packets over 8-bit serial. I think I need to call btattach with the right protocol, but I haven't gotten it to work. Or maybe I need to call hciattach, again with some protocol arg? Anyone know what hci protocol this is? It doesn't seem to match H4. code:
It's also possible this is the CC2540T bootloader asking me to upload the firmware image. But I don't think so, since the CC2540T contains plenty of flash. My goal is to figure out the necessary magic, then document it on the OpenWrt wiki. If I can get it working, I might try tethering my router to my phone for lols. e: for some reason, the module is able to terminate my terminal programs (screen, picocom) just with this binary data. I wrote a plain C program to read the serial tty and print better error info. code:
Now the byte count field at offset 3 exactly matches the length of the following packet body, enclosed with [ ]. Finally, after that last packet, the device causes read() to immediately return 0 several times in a row. If I restart my program, it can open and block on the read() once again. How would a 3 wire serial port cause that? Break signal maybe? I think I need to set the serial tty line discipline to n_hci (15). But I have not messed with line disciplines before and the linux docs contain some dire warnings: quote:Do not re-use ldisc numbers as they are part of the userspace ABI and writing over an existing ldisc will cause demons to eat your computer. You must not re-register over the top of the line discipline even with the same data or your computer again will be eaten by demons. In order to remove a line discipline call tty_unregister_ldisc(). e3: maybe the format matches TI's vendor HCI. The opcodes in the hexdump don't seem to decode, tho. ryanrs fucked around with this message at 17:34 on May 4, 2024 |
# ? May 4, 2024 06:58 |
Sapozhnik posted:ostree is the gold standard for os upgrades and it is bizarre that none of the other desktop oses have anything that comes close. mobile things have a/b partitions which work similarly and are technically more secure in some rather insane threat scenarios i guess. all without any kind of self-repair nonsense that’s likely to break when there’s inevitable edgecases
|
|
# ? May 4, 2024 07:42 |
|
ryanrs posted:
I don’t own an oscilloscope so I can’t look at the raw voltages and how they change in a given time frame, and I don’t really know how ttl serial works at the physical level, but it kind of sounds like the host processor is receiving a lot of hangup signals which is causing read() to return zero. https://learn.sparkfun.com/tutorials/serial-communication/all According to this, an idle line is one where the voltage is high. My guess is that this is the best way to indicate carrier and that there’s someone on the other end. That end will bring the voltage low in order to indicate data. I haven’t found any documentation to support this, but I suspect that letting the rx stay low for awhile will indicate a loss of carrier to the host processor. In which case, the driver would probably want to cut any blocking call with a short read because there’s no one on the other end of the line.
|
# ? May 4, 2024 17:33 |
|
sb hermit posted:Anyways, taking all of this seriously... I have a Mesa 6i25 card and it's such a weird thing. It has no drivers, the closest thing to drivers it comes with is a text file with all the memory offsets for the memory locations you read/write to interact with it. So okay, you assign it the UIO driver which lets you mmap it, and then you read some registers and do some raw pointer math to calculate all the necessary offsets. This part was easy to me at least, and it's lightning fast since it makes no system calls (read()/write()/ioctl()) to interact with which otherwise have an overhead associated with it. You dereference the pointers as if they were any other memory and the memory controller turns those into PCI commands, great. However, it doesn't have any interrupt on change capabilities. It's designed for controlling mills and other similar pieces of manufacturing gear that don't really have a use for things other than like stepper controllers and quadrature counters and such. But, the UIO device file which you can mmap to expose device memory actually lets you poll() or blocking read it to wait for an interrupt if the device can generate those. Thing is, the source code for the firmware is available. While it's a PCIe device, it's actually an FPGA implementing original PCI connected to a PCI to PCIe ASIC. I also have reason to believe that the interrupt line is hooked up because the vague documentation seems to suggest one of the peripherals that I don't understand makes use of it. The firmware is also arranged as a core module and one module per peripheral type, and you can compile firmware with the number of each module you want to use. So theoretically it should be fairly easy to implement an interrupt-on-change module that toggles the interrupt line and gives you a register that tells you which pins changed since you last read it. But I don't know any HDL and especially not the one it uses, so guess I'd better learn at some point BattleMaster fucked around with this message at 18:00 on May 4, 2024 |
# ? May 4, 2024 17:56 |
|
Found another clue: I timed the packet bursts, and they are almost 60 secs apart. I have GPIO access to the bluetooth module's reset line, and tried asserting it for a while. The packets stopped coming. When I de-asserted the bluetooth reset, it takes exactly 60 secs before I see a packet. code:
sb hermit posted:According to this, an idle line is one where the voltage is high. My guess is that this is the best way to indicate carrier and that there’s someone on the other end. That end will bring the voltage low in order to indicate data. Yes, this seems likely. After the last timeout, it might hold the line low for a bit, then reset itself. ryanrs fucked around with this message at 18:00 on May 4, 2024 |
# ? May 4, 2024 17:58 |
|
Crap I can't believe I did a quote instead of edit
|
# ? May 4, 2024 17:59 |
|
60 seconds apart? it sounds like it didn't get anywhere near close to initializing enough to do this but, uh, they're not bluetooth beacons, are they?
|
# ? May 4, 2024 18:00 |
|
Could be? It's the built-in bluetooth module in an Aruba 'enterprise' wifi access point. So whatever their enterprise customers use bluetooth for, I guess. Would they start beaconing poo poo before even establishing host comms? e: HPE Aruba AP-303H Hospitality AP. For when your enterprise is a hotel, I guess.
|
# ? May 4, 2024 18:02 |
|
That honestly sounds like a use case where you'd want to specifically make use of Bluetooth beacons, not letting people actually connect to it that way
|
# ? May 4, 2024 18:09 |
|
ryanrs posted:Could be? It's the built-in bluetooth module in an Aruba 'enterprise' wifi access point. So whatever their enterprise customers use bluetooth for, I guess. i honestly don't know. it's possible i guess. if the chip isn't even communicating with the system then i'd think it's really unlikely, but it could be a host advertisement beacon
|
# ? May 4, 2024 18:10 |
|
BTW, these bytes aren't being sent over the air (I hope). They're coming in on the Host Controller Interface (HCI). I think it's trying to handshake, then getting mad about being snubbed.
|
# ? May 4, 2024 18:15 |
|
BattleMaster posted:
you’re a braver person than I am I draw the line at fpgas… maybe I’ll pick it up someday but so many of those tools are proprietary and the hardware is so hard to source although I think I have a cyclone v somewhere
|
# ? May 4, 2024 18:17 |
|
ryanrs posted:BTW, these bytes aren't being sent over the air (I hope). They're coming in on the Host Controller Interface (HCI). I think it's trying to handshake, then getting mad about being snubbed. yeah, i thought maybe it could just be regurgitating what it's trying to send over the air, but idk probably not. just throwing out suggestions i agree it does seem more like it's trying to boot, not receiving whatever it's looking for and looping because of that, though. but i'm pretty sure you and sb have more knowledge about debugging this kind of thing than i do lol
|
# ? May 4, 2024 18:18 |
|
tbh, I think it would be cool to control an access point over bluetooth if you somehow can’t get to it over ethernet and need to reset it or something and you’d otherwise have to bust out a ladder to get to it
|
# ? May 4, 2024 18:19 |
|
sb hermit posted:tbh, I think it would be cool to control an access point over bluetooth if you somehow can’t get to it over ethernet and need to reset it or something and you’d otherwise have to bust out a ladder to get to it you probably can? there's BNEP (ethernet emulation), if it had a bridge to the rest of the interfaces you should be able to, in theory anyway but tbh i've never even thought about adding bluetooth to a router. i suppose it'd be pretty easy with one of those little usb bt adapters though, maybe i can give it a try when i get openwrt going
|
# ? May 4, 2024 18:24 |
|
It would be a funny but completely logical move for a hardware engineer to just hook up the lines and not have anyone listen to them because a PM decided that there was no budget or interest in writing the glue to allow the software to actually talk to the bluetooth chip and if the bluetooth chip emits the beacon as needed, mission accomplished
|
# ? May 4, 2024 18:27 |
|
Beeftweeter posted:you probably can? there's BNEP (ethernet emulation), if it had a bridge to the rest of the interfaces you should be able to, in theory anyway That’s true. I was more going for a binary protocol over a serial interface or something. Actually bridging the bluetooth ethernet, wifi ethernet, and physical ethernet traffic sounds like quite a flex but maybe a mite bit unnecessary. On the other hand, your comment made me think a little more about it. Exposing the bluetooth as an ethernet device would probably be the best idea to configure it because you could just use a web browser. A much more modern 2024 solution than asking the user to install custom software to talk serial over bluetooth.
|
# ? May 4, 2024 18:34 |
|
sb hermit posted:tbh, I think it would be cool to control an access point over bluetooth if you somehow can’t get to it over ethernet and need to reset it or something and you’d otherwise have to bust out a ladder to get to it Automatic internet failover by tethering to the nearest employee smartphone and making it the default route for the entire department.
|
# ? May 4, 2024 18:36 |
|
sb hermit posted:It would be a funny but completely logical move for a hardware engineer to just hook up the lines and not have anyone listen to them because a PM decided that there was no budget or interest in writing the glue to allow the software to actually talk to the bluetooth chip It's actually a big time feature mentioned in all their marketing material. Enterprise wifi 'owns' the backhaul in corporate deployments, in the sense that there is big invested capital to get power+data in the form of ethernet to APs all over the building. So the enterprise gear has adopted stuff like bluetooth, zigbee, and other low power protocols. And it does honestly make sense to have wifi APs be the backhaul for these low power protocols, rather than building out a parallel system on 2.4 GHz low bandwidth mesh. And as a bonus, if you can take a bunch of open standards and combine them in such a way that your proprietary management software is required to run it all, that's a win, too.
|
# ? May 4, 2024 18:57 |
|
I just thought of an amazing hack to reprogram the CC2540 in-system. Disable both the console uart and the bluetooth uart on the SoC. Use the SoC gpio pin routing to make a crossover cable in the SoC fabric to connect the bluetooth serial port pins to the console uart pins. Then I should be able to talk directly to the CC2540 via the router's normal console port. e: Hmm, not sure that will work. I wish I had the SoC programming manual. I know on Nordic microcontrollers you can do weird stuff like attach 1 input pin to multiple peripherals. I guess a less-weird solution would be to echo characters between the uarts. But I'm not sure it even needs to have firmware loaded. None of the NOR partitions looked like CC2540 code. The ELF binaries I found were all for ARM (the CC2540 has a 8051). ryanrs fucked around with this message at 01:57 on May 5, 2024 |
# ? May 5, 2024 00:09 |
|
TI BLE Vendor Specific HCI Reference Guide It's a Bluetooth HCI command being tunneled inside a vendor-specific HCI event packet. It definitely looks like Texas Instrument's HCI extensions, which makes sense. Now I just need to find where the hci_ll kernel driver is hiding (hopefully somewhere in kernel_menuconfig). e: part of my confusion was that somewhere along the way, linux stopped calling TI's extensions "texas" and renamed it to "ll", which is really hard to search for. ryanrs fucked around with this message at 04:01 on May 5, 2024 |
# ? May 5, 2024 03:56 |
|
|
# ? May 5, 2024 21:17 |
|
lol i'm setting up a new AT&T internet connection with a linux router behind their gateway device i was trying to figure out why my router lost its DHCPv6 address and prefix delegations overnight my first thought was i had run into another IPv6/DHCPv6 bug in their lovely gateway firmware nope, turns out i forgot to allow the inbound DHCPv6 packets code:
|
# ? May 5, 2024 18:49 |