Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-29-2007, 08:41 PM   #1
ajnorth
Member
ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.
 
Posts: 17
Karma: 280
Join Date: Dec 2007
Device: iLiad
Samba/smbd/shared folder access to iLiad

I've read elsewhere on this forum some stuff about Samba and the iLiad but I think it referred to Samba running on other Linux boxes on the same network as the iLiad. I wanted Samba running on the iLiad itself, to give shared folder access to the iLiad from a Windows PC on the same wireless network. This makes transferring/accessing files easier than hooking up the USB or using the inbox/outbox concept built into iRex's software.

So, for others that want to do the same, here's a minimal binary distribution of the Samba server smbd that will run on the iLiad (I'm using 2.11).
I've compiled to run out of /mnt/free/samba but you can probably override that with command line options to smbd (try smbd --help). If you run either smbd or smbpasswd you'll have to set the shell variable LD_LIBRARY_PATH to point to the lib directory first.

Note I didn't bother including nmbd so accessing the shared folder from windows will require an IP address, not a windows name e.g. \\192.168.1.5

Also, you'll need to set up users on the iLiad corresponding to windows users on the windows boxes you'll be accessing the iLiad with. This involves running on the iLiad e.g.
"adduser username1"
"smbpasswd -a username1"
where username1 is the windows user accessing the iLiad share. You need to enter the same password into smbpasswd as that used on the windows box to avoid getting a login prompt box when you access the share.

In the smb.conf file I have /mnt/free as the shared directory and have given username1 and username2 from the windows boxes root privileges by making them admin users (otherwise you can't modify/add/delete anything). This shouldn't matter too much for user files in /mnt/free but you'd want to be careful about accidentally trashing the iLiad if you mount any of the system directories.

Note the "private" and "var" directories as distributed are empty, but are necessary to run smbpasswd and smbd - some files will be created in there.
If you have and trouble setting this up, try running smdb with "smbd -i -d 5" from the iLiad command line then try to connect from the windows box - the debug messages may tell you why accesses to the share are failing. Note the -i option is only good for one access - the connection will be closed afterwards.

I imagine this could be run on startup of the iLiad. I'm doing it manually at the moment, after manually starting the wireless interface.
Attached Files
File Type: zip samba.zip (2.04 MB, 316 views)
ajnorth is offline   Reply With Quote
Old 12-29-2007, 09:21 PM   #2
nekokami
fruminous edugeek
nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.
 
nekokami's Avatar
 
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
Cool. I'd only need this if I wanted to initiate the connection from the desktop, correct?
nekokami is offline   Reply With Quote
Old 12-30-2007, 10:32 PM   #3
ajnorth
Member
ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.
 
Posts: 17
Karma: 280
Join Date: Dec 2007
Device: iLiad
Yes - you'd do it if you want to see the files stored on the iLiad in a windows folder on a windows PC with a connection over a network, initiated by entering e.g. \\192.168.1.5 in a windows browser (where the IP address is that of the iLiad). iRex have done it the other way around for connections to the PC - mounting a windows share on the iLiad, and then only temporarily to implement their inbox/outbox concept, which I find a bit clunky. The inbox/outbox concept is probably best in fitting with what they plan for the IDS, whatever that is.
ajnorth is offline   Reply With Quote
Old 12-31-2007, 02:48 AM   #4
ajnorth
Member
ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.
 
Posts: 17
Karma: 280
Join Date: Dec 2007
Device: iLiad
Starting samba automatically

I've just put a call to /mnt/free/samba/bin/start.sh at the end of /home/root/start.sh to load the samba server on startup.
That seems to work fine. I manually started the wireless network after startup and was then able to access the shared folder ok. I wanted the network connection to remain manual because of the battery drain associated with wireless (I have wireless network on and off scripts accessible through the iLiad GUI).
ajnorth is offline   Reply With Quote
Old 12-31-2007, 12:21 PM   #5
nekokami
fruminous edugeek
nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.nekokami ought to be getting tired of karma fortunes by now.
 
nekokami's Avatar
 
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
What I really want to do is reconfigure the IDS button (in most contexts) to back up the contents of my Notes and scribbles to my linux box, wirelessly. Though I guess I could launch a script instead. I need to spend some time reading through the notes on setting up samba on linux and wireless on the iLiad, etc.
nekokami is offline   Reply With Quote
Old 01-02-2008, 03:53 AM   #6
narve
iLiad fan
narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.narve can teach chickens to fly.
 
Posts: 210
Karma: 3864
Join Date: Oct 2006
Device: iRex iLiad
Quote:
Originally Posted by ajnorth View Post
I've just put a call to /mnt/free/samba/bin/start.sh at the end of /home/root/start.sh to load the samba server on startup.
That seems to work fine. I manually started the wireless network after startup and was then able to access the shared folder ok. I wanted the network connection to remain manual because of the battery drain associated with wireless (I have wireless network on and off scripts accessible through the iLiad GUI).
This sounds cool. However, my problem with this concept is the extremely unreliable state of the wireless connection.

My script starts the wireless connection using "wireless.sh start xxxxx". It works, but it sometimes drops after 10 seconds, sometimes it is stable for several minutes. What does your script contain? Is it better to use the connectionMgr command?
narve is offline   Reply With Quote
Old 01-03-2008, 07:13 AM   #7
ajnorth
Member
ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.
 
Posts: 17
Karma: 280
Join Date: Dec 2007
Device: iLiad
Reliability

I've just changed to Alinine's wireless scripts (http://www.mobileread.com/forums/showthread.php?t=14718), which are great.
I was using the connectionMgr but I discovered that program would shut down the wireless connection after successfully configuring it if the PC it was configured to connect to couldn't be reached i.e. it wouldn't work if the PC was turned off. You can pass a connect-ids option to attempt a connection to the ids instead of the PC but it's better to have independent control of the wireless without the iLiad attempting to connect to anything.
The wireless is very stable for me, but seems to have very short range compared to a laptop with wireless. I seem to almost have to be in the same room as my router.
Re: stability, I'm running only on the internal memory so far. I've read that access to the compact flash cards can disrupt the wireless.
ajnorth is offline   Reply With Quote
Old 01-11-2008, 02:34 PM   #8
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Newcastle upon Tyne, UK
Device: iRex iLiad, Psion 5MX, nokia n800
I've just set this up and this is so cool. File management is now a breeze.

Just out of interest, how secure is it? My password is a combination of upper and lower case letters and numbers. At home I'm happy enough using it but at work there are hundreds of users, several of whom are likely to be quite savvy about poking around in things.
daudi is offline   Reply With Quote
Old 01-17-2008, 04:31 AM   #9
ajnorth
Member
ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.
 
Posts: 17
Karma: 280
Join Date: Dec 2007
Device: iLiad
Security

I'm just using it on a private network so I don't much care about security and haven't looked into it much. It's the most basic level of windows security (no domain controller or anything). I don't know how secure that is i.e whether passwords are clear text/sniffable on your work network.

One thing I suggest you do is just share your book/document directory - don't share the root/iRex filesystem - even if it is just you accessing it you wouldn't want to accidentally send iLiad system files to the windows trashcan!
Then security wise, presuming you are backing up those books/documents elsewhere at work, I guess it just depends on whether you care about someone determined seeing what's in your book/document directory.
ajnorth is offline   Reply With Quote
Old 01-17-2008, 04:45 AM   #10
daudi
Addict
daudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-booksdaudi has learned how to read e-books
 
Posts: 281
Karma: 904
Join Date: Oct 2007
Location: Newcastle upon Tyne, UK
Device: iRex iLiad, Psion 5MX, nokia n800
Ah, very good point. I do indeed only share a folder that holds journal articles and books so from that respect it should not be a problem.
daudi is offline   Reply With Quote
Old 02-18-2008, 04:02 PM   #11
Spatte
Member
Spatte began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2007
Device: None
Hi everyone,

I have tried to get this to work on my Iliad but I must have missed something. Maybe you could give me a hint.

Im using a iMac running MacOSX 10.5.1.

This is what I have done:
1. Copied the files from the original post to /mnt/free/ on my Iliad.

2. Using mrxvt I ran the following commands on the Iliad:
2a. "adduser frederik"
2b. "export LD_LIBRARY_PATH=/mnt/free/samba/lib"
2c. "smbpasswd -a frederik" (this command gave a lot of output)

3. I have change the line "admin users = username1, username2" in smb.conf to "admin users = frederik, username2"

4. Start wireless using Alinine's wireless scripts

5. Start samba by entering /mnt/free/samba/bin/start.sh in mrxvt

6. I try to connect to the Iliad using "sudo mount -t cifs //10.0.1.3/mnt/free -o uid=frederik,gid=frederik,credentials=iliad_creden tials iliad" in the terminal on my mac. (got this command from Daudi in the "Using the Iliad for research"-thread)

What am I doing wrong?


Grateful for any hints.

/ SP

[EDIT: I turns out I can connect, using the "Connect to server..." menu command in finder and by entering smb://10.0.1.3 in the connection dialog. Great! Now I just want to know how to do it using the shell...]

[EDIT2: Actually, it seems I have to "wake my connection up" by running ping from the Iliad. Before running ping from the Iliad, I cannot connect to the Iliad]

Last edited by Spatte; 02-18-2008 at 05:33 PM.
Spatte is offline   Reply With Quote
Old 02-22-2008, 12:56 AM   #12
ajnorth
Member
ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.ajnorth has a complete set of Star Wars action figures.
 
Posts: 17
Karma: 280
Join Date: Dec 2007
Device: iLiad
Ping to wakeup

Are you accessing the compact flash card in between turning on the wireless and attempting to connect? That may cause the wireless connection to drop out (a bug in the Iliad apparently). If you aren't it sounds like your router configuration may be bad. Those are my only 2 suggestions sorry. I reckon the only things the ping could be doing are
1) waking up the Iliad's wireless, or
2) fixing a problem with the routing.
Try playing around with "arp" on the MAC to see if the iLiad is in the ARP table before and after you ping and play around with the router as well to make sure the two machines can see each other ok. See http://en.wikipedia.org/wiki/Address...ution_Protocol

I'm not sure what the proper mount command syntax would be since I connect from a Windows box.
ajnorth is offline   Reply With Quote
Old 02-29-2008, 09:02 AM   #13
Spatte
Member
Spatte began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2007
Device: None
Yes I was using the CF card. This bug drove me crazy so i finally decided to change my workflow. Now I'm swapping the CF card back and forth. Would be nice if I someday could swap 1's and 0's back and forth through the air...

Thanks for the help.

/ SP
Spatte is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sqlite samba lock rootto Calibre 4 09-27-2009 02:03 PM
installing shell access causes Iliad to keep rebooting? Jolly iRex 2 05-12-2008 10:50 PM
iLiad Access to all your iLiad files, without USB narve iRex Developer's Corner 30 01-28-2008 03:29 PM
iLiad Any possibility of ACCESS Palm on Iliad? readmore iRex Developer's Corner 1 11-27-2007 03:57 PM
iLiad How do I get ssh access to my 2.7.1 iLiad? narve iRex Developer's Corner 3 11-28-2006 05:59 PM


All times are GMT -4. The time now is 11:48 PM.


MobileRead.com is a privately owned, operated and funded community.