It is currently Sat Dec 16, 2017 7:17 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 84 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
 Post subject: Re: Contiki 2.1 released
PostPosted: Tue Jun 10, 2008 9:02 pm 
Offline

Joined: Thu May 17, 2007 3:00 pm
Posts: 80
Location: Duesseldorf, Germany
Oliver wrote:
lodger wrote:
I wonder, if it's possible to do disk i/o? Or is that not implemented yet for the c64 taget?
Disk I/O is both used by Contiki internally (i.e. for reading the 'contiki.cfg' and loading the *.eth drivers) and by Contiki apps (i.e. the file-based web server and the file-related commands of the telnet-shell).

Best, Oliver


Well, the cfs_read command works, but it seems like you can't write data to a file (on the c64 platform, native and with VICE) using cfs_write. I've attached my example code, feel free to try it. It just won't work.


Attachments:
File comment: modified "hello-world.c" code containing cfs commands. cfs_read works, but cfs_write fails (on the c64 platform, native and with VICE) .
hello-world.c [3.41 KiB]
Downloaded 495 times

_________________
LOAD ":*",8,1
READY.
RUN
Top
 Profile  
Reply with quote  
 Post subject: Re: Contiki 2.1 released
PostPosted: Wed Jun 11, 2008 5:16 am 
Offline

Joined: Thu Jun 05, 2008 5:45 am
Posts: 2
This may not be the right place for it, but I've got a question about Contiki/VICE. I downloaded the 'Instant Contiki Development Environment 1.0a' ubuntu dev environment in hopes of messing around with Contiki and C64 emulation via VICE.

Now the VICE included with the IDE doesn't have networking enabled. So I (eventually :cry: ) got the right libraries required for VICE compilation with network support, and compiled a version that had networking enabled.

I used Oliver's 2.1 image posted here and tried Contiki networking with VICE set to TFE, RR-net etc with no luck. RR-net seemed to work on the C64 side, but no network data was being passed. So is VICE networking the culprit? I know that it's broken a bit, but not to what extent.


Top
 Profile  
Reply with quote  
 Post subject: Re: Contiki 2.1 released
PostPosted: Wed Jun 11, 2008 8:07 am 
Offline

Joined: Thu May 17, 2007 3:00 pm
Posts: 80
Location: Duesseldorf, Germany
To have ethernet enabled for VICE on Linux, you must have libpcap and libnet installed and VICE must be run as "root" user (e.g. via sudo). See this document for more information on this topic.

However, I've also built my VICE (on Ubuntu 8.04) from source, with the ethernet build option enabled. I've also installed libpcap and libnet and ran VICE as root user. Still, there's no ethernet available in the Linux build (but it works with WinVICE). So even if you follow the instructions given above, ethernet functionality may still be absent in the Linux version of VICE. And I wouldn't wonder if it was disabled for security reasons, as running such an app as root user *is* a security risk.

Small hint: try to use the latest cc65 (e.g. 2.12.0) release along with the CVS version of Contiki 2.1. It may be a bit more complex to create a proper build environment that way, but compiling cc65 and checking out Contiki 2.x really is no big deal. And that way you always have the latest sourcecode of Contiki 2.x available through CVS.

_________________
LOAD ":*",8,1
READY.
RUN


Top
 Profile  
Reply with quote  
 Post subject: Re: Contiki 2.1 released
PostPosted: Wed Jun 11, 2008 10:36 am 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 860
Yeah, it's quite tricky (and frustrating) to get the ethernet emulation running on Vice/Linux. Be very meticulous about build warnings. The make script generally ignores them and builds without failure (and without ethernet) !


Top
 Profile  
Reply with quote  
 Post subject: Re: Contiki 2.1 released
PostPosted: Wed Jun 11, 2008 4:45 pm 
Offline

Joined: Thu May 17, 2007 3:00 pm
Posts: 80
Location: Duesseldorf, Germany
RaveGuru wrote:
Yeah, it's quite tricky (and frustrating) to get the ethernet emulation running on Vice/Linux. Be very meticulous about build warnings. The make script generally ignores them and builds without failure (and without ethernet) !


You have to make sure that (on Ubuntu Linux 8.04) you use libnet0 and libnet0-dev, not libnet1/libnet1-dev. If so, get libnet0/libnet0-dev and recompile. That's how I got it compiled in (the option is now available). Still it's not working ... hmm ... what memory address and which IP address (is it the same as the host system e.g. the linux box?) do I have to set? On my C64 it's $DE08 but I don't know what to do within VICE ...

_________________
LOAD ":*",8,1
READY.
RUN


Top
 Profile  
Reply with quote  
 Post subject: Re: Contiki 2.1 released
PostPosted: Wed Jun 11, 2008 8:54 pm 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 860
You don't set any IP address. Vice will work as a virtual networkcard (in this case RR-Net or TFE) with its own MAC address. Vice will just use your physical network card to send and receive frames. Other hosts on the network will see your computer and Vice as two different hosts. As for the memory location, IIRC you just need to select RR-Net emulation in Vice, which should emulate standard RR-Net at $de02.


Top
 Profile  
Reply with quote  
 Post subject: Re: Contiki 2.1 released
PostPosted: Wed Jun 11, 2008 10:35 pm 
Offline

Joined: Thu Jun 05, 2008 5:45 am
Posts: 2
lodger wrote:
To have ethernet enabled for VICE on Linux, you must have libpcap and libnet installed and VICE must be run as "root" user (e.g. via sudo). See this document for more information on this topic.

I obtained those libraries, and built 1.22 source of VICE. Followed that guide and ran as root, still no joy. I'll have to give some thought to cc65 and the Contiki CVS. Though based on everything I've read, it should all be working now, and isn't.

RaveGuru wrote:
Yeah, it's quite tricky (and frustrating) to get the ethernet emulation running on Vice/Linux. Be very meticulous about build warnings. The make script generally ignores them and builds without failure (and without ethernet) !

Yes, I had to parse through the config script output to find the issues with libpcap/libnet. And found out the hard way that you need to use a deprecated library version for one of them to get VICE to build correctly.


Top
 Profile  
Reply with quote  
 Post subject: Re: Contiki 2.1 released
PostPosted: Sun Jun 15, 2008 11:29 pm 
Offline

Joined: Wed Dec 05, 2007 2:15 am
Posts: 77
Hi,

Regarding Ethernet support for VICE/Linux...

1. Certainly I'd like to see 'Instant Contiki' come with an Ethernet-enabled VICE. But for Adam the 6502 targets are just not important anymore. So I'm happy he (with detailed information from me) at least installed and configured VICE so that the disk image creation now being (optional) part of the Contiki build works - it uses VICE's 1541 tool. He told me that he'd maybe later revisit the idea of compiling VICE to get Ethernet support. So if someone here comes up with a reproducable procedure to compile VICE successfully with Ethernet support suitable for the 'instant Contiki' image then I'd certainly be willing to forward that to Adam and try to make him follow that and include the result in his image...

2. The $DE08 vs. $DE02 confusion is unnecessary. It's just a diffrent way to describe the same thing (check my posting in this thread from Tue Dec 11, 2007 12:42 pm for details). What the Contiki driver indicates as "$DE08" IS exactly the "RR+RR-Net" setup - and at least on VICE/Win32 it works as expected. The same is btw. true for VICE/Win32's "TFE" and Contiki's "$DE00". So although I'm personally happy with people engaging with Contiki I see no point in building Contiki on one's own because of VICE issues.

3. On the IP address topic I'd like to add the (maybe too obvious but one never knows...) remark that the IP setup used for Contiki needs to match the local LAN - it needs to like just like to would for another physical machine added: Individual IP, same subnet, ...

4. Maybe a bit off-topic but worth mentioning anyway: WinPcap (and therefore VICE/Win32) works just great with the 'Microsoft Loopback Adapter' virtual network interface. This allows for very easy local testing on one box. Just add the virtual hardware and configure it's IP settings for a different subnet and it won't disturb you normal networking in any way. And as Wireshark uses WinPcap too you can nicely monitor the traffic.

Best, Oliver


Top
 Profile  
Reply with quote  
 Post subject: Re: Contiki 2.1 released
PostPosted: Fri Jun 27, 2008 11:01 am 
Offline
Site Admin

Joined: Wed Jan 11, 2006 12:22 pm
Posts: 860
This thread has been forked to viewtopic.php?f=6&t=391


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 84 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group