Skip to main content

Posts

Showing posts with the label hardware

Cardputer as a Hardware Password Manager

For the past month, I've been prototyping my own hardware password manager using the Cardputer , a compact device that's surprisingly perfect for the task.  I learned about the Cardputer while searching for the ideal hardware to build a password manager. It's essentially a microcontroller (the ESP32-S3) packed with a screen and a keyboard. What really sold me on it were these features: Direct Interaction: I can interact directly with the device – typing my master password, searching for credentials, and confirming password entry, all on the Cardputer itself. USB Keyboard Emulation: The device can seamlessly emulate a USB keyboard, allowing for both manual and automatic password entry into other devices. Hardware-Accelerated Crypto: The ESP32-S3 boasts hardware acceleration for AES and SHA operations, crucial for secure password management. Secure Element Integration:  The Cardputer supports an optional ATECC608B secure element (available as an official accessory ), provid...

Hardware Password Manager

[Updates 2025-01-20] The original blog post assumes that all passwords are stored in one password manager, and the password manager either unlocks everything or nothing (e.g. Keepass). After discussing with friends, I realized that if I use something like pass , and I use a hardware GPG token, I can actually store and sync all encrypted passwords to all devices, because I will only decrypt the passwords on demand, and the computer will not see the GPG private key. The compromise is that the computer will see the list of all password entries (e.g. accounts), as well as a few other issues . I've been using Keepass for many years. I don't use online password services because I cannot fully trust them. Besides, I may not always have Internet connection, which is why I also don't use a self-hosted service. Everything has been working fine, until I turn my paranoid knob to the max. Here's the thought experiment . The Imaginary Scenario Let's say I have 100 PCs for differe...

Chasing a Wifi Ghost

For quite a while, I have not been so confused (and excited) by a technical issue. The problem is: I got very slow download speed (~10Mbps) on my Windows laptop, when connected to Wifi. To make it a bit more puzzling: - The upload speed is much better (~60Mbps). - Sometimes the download speed may reach ~100Mbps for a few seconds, before quickly fall back to ~10Mbps. Having been suffering from it for a few months, I finally decide to take on this issue today. Beginning of the Journey As usual, there are some troubleshooting routine I should do. Also as usual, they don't help much. - Try other devices with the same Wifi - Try to connect to other Wifi - Try to connect to Ethernet - Reset the Wifi router - Run Windows troubleshooter Well, eventually I did get some information. The download & upload speed is actually normal for all my other devices, which includes Android/iOS phones, MacBook Pro etc.  This pieced of info narrowd the root cause down to the laptop itself: The rou...

杂记 20120428 | Misc Notes 20120428

1. Google Chrome 强制开启GPU加速 google-chrome --ignore-gpu-blacklist 2. 删除不用的locale 安装localepurge 3. 带电源的外置硬盘不能识别 dmesg显示错误信息 device not accepting address NN, error -110 device descriptor read/64, error -110 unable to enumerate USB device on port N 参见 http://www.noah.org/wiki/USB_error_-110_in_dmesg_log https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.15/+bug/54273 切断硬盘电源,等几秒后重新连接得以解决 1. To force enable GPU acceleration of Google Chrome google-chrome --ignore-gpu-blacklist 2. To remove redundant locale files Install localepurge 3. An external hard drive with it own power cannot be recognized Messages shown in dmesg device not accepting address NN, error -110 device descriptor read/64, error -110 unable to enumerate USB device on port N See http://www.noah.org/wiki/USB_error_-110_in_dmesg_log https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.15/+bug/54273 Power off the hard drive and wait for a few seconds. Then reconnect everything ...

Windows 键盘问题一例

今天打开电脑,进入Windows,登陆时竟然发现键盘不能用!冷静了一下后用软键盘登了,登陆后发现还是不行! 于是用鼠标和软键盘操作,看Device Manager,键盘设备有个黄叹号,设备状态里显示 Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged (code 19) Google之,在 http://www.edmartechguide.com/2009/02/windows-cannot-start-this-hardware.html 里得到线索 于是进入Regedit,在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class项下逐个检查,直到找到{4D36E96B-E325-11CE-BFC1-08002BE10318},发现Class值是Keyboard,那么应该就是这项了 由于权限问题,改名和删除都不行,于是仔细观察各项,发现"UpperFilters"里有个可疑的alidevice,于是删掉,把"kbdclass alidevice"改成"kbdclass" 然后去Device Manager里Uninstall键盘设备,然后刷进,于是可以用了。 这样看来,应该是淘宝的驱动挂了,或者是让我搞挂了。 另外是Device Manager里的PS/2鼠标也不能用,这里是我笔记本上的触摸板。我用的鼠标是USB的,不过注册表里没有发现可疑项,重启以后自然能用了。 另外庆幸我的USB鼠标还能工作,否则输入设备一个都没了。。。好险

Ubuntu 8.10 wacom 绘图板驱动问题

我的绘图板在Linux认成Waltop的板子,一直以来用wacom的驱动跑得好好的。 但是前一阵子更新系统以后就出了问题,现象是移动没问题,但是一点击就没有反应了,得把笔尖离开板子几秒再靠近才行。或者如果一开始迅速把笔尖点在板子上移动也能响应,但是抬起就不行了。 中间折腾了很长时间,一开始以为电池没电了,后来发现Windows下好好的。后来开始到处搜,xorg.conf自然是改了无数次,另外还改了udev, hal。到最后这几个东西弄得差不多都明白了,绘图板还是不干活。 后来,终于在 Ubuntu官方帮助 里看到了如下文字: Users might also be affected by a bug in the 8.1.4 version of the wacom drivers that comes with Ubuntu 8.10, where the input freeze when the pen touches the tablet. If that is the case for you, you can install updated drivers : 于是“一声叹息”。。。 后来想编译份最新的linuxwacom,但是又有别的问题,总报usbParse: Exceeded channel count; ignoring the events.搜了一下,似乎也是很新的问题,开发者还在解决中。 于是下了那个帮助里给的两个deb并安装,似乎第一次没有成功,也可能是没有重启的缘故。但是第二次就好了。 总算是好了。

Vista 无法设置游戏控制器

症状: 系统Vista,几周前DMC4还玩得好好的,这几天突然发现不行了。不论是dx9还是dx10的,就一直黑屏。DMC4Launcher可以进入,但是一设置手柄就卡死。 分析: 起初认为是显卡驱动的问题,更新后无果。 后来想起了dxdiag,载入后发现每次到input那个tab就会卡死(好像中间有几次成功了),于是认为是手柄问题,但是在别的游戏(如smynes)中就工作正常。 后来进入控制面板设置游戏控制器,没有反应。 用VS调试DMC4Launcher以及主程序,前者断在dinput8.dll的一个类似EnumDevices的函数里,后者则是一个奇怪的死循环。后来又调式了游戏控制器选项的rundll32.exe, 跟DMC4Launcher情况一样。 于是去Device Manager,到Human Interfaces Devices中逐个删除,发现一个比较奇怪的设备 Root Enumerated Hid Device。删除之后需要重启,而后竟工作正常了。 想想这几天,更新过Tooya Pro绘图板的驱动,于是打开Painter一看,果然绘图板的压感没了。重装驱动后那个Root Enumerated Hid Device再度出现,而DMC4也随之再次不能进入了。 结论: Tooya Pro的驱动会导致冲突,影响游戏控制器及有关程序(可能主要是dinput8.dll里的那个函数)。不知道哪里的bug,完全google不到。 临时解决办法就是禁掉Root Enumerated Hid Device,仅当需要用绘图板时才启用。不过老得重启还是很麻烦的。

Linux 下绘图板配置

作为一个绘画爱好者,绘图板是必不可少的。 怎奈Linux下面绘图板时认时不认,压感也时支持时不支持。 今天终于下决心弄好它。 我的板子是Tooya Pro,USB版。 Linux下认成WALTOP International Corp. Slim Tablet 系统是Ubuntu 8.04 首先是要定位设备名,一种方法是找到绘图板是哪一个/dev/input/event*,这又有多种方法,一种是看dmesg,记住pci地址,然后去/dev/input/by-path找到对应的,再看其是哪个/dev/input/event*的symlink;另一种方法是用wacdump挨个测试/dev/input/event*。当然也可以二者结合使用。在我机器上绘图板是/dev/input/event2 由于我对/dev/input/event*命名不是很了解,所以担心改了配置后这个数值会变,于是再一个网页上学到了修改udev rules的方法,让它自动建立symlink。后来发现wacom就是这样做的。 具体方法是首先用lsusb等工具找到设备的idProduct和idVendor。 我的绘图板在lsusb下看是172f:0031 然后建立文件/etc/udev/rules.d/65-tablet.rules: KERNEL=="event*", SYSFS{idProduct}=="0031", SYSFS{idVendor}=="172f", SYMLINK+="input/tablet" 这样以后会自动建立/dev/input/tablet到对应/dev/input/event*的symlink,很是方便。 下一步是需要确定板子的坐标范围(或许这步可以省略),主要是用wacdump看看板子左上角和右下角的坐标。后来我有参考了以下板子的说明书,得到坐标(0,0)-(10000,6250) 接着当然是修改xorg.conf (听说最新的Xorg对即插即用支持得很好,真希望不用老改这玩意儿了) ServerLayout Section中加一句 InputDevice "stylus" "SendCoreEvents" 然后加一个InputDevice Sectio...

Windows Vista 更改启动驱动器SATA模式后出现 STOP 0x0000007B INACCESSABLE_BOOT_DEVICE 的解决

参见: http://support.microsoft.com/kb/922976/zh-cn 最近把硬盘sata模式改成了ahci,linux下没什么问题,但是进vista后就出现上面的错误信息。 产生原因大概是安装Vista时使用的IDE模式,因此Vista安装后没有开启ahci服务。 根据上面的链接,解决方法为,先用IDE模式启动,修改注册表 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msahci 把Start键值改为0 然后重启,再改成ahci就行了。

有关 64位Linux 驱动 Atheros 5007EG 无线网卡

[2008-10-03 更新]ubuntu 8.10中新增了acer_wmi模块,可以完美驱动无线网卡了 :) 系统是 Ubuntu 8.04 rc amd64,笔记本是Acer Aspire 4520 无线网卡现在看来是 Atheros 5007EG, 为什么这么说呢,我主要依靠lspci判断,最早识别不出来,后来能认出Atheros,但是没型号。然后一段时间内都认成5006EG。当时也是按它装的驱动。但是最近update pciid后又认成了AR242x。 在 http://madwifi.org/wiki/Compatibility/Atheros 上是这么说的 Atheros AR5007EG ¶ Chipset: AR2425 / AR5007EG URL: http://atheros.com/pt/AR5007EG.htm Supports: 802.11b 802.11g Interface: PCI-Express x1 Device Information: Ethernet controller: Atheros Communications, Inc. Unknown device 001c (rev 01),Subsystem: AMBIT Microsystem Corp. Unknown device 3065 Notes: not supported by HAL as of 2007.04.28 - resturns Hal status 13 Notes: Suported by ndiswrapper with windows driver, but some user reports crash problems Notes: Instructions about how to use the windows driver + ndiswrapper Notes: works fine with ndiswrapper, using old drivers, search ubuntu forums Notes: Sometimes erroneously reported as an AR5006EG by lspci Notes: Works perfectly with latest madwifi...

Gnome下的键盘设置的小技巧

今天突然发现Keyboard设置里面有个Model选项,于是试着设成的Acer Laptop,因为我用的Acer笔记本。 然后发现那些快速启动键都能很好的识别了,具体表现是设置快捷键是可以显示出有意义的字符了,如XF86AudioPlay 不错不错

linux 连接 蓝牙 手机

参考: http://blog.flyingdream.net.cn/2007/%E5%9C%A8-ubuntu-linux-%E4%B8%8B%E5%88%A9%E7%94%A8%E8%93%9D%E7%89%99%E9%80%9A%E8%BF%87-gprs-%E6%97%A0%E7%BA%BF%E4%B8%8A%E7%BD%91/ http://www.chinalinuxpub.com/read.php?wid=1490 测试环境, ubuntu 7.10 + motorola A768i 网上搜这个能搜到很多, 大致是装上很多以bluez-开头和包含bluetooth的包(我差不多都装了), 之后启动bluetooh服务,以及运行gnome-obex-server(Applications->Accessories->Bluetooth File Sharing). 然后就能自动找到手机了(可能也需要修改hcid.conf,见下), 传文件是点右键, Send to, 里面有个Bluetooh的选项。 今天一直在搞rfcomm, 本来是试图连上蓝牙局域网的,但是一直没成功,到现在有点成果。记录如下。 注意: 要用到的命令:hcitool, hciconfig, sdptool, rfcomm, 最好都看一下文档。 另外每次修改配之后注意重启bluetooth服务:/etc/init.d/bluetooth restart 很多命令需要管理员权限,以下省略sudo 步骤: 1.修改/etc/bluetooth/hcid.conf, 关键是如下两行 security auto; passkey "1234"; 第一行很重要, 我一开始设的user,手机怎么都连不上电脑 第二行是手机连电脑时需要输入的验证码 2.hcitool scan 得到手机的地址 3.sdptool browse 得到手机服务列表 我这里这条命令结果为空, 我用的是spdtool search --bdaddr 常用的service有 DUN 拨号 LAN HS headset OPUSH obex push 得到列表后注意看Protocal Descriptor List里“RFCOMM”一行及下一行, 找到Channel: x, 记住这个x...

linux下麦克风不工作

我这里麦克风的症状如之前声卡output的一样, 不报错但是不工作(偶尔好像也报错)。 弄了好几次不见起色。 今天偶然又看看了alsa网站里的详细安装说明,发现我这里设备文件的权限没设对。 于是运行chmod a+rw /dev/dsp /dev/mixer /dev/sequencer,之后问题解决(我这里没有midi) 不过似乎噪声很大,尚待解决。但是好歹可以用了。

ubuntu 升级至7.10后framebuffer console故障排除

症状:没有修改任何配置,升级后framebuffer console突然不工作了,纯控制台变成黑屏,手工加载fbcon, vesafb, nvidiafb(我的显卡是nvidia)也不行。 折腾了好半天,参考了一些网页,比如 https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/129910 了解了大致原因,一个是 fbcon不能自动加载,另外是framebuffer的驱动被加入了blacklist 得解决方案: 1.修改/etc/initramfs-tools/modules, 添加fbcon, vesafb(每个模块占一行) 2.修改/etc/modprobe.d/blacklist-framebuffer, 把含vesafb, nvidiafb的两行注释掉 3.确认grub里的启动参数中设置好了vga 问题解决。 注:第一步里似乎不用加上nvidiafb, 但是另外两个似乎要加上

ubuntu 升级至7.10后网卡设备名自动改变的解决方法

症状是每次开机时会说invaid MAC address, 然后就会生成一个随机的MAC。 但是7.04时这个可以忽略。7.10里每次MAC一更改,网卡设备名就会更改,从eth0一直往上加。 查了一下,是udev这个东西搞的鬼。具体来说是/etc/udev/rules.d/75-persistent-net-generator.rules 我把一开始的GOTO="persistent_net_generator_do"该成了GOTO="persistent_net_generator_end",即直接跳过了生成新设备名的代码,问题得以解决。

Intel HD Audio 在 linux 下耳机插孔不工作的解决办法

症状是:使用hda-intel模块驱动声卡,扬声器工作正常,但插入耳机后耳机不出声,而扬声器仍发声。 参考了http://leufke.info/linux/asus/index.html, 可以尝试给snd-hda-intel模块加入position_fix=1的参数,一般来说是修改/etc/modprobe.d/options,加入options snd-hda-intel position_fix=1即可

再谈声卡识别但不出声的问题

上次在 一个关于声卡识别的问题 提到了一个关于声卡在设备管理器中能够识别, 但是声音选项中缺说找不到音频设备的问题。 我转的解法是用Plug and Play Software Device Enumerator替换一个已有设备ISAPNP Read Data Port。起初我认为是识别有误, 但后来感到有些不对劲, 觉得那本身是一个正常的系统设备。 虽然能正常工作, 但毕竟不是完美解决方案。 后来再次尝试了上次 也提到的重装Plug and Play Software Device Enumerator的方法: 1.假设windows装在c:\windows下, 将c:\windows\inf\machine.inf, c:\windows\system32\streamci.dll, c:\windows\system32 \drivers\swenum.sys拷到一个临时目录下 2.修改machine.inf,找到[ControlFlags], 把下面一行ExcludeFromSelect=*删去 3.如果现在设备管理器中有Plug and Play Software Device Enumerator, 那么用现在的临时目录给它更新驱动即可,否则依次进 入控制面板->添加硬件, 几次"下一步"后依次选"添加新的硬件设备","安装我手动从列表选择的硬件","显示所有设备","从磁盘 安装", 此时选那个目录, 然后厂商选"(标准系统设备)", 型号选"Plug and Play Software Device Enumerator", 然后安装便可 。 最后还查到一个解法, 是说在注册表中删除所有swenum的相关项, 然后就能自动识别Plug and Play Software Device Enumerator 了, 不过这个没试过, 不知是否真的可行。

一个关于声卡识别的问题

环境为Windows XP SP2, 声卡realtek hd audio, 似乎是nvidia的主板 症状比较特别, 是偶然卸了某驱动后发现很多硬件不能用了, 打开设备管理器发现dvd-rom, 声卡等都有黄色叹号, 另外还有一个"Plug and Play Software Device Enumerator" 也是这样。 一开始想用"卸载-重新识别"的方法, 但是那个"Plug and Play Software Device Enumerator"卸掉便一去不复返了。 一开始我没在意, 全心折腾声卡, 但是总是不行, 后来在网上艰难搜索才发现问题就出现在那个"Plug and Play Software Device Enumerator"上。 网上有个从系统目录copy出inf, sys, dll个一个文件, 稍微修改并利用它们安装一个这个硬件的方法。 我没试成功(后来发现是没理解好说明)。 之后在 http://www.softwaretipsandtricks.com/forum/windows-xp/7021-no-sound-says-no-audio-device-but-drivers-there-enabled-working-properly-5.html 找到了一种解法, 原文加翻译如下: 1. From Device Manager (be sure to select View/Show hidden devices), find the 'ISAPNP Read Data Port' device from the System Devices list. (Of note: once I successfully repaired this problem, this device no longer appears.) 在设备管理器中(注意选上查看->显示隐藏的设备。(译注:似乎不选也可))找到ISAPNP Read Data Port这个设备(当成功进行下面操作后, 这个设备将不再存在(译注:成功后会由Plug and Play Software Device Enumerator取而代之, 也就是说, 问题应该是对这个硬件的...

linux 下 驱动 Acer 笔记本 Realtek ALC268 声卡

我这个笔记本是Acer的, 声卡为nvidia mcp67集成, 解码器为realtek alc268 刚装上ubuntu 7.04后声卡能够识别, 有nvidia unknown device 和alc268字样, 但是不能发声。 起初认为是声卡没有识别好, 但是装了最新的alsa1.0.15rc1和ossv4都没效果, 了解了update-pciid才知道其实已经识别了声卡, 而问题出现在 realtek alc268上。 realtek官网上也有个驱动, 下了一看,里面原来也是alsa1.0.14, 只是驱动版本号比较特别。装上后仍不起作用。 在网上搜了很多文章, 其中这个比较好 Bug #116326 in linux-source-2.6.22 (Ubuntu): “No audio INTEL HD audio - Realtek ALC268 codec - Toshiba A205-S4577” 看来这个问题主要出在新型的笔记本上。 另外我还得知了alsa1.0.14对alc268支持的不是很好。上面那个链接里, 中间有几个人帖上了for realtek的alsa补丁, 看样子能起作用。 他们说1.0.14上支持的声卡列表里没有alc268。还有一点, 提出这个问题的人是toshiba的笔记本, 下面帖子中多次提到了model=toshiba这个参数, 于是我自然想到有没有for acer的。 于是我把目光放在了1.0.15rc1上, 看changlog里赫然有个alc268, 而其中专门多了一个acer笔记本的model。 我顿时眼前一亮。 有戏! 再看一下alsa的安装说明, 应该在snd_hda_intel模块加载时加上model=xxx 的参数。 那我这情况自然是在/etc/modprobe.d/options里加一句options snd_hda_intel model=acer 然后重启(可能仅重加载snd-hda-intel也可), 听到了熟悉的ubuntu启动声音。 啊哈哈哈!!!

ubuntu nvidia 驱动安装

显卡是nvidia geforce 8400M G, ubuntu 论坛上说的方法是装nvidia-glx, 我看了看源里, 除了这个包还有个nvidia-glx-new, 但是看说明,似乎太老了, 不认geforce8。 事实确实如此。 于是上nvidia官网下了个驱动, 叫做NVIDIA-Linux-x86-100.14.11-pkg1.run,但是装了不能用, X的错误信息说nvidia kernel interface版本不匹配, 而这个应该是ubuntu的linux-restricted-modules包提供的, 问题可能在这里. 后来在nvidia论坛上证实了这一点, 在http://www.nvnews.net/vbulletin/showthread.php?s=5e6ef2b1d1fb97772f6b738b135f220b&t=72490说道 If you wish to install the NVIDIA Linux graphics driver on a Debian GNU/Linux or Ubuntu system that ships with Xorg 7.x, please ensure that your system meets the following requirements: * development tools like make and gcc are installed * the linux-headers package matching the installed Linux kernel is installed * the pkg-config and xserver-xorg-dev packages are installed * the nvidia-glx package has been uninstalled with the --purge option and the files /etc/init.d/nvidia-glx and /etc/init.d/nvidia-kernel do not exist If you use Ubuntu, please also ensure that the linux-restricted-mod...