Hack a Nokia N900
(→FM TX) |
|||
第129行: | 第129行: | ||
产品手册: https://www.silabs.com/products/audiovideo/fmtransmitters/Pages/Si471213.aspx | 产品手册: https://www.silabs.com/products/audiovideo/fmtransmitters/Pages/Si471213.aspx | ||
− | Datasheet: http://www.silabs.com/Support%20Documents/TechnicalDocs/AN332.pdf | + | Datasheet: http://www.silabs.com/Support%20Documents/TechnicalDocs/AN332.pdf |
+ | |||
+ | 内核驱动: http://www.mjmwired.net/kernel/Documentation/video4linux/si4713.txt | ||
+ | |||
+ | <pre> | ||
+ | Nokia-N900:~# modprobe -l | grep 47 | ||
+ | /lib/modules/2.6.28-omap1/fmtx-si4713.ko | ||
+ | </pre> | ||
+ | |||
+ | 驱动形成一个 /dev/radio0 的设备,是一个 video4linux 设备 | ||
+ | |||
+ | <pre> | ||
+ | # v4l2-ctl --all -d /dev/radio0 | ||
+ | Driver Info: | ||
+ | Driver name : radio-si4713 | ||
+ | Card type : Silicon Labs Si4713 FM Radio Tr | ||
+ | Bus info : I2C: 0x63 | ||
+ | Driver version: 1 | ||
+ | Capabilities : 0x00010000 | ||
+ | Tuner | ||
+ | Video input : 0 | ||
+ | Frequency: 1400000 (87.500000 MHz) | ||
+ | Video Standard = 0x00000000 | ||
+ | Streaming Parameters Video Capture: | ||
+ | Frames per second: 25.000 (25/1) | ||
+ | Read buffers : 0 | ||
+ | Tuner: | ||
+ | Name : FM Transmitter | ||
+ | Capabilities : 62.5 Hz stereo | ||
+ | Frequency range : 87.5 MHz - 108.0 MHz | ||
+ | Signal strength/AFC : 0%/0 | ||
+ | Current audio mode : stereo | ||
+ | Available subchannels: stereo | ||
+ | </pre> | ||
+ | |||
+ | 驱动同时在 sysfs 下有接口: /sys/class/i2c-adapter/i2c-2/2-0063/ | ||
<br><br> | <br><br> |
2013年11月20日 (三) 18:08的版本
目录 |
1 快捷键
Ctrl + Y 重复 (如果有效) Ctrl + F 打开搜索框 (如果有效) Ctrl + 右箭头 移动到文本的最后 Ctrl + 左箭头 移动到文本的开始 FN + Ctrl 打开特殊符号表 Ctrl + Backspace 打开任务管理器 Ctrl + Shift + P 截图(图片保存在 /home/user/MyDocs/.images/Screenshots) Ctrl + Shift + X 打开Xterm窗口 Ctrl + Space 输入语言切换 快速按两下电源键 锁住屏幕和键盘 快速按两下Shift 锁住大写键 快速按两下Fn 锁住Fn键 在桌面上 按A-Z字母搜索联系人 在桌面上按蓝色箭头+数字 直接输入电话号码,进入拨号界面
2 基本shell安装
先 ROOT,在应用管理器 "Application Manager" 里安装 "rootsh",如果找不到,要先添加这个源:
deb http://repository.maemo.org/extras/ fremantle free non-free
如下命令可获得 ROOT:
$ sudo gainroot
或者直接:
$ root
添加下列软件包源到: /etc/apt/sources.list
deb http://repository.maemo.org/extras-testing/ fremantle free non-free deb http://repository.maemo.org/extras-devel/ fremantle free non-free
Update apt cache:
# apt-get update
安装 bash coreutils-gnu grep-gnu findutils-gnu tar-gnu wget vim netcat openssh-client openssh-server
# apt-get install bash coreutils-gnu grep-gnu findutils-gnu tar-gnu wget vim netcat openssh-client openssh-server
bash 环境的配置,与桌面 Linux 一样,用户偏好和环境变量都在 /etc/bash.bashrc 和 ~/.bashrc 中,如果发现改了他们不起作用,记得在 /etc/profile 里加一行:
source /etc/bash.bashrc
N900默认的用户是 user,更改默认使用的 shell 在文件 /etc/passwd 中:
root:x:0:0:root:/root:/bin/bash user:!:29999:29999::/home/user:/bin/bash
警告: 不要执行 ln -sf /bin/bash /bin/sh 覆盖系统原有的 /bin/sh,这会导致系统不能启动
3 SSH 免密码登录
生成当前用户的 ssh key:
Nokia-N900:~# id uid=0(root) gid=0(root) Nokia-N900:~# ssh-keygen Generating public/private rsa key pair. ......
把 ssh public key 拷到目标机上(ssh 去登录的机器):
Nokia-N900:~# scp .ssh/id_rsa.pub root@YOUR_SERVER_IP:/tmp/id_rsa_n900
在目标机上执行:
# cat /tmp/id_rsa_n900 >> ~/.ssh/authorized_keys
这样,从 N900 再登录目标机时就不用输入密码了:
# ssh root@YOUR_SERVER_IP
4 实用工具
- 推开镜头盖,立即弹出对话框让你选择:是开闪光(当手电用)还是开相机
Nokia-N900:~# apt-get install flashlight-extra
5 系统备份
https://metalab.at/wiki/Hack-A-N900/Dump_and_Restore_rootfs_Image
6 FM TX
N900 内有一片 SI4713,带 76-108 MHz FM 发射
The FM signal is transmitted from a loop antenna built into the case, and connected to the PCB with clips.
产品手册: https://www.silabs.com/products/audiovideo/fmtransmitters/Pages/Si471213.aspx
Datasheet: http://www.silabs.com/Support%20Documents/TechnicalDocs/AN332.pdf
内核驱动: http://www.mjmwired.net/kernel/Documentation/video4linux/si4713.txt
Nokia-N900:~# modprobe -l | grep 47 /lib/modules/2.6.28-omap1/fmtx-si4713.ko
驱动形成一个 /dev/radio0 的设备,是一个 video4linux 设备
# v4l2-ctl --all -d /dev/radio0 Driver Info: Driver name : radio-si4713 Card type : Silicon Labs Si4713 FM Radio Tr Bus info : I2C: 0x63 Driver version: 1 Capabilities : 0x00010000 Tuner Video input : 0 Frequency: 1400000 (87.500000 MHz) Video Standard = 0x00000000 Streaming Parameters Video Capture: Frames per second: 25.000 (25/1) Read buffers : 0 Tuner: Name : FM Transmitter Capabilities : 62.5 Hz stereo Frequency range : 87.5 MHz - 108.0 MHz Signal strength/AFC : 0%/0 Current audio mode : stereo Available subchannels: stereo
驱动同时在 sysfs 下有接口: /sys/class/i2c-adapter/i2c-2/2-0063/