- 博客(34)
- 资源 (3)
- 收藏
- 关注
原创 交叉编译expect
交叉编译 expect 需要先编译如下依赖包:tcl tcl源码下载: wget http://nchc.dl.sourceforge.net/sourceforge/tcl/tcl8.4.11-src.tar.gz 我的目标主机是一台运行着openwrt系统的x86机器。工具链为 i486-openwrt-linux-./configure --prefix=$PWD/tmp --host=
2015-07-29 09:58:52 2899
原创 openwrt ppoe 拨号设置
ppoe 拨号配置文件位于: /etc/config/network 大致设置步骤如下:1.首先进入字符界面,然后输入 cd /etc/config 进入 /etc/config 目录2.输入vi network,进行network文件配置3.输入如下字符config 'interface' 'wan' option 'ifname' 'eth1' option
2015-07-27 15:08:48 6380 1
原创 openwrt console密码登录
设置 openwrt 启动时 串口控制台登录需要密码: 一、客制化busybox make menuconfigBase system —> <*> busybox …… [*] Customize busybox option Login/Password Management Utilities —>
2015-07-23 11:24:43 4604
原创 mysql c语言接口。个人封装
个人封装的一些数据库的c语言接口#include <stdio.h>#include <stdlib.h>#include <stdio.h>#include "mysql.h" //我的机器上该文件在/usr/include/mysql下/***********************************************************//*一下操作的表。表名为
2015-07-22 13:44:43 1726
原创 mysql 数据操作。唯一索引
为数据库添加唯一索引:ALTER TABLE table_name ADD UNIQUE (code);table_name : 表名 code: 唯一索引
2015-07-22 13:38:51 628
原创 mysql c语言操作
在 c 语言中调用 mysql 的 api 函数实现: 连接数据库 查询数据库 修改数据库中某一项的值#include <stdio.h>#include <stdlib.h>#include <stdio.h>#include "mysql.h" //我的机器上该文件在/usr/include/mysql下#define SELECT_QUERY "select * from myt
2015-07-21 15:26:27 506
原创 mysql 添加 删除字段
SHOW DATABASES; //显示有多少个数据库create database rt5350_user_list; //创建一个数据库 use rt5350_user_list; //使用该数据库show tables //显示有多少个表格CREATE TABLE mytable (name VARCHAR(20), pas
2015-07-21 14:14:49 623
原创 Android udp编程笔记 1
Android udp 编程需要注意的两个要点:第一:要在 xml 工程文件中添加应用的权限。否则会因为没有网络权限而报错。添加如下内容:<uses-permission android:name="android.permission.INTERNET"/> 第二:不要在 UI 函数里面调用 sock.send() 函数!!! 为什么?因为 Android 规定,任何情况都可以
2015-07-20 02:59:35 733
原创 openwrt 修改默认 IP
在trunk目录下执行mkdir -p files/etc/config 然后在 config 目录下新建network文件写入如下内容config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmas
2015-07-19 13:25:25 6493
原创 openwrt 版本下载
OpenWrt source repository downloadsThe recommended way of checking out the OpenWrt source code is cloning the Git repository using one of the following commands:trunk (main development tree)Main reposi
2015-07-18 23:31:58 7559 1
原创 iptables 防火墙笔记 3 :黑名单脚本
利用 iptables 实现黑名单: 首先,设置 FORWARD 默认策略为信任:ACCEPTiptables -P FORWARD ACCEPT例如,我们想要让用户无法访问 百度。我们只需要设置 FORWARD 链上。目标为 百度 的所有数据丢弃即可:iptables -I FORWARD -d m.baidu.com -j DROP既然知道了这个原理。我们便可以写一个简单的黑名单脚本文件,把
2015-07-18 20:42:41 3345
原创 iptables 防火墙笔记 2
重零开始,构建自己的防火墙1 清除防火墙规则iptables -F这时候。我们发现手机连接rt5350.上不了网了。查看 iptables 规则:2 查看防火墙规则root@goldsunny:/# iptables -LChain INPUT (policy ACCEPT)target prot opt source destination
2015-07-18 15:14:19 966
原创 IPtables 防火墙笔记 1
虽然 openwrt 的防火墙规则可以使用 uci 命令进行配置。配置文件位于 /etc/config/firewall 通过分析 /etct/init.d/firewall 脚本文件。我们可以知道实际上执行防火墙功能的程序是 fw3 不过。openwrt 作为一个 linux 系统,也是支持 iptables 的。所以。掌握了 iptables 。输入 iptables -L 查看当前防火墙规
2015-07-18 13:19:49 2048
原创 openwrt 中使用uci 设置防火墙规则 1
openwrt 使用 uci 软件实现对系统的配置。 UCI的配置文件全部存储在/etc/config目录下。需要记住。使用 uci 设置后,必须调用 uci commit firewall 配置才会生效root@OpenWrt:/# ls /etc/config/dhcp dropbear firewall network system wireless更多内容请参考 : http://
2015-07-17 11:24:02 8424
原创 openwrt 防火墙设置 一。/etc/config/firewall
有关 IPtable 的相关说明请见这篇文章: http://blog.chinaunix.net/uid-22780578-id-3346350.htmlopenwrt 中使用 uci 可实现对 IPtable 进行配置。配置文件位于 /etc/config/firewall1 默认配置config defaults option syn_flood '1'
2015-07-16 21:39:27 24937
原创 openwrt rt5350 SPI I2C驱动简单说明
在openwrt中已经支持 RT5350 的SPI I2C等驱动。1 只需要在内核模块选上即可:make menuconfig-> Kernel modules -> SPI Support -> I2C support根据自己的需求选中模块。2 修改配置文件vi target/linux/ramips/dts/rt5350.dtsi i2c@900 {
2015-07-15 23:30:40 4264
原创 openwrt 脚本文件实现中继(uci命令)
上篇文章将了如何用uci命令实现中继。现在做个总结。直接写成脚本。#!/bin/ash#开启WIFI功能,OpenWrt默认没启用WIFIuci set wireless.@wifi-device[0].disabled=0uci commit wirelesswifi#创建wwan接口uci set network.wwan=interfaceuci set network.wwan.pro
2015-07-15 23:22:09 3270
原创 openwrt uci 命令实现中继
参考 http://blog.csdn.net/xiaoxiaozhu2010/article/details/23823523 但是自己在测试的时候,却发现结果跟上面的文章不太一样。于是总结了自己的设置步骤。开启WIFI功能,MR10U刷OpenWrt默认没启用WIFIuci set wireless.@wifi-device[0].disabled=0uci commit wireless
2015-07-15 01:09:16 2862
原创 openwrt 网络相关配置文件 /etc/config/network /etc/config/wireless
root@DayDream:/# cat /etc/config/wireless config wifi-device 'radio0' option type 'mac80211' option channel '11' option hwmode '11g' option path '10180000.wmac'
2015-07-14 11:52:39 15624
原创 编译x86架构的openwrt系统,让笔记本从u盘启动openwrt
下载openwrt源码, 参考: http://blog.csdn.net/u011641885/article/details/46348267make menuconfig 基本配置 Target System (x86) ---> Subtarget (Generic) ---> Target Profile (Generic) ---> Targ
2015-07-12 02:05:30 10268
原创 笔记本安装openwrt x86
注意!!!不要烧写到你的硬盘上面去,会格式化你整个硬盘的。数据宝贵啊,建议烧写到u盘,然后从u盘启动1 编译出一个x86的固件。 记得编译的时候要选择生成 vmdk 文件 openwrt-x86-generic-combined-ext4.vmdk2 下载 winimage 软件3 可以把 x86 固件安装到 U盘 或者 硬盘 ,如果要安装到硬盘,请在PE下面操作,而且,该硬盘不可以格式化!.准
2015-07-10 09:25:55 16679
原创 c程序调用 mysql库函数 操作数据库
1 连接上服务器:/*mytable 数据库中的表格名称name 根据 name 进行选择*/#define SELECT_QUERY "select * from mytable where name like '%s'" MYSQL mysql, *sock; //定义数据连接句柄/*******************************************函数名:
2015-07-09 11:38:26 872
原创 mysql 数据库简单操作,文本添加元素
SHOW DATABASES; //显示有多少个数据库create database rt5350_user_list; //创建一个数据库 use rt5350_user_list; //使用该数据库show tables //显示有多少个表格CREATE TABLE mytable (name VARCHAR(20), pas
2015-07-09 11:34:07 1201
原创 nodogsplash 调试工具 ndsctl
ndsctl是通过unix socket与nodogsplash之间通过socket来实现进程之间的通信。ndsctl的主要作用如下:root@DayDream:/# ndsctl Usage: ndsctl [options] command [arguments]options: -s <path> Path to the socket -h
2015-07-09 10:41:52 1681
原创 openwrt 利用 nodogsplash 打造广告路由器
1.编译时,选上 nodogsplash 软件包Symbol: PACKAGE_nodogsplash [=y] Type : tristate Prompt: nodogsplash........................... Open public network gateway daemon x Location: -
2015-07-09 10:05:04 3233
原创 openwrt 3g路由,设置防火墙
根据之前的文章,设置好3g,并能拨号上网后。用手机连接路由器,发现手机上不了网,主要是因为防火墙的缘故。进入 luci网页界面 点击 network -> firewall 在 Zones 栏下面选择 add Covered networks 选择 ppp Allow forward to destination zones: Allow forward from source zone
2015-07-08 14:53:33 1271
原创 linux 修改 usb-serial.c 提升3G上网速度
Linux原有的USB驱动是针对低速USB设计的,,它的缓存开的太小。因此,3G上网卡的网速并没有达到evdo的正常速度。 在没有修改内核源码之前:root@DayDream:/home# ping 114.114.114.114PING 114.114.114.114 (114.114.114.114): 56 data bytes64 bytes from 114.114.114.114:
2015-07-08 14:03:34 1472
原创 openwrt 编译时,指定root密码
启动开发板,输入 passwd root 设置密码,设置完后查看 密码文件cat /etc/shadow root:$1$P89R6Q.2$ZBlMI6dWr0ddaZ/n/t9Rv0:16624:0:99999:7:::daemon:*:0:0:99999:7:::ftp:*:0:0:99999:7:::network:*:0:0:99999:7:::nobody:*:0:0:99999
2015-07-08 10:39:34 4991
原创 openwrt uci常用命令
1.修改 br-lan 的默认IP,网关,dns:uci set network.lan.ipaddr=192.168.2.1 uci set network.lan.gateway=192.168.1.1 uci set network.lan.dns=8.8.8.8 uci commit networkwifi downwifi2.作为sta模式连接到路由器开启WIF
2015-07-08 09:52:50 7042
原创 linux c编程中调用 shell 命令
system 函数,会调用fork()产生子进程,由子进程来调用/bin/sh-c string来执行参数string字符串所代表的命令,此命令执行完后随即返回原调用的进程。在调用system()期间SIGCHLD 信号会被暂时搁置,SIGINT和SIGQUIT 信号则会被忽略。/*******************************************************
2015-07-07 14:51:06 798
原创 linux 设置默认网关
ping 114.114.114.114 都是ping不通,提示如下:root@DayDream:/# ping www.baidu.comping: bad address 'www.baidu.com'root@DayDream:/# ping 114.114.114.114PING 114.114.114.114 (114.114.114.114): 56 data bytesping:
2015-07-06 16:09:20 9095
原创 openwrt 3G驱动
在openwrt下面添加3G模块。目前,市场的3G模块大概有两种,一种是插上电脑,直接可以识别出来是USB-3G设备。 对于这种3G模块在openwrt上面的驱动,请参考这篇文章: http://blog.csdn.net/u011641885/article/details/46440159本文讨论的是另外一种,插上电脑后,电脑识别出来的一个U盘。需要我们切换成usb-3G。第一步,请参考这篇
2015-07-06 15:49:27 2215
原创 openwrt 添加vsftpd服务器
在openwrt中添加 vsftpd 服务器。可以很方便地实现文件传输。1.make menuconfig,选上 vsftpd 软件包Prompt: vsftpd Location: -> Network -> File Transfer make V=s 编译完烧写内核。启动
2015-07-06 13:28:59 4968
原创 rt5350 uboot 命令的简单分析
rt5350在刷机的时候。需要我们填写 服务器IP 板子IP 文件名,每次都要手动写。很麻烦。下面,我们通过 uboot 命令行来修改这三个默认参数。rt5350 进入开机界面。此时输入 4 进入 uboot 命令行,在这里我们可以做一些简单的设置。Please choose the operation: 1: Load system code to SDRAM via TFTP.
2015-07-02 21:52:43 2958
旗点云平台测试程序 v0.1版本
2019-12-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人