–> Ugly but okay in a development virtual machine
Launch the command “sudo visudo” in a terminal.
Add at the end :
student ALL=(ALL) NOPASSWD: ALL
And student will have no password prompt when using sudo
–> Ugly but okay in a development virtual machine
Launch the command “sudo visudo” in a terminal.
Add at the end :
student ALL=(ALL) NOPASSWD: ALL
And student will have no password prompt when using sudo
→ Ugly but okay in a development virtual machine…
Add “– – autologin root” at the end of /etc/init/tty1.conf
It will auto-log you as root for the first console. For the others, do the same with /etc/init/tty[1-5].conf
You can autolog as “student” by replacing root by student. It’s a little safer … but still ugly.
If all you get is a black screen when booting, boot in recovery mode to see a little more information :
When you are in the grub menu, choose the “recovery” version
If there is none or if it’s still black type “e” in the grub menu over the kernel entry you want. Find the line starting by linux, and add “ro single recovery” at the end.
Type F10 to boot.
Grub normally have a “Previous versions” menu to allow you to boot with the ubuntu default kernel…
In fact if you get a black screen when booting, chances is that you’re missing some modules. But you can get more:
A network problem during boot may stall you for 120 seconds, with or without a black screen ! So wait a little !
This post is in French as it concerns only people from my area
Start’up Troubleshooting
Building Kernel Troubleshooting
Booting Kernel Troubleshooting
More a little post-it than a post, I wanted to put somewhere the commands :
Using the eeprom is as simple as these two commands :
[code lang=”c”]EEPROM_READ(addr) EEPROM_WRITE(addr,value) [/code]A little example (reading from the USART a value and putting it in the EEPROM address 0x00)
[code] while (!DataRdyUSART()); char data = ReadUSART(); EEPROM_WRITE(0x00,data); [/code]Note that theses header are defined in the standard xc8 header
How to detect if another user is connected to your machine or your server? You can use the command “users” to check yourself is someone is connected. But to do it automatically, you’ll have to use some pipe :
[code lang=”bash”]expr length “`users | sed -e “s/\($USER\|\[ \]*\)//ig”`”[/code]
The first thing executed by the shell will be the thing under french apostrophe ( ` ). Theses are for evaluation a command, and replace it by what it outputs (normally print on the screen). The command users print the list of connected users into a pipe, to sed which evaluate its command as a regular expression (-e parameter). The command is “s” for substitute, and the rest tells him to find “$USER” (replaced by the currently connected user, you) and spaces and replace them by … nothing. So this part will be an empty string if there is no other users connected than “$USER” and something not empty if there is.
The “expr length” return the length of a string. So this commands print 0 if there is no other user connected, and >0 if there is some !
In a shell script to do something if yes or no…
[code lang=”bash”]#!/bin/sh
usersstripped=`users | sed -e “s/\(tom\|\[ \]*\)//ig”`
connected=`expr length “$usersstripped”`
if [ “$connected” -eq “0” ] ; then
echo “No other user is connected”
else
echo “Other user connected !”
fi[/code]
It is essentially the same command but done in two times, as in a shell script this command would not be evaluated correctly.
And if you want to put that in a cron to eg. send you a mail, you just have to type “crontab -e” and put a line like :
[code]* * * * * /home/tom/connected[/code]
To launch it every minutes. But if you do that you’d better do something like detecting a connection…
As IP Camera are cheaper than real alarm, I decided to buy a cheap IP Camera like ones you see for 50€ when typing “ip camera” on amazon :
(Re)brand : Wanscam
Model : FR4020A2
Original system firmware : 0.37.2.46
Original WEB UI : 0.9.4.16
It can detect movement, move horizontally and vertically by a web interface, send mail, send image on ftp, etc etc…
But the reference nearly doesn’t exist, and finding a newer firmware is nearly impossible. But this camera looks a lot like a lot of others, including Foscam. So I decided to find a newer firmware for similar webcams. I found that the firmware for mine was named lr_cmos_0_X_Y_Z.bin, and I searched for newer version. I finaly came acrosse this page : http://www.dericam.com/bbs/forum.php?mod=viewthread&tid=85 where a link to a firmware for the Dericam M801W is given containing a file named “lr_cmos_0_41_2_51.bin”, I decided to flash it and… It works ! It doesn’t seem that there exist any newer firmware…
About the web ui firmware, I searched for a firmware in the web coming with the system firmware around 41.2.51, and I came accross http://www.openipcam.com/forum/index.php/topic,128.0.html#msg1956 . The web ui firmware number is smaller but clearly, the interface is newer… It comes with something we can call a “design”, far away from the horrible original nearly “text only” interface.
So my final versions are :
Device Firmware Version | 0.41.2.51 |
Device Embeded Web UI Version | 0.2.9.12 |
You can download the files here : lr_cmos_0_41_2_51 (flash the lr_cmos first!) and WEB UI 0.2.9.12.bin. The video quality is really better ! Wifi is working, etc…
The update process doesn’t lost configuration or passwords !
A little tips working with all of theses ip camera, create some favorites to directly set or unset alarm :
Set alarm to send by ftp and by mail : http://10.0.0.50:99/set_alarm.cgi?next_url=alarm.htm&motion_armed=1&input_armed=0&motion_sensitivity=5&iolinkage=0&mail=1&upload_interval=1&ioin_level=1&ioout_level=0&schedule_enable=0&schedule_sun_0=0&schedule_sun_1=0&schedule_sun_2=0&schedule_mon_0=0&schedule_mon_1=0&schedule_mon_2=0&schedule_tue_0=0&schedule_tue_1=0&schedule_tue_2=0&schedule_wed_0=0&schedule_wed_1=0&schedule_wed_2=0&schedule_thu_0=0&schedule_thu_1=0&schedule_thu_2=0&schedule_fri_0=0&schedule_fri_1=0&schedule_fri_2=0&schedule_sat_0=0&schedule_sat_1=0&schedule_sat_2=0
Set alarm to send by ftp only : http://10.0.0.50:99/set_alarm.cgi?next_url=alarm.htm&motion_armed=1&input_armed=0&motion_sensitivity=5&iolinkage=0&mail=0&upload_interval=1&ioin_level=1&ioout_level=0&schedule_enable=0&schedule_sun_0=0&schedule_sun_1=0&schedule_sun_2=0&schedule_mon_0=0&schedule_mon_1=0&schedule_mon_2=0&schedule_tue_0=0&schedule_tue_1=0&schedule_tue_2=0&schedule_wed_0=0&schedule_wed_1=0&schedule_wed_2=0&schedule_thu_0=0&schedule_thu_1=0&schedule_thu_2=0&schedule_fri_0=0&schedule_fri_1=0&schedule_fri_2=0&schedule_sat_0=0&schedule_sat_1=0&schedule_sat_2=0
Unset alarm : http://10.0.0.50:99/set_alarm.cgi?next_url=alarm.htm&motion_armed=0&input_armed=0&motion_sensitivity=5&iolinkage=0&mail=0&upload_interval=0&schedule_enable=0&schedule_sun_0=0&schedule_sun_1=0&schedule_sun_2=0&schedule_mon_0=0&schedule_mon_1=0&schedule_mon_2=0&schedule_tue_0=0&schedule_tue_1=0&schedule_tue_2=0&schedule_wed_0=0&schedule_wed_1=0&schedule_wed_2=0&schedule_thu_0=0&schedule_thu_1=0&schedule_thu_2=0&schedule_fri_0=0&schedule_fri_1=0&schedule_fri_2=0&schedule_sat_0=0&schedule_sat_1=0&schedule_sat_2=0
Don’t forget to change your ip adress/port of course… You can change the “motion_sensitivity=5” to another value according to your environment…