A standalone tool to easily make a customised winpe3 with or without AIK.
Download/Discuss it here.
Check it here
Check it here
Here below a quick how to use an arduino and a cheap enc28j60 ethernet module (5€).
Can be handy to built a quick web server and some sensors (like a ds18b20 for example).
below the wiring :
below a sketch using the ethercard library (provided with Arduino GUI) :
// Present a "Will be back soon web page", as stand-in webserver. // 2011-01-30http://opensource.org/licenses/mit-license.php #include #define STATIC 0 // set to 1 to disable DHCP (adjust myip/gwip values below) #if STATIC // ethernet interface ip address static byte myip[] = { 192,168,1,200 }; // gateway ip address static byte gwip[] = { 192,168,1,1 }; #endif // ethernet mac address - must be unique on your network static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 }; byte Ethernet::buffer[500]; // tcp/ip send and receive buffer char page[] PROGMEM = "HTTP/1.0 200 OK\r\n" "Content-Type: text/html\r\n" "Retry-After: 600\r\n" "\r\n" "" " " "my web page" " " "" "hello world !
" "" "" ; void setup(){ Serial.begin(38400); Serial.println("\n[backSoon]"); if (ether.begin(sizeof Ethernet::buffer, mymac) == 0) Serial.println( "Failed to access Ethernet controller"); #if STATIC ether.staticSetup(myip, gwip); #else if (!ether.dhcpSetup()) Serial.println("DHCP failed"); #endif ether.printIp("IP: ", ether.myip); ether.printIp("GW: ", ether.gwip); ether.printIp("DNS: ", ether.dnsip); } void loop(){ // wait for an incoming TCP packet, but ignore its contents if (ether.packetLoop(ether.packetReceive())) { memcpy_P(ether.tcpOffset(), page, sizeof page); ether.httpServerReply(sizeof page - 1); } }
I have been playing with pxe booting for a while, first starting with pxelinux, then gpxe and lately with ipxe.
I am mostly a windows user and as an IT often needs a quick (=no install) and portable (=run from USB) dhcp server including a tftp server and a http server offering me then pxe booting.
I could use tftp32 or serva but i like to make my own tools and these 2 were missing some features here and there.
So here comes a small portable dhcp server including a tftp and a http server.
This is freeware (and will always be), should be opensource and the unique here idea is to share and contribute.
-dhcp daemon supports an alternative filename based on the user-class thus enabling chainloading (gpxe->pxelinux, ipxe->script, etc), and also support settings dhcp options (which can then be used by your boot loader)
-tftp daemon supports tsize and blksize commands.
-http daemon support head, range (mandatory for ipxe sanboot options) and over 2gb iso.
-new in version 1.0.0.7 : BINL (RIS & WDS) support
-new in version 1.0.0.10 : DNS daemon
The root home of tftp and http is the folder where you main pxe loader sits.
I put all my iso files in a sub folder called images.
I put all my wim files in a sub folder called sources.
I put all my other loaders, in case I want to chain load, in next to my main loader (bootmgr, pxelinux, gpxe, grldr, etc)
In the attached screenshot, i load ipxe then chainloads a script (menu.ipxe).
In the script 3 different methods : the classic memdisk, a newer approach with sanboot and a new kid on the block wimboot.
More info about these loading methods here :
http://www.syslinux.org/wiki/index.php/MEMDISK
http://ipxe.org/cmd/sanboot
http://ipxe.org/wimboot
Side note about ipxe+sanboot+http : I am big fan.
I have always been looking for a quick and efficient boot from lan methods and this is one is great : executes as it read and faster than memdisk since no preloading of the ISO is required.
iPXE reaches 50/60 MBits/secs on my lan.
« Voila ».
Download : http://reboot.pro/files/file/303-tiny-pxe-server/
Erwan
Why go for such an arduino when the Uno and Nano are available?
First because it is much smaller, then because it also uses much less power (due to the missing FTDI chip).
The pro mini can be found here for about 6 € : http://dx.com/p/178183 .
The usb dongle can be found here for about 2 € : http://dx.com/p/149859 .
Below the wiring. As mentionned, since the usb dongle does not have a reset feature, press reset on the arduino right between the compiling and uploading part in the Arduino Gui.
In the Arduino Gui, dont forget to select the right card i.e « arduino pro or pro mini 5v / 16 mhz / atmega328).
Voila!
Erwan
I wanted to find a way to call my kids, with me sitting on ground floor and them, sitting on the top floor of the house.
2 arduino, one acting as transmitter, one acting as receiver and here we go : they would not ignore me anymore 🙂
Lets start the transmitter (schema and code) : it has a push button to send the signal and a led to indicate it is transmitting.
#includeconst int led_pin = 11; //const int transmit_pin = 4; //const int transmit_en_pin = 3; const int transmit_pin = 3; //const int transmit_en_pin = 3; const int buttonPin=2; void setup() { pinMode(buttonPin, INPUT); // sets the digital pin as output pinMode(led_pin, OUTPUT); // sets the digital pin as output delay(1000); Serial.begin(9600); // Debugging only Serial.println("setup"); // Initialise the IO and ISR vw_set_tx_pin(transmit_pin); //vw_set_rx_pin(receive_pin); //vw_set_ptt_pin(transmit_en_pin); //vw_set_ptt_inverted(true); // Required for DR3100 vw_set_ptt_inverted(false); vw_setup(2400); // Bits per sec } byte count = 1; void loop() { int reading = digitalRead(buttonPin); if(reading==HIGH) { // digitalWrite(led_pin, HIGH); // Flash a light to show transmitting char msg[7] = {'h','e','l','l','o',' ','#'}; //msg[5]=count; vw_send((uint8_t *)msg, strlen(msg)+1); vw_wait_tx(); // Wait until the whole message is gone Serial.println(count); count = count + 1; delay(500); digitalWrite(led_pin, LOW); } }
Next comes the receiver : it has a buzzer playing a small melody and a led blinking to indicate it is receiving.
#include#include const int led_pin = 8; const int receive_pin = 3; //2 const int buzzer=11; // tableau de mémorisation des notes de la mélodie int melody[] = { NOTE_C4, NOTE_G3,NOTE_G3, NOTE_A3, NOTE_G3,0, NOTE_B3, NOTE_C4}; // tableau de mémorisation de la durée des notes : 4 = noire, 8 = croche, etc.: int noteDurations[] = {4, 8, 8, 4,4,4,4,4 }; void play(){ // boucle pour parcourir les notes de la mélodie for (int thisNote = 0; thisNote < 8; thisNote++) { // thisNote de 0 à 7 // pour calculer la durée de la note, on divise 1 seconde par le type de la note //ainsi noire = 1000 / 4 sec, croche = 1000/8 sec, etc... int noteDuration = 1000/noteDurations[thisNote]; // joue la note sur la broche x pendant la durée voulue tone(buzzer, melody[thisNote],noteDuration); // pour distinguer les notes, laisser une pause entre elles // la durée de la note + 30% fonctionne bien : int pauseBetweenNotes = noteDuration * 1.30; delay(pauseBetweenNotes); // delai entre les notes // stoppe la production de son sur la broche 8 : noTone(buzzer); } } void setup() { pinMode(led_pin, OUTPUT); // sets the digital pin as output pinMode(buzzer, OUTPUT); // sets the digital pin as output delay(1000); Serial.begin(9600); // Debugging only Serial.println("setup"); // Initialise the IO and ISR //vw_set_tx_pin(transmit_pin); vw_set_rx_pin(receive_pin); //vw_set_ptt_pin(transmit_en_pin); //vw_set_ptt_inverted(true); // Required for DR3100 vw_set_ptt_inverted(false); vw_setup(2400); // Bits per sec vw_rx_start(); // Start the receiver PLL running } void loop() { uint8_t buf[VW_MAX_MESSAGE_LEN]; uint8_t buflen = VW_MAX_MESSAGE_LEN; if (vw_get_message(buf, &buflen)) // Non-blocking { int i; // Message with a good checksum received, print it. Serial.print("Got: "); for (i = 0; i < buflen; i++) { Serial.print(buf[i], HEX); Serial.print(' '); } Serial.print(' '); for (i = 0; i < buflen; i++) { Serial.print(char(buf[i])); Serial.print(' '); } Serial.println(); digitalWrite(led_pin, HIGH);delay(1500);digitalWrite(led_pin, LOW);delay(1500); digitalWrite(led_pin, HIGH);delay(1500);digitalWrite(led_pin, LOW);delay(1500); play(); } }
Voila !