Stránka 1 z 2

Webserver atmega88

Napsal: 11 bře 2015, 12:42
od markoni
Zdravím
Na serveru http://tuxgraphics.org/electronics/2006 ... rver.shtml je projekt který se snažím realizovat ale místo webstránky se zobrazují tyhle fragmenty

Kód: Vybrat vše

http://192.168.0.25/secret     ****do prohlížeče**** 
HT/. 0 oe emnnl
Lcto:secret/
otn-ye ethm
Pam:n-ah

<131MvdPraety/1
/
otn-ye ethm
Pam:n-ah

adataln ls oteul
--------------------------------
http://192.168.0.25/               ****do prohlížeče****
HT/. 0 K
otn-ye ethm

<>sg:ht:/oto_ppswr<p
HT/. 0 K
otn-ye ethm
----------------
http://192.168.0.25/secret/1            ****do prohlížeče****
HT/. 0 K
otn-ye ethm
Pam:n-ah

<etr<>upti:<otclr"0F0" N/ot sal< rf""[ers tts<a<sal<p
p< rf"/"Sic f<a<> sal< rf""[ers tts<a<sal<p
p< rf"<cne>h>b>eso .7 ugahc.r
/"Sic n/>p
-----------------------
http://192.168.0.25/secret/0          ****do prohlížeče****
HT/. 0 K
otn-ye ethm
Pam:n-ah

<etr<>upti:OF<otclr"0F0" N/ot sal< rf""[ers tts<a<sal<p
p< rf"/"Sic n/>p<cne>h>b>eso .7 ugahc.r
/"Sic n/>p

Relé funguje vypínání http://192.168.0.25/secret/0 zapínání http://192.168.0.25/secret/1
v příloze je můj upravený projekt atmega88 jede na interním oscilátoru 8MHz
při překladu mám tam 20 warmingů PROGMEN
to asi bude ten problém že se nezobrazí webstránka jak má

Kód: Vybrat vše

Warning   1   type defaults to 'int' in declaration of 'progmem_s' [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.c   384   68   atmega88webserver
Warning   2   '__progmem__' attribute ignored [-Wattributes]   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.c   384   1   atmega88webserver
Warning   3   type defaults to 'int' in declaration of 'progmem_s' [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   75   atmega88webserver
Warning   4   '__progmem__' attribute ignored [-Wattributes]   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   1   atmega88webserver
Warning   5   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   96   9   atmega88webserver
Message   6   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   7   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   98   9   atmega88webserver
Message   8   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   9   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   99   9   atmega88webserver
Message   10   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   11   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   100   9   atmega88webserver
Message   12   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   13   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   109   9   atmega88webserver
Message   14   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   15   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   110   9   atmega88webserver
Message   16   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   17   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   112   17   atmega88webserver
Message   18   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   19   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   114   17   atmega88webserver
Message   20   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   21   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   116   9   atmega88webserver
Message   22   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   23   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   118   17   atmega88webserver
Message   24   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   25   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   120   17   atmega88webserver
Message   26   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   27   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   122   9   atmega88webserver
Message   28   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   29   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   243   41   atmega88webserver
Message   30   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   31   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   247   41   atmega88webserver
Message   32   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   33   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   248   41   atmega88webserver
Message   34   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver
Warning   35   passing argument 3 of 'fill_tcp_data_p' from incompatible pointer type [enabled by default]   E:\atmel\atmega88webserver\atmega88webserver\main.c   255   41   atmega88webserver
Message   36   expected 'const int *' but argument is of type 'const char *'   E:\atmel\atmega88webserver\atmega88webserver\ip_arp_udp_tcp.h   28   17   atmega88webserver

ten projekt je dřívějšího data a pro definici ukládání do flash paměti se používalo místo PROGMEN něco jiného a v tom asi bude zakopaný pes
potřeboval bych udělat něco s tím?
díky

Napsal: 11 bře 2015, 18:49
od DRAKE
Zkus v souborech:

ip_arp_udp_tcp.c a ip_arp_udp_tcp.h

nahradit

uint16_t fill_tcp_data_p(uint8_t *buf,uint16_t pos, const PROGMEM *progmem_s)

za

uint16_t fill_tcp_data_p(uint8_t *buf,uint16_t pos, const char* PROGMEM progmem_s)

Napsal: 11 bře 2015, 21:37
od petus
třeba ti to pomůže. Český projekt založený na tuxgraphics
http://chiptron.petus.cz/news.php?readmore=117

Napsal: 12 bře 2015, 14:37
od markoni
Bohužel ty stránky už nefungují :cry:

Napsal: 12 bře 2015, 17:36
od markoni
DRAKE píše:Zkus v souborech:

ip_arp_udp_tcp.c a ip_arp_udp_tcp.h

nahradit

uint16_t fill_tcp_data_p(uint8_t *buf,uint16_t pos, const PROGMEM *progmem_s)

za

uint16_t fill_tcp_data_p(uint8_t *buf,uint16_t pos, const char* PROGMEM progmem_s)

nepomohlo to :oops:

Napsal: 12 bře 2015, 18:49
od DRAKE
Z toho co ji napsal v prvním příspěvku to vypadá, že to odesílá každý druhý znak. To odpovídá tomu, že se tam konvertuje char* na int*, neboť int je dvoubajtový a char jednobajtový.

Jde to vůbec přeložit? Nepíše ti to warningy?

Napsal: 12 bře 2015, 19:38
od markoni
Ale ano píše to warmingy po překladu je jich 20 ostatně to uvádím výše já bych potřeboval důkladně pochopit čtení z flash čili programové paměti já si to vysvětluji tak to při překladu se to vysype do hex souboru který je potom "napálen!" do procáku ostatně když dáš debug Atmel studuo 6.2 tak v okně memory si můžeš přečíst ty všechny stringy no a ten program čte co potřebuje to podle mého já jsem hledal na netu nějakou učebnici GCC jazyka v češtině nemohu najít

Napsal: 14 bře 2015, 11:13
od markoni
DRAKE píše:Z toho co ji napsal v prvním příspěvku to vypadá, že to odesílá každý druhý znak. To odpovídá tomu, že se tam konvertuje char* na int*, neboť int je dvoubajtový a char jednobajtový.

Jde to vůbec přeložit? Nepíše ti to warningy?

Jak to upravit? díky :oops:

Napsal: 15 bře 2015, 11:31
od markoni
Tak už jsem se dobral úspěšného konce úprava v souboru ip_arp_udp_tcp.c
je taková místo

Kód: Vybrat vše

 uint16_t fill_tcp_data_p(uint8_t *buf,uint16_t pos, const prog_char *progmem_s)

tak

Kód: Vybrat vše

uint16_t fill_tcp_data_p(uint8_t *buf,uint16_t pos, const char *progmem_s)

žádné warmingy díky

Napsal: 25 bře 2015, 11:09
od markoni
Zdravím
vyskytly se mi problémy nemohu načíst stránku ten modul LAN je v pořádku to vím určitě, napadlo mi ten program dát do proteus isis simulátoru a tam jsem zjistil následující viz přílohy spojení modulu a atmegy88 nejsou aktivní všechny piny které jsou spojeny s modulem před tým to fungovalo mám s toho hlavu pryč.Druhá věc ten reset MCU mohu tak zapojit ? díky

Napsal: 26 bře 2015, 14:52
od markoni
Tak mi to dneska ráno začalo na chvíli fungovat ale už mi to zas nefunguje lépe řečeno funguje to když to chce samo nevím kde může být chyba?díky :oops:

Napsal: 25 kvě 2015, 09:58
od PC-maniak
markoni píše:Tak mi to dneska ráno začalo na chvíli fungovat ale už mi to zas nefunguje lépe řečeno funguje to když to chce samo nevím kde může být chyba?díky :oops:


Zdravim je to trochu pozdejsi odpoved .. ale zkousel si jinou atmegu ? nemohlo se stat ze si natrefil na nacatek kus ... muzes zjistit zda atmega vubec po cas "nefunkcnosti" pracuje ?(pro tyhle ucely je dobre si do takovych applikaci davat blikajci ledku..)

pripadne zkus prepnout atmegu do externiho krystalu a pripoj ho.. ja s internima nemel nikdy dobre vysledky.. vzdy to nejak haprovalo

Napsal: 26 kvě 2015, 09:23
od markoni
Ono by bylo snadné nastavit tu atmegu88 na externí hodiny když je k mání nebo se dokonce nabízí hodinový výstup z LAN modulu ale ten modul je na 3V ale já vlastní chybou jsem si asi oddělal usbasp programátor tak že to musím programovat siprog které mám zapojeno do COM1 a tam je to sraženo 5V zenerkama tak že 3V na datových signálech k dispozici nemám kdyby jsem to nastavil na externí hodiny tak bych pak nedokázal to přeprogramovat jen z pomocí externích hodin já tomu říkám vyprošťovák udělaný s časovače 555 který mi běží na 150 khz a kdyby to nezafungovalo tak bych byl totálně nahraný :evil: teď když to píši tak mě napadlo dát tam 8 MHz krystal co ty na to? díky

Napsal: 26 kvě 2015, 10:44
od PC-maniak
tak jdi na ebay a kup za 2kilca novej prog kdyz si tamten odmrsknul =)

jinak sem asi presne nepochopil ten tvuj vyprostovak .... ale rozhodne nejlepsi reseni je to udelat poradne :D takze kup ten bazmek je to otazka par kacek a normal to prepni ;)

Odkud jsi ? mam tu kdyztak willema 6ku

Napsal: 26 kvě 2015, 11:43
od markoni
jinak sem asi presne nepochopil ten tvuj vyprostovak

Na XTAL1 atmegy88 vstup připojíš Output tohohle udělátka.
tak jdi na ebay a kup za 2kilca novej prog kdyz si tamten odmrsknul =)

USBasp jsem koupil na aukru na ebay se bojím kupovat nemusí létat po celém netu moje adresa jinak na ebay jsou věci levnější než na aukru