Dell Mini 9 Hardware and Upgrades Discuss Dell Mini 9 Hardware and Upgrades.

Reply
 
LinkBack Thread Tools Display Modes
  (#61) Old
Expert Member
 
Posts: 692
Join Date: Mar 2009
Default Re: SDHC mini PCIe adapter - Would it work?! - 05-10-2009, 02:20 AM

Took awhile since I've not been feeling well but here is a nicer script for the .sleep file for use with SleepWatcher for OS X folks. It will go through and stop any programs that have files open on the internal SHDC card then eject the card and if that fails unmount it.

Code:
#!/bin/bash
sync
echo $(date) >> $HOME/.log-jumount.log
# Figure out what volumes goes with /dev/disk1s1
# If you want you can just hard code a name in here instead
Vol=`df | grep /dev/disk1s1 | grep -o /Volumes/.\*`
# write list of open files on SD card to temp file
lsof | grep ${Vol} > /tmp/jumount.log
# copy temporary list to log file
cat /tmp/jumount.log >> $HOME/.log-jumount.log
# kill any processes with open files
grep ${Vol} /tmp/jumount.log | sort -u -k 2,2 | awk '{system ("kill -TERM "$2)}'
# wait for the processes to unwind
sleep 2
sync
# use eject to dismount the SD card (essential!)
diskutil eject ${Vol}
# check if eject has fully dismounted SD card.  If not, dismount it explicitly
umount ${Vol} 2> /dev/null


Mini1: Vostro A90, Black, 2G, 1.3 Webcam, Bluetooth, 64G SuperTalent, OS X 10.6.4
Mini2: Mini9, Black, 2G, 0.3 Webcam, Bluetooth, 32G RunCore, OS X/Win 7, internal PCI-e SHDC Reader
Mini3: Mini10v. Black, 2G, Webcam, 640G HD, OS X 10.5.8/Win 7/Ubuntu [Hibernate w/NBI 0.8.3 RC4]
Dropbox Referral
Reply With Quote
  (#62) Old
Expert Member
 
Posts: 692
Join Date: Mar 2009
Default Re: SDHC mini PCIe adapter - Would it work?! - 05-10-2009, 11:07 PM

A neater version with some error checking.

Code:
#!/bin/bash
sync
TMP=/tmp/jumount.log
JLOG=${HOME}/.log-jumount.log
echo $(date) >> ${JLOG}
# Figure out what volumes goes with /dev/disk1s1
# If you want you can just hard code a name in here instead
Vol=`df | grep /dev/disk1s1 | grep -o /Volumes/.\*`
if [ -z "${Vol}" ] 
then
    echo "Nothing to unmount" >> ${JLOG}
    exit 0
fi
echo "Cleaning up ${Vol} for sleep" >> ${JLOG}
# write list of open files on SD card to temp file
lsof | grep ${Vol} | sort -u -k2,2 > ${TMP}
# [Optional, remove # to enable] copy temporary list to log file
# cat /tmp/jumount.log >> ${JLOG}

if [ -s ${TMP} ]
then
    # kill any processes with open files
    cat ${TMP} | awk '{system ("echo kill -TERM "$1 " >> ${HOME}/.log-jumount.log")}'
    cat ${TMP} | awk '{system ("kill -TERM "$2)}'
    # wait for the processes to unwind
    sleep 2
    sync
fi
# use eject to dismount the SD card (essential!)
sudo diskutil eject ${Vol} >> ${JLOG}
# check if eject has fully dismounted SD card.  If not, dismount it explicitly
sudo /sbin/umount -f ${Vol} 2>/dev/null >> ${JLOG}


Mini1: Vostro A90, Black, 2G, 1.3 Webcam, Bluetooth, 64G SuperTalent, OS X 10.6.4
Mini2: Mini9, Black, 2G, 0.3 Webcam, Bluetooth, 32G RunCore, OS X/Win 7, internal PCI-e SHDC Reader
Mini3: Mini10v. Black, 2G, Webcam, 640G HD, OS X 10.5.8/Win 7/Ubuntu [Hibernate w/NBI 0.8.3 RC4]
Dropbox Referral
Reply With Quote
  (#63) Old
Junior Member
 
Posts: 27
Join Date: Feb 2009
Default Re: SDHC mini PCIe adapter - Would it work?! - 05-11-2009, 05:17 AM

I have ordered all the parts for this.

I have enlisted a guy who can solder tiny things..... so i'll let you know how i go. Couldn't find the standoffs, so i am gonna borrow one from the wifi card.
Reply With Quote
  (#64) Old
Senior Member
 
ishagi's Avatar
 
Posts: 187
Join Date: Mar 2009
Location: Kanata, Ontario, Canada
Default Re: SDHC mini PCIe adapter - Would it work?! - 05-11-2009, 01:32 PM

Quote:
Originally Posted by waapwoop
I have ordered all the parts for this.

I have enlisted a guy who can solder tiny things..... so i'll let you know how i go. Couldn't find the standoffs, so i am gonna borrow one from the wifi card.
Good luck.

FWIW, I've been playing around with this for several weeks now and have no issues other than the bottom of the Mini feeling slightly warmer due to the addition of the extra card. I don't think battery life has been affected to any noticeable degree.

I run both Win7 and OSX. For both OS to see the card, it must be formatted in FAT32. I have applications, games, pictures, movies etc running off of it with no problems.

If using OSX, you need the SleepWatcher script installed for unmounting during sleep. Also, in Windows, if OSX has been using the drive, you'll have some hidden apple files taking up some space (like .trash etc). A small price to pay.
For TimeMachine, I use yet another 16G SDHC on the external slot which I randomly put in to do a random backup. I guess, you could also use the internal one if you wanted.

Not finding the proper low-height M2 standoffs is still buggin' me, so I might try to find another source for them that fits (i.e. the PEM ones supposedly had too large an inner diameter). It would be nice to have two standoffs for the Wifi and MR04.


Dell Mini 9 (96Gb) | White | SL 10.6.5 + Win7 Pro using EasyBCD 2.0 | 2G GSkill 667 RAM | No Webcam | BIOS A05 | 32G Runcore SSD | 32G SDHC (ext) | 32G SDHC (int w/ MR04 Card) | 1505 802.11n | Internal BT | Chrome Apple Logo
Dell Vostro A90 (96Gb) | SL 10.6.5 | 2G HyperX | 0.3Webcam | BIOS A04 | 64G Runcore SSD | 32G SDHC (ext) | and other stock features
| CLICK HERE TO ADD AN INTERNAL SDHC CARD | | CLICK HERE TO TAKE THE HACKINTOSH POLL |
Reply With Quote
  (#65) Old
Junior Member
 
Posts: 7
Join Date: May 2009
Default Re: SDHC mini PCIe adapter - Would it work?! - 05-11-2009, 11:10 PM

Ok, I know I am a bit late on this, But...

If the Mini 9 already has the connector soldered then this is a simple plug in mod plus a driver install correct???
For going the need for additional software for the mac OS, and the stand offs...

Are there connections that need to be cut if the connector is already installed?

Thanks for any help, and great topic everyone!!!


L8r,
Gyro
(Short for Gyroscope, Not the Greek sandwich, Although those are tasty!) :lol:
Reply With Quote
  (#66) Old
Senior Member
 
ishagi's Avatar
 
Posts: 187
Join Date: Mar 2009
Location: Kanata, Ontario, Canada
Default Re: SDHC mini PCIe adapter - Would it work?! - 05-12-2009, 12:35 AM

Quote:
Originally Posted by Gyro
Ok, I know I am a bit late on this, But...

If the Mini 9 already has the connector soldered then this is a simple plug in mod plus a driver install correct???
For going the need for additional software for the mac OS, and the stand offs...

Are there connections that need to be cut if the connector is already installed?

Thanks for any help, and great topic everyone!!!
If you already have the WWAN connector installed, then it should be "plug and play". I would assume the standoffs and a cover over the PCB where the WWAN card would be, are already installed. No cuts, no straps, just install the MR04 card with your choice of SDHC card. For me, Win7 and OSX automatically installed the Ricoh R5U880 drivers etc. Not sure how other OS will react to the card.

So, what do you need as a bare minimum for parts if you aren't so lucky to have the WWAN connector installed by DELL?

1. MR04 card [which comes with screws for the standoff(s)]
2. SD/SDHC card - the bigger the better
3. mini pci-e connector (soldered somehow into the WWAN space)
4. standoff(s) - one minimum (either new and soldered into the available space(s) or steal one from the wifi card)
5. recommended -> electrical or kapton tape under the card (to prevent accidental component-to-pcb via shorts)
6. optional -> if you're going to do this yourself, make sure you have a good soldering iron/tips (and knowledge/patience/yadda-yadda-yadda ...)


Dell Mini 9 (96Gb) | White | SL 10.6.5 + Win7 Pro using EasyBCD 2.0 | 2G GSkill 667 RAM | No Webcam | BIOS A05 | 32G Runcore SSD | 32G SDHC (ext) | 32G SDHC (int w/ MR04 Card) | 1505 802.11n | Internal BT | Chrome Apple Logo
Dell Vostro A90 (96Gb) | SL 10.6.5 | 2G HyperX | 0.3Webcam | BIOS A04 | 64G Runcore SSD | 32G SDHC (ext) | and other stock features
| CLICK HERE TO ADD AN INTERNAL SDHC CARD | | CLICK HERE TO TAKE THE HACKINTOSH POLL |
Reply With Quote
  (#67) Old
Expert Member
 
Posts: 692
Join Date: Mar 2009
Default Re: SDHC mini PCIe adapter - Would it work?! - 05-12-2009, 03:23 AM

I was explaining to someone in PM how the script worked and then later how to test it. Figured that since others may try this hardware mod it'd be useful for all. Warning longwinded…

Let's see, where to begin…

The script keeps a log of what it tries to do and puts it in your home directory. It is named '.log-jumount.log' but you won't see it if you just type ls. That's because files who's name starts with a '.' aren't listed. But you can look at it with cat or more. That is type "cat .log-jumount.log" and the contents will be shown on the screen.

In unix/linux everything that's a device will have a corresponding /dev entry. So each HD, SSD, CD/DVD drive, touch tablet, printer, anything basically you plug into the computer will show up as some sort of /dev/something.

The drives are going to show up as /dev/diskXsY where X is the physical device and Y is the logical device. For example I have a dual boot machine, Win7 and OS X so I have 2 partitions on my SSD. The first, the Win7, is /dev/disk0s1 and my OS X partition is /dev/disk0s2. (Physical numbers start at 0, logical at 1).

The next mounted drive is /dev/disk2s1 then the next will be /dev/disk3s1, etc.

You can see these by typing df in a terminal window.

The lsof command (which you can also try out by typing in a terminal window) will list all the open files by any program. The output has the program name as the first item, the process ID# as the second and the last item is the filename.

The first bit of the script tries to figure out the name of the disk by searching through the output of the df command, looking for the 2nd drive, disk1s1. I need the actual name of the mount point (the last part of any df output line) and that's what the 2nd grep in that line does.

So you could have done:
Vol=/Volumes/PATRIOT32G
instead of the code that's there.

Next the script checks to see if there actually was a second volume (it could have been unmounted) and just exits if it doesn't exist.

At this point I know the name of the mount point and the list of all open files. So I go through the list of open files and look for any that start with the mount point of the SDHC. I sort them and drop duplicates, using the 2nd item of the lsof output which is the process ID#. That's stuck in the file /tmp/jumount.log

If that file isn't empty, which means there is at least one process with a file open on the SDHC, I want to tell the system to stop that program. That's the kill command.

I wait 2 seconds for those processes to actually stop.

Then I try to eject the SDHC (since its removable) and then just for safety try to unmount it in case the eject failed.

I tested the script with the drive unmounted before sleep and with and without files open on the SDHC so I don't know why it didn't work for you.

As far as checking for files, try an easy one, open an app that's on the SD card. It should be quit, along with an entry in the logile, when you come back from sleep.

If that works the last simple test is to make a text file on the SD and open it with TextEdit (which should be on the SSD as part of a basic OS X install), when you come back from sleep TextEdit should be gone, again with a logfile entry.

Interesting that you have the card in the slot as disk1s1 and the PCI adapter as disk2s1, its consistently the other way for me. Could depend on brand of card and read/write speed, which one the OS mounts first.


Mini1: Vostro A90, Black, 2G, 1.3 Webcam, Bluetooth, 64G SuperTalent, OS X 10.6.4
Mini2: Mini9, Black, 2G, 0.3 Webcam, Bluetooth, 32G RunCore, OS X/Win 7, internal PCI-e SHDC Reader
Mini3: Mini10v. Black, 2G, Webcam, 640G HD, OS X 10.5.8/Win 7/Ubuntu [Hibernate w/NBI 0.8.3 RC4]
Dropbox Referral
Reply With Quote
  (#68) Old
Junior Member
 
Posts: 2
Join Date: Apr 2009
Default Re: SDHC mini PCIe adapter - Would it work?! - 05-12-2009, 04:02 AM

hello,
will this adapter work for the sd/sdhc mod?
http://cgi.ebay.com/Mini-PCI-e-DIY-H5-2 ... .m20.l1116

thank you in advance for your answer.
Reply With Quote
  (#69) Old
Senior Member
 
ishagi's Avatar
 
Posts: 187
Join Date: Mar 2009
Location: Kanata, Ontario, Canada
Default 05-12-2009, 12:07 PM

Quote:
Originally Posted by acio View Post
hello,
will this adapter work for the sd/sdhc mod?
http://cgi.ebay.com/Mini-PCI-e-DIY-H5-2 ... .m20.l1116

thank you in advance for your answer.
NO!!! The 5.2mm tall one is too tall.
Look back on pg4 of this thread to see the correct part number. Order from Mouser to make your life easier.

PART NUMBER: 656-MM60-52B1-B1-R - this is the low height one 3.9mm

Buy it at Mouser: $2.06US + shipping

http://www.mouser.com/Search/Refine....MM60-52B1-B1-R


Dell Mini 9 (96Gb) | White | SL 10.6.5 + Win7 Pro using EasyBCD 2.0 | 2G GSkill 667 RAM | No Webcam | BIOS A05 | 32G Runcore SSD | 32G SDHC (ext) | 32G SDHC (int w/ MR04 Card) | 1505 802.11n | Internal BT | Chrome Apple Logo
Dell Vostro A90 (96Gb) | SL 10.6.5 | 2G HyperX | 0.3Webcam | BIOS A04 | 64G Runcore SSD | 32G SDHC (ext) | and other stock features
| CLICK HERE TO ADD AN INTERNAL SDHC CARD | | CLICK HERE TO TAKE THE HACKINTOSH POLL |
Reply With Quote
  (#70) Old
Junior Member
 
Posts: 19
Join Date: Feb 2009
Default 05-12-2009, 04:15 PM

Quote:
Originally Posted by ishagi View Post
Good luck.

FWIW, I've been playing around with this for several weeks now and have no issues other than the bottom of the Mini feeling slightly warmer due to the addition of the extra card. I don't think battery life has been affected to any noticeable degree.

I run both Win7 and OSX. For both OS to see the card, it must be formatted in FAT32. I have applications, games, pictures, movies etc running off of it with no problems.

If using OSX, you need the SleepWatcher script installed for unmounting during sleep. Also, in Windows, if OSX has been using the drive, you'll have some hidden apple files taking up some space (like .trash etc). A small price to pay.
For TimeMachine, I use yet another 16G SDHC on the external slot which I randomly put in to do a random backup. I guess, you could also use the internal one if you wanted.

Not finding the proper low-height M2 standoffs is still buggin' me, so I might try to find another source for them that fits (i.e. the PEM ones supposedly had too large an inner diameter). It would be nice to have two standoffs for the Wifi and MR04.



You can use NTFS on the card if you install the Mac-fuse driver from macfuse - Google Code and then the NTFS-3g driver from NTFS-3G: Stable Read/Write NTFS Driver It's solid enough that our Men's and Women's Basketball teams both use it without a hitch to produce videos for our athletic conference.
Reply With Quote
Reply

« Battery Replacement Story and Fix | a summary of internal mods on mini 9 »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.mydellmini.com/forum/dell-mini-9-hardware-upgrades/4635-sdhc-mini-pcie-adapter-would-work.html
Posted By For Type Date
3DCenter Forum - Diskussion Schnäppchen Dell Vostro A90 This thread Refback 05-27-2009 08:43 PM

Copyright © 2008-2011 MyDellMini.com.