Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Build a Webserver with ENC28J60 +AVR
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM Project Blog
View previous topic :: View next topic  
Author Message
tetye

Bascom Member



Joined: 04 Jan 2008
Posts: 6
Location: Budapest

hungary.gif
PostPosted: Wed Mar 20, 2013 8:55 am    Post subject: Reply with quote

Thanks for the information , i'll be waiting for your response.

UPDATE :

The main problem is , the tcp header is too long , tcpdump on linux sniffs this :

Code:

debian506:/home/cateye# tcpdump -vv host 192.168.1.96
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:08:45.297727 IP (tos 0x0, ttl 128, id 31352, offset 0, flags [DF], proto TCP (6), length 391)
    192.168.1.30.3385 > 192.168.1.96.www: Flags [P.], cksum 0x157a (correct), seq 1013044332:1013044683, ack 286326784, win 65535, length 351
15:08:45.382735 IP (tos 0x0, ttl 64, id 8316, offset 0, flags [DF], proto TCP (6), length 60)
    debian506.local.53229 > 192.168.1.96.www: Flags [S], cksum 0x3e39 (correct), seq 3656897143, win 5840, options [mss 1460,sackOK,TS val 1831435 ecr 0,nop,wscale 5], length 0
15:08:45.391289 IP (tos 0x0, ttl 64, id 8316, offset 0, flags [DF], proto TCP (6), length 48)
    192.168.1.96.www > debian506.local.53229: Flags [S.] [bad hdr length 40 - too long, > 28]
15:08:48.382718 IP (tos 0x0, ttl 64, id 8317, offset 0, flags [DF], proto TCP (6), length 60)
    debian506.local.53229 > 192.168.1.96.www: Flags [S], cksum 0x3b4b (correct), seq 3656897143, win 5840, options [mss 1460,sackOK,TS val 1832185 ecr 0,nop,wscale 5], length 0
15:08:48.391438 IP (tos 0x0, ttl 64, id 8317, offset 0, flags [DF], proto TCP (6), length 48)
    192.168.1.96.www > debian506.local.53229: Flags [S.] [bad hdr length 40 - too long, > 28]
15:08:50.730296 IP (tos 0x0, ttl 128, id 31419, offset 0, flags [DF], proto TCP (6), length 381)
    192.168.1.30.3389 > 192.168.1.96.www: Flags [P.], cksum 0xb8e4 (correct), seq 4280575586:4280575927, ack 286326784, win 65535, length 341
15:08:53.382567 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.96 tell debian506.local, length 28
15:08:53.384670 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.1.96 is-at 45:c6:b3:f3:ab:9e (oui Unknown), length 46
15:08:54.382572 IP (tos 0x0, ttl 64, id 8318, offset 0, flags [DF], proto TCP (6), length 60)
    debian506.local.53229 > 192.168.1.96.www: Flags [S], cksum 0x356f (correct), seq 3656897143, win 5840, options [mss 1460,sackOK,TS val 1833685 ecr 0,nop,wscale 5], length 0
15:08:54.409087 IP (tos 0x0, ttl 64, id 8318, offset 0, flags [DF], proto TCP (6), length 48)
    192.168.1.96.www > debian506.local.53229: Flags [S.] [bad hdr length 40 - too long, > 28]
15:08:57.267583 IP (tos 0x0, ttl 128, id 31504, offset 0, flags [DF], proto TCP (6), length 381)
    192.168.1.30.3391 > 192.168.1.96.www: Flags [P.], cksum 0xb171 (correct), seq 1859255846:1859256187, ack 286326784, win 65535, length 341
15:09:06.621099 IP (tos 0x0, ttl 128, id 31549, offset 0, flags [DF], proto TCP (6), length 381)
    192.168.1.30.3395 > 192.168.1.96.www: Flags [P.], cksum 0x9869 (correct), seq 2532825602:2532825943, ack 286326784, win 65535, length 341
15:09:17.982006 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.96 tell 192.168.1.30, length 46
15:09:17.983737 IP (tos 0x0, ttl 128, id 31609, offset 0, flags [DF], proto TCP (6), length 391)
    192.168.1.30.3399 > 192.168.1.96.www: Flags [P.], cksum 0xa4d1 (correct), seq 4145646158:4145646509, ack 286326784, win 65535, length 351
 


This is happening when im trying to open the page with w3m . (but i assume this would happen with any other linux browser)
Hope this could point in a direction.
Back to top
View user's profile Visit poster's website MSN Messenger
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Sun Mar 24, 2013 8:05 am    Post subject: Reply with quote

Have been looking at this but as I did not do the TCPIP part I have made only a little headway by increasing the the variable Msg_temp As String * 500 in the Sub Http I now get the message Loading on my android tablet instead of connecting but that's as far as I get!

Regards Paul
Back to top
View user's profile
forter

Bascom Member



Joined: 12 Jan 2012
Posts: 8

PostPosted: Sun May 12, 2013 7:08 pm    Post subject: Reply with quote

Hi, Paulvk!
Is it possible to change your code for ATMega644 to ATMega128?
In compiling process I have received a message "Out of SRAM ..." and "address out of bounds...".
Can you help me?
Back to top
View user's profile
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Mon May 13, 2013 12:04 am    Post subject: Reply with quote

Hello forter

The code grew too big for the m644 so I went to a M1284p its pin for pin compattable and the posted code is for it. The M1284p has 16K of ram so large buffers are possible its very well suited to a task like this its also cheap compared to many other AVRs it runs well when using the 12.5Mhz from the ENC28J60. Note when using Bascom it is made to make it simple to change from one chip to another you just change the $regfile setting as long as the chip has enough resources and you note the port to pins changes Bascom will do the rest.

Regards Paul
Back to top
View user's profile
doggies99

Bascom Member



Joined: 13 May 2013
Posts: 1

PostPosted: Mon May 13, 2013 10:37 am    Post subject: Reply with quote

Hi, Mr. Paulvk

i'm a student from Indonesia..in my final project i'm try to make a webserver with enc28j60 with Atmega8535..and i'm little bit confused with the atmega code..because i preferably like in hardware section not in coding section..i have been read Mr. Benzijllstra code about connecting atmega with enc28j60 but it's hard for me to understand with the code..i'm just want to make enc28j60 as a DHCP Client because i'm using HAME A15 as a mini wifi router..so the Atmega+enc28j60 get the ip public from mini router..so i can access the board wireless..i really hope you can help me with the code..

i had been ask Mr. Benzijllstra and he reference me to ask you..

Thanks,
Ardi Wirasatria
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Tue May 14, 2013 9:26 am    Post subject: Reply with quote

when DIM var AT address is used, the change exist you might need to change the code because some chips have SRAM starting at &H60, &H100 or &H200 or &H1000
_________________
Mark
Back to top
View user's profile Visit poster's website
PtG76

Bascom Member



Joined: 18 Apr 2013
Posts: 11
Location: Uzhhorod

ukraine.gif
PostPosted: Thu May 16, 2013 7:25 am    Post subject: Reply with quote

Greetings, Gentleman!

I need some help. I'm working on some kind of crossing point (checkpoint).
What I have: an ATmega128, LCD, enc28j60, Em4095 RFID, ds18B20 temp
sensor, PFC88583 some Leds and a Buzzer. The idea is: the worker checking
in by touching the RFID antenna with his card, the controller stores its ID
and a time stamp witch is followed with signal on buzzer and a green led.
On the other side there is a "daemon" which is time-to-time checks the
controller over the Ethernet. The daemon receives data by a request and it
works with received data (handling, analyzing).
The temperature sensor data displayed on LCD. Also there displayed the
current date and time.
The BIG problem is the stability of Ethernet. It is not stable Brick wall

Any suggestion are welcome.

Sincerely, Peter

_________________
----------------------------------------
Sincerely, Peter Petky jr
Back to top
View user's profile Visit poster's website
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Thu May 16, 2013 9:56 am    Post subject: Reply with quote

Hello All

doggies99 Ben gives me more credit than I am due I still have a lot to learn I have not yet got my head around TCIP I have used his work and added to it a working DHCP would be good to have !


Peter Is your AVR running off the clock output of the ENC28J60 and not its own clock?


Regards Paul
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM Project Blog All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum