473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Accessing a USB Device?

Hello,

I have a MP3 and I want to access the songs in them. I was wondering
if Python could help me do that. I understand that this can be done
using Linux by mountig it as a file system, but I am not on Linux and
this is mainly for a Windows platform. Can anyone shed some light?

Thanks,
Jul 18 '05 #1
7 10261
On 11 Oct 2003 21:20:08 -0700, fa****@jaredweb.com (Fazer) wrote:
Hello,

I have a MP3 and I want to access the songs in them. I was wondering
if Python could help me do that. I understand that this can be done
using Linux by mountig it as a file system, but I am not on Linux and
this is mainly for a Windows platform. Can anyone shed some light?

Thanks,


Assuming it is a USB device, if the included drivers do not allow
mounting it as a filesystem (my own MP3 player does not, but flash
readers seem to do this as standard) you probably have an extreme
uphill battle accessing it from Python.

Basically, while USB is a serial bus, it isn't like the old serial
ports. It isn't something that's easily handled in a high level
language. If you want to access a USB MP3 device from Python, you will
need...

1. A good understanding of how USB works at a low level.

2. Documentation of the probably proprietary protocol that the MP3
player uses.

3. A driver development kit and C compiler.

Basically, you'd probably need to write an alternate driver for your
device (which would probably block out the original one) and a Python
extension which communicates with that driver.
--
Steve Horne

steve at ninereeds dot fsnet dot co dot uk
Jul 18 '05 #2
Hello Fazer,
I have a MP3 and I want to access the songs in them. I was wondering
if Python could help me do that. I understand that this can be done
using Linux by mountig it as a file system, but I am not on Linux and
this is mainly for a Windows platform. Can anyone shed some light?

I think it's configured just like a serial port. If I'm right try pyserial.

HTH.
Miki
Jul 18 '05 #3
On Sun, 11 Oct 2003, Fazer wrote:
I have a MP3 and I want to access the songs in them. I was wondering
if Python could help me do that. I understand that this can be done
using Linux by mountig it as a file system, but I am not on Linux and
this is mainly for a Windows platform. Can anyone shed some light?


Just plug the thing in and access it as a removable drive (which is all
mounting it as a filesystem really is). You should be able to view the
MP3s with Windows Explorer

--
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: an*****@bullseye.apana.org.au (pref) | Snail: PO Box 370
an*****@pcug.org.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia

Jul 18 '05 #4
On Mon, 13 Oct 2003 08:09:53 +1000 (EST), Andrew MacIntyre
<an*****@bullseye.apana.org.au> wrote:
On Sun, 11 Oct 2003, Fazer wrote:
I have a MP3 and I want to access the songs in them. I was wondering
if Python could help me do that. I understand that this can be done
using Linux by mountig it as a file system, but I am not on Linux and
this is mainly for a Windows platform. Can anyone shed some light?


Just plug the thing in and access it as a removable drive (which is all
mounting it as a filesystem really is). You should be able to view the
MP3s with Windows Explorer


That depends on how the PC connectivity for the MP3 player works.
Mine, for one, doesn't work that way. It provides an application which
looks a bit like explorer, but you don't get a drive letter - you just
get two listview panes in the application listing the MP3s in the
built-in flash and the extension flash of the device.
--
Steve Horne

steve at ninereeds dot fsnet dot co dot uk
Jul 18 '05 #5
Stephen Horne <$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$.co.uk> wrote in message news:<19********************************@4ax.com>. ..
On Mon, 13 Oct 2003 08:09:53 +1000 (EST), Andrew MacIntyre
<an*****@bullseye.apana.org.au> wrote:
On Sun, 11 Oct 2003, Fazer wrote:
I have a MP3 and I want to access the songs in them. I was wondering
if Python could help me do that. I understand that this can be done
using Linux by mountig it as a file system, but I am not on Linux and
this is mainly for a Windows platform. Can anyone shed some light?


Just plug the thing in and access it as a removable drive (which is all
mounting it as a filesystem really is). You should be able to view the
MP3s with Windows Explorer


That depends on how the PC connectivity for the MP3 player works.
Mine, for one, doesn't work that way. It provides an application which
looks a bit like explorer, but you don't get a drive letter - you just
get two listview panes in the application listing the MP3s in the
built-in flash and the extension flash of the device.


That's exactly right. I hoped that I could mount it as a drive, but I
can't. However, in Linux, is it possible to mount such a MP3 Player
as a mountable drive?
Jul 18 '05 #6
On 13 Oct 2003 14:51:37 -0700, fa****@jaredweb.com (Fazer) wrote:
Stephen Horne <$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$.co.uk> wrote in message news:<19********************************@4ax.com>. ..
On Mon, 13 Oct 2003 08:09:53 +1000 (EST), Andrew MacIntyre
<an*****@bullseye.apana.org.au> wrote:
>On Sun, 11 Oct 2003, Fazer wrote:
>
>> I have a MP3 and I want to access the songs in them. I was wondering
>> if Python could help me do that. I understand that this can be done
>> using Linux by mountig it as a file system, but I am not on Linux and
>> this is mainly for a Windows platform. Can anyone shed some light?
>
>Just plug the thing in and access it as a removable drive (which is all
>mounting it as a filesystem really is). You should be able to view the
>MP3s with Windows Explorer


That depends on how the PC connectivity for the MP3 player works.
Mine, for one, doesn't work that way. It provides an application which
looks a bit like explorer, but you don't get a drive letter - you just
get two listview panes in the application listing the MP3s in the
built-in flash and the extension flash of the device.


That's exactly right. I hoped that I could mount it as a drive, but I
can't. However, in Linux, is it possible to mount such a MP3 Player
as a mountable drive?


Good question. In fact, better question - can you access the device at
all in linux?

AFAIK there is no standard protocol for accessing MP3 players, so
unless someone has written a specific driver for your specific device
you will probably be out of luck.

All I can suggest is that you google for "linux driver" and the make
and model of your MP3 player.
--
Steve Horne

steve at ninereeds dot fsnet dot co dot uk
Jul 18 '05 #7
On Tue, 13 Oct 2003, Fazer wrote:
Stephen Horne <$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$.co.uk> wrote in message news:<19********************************@4ax.com>. ..
On Mon, 13 Oct 2003 08:09:53 +1000 (EST), Andrew MacIntyre
<an*****@bullseye.apana.org.au> wrote:
On Sun, 11 Oct 2003, Fazer wrote:

> I have a MP3 and I want to access the songs in them. I was wondering
> if Python could help me do that. I understand that this can be done
> using Linux by mountig it as a file system, but I am not on Linux and
> this is mainly for a Windows platform. Can anyone shed some light?

Just plug the thing in and access it as a removable drive (which is all
mounting it as a filesystem really is). You should be able to view the
MP3s with Windows Explorer


That depends on how the PC connectivity for the MP3 player works.
Mine, for one, doesn't work that way. It provides an application which
looks a bit like explorer, but you don't get a drive letter - you just
get two listview panes in the application listing the MP3s in the
built-in flash and the extension flash of the device.


That's exactly right. I hoped that I could mount it as a drive, but I
can't. However, in Linux, is it possible to mount such a MP3 Player
as a mountable drive?


What filesystem is reported for the mount in Linux?? If it is FAT or
FAT32, I would suggest that the Windows application is getting its mitts
on the device before explorer attempts a removable device mount. In this
case you might try uninstalling the application and any drivers it may
have loaded.

--
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: an*****@bullseye.apana.org.au (pref) | Snail: PO Box 370
an*****@pcug.org.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia

Jul 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: lupher cypher | last post by:
Hi, I'm trying to access memory directly at 0xb800 (text screen). I tried this: char far* screen = (char far*)0xb8000000; but apparently c++ compiler doesn't know "far" (says "syntax error...
4
by: Bradley Grant | last post by:
Does anyone out there know of where I could find some C# example programs for accessing USB Devices. There just does not seem to be much out there on this subject. Even after doing a Google,...
1
by: john wright | last post by:
I am trying to access a Human Interface device on USB. It is a device that will lock the PC when you walk away. I read the article on Coding for fun on MSDN and it was interesting, but as always...
2
by: Jimmy Reds | last post by:
Hi, I have a blood glucose meter (a Lifescan OneTouch Ultra in case anyone was wondering) which I connect to my PC using a USB cable and I would like to have a go at accessing the data on this...
1
by: walterbyrd | last post by:
I want my python app to read a file from a pocketpc mobile device, if possible. Assume I am running windows-xp, and activesync 3.8. Assume I have "exported" the file. As I understand it,...
37
by: Neo | last post by:
Hi, I want to write a program that essentially connects to web, access some web page and pass some parameters and fetch the return values and print like LWP in Perl Context. Can some one...
3
by: john | last post by:
I would like to view physical memory that is mapped to a pci board. I am using a tool called WinIO to try to create a virtual address to that physical memory. It works for both read and write of...
0
by: xlar54 | last post by:
Im needing to access a PocketPC device via C#. Using Windows Vista and a PocketPC 2002. I found out that if you disable the service called Windows Mobile 2003, the device will still show up in My...
2
by: wizche | last post by:
Hi, I'm currently trying to develop a IR Remote (TV consumer) listener in C under Linux. First of all I tried with an old notebook with an integrated IR peripheral (FIR)under Debian (kernel...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.