BUG Community

Welcome! Log In

Forums BUGbase Changing device name?

Subscribe to Changing device name?  21 posts, 8 voices

Log in to reply to this topic
 
Jan 30, 2010 3:30pm
User_img_not_found_04_med blprnt 19 posts

Hi All,

I’m trying to get the device name changed on the Bug base so that it can report itself to a server.

I can get the name changed temporarily by doing this:

1. vi /etc/hosts and change the name


2. do a hostname ‘name’ from the command line


3. vi /etc/hostname and change the name


4. check this with cat /proc/sys/kernel/hostname 

However when I reboot the device name changes to ‘localhost’. I suspect there is probably another file somewhere that I need to change.

Any advice?

Thanks!

-Jer 

Feb 1, 2010 2:01pm
Medium Bug Labs team akweon 2 posts

Hi Jer,

Your steps seem right to me. Here’s what I did just now and verified it renames my BUG:

1. vi /etc/hostname

and change BUG to something else. Let’s say we rename to “myBUG.”

2. vi /etc/hosts

and change “localhost bug” to “localhost mybug”. This basically allows you ping your BUG’s web server with a friendly name.

 

After you restart your BUG and ssh in, you should see root@myBUG at the prompt.

Let me now if you have any issues.

 

Thanks,
Amie

Feb 1, 2010 2:05pm
User_img_not_found_04_med blprnt 19 posts

I’ll try it again.

It might be I’m retrieving the device name wrong in my app:

try{


      InetAddress ownIP=InetAddress.getLocalHost();


      mName = ownIP.getHostName();


    }catch (Exception e){


      System.out.println(“Couldn’t set device name =”+e.getMessage());


    }

This code sends the correct device name after I change the device name with the steps above, but it doesn’t ‘stick’ after restart.

I’ll poke around and see if I can figure it out.

Thanks.

-Jer

 

Feb 2, 2010 11:11am
Medium Bug Labs team bcruskie 45 posts

Hi Jer,

If I remember correctly you’re using a Angstrom build from jconnolly? If this is the case this might be a defect. I will email this thread to JC and see if he has any ideas.

Thanks,

Brian

Feb 3, 2010 1:28pm
Medium Bug Labs team jconnolly 285 posts

Works for me:

root@mybug123:~# tail -n 5 /var/log/concierge.log [Wed Feb 03 13:15:57 GMT 2010] [DEBUG] UAM INSTALL /usr/share/java/apps/HostnameTest.jar [Wed Feb 03 13:15:57 GMT 2010] [DEBUG] UAM START file:/usr/share/java/apps/HostnameTest.jar ------------------------- Name:mybug123 ------------------------- root@mybug123:~# cat /etc/hosts 127.0.0.1 localhost.localdomain localhost mybug123 10.10.10.1 bughost root@mybug123:~# cat /etc/hostname mybug123 root@mybug123:~# reboot Broadcast message from root (ttymxc/4) (Wed Feb 3 13:16:21 2010): .... .-------. | | .-. | | |-----.-----.-----.| | .----..-----.-----. | | | __ | ---'| '--.| .-'| | | | | | | | |--- || --'| | | ' | | | | '---'---'--'--'--. |-----''----''--' '-----'-'-'-' -' | '---' The Angstrom Distribution mybug123 ttymxc4 Angstrom 2009.X-stable mybug123 ttymxc4 mybug123 login: root root@mybug123:~# cat /etc/hosts 127.0.0.1 localhost.localdomain localhost mybug123 10.10.10.1 bughost root@mybug123:~# cat /etc/hostname mybug123 root@mybug123:~# cat /var/log/concierge.log --------------------------------------------------------- Concierge OSGi 1.0.0.RC3 on Linux 2.6.27.2 starting ... --------------------------------------------------------- [Wed Feb 03 13:18:04 GMT 2010] [DEBUG] UAM START file:/usr/share/java/apps/HostnameTest.jar ... ------------------------- Name:mybug123 ------------------------- ...

 

Feb 3, 2010 2:10pm
User_img_not_found_04_med blprnt 19 posts

Thanks, John…

This all seems to be working, now. One of the devices early on switched to ‘localhost’ for a device name but I may have just done something wrong.

We’re one day away from the opening here and things are almost under control.

The big issue is with WiFi – getting the bugs to ‘smartly’ connect to the right network is still a manual process, which is somewhat irritating. But, all in all, we are in good shape.

Cheers,

-Jer

Feb 3, 2010 2:13pm
Medium Bug Labs team jconnolly 285 posts

I’ll try to get into that today.  I’ll keep it within this thread and let you know

Feb 3, 2010 2:26pm
User_img_not_found_04_med blprnt 19 posts

Thanks again.

In the case where a device loses signal, and then moves into another zone, it does appear to pick up a signal eventually, but after a long delay.

I wonder if the frequency of checking networks can be increased? Just a thought.

-Jer

Feb 3, 2010 2:36pm
User_img_not_found_04_med blprnt 19 posts

I think I’ve found where to change the scan interval:

In the /var/lib/connman/ directory, there is a set of config files.

It looks like there’s one master config file (in my case it’s called dev_001988202648.conf) which has some global settings:

[Configuration]

Policy=auto

Priority=100

ScanInterval=300

And then it looks like it saves config files with connection information for the remembered networks. For example, I have a file called dev_00198810fd01.conf which contains a set of entries for the networks that I’ve added:
[06_12_CF_D3_67_73]     
Remember=true           
WiFi.Security=wpa       
WiFi.Passphrase=
                        
[06_12_CF_CB_91_25]     
Remember=true           
WiFi.Security=wpa       
WiFi.Passphrase=
I am going to try to copy the network info onto another bug and see if it will then ‘know’ all of the networks.
I will also change the ScanInterval in the first file to something smaller (300 is in seconds, I am assuming – so 5 minutes between scans)
-Jer

Feb 3, 2010 3:24pm
Medium Bug Labs team jconnolly 285 posts

Yeah that makes sense:

 

<a href="http://docs.enlightenment.org/api/e_dbus/html/e__connman__device_8c.html">http://docs.enlightenment.org/api/e_dbus/html/e...</a>

 

I don’t have access to “many” AP’s in the office so it would be difficult to test your scenario.  Let me know how it goes.

Feb 3, 2010 3:47pm
User_img_not_found_04_med blprnt 19 posts

Changing the interval doesn’t seem to help.

Even selecting networks manually has always been problematic. Half the time, there are no networks listed in the drop down. 

I will continue forward and see what I can do. 

Feb 3, 2010 4:24pm
Medium Bug Labs team jconnolly 285 posts

You may want to try some of the artifacts built with connman… there are test utilities that may be of some value even for use by your application:


http://bugcommunity.com/downloads/files/connman…


One thing to try is using the GUI to list networks, then at the same time try the command line utility in that tarball.  This should tell you if it’s just a crappy GUI problem.  connman-gnome support has been pretty much dropped by their community so I wouldn’t doubt that there are quirks and unfixed bugs.

Feb 4, 2010 3:17pm
Medium Bug Labs team mjuszkiewicz 2 posts

Connman…

 

Personally I am using wpa-supplicant directly and store common used networks in it’s config: /etc/wpa-supplicant.conf. But it works just because I do not use connman and my bug devices are always connected by Ethernet.

Feb 4, 2010 3:19pm
Medium Bug Labs team jconnolly 285 posts

Is there a way to scan and auto-connect to nearest networks though?  I think that’s the clincher

Feb 4, 2010 3:50pm
Medium Bug Labs team mjuszkiewicz 2 posts

jc: no idea how connman solves that but wpa-supplicant can be told to which networks it has to connect, which ones are more preferred then others etc.


http://blog.jasondonenfeld.com/248 is nice read

Feb 4, 2010 5:24pm
Medium Bug Labs team jconnolly 285 posts

This sounds like exactly what you need Jer.  I would definitely try using wpa_supplicant and disabling or removing connman entirely.

Feb 4, 2010 5:56pm
User_img_not_found_04_med blprnt 19 posts

OK. I will maybe get the chance to dig into this. Our show is up and running in 2 hours so there’s not much I can do for now!

We’ll take and post a bunch of photos.

Oct 24, 2012 1:46am
User_img_not_found_01_med qazqazqaz 469 posts

As a perfect combination of classic and modern fashion,Coach Outlet Online Julia Bags can show the customers'unique personality.Tiffany UK grabbed the globe, stands out as the celeb on their favorite stars luxury type, granted an innovative simple move the pavement luxury, complete with luxury.In terms of the quality and superior design that make more and more customers are satisfied to Coach Factory Online.Welcome!hat experts claim Coach Outlet Online shopping is in the changes they are available in.As long as you open our Coach Factory Outlet webpage, you will view various Coach New Arrivals which are the most popular also the most fashionable in this year.On the date when the Louis Vuitton UK on sale, all people will pour into the stores. At this time, it on the booths will be wiped out, and only one or two days the seller will declare that there is no stock anymore.

Oct 24, 2012 4:16am
User_img_not_found_01_med qazqazqaz 469 posts

Remember that the right accessories can enhance your alluring look with your Canada Goose Parkas Outlet.Baggy, ovoid shaped Canada Goose Jackets Outlet that are rounded around the shoulders look fabulous and can be a perfect match for you.This excellent conviction so that you class gets to amateur Canada Goose Outlet In a number of Parka, for example Young Canada Goose affordable Cardigan.Luxury has always been synonymous with fur and leather and this year a faux fur Canada Goose Jackets Outlet will surely be the key piece of your wardrobe.

Nov 2, 2012 10:33pm
User_img_not_found_04_med wangly 62 posts

another that you figure a few things out that maybe you didn’t during during
cheap north face
jacket
during the campaign.”The two top-of-the-ticket candidates,
President Obama and former Gov. Mitt Romney, kicked off the series of
presidential debates debates

cheap replica designer
handbags

debates last week. Read a fact check of that debate Meningitis
Outbreak: 170 Cases, 14 DeathsOutbreak Linked to Spinal Steroid Steroid cheap moncler Steroid
InjectionsBy KATIE MOISSE and DAN CHILDSOct. 11, 2012— The Centers for Disease
Control and Prevention reported two more deaths deaths moncler jackets men
deaths linked to the outbreak of fungal meningitis from steroid for back pain,
bringing to 14 the total number of of north face outlet of
people who have died from these infections.The CDC also that 170 cases of the
rare form of fungal meningitis meningitis moncler outlet
meningitis have now been reported in 11 states.The outbreak has linked to an
injectable steroid, called methylprednisolone acetate, made by by

Dec 7, 2012 12:36am
User_img_not_found_04_med snapbackone 20 posts

Slowly, by virtue of Snapback Hats

what coach Pete Carroll calls &quot;an ongoing ascending process,&quot; Seattle quarterback Russell Wilson is winning over every skeptic.Fans. Snapback Hats Sale

. Opponents. Coaches. And, perhaps most important, teammates.If there was any remaining doubt that Wilson had earned the complete confidence of even the most cynical Seahawks veterans NBA Snapback Hats

, hearing their MLB Snapback Hats

after he engineered Sunday's overtime victory in Chicago likely erased that.

That’s what happens when NFL Snapback Hats

, as Sidney Rice said Wednesday Knit Hats

, "With the pressure on, he’s never failed us. He’s brought us to the table every Obey Snapback Hats

single time Supreme Snapback Hats 

."Rice, in fact, says he sometimes Ymcmb Snapback Hats

forgets that Wilson 47 Brand Snapback Hats

is a rookie NBA Knit Hats

."He doesn’t carry himself like a rookie NFL Knit Hats

," he said Supreme Knit Hats

. "He’s never shown a sign of being scared Atlanta Hawks Snapback Hats

.""I think he’s just playing good football Boston Celtics Snapback Hats

," added guard John Moffitt Chicago Bulls Snapback Hats

. "What you do on the field Dallas Mavericks Snapback Hats

is how you get respect Los Angeles Lakers Snapback Hats

."In the NFL Memphis Grizzlies Snapback Hats

, there is a natural tendency New York Knicks Snapback Hats

to look askance at any hotshot young kid Oklahoma City Thunder Snapback

who comes in Orlando Magic Snapback Hats

. And for a quarterback Boston Red Sox Snapback Hats

, the need to prove Chicago White Sox Snapback Hats

oneself increases exponentially New York Yankees Snapback Hats

. But Wilson Buffalo Bills Snapback Hats

, a third-round draft pick Chicago Bears Snapback Hats

, began almost immediately Dallas Cowboys Snapback Hats

to show he belonged Denver Broncos Snapback Hats

."When rookies come in Detroit Lions Snapback Hats

, you see how they work Green Bay Packers Snapback Hats

," said fullback Michael Robinson Houston Texans Snapback Hats

, who led the chorus of Miami Dolphins Snapback Hats

Wilson raves on Sunday New England Patriots Snapback Hats

. "You just watch New Orleans Saints Snapback Hats

. He was a New York Giants Snapback Hats

who didn't try too hard to fit in Philadelphia Eagles Snapback Hats

. Pittsburgh Steelers Snapback Hats

just worked, and kept working, and kept working.

Log in to reply to this topic
Forums BUGbase Changing device name?