OsmocomBB && Motorora C118

时间:2023-03-09 22:04:13
OsmocomBB && Motorora C118

OsmocomBB 编译安装: http://www.cnblogs.com/hangxin1940/p/3375216.html

##准备:

C118

![C118](http://images.cnblogs.com/cnblogs_com/hangxin1940/525357/o_motoc118.jpg "C118")

FT232RL USB TO TTL

![FT232RL](http://images.cnblogs.com/cnblogs_com/hangxin1940/525357/o_usbrs232.JPG "FT232RL")

CP2102 数据线

![CP2102](http://images.cnblogs.com/cnblogs_com/hangxin1940/525357/o_CP2102.png "CP2102")

连接(连接前手机关机):

![conn](http://images.cnblogs.com/cnblogs_com/hangxin1940/525357/o_osmbb.jpg "conn")

##测试连接:

$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 008: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

可以看到ft232 usb-serial,看起来转换器工作正常。

$ dmesg
[48692.404539] usb 3-1: FTDI USB Serial Device converter now attached to ttyUSB0

可以看到硬件信息最后一条是FT232RL转换器的插入信息,设备为`ttyUSB0`

##刷入layer1

cd src/host/osmocon/
sudo ./osmocon -p /dev/ttyUSB0 -m c123xor ../../target/firmware/board/compal_e88/layer1.compalram.bin

将layer1程序刷入C118内存:

...
handle_write(): finished
...
Received DOWNLOAD ACK from phone, your code is running now!

输出这些表示刷入成功,此时手机屏幕应该会显示一些相关的东东。失败的话拔掉重试

##运行layer2/3层的应用

这些东西在 `src/host/layer23/src/misc` 与 `src/host/layer23/src/mobile` 下面。

使用方法自行google