Raspberry Pi ...

Anything goes in here.....
User avatar
robin
Jedi Master
Posts: 10546
Joined: Mon Mar 27, 2006 1:39 pm

Raspberry Pi ...

Post by robin » Sun Aug 25, 2013 8:34 pm

If anyone has bought such a thing and now has it languishing in the back of a drawer, I am looking for one to experiment on but the nature of the experiment precludes me spending any money on buying a Pi :-)

Feel free to send via SE Pony Express or wrap it in a jiffy and send royal mail ... I will return said Pi should you feel the need to put it back in your drawer :-)

Cheers,
Robin
I is in your loomz nibblin ur wirez
#bemoretut

User avatar
campbell
Posts: 17339
Joined: Sat Mar 25, 2006 12:42 pm
Location: West Lothian
Contact:

Re: Raspberry Pi ...

Post by campbell » Tue Aug 27, 2013 11:14 pm

New ECU?!
http://www.rathmhor.com | Coaching, training, consultancy

User avatar
robin
Jedi Master
Posts: 10546
Joined: Mon Mar 27, 2006 1:39 pm

Re: Raspberry Pi ...

Post by robin » Wed Aug 28, 2013 7:40 am

No! I have much better CPUs for that (Cortex-M3/Cortex-M4).

Cheers,
Robin
I is in your loomz nibblin ur wirez
#bemoretut

User avatar
BiggestNizzy
Posts: 8932
Joined: Sun May 27, 2007 6:47 pm
Location: Kilmarnock
Contact:

Re: Raspberry Pi ...

Post by BiggestNizzy » Mon Mar 02, 2015 11:40 pm

Been playing with my pi recently as I thought of a genuine use for it.
I am running the noobs version of the raspbian os and have installed and got apache2, php, SAMBA. And got it all booting to the chromium browser (currently the BBC F1 page) but I have come across a massive problem with my plan. I need to connect it to a mssql database and as far as I can tell I need to setup freeTDS and even though I have installed it but I cant connect. The error log tells me that the php connect string is unknown. Does anyone have any experience with this as the documentation seems to be written for someone with alot more technical knowledge than me.
Sent from my ZX SPECTRUM +2A

User avatar
robin
Jedi Master
Posts: 10546
Joined: Mon Mar 27, 2006 1:39 pm

Re: Raspberry Pi ...

Post by robin » Tue Mar 03, 2015 12:17 am

You should be able to install the mysql package directly. Rasbian is a derivative of the debian distribution. It is normal to use the apt-get tool from the command line; assuming you are logging in as a non-privileged user then you need to use the sudo command to raise your privileges temporarily. Alternately, login as root.

sudo apt-get install mysql-server
sudo apt-get install php5-mysql

The former is the actual database engine. The latter is the bindings that allow PHP to access the database - note this is allow as in "provide the code that makes it possible" not "configure the database so that there is a database, there is a user, the user has permissions to access the database, the database is accepting connections from the appropriate source". I have no idea what you're trying to achieve so cannot comment on what's appropriate for the latter. What, actually, are you trying to make work (please tell me it's not WordPress!!!).

If you have the option of using postgresql in place of mysql I suggest you do that (if only because I know postgresql well and so can guide you on what to do).
I is in your loomz nibblin ur wirez
#bemoretut

User avatar
r10crw
Posts: 1966
Joined: Thu Aug 10, 2006 8:14 pm
Location: Aberdeenshire

Re: Raspberry Pi ...

Post by r10crw » Tue Mar 03, 2015 9:23 am

Ill send you mine down as it is now languishing in the back of a drawer. Not used it for ages so need to make sure its still working, anyway I need to send you something else thats been sitting here for ages.

Whats your addy again?
Hairdresser at heart.

User avatar
graeme
Posts: 3528
Joined: Tue Mar 15, 2005 11:29 am
Location: Kintore

Re: Raspberry Pi ...

Post by graeme » Tue Mar 03, 2015 9:52 am

Robin,

Using all 6 of mine I'm afraid, but come on, they're like £25 you pikey! :) You'll find a permanent use for it.

Presently:
1 monitoring electricity use in the house using a clamp-type current transformer at the meter (using a custom daemon and rrd tools)
1 grabbing weather data from the USB port on a weather station and storing it for trending/graphing at some point
1 set up as a virtual ADSB radar using a SDR USB dongle (£10 freeview tuner). About 20mile line of sight with the short stick antenna, but I've had a few 300 mile contacts with a tuned length co-linear coaxial antenna.
1 with a GPS receiver connected to GPIO used as a stratum 1 NTP server for the network (work in progress, ms accuracy, but aiming for <20us. totally pointless for NTP I know. )
1 set up as a wireless access point + VPN client which I can carry with me for portable hot-spot. Ideal for hotels with Ethernet in the rooms but poor wifi coverage.
1 monitoring my network monitoring server

I've also at various times dabbled with the usual retro games emulators, most of the media player distros, and had a Pi as my home broadband router/firewall for a while too before I got fiber and needed more throughput.

They're fantastic devices and every kid (of all ages) should have one.

Nizzy,
I think Robin misread MSSQL as MySQL. You don't need to install MySQL to use FreeTDS unless I'm missing something. Echo Robin's request... what's the end goal?

I take it the MS SQL database already exists? If not, use something else. But assuming it does, you want to pull some data out? You'll need to know the server name or IP, what version of SQL server its running, and be on the same network so you can talk to it (sorry if that's a bit obvious) and you'll need authentication details.

Once you've got all that, and FreeTDS installed, you'll need to set up the connection in the freetds.conf (I don't know much about freeTDS but if you get stuck I can read the docs and work it out), then use the connection name you give that the freetds.conf in your PHP like this:

$db_conn = mssql_connect("<yourfreetdsconnectionname>","<user>","<password>") or die("Error: can't connect to db");

I'm guessing from your error message that you've got roughly that far already, so fill in the details or post your configs and we'll go from there.

G
211
958

User avatar
tut
Barefoot Ninja
Posts: 22975
Joined: Tue Mar 15, 2005 5:53 pm
Location: Tut End, Glen of Newmill

Re: Raspberry Pi ...

Post by tut » Tue Mar 03, 2015 9:58 am

Fascinating........

Tried googling on some of the abbreviations but the laptop was getting hot.

tut

User avatar
graeme
Posts: 3528
Joined: Tue Mar 15, 2005 11:29 am
Location: Kintore

Re: Raspberry Pi ...

Post by graeme » Tue Mar 03, 2015 10:04 am

A bit more debugging

Can you ping the mssql server?
Can you telnet to it? ("sudo apt-get -y install telnet", then "telnet <server ip> 1433")

in fact, here's a good starter:

http://www.freetds.org/userguide/serverthere.htm
Last edited by graeme on Tue Mar 03, 2015 10:14 am, edited 1 time in total.
211
958

User avatar
robin
Jedi Master
Posts: 10546
Joined: Mon Mar 27, 2006 1:39 pm

Re: Raspberry Pi ...

Post by robin » Tue Mar 03, 2015 10:06 am

Quite right - I saw mysql because that's what a lot of these projects use.

Google suggests this:

http://blog.thesysadmins.co.uk/ubuntu-s ... a-php.html

Note there are two other packages besides the tds - the odbc and sybase packages are required it seems - no idea if that's just random choice or reality (in the back of my head MS SQL server used to be Sybase, so there is some sense to it).

Cheers,
Robin
I is in your loomz nibblin ur wirez
#bemoretut

User avatar
rossybee
Posts: 11093
Joined: Tue Mar 15, 2005 9:13 pm
Location: Dundee

Re: Raspberry Pi ...

Post by rossybee » Tue Mar 03, 2015 10:32 am

A typical day in Graeme's house...

Image
Ross
---------
1972 Alfaholics Giulia Super
2000 Elise S1 Sport 160
2004 Bentley Conti GT
2017 Schkoda Yeti
2x Hairy GRs (not Toyota)

Now browsing the tech pages :mrgreen:

:cheers

User avatar
graeme
Posts: 3528
Joined: Tue Mar 15, 2005 11:29 am
Location: Kintore

Re: Raspberry Pi ...

Post by graeme » Tue Mar 03, 2015 10:50 am

Well the cheese and crackers are correct, and it's not very tidy, and I do wear the wrong trousers on occasions, so there are some similarities.

However, Wallace is clearly having a spot of trouble with his porridge cannon, while mine is fully operational.
211
958

User avatar
rossybee
Posts: 11093
Joined: Tue Mar 15, 2005 9:13 pm
Location: Dundee

Re: Raspberry Pi ...

Post by rossybee » Tue Mar 03, 2015 11:23 am

graeme wrote:, Wallace is clearly having a spot of trouble with his porridge cannon, while mine is fully operational.
Fnarrr!
Ross
---------
1972 Alfaholics Giulia Super
2000 Elise S1 Sport 160
2004 Bentley Conti GT
2017 Schkoda Yeti
2x Hairy GRs (not Toyota)

Now browsing the tech pages :mrgreen:

:cheers

User avatar
campbell
Posts: 17339
Joined: Sat Mar 25, 2006 12:42 pm
Location: West Lothian
Contact:

Re: Raspberry Pi ...

Post by campbell » Tue Mar 03, 2015 11:51 am

Graeme you need to have more children. First to ensure you don't have time to tool around with Raspberry PIs and second to keep your porridge cannon in full working order.

;-)
http://www.rathmhor.com | Coaching, training, consultancy

User avatar
rossybee
Posts: 11093
Joined: Tue Mar 15, 2005 9:13 pm
Location: Dundee

Re: Raspberry Pi ...

Post by rossybee » Tue Mar 03, 2015 12:25 pm

Maybe he's like me....porridge cannon decommissioned...but still functioning purely for recreational purposes?
Ross
---------
1972 Alfaholics Giulia Super
2000 Elise S1 Sport 160
2004 Bentley Conti GT
2017 Schkoda Yeti
2x Hairy GRs (not Toyota)

Now browsing the tech pages :mrgreen:

:cheers

Post Reply