Sunday, October 21, 2018

Busy Sunday with Sparkfun's nRf52832 Dev Board

My Sunday(Oct 21, 2018) has been so so so busy because of my beacon experiment. Actually for 2 weeks now, I was stuck at why my battery charge level monitoring circuit would not work(I was just toggling between the board's A4 and A5 analog pins). And I gave up on it and went on to do another task to make the piezo speaker work with the board. I faced another very challenging task why it does not work with digital pin 10, then I remembered previously when experimented with the LED on/off sketch and I used digital pin 15 and it worked, so I transferred the connection to that pin and it worked very well. Because of this I realized that maybe the analog pins A4 and A5 are made for a different purpose so I tried to experiment with A6 and finally, I am getting good results. So, I am able to make both work.

With this success, I prepared a simple sketch that will broadcast Ibeacon, will communicate with the pc to continuously transmit battery charge level(2V up tp 4.2V)  and add GATT Services to get the battery charge level and be able to turn on / off the piezo speaker. So sad that the nRF52832 Dev Board is not compatible with Arduino's Tone library, I am not able to upload the Super Mario Brothers theme music into it.

Creating the program(sketch) is the most critical part because the battery life depends on it, so the sketch must be highly optimized to save power and battery will at least last longer than 1 day. The sketch I created is not the best solution, there are better ways to do it to make it conserve energy and the 800mAH battery could last longer than 3 months. The piezo speaker can consume more than 50mA alone, while connecting to the device would consume 30mAnot to mention the builtin voltage regulator has a normal current leakage of 10 mA and of course the red LED connected to the power source normall consumes 16-18 mA(but this can be disconnected easily as sparkfun provided the connection at the back), at normal operation it(the nRf52832 ic alone) normally consumes around 7mA. I heard that other sketches can lower the normal consumption to 0.3mA or even down to 1microA that should be enough to make it last for several days by putting the device at deep sleep. The sketch I created would only let the device enter the low power mode. I have not tried to make it enter into deep sleep mode because the last time I tried it, the nRF connect app could not connect to it. Maybe there is a technique to make it not to interfere with the connection process.

To be honest, the connection is very stable, it does not disconnect making it ideal as a key finder.

Here is the hardware setup:

My actual device on a breadboard:


With this current configuration, I can charge the battery while programming it. 

Sample Serial Output:

The nRF Connect App Screen:


Here is the screen recording:(you can hear the actual beeping of the beacon:



And finally the sketch:
You may download the sketch here.

Monday, September 24, 2018

Key Fields or Index Fields in a Data Base Table

Key Fields or Index Fields are quite useful in a database table. They were meant to have permanent or fixed values throughout their record lifetime not until the record is deleted. Key Fields makes sure that every record unique. Aside from this the database is equipped with logic(search algorithm) which makes use of index fields to perform fast and efficient search and sorting functions. I remember at one point in my programmer career when still software I am supporting is still struggling to make a name in he industry, one of the the client's problem was the program was running extremely slow so I investigated and found out that several select statements were not using index fields in there search parameter. I am aware that the software is capable of creating customized indexes so I created customized indexes and the result was 80% faster.

With this basic idea of database concepts, programmers will be able to create a group of tables that are optimized in terms query and sorting speeds. It is a fundamental concept that should not be forgotten. Always remember that if a field is meant to be modified, do not use as index field. It is a mortal sin to do it. Everybody will lough at you.

What happens when it is unavoidable because there is a possibility that all key fields are the same except that modifiable field? The answer is record will not be saved in the database. That's when a serial number as key field will come to the rescue. It makes sure that every record entered in the table is unique. It is just a design tip.

Just expressing my thought, duhhh!!!

Monday, July 30, 2018

Make Sparkfun's nrf52832 IOT Board an Ibeacon

Like I said, the nrf52832 breakout board can be programmed to become an Ibeacon using the blepheripheral library, in fact it has a sample sketch. But I think the sample sketch is not applicable to what I am trying to achieve so, I decided not to use the sample sketch. The main reason is that it needs an interrupt and a timer just to change the frame from ibeacon to eddystone, so it is not good.

But, using the included ibeacon library as guide, it enabled me to understand how to turn the device into ibeacon. I used Ibeacon Detector app to capture the data packets or advertising packets, and used the captured data to change the blepheripheral manufurerdata and that's it. I just turned it into ibeacon.

Here is the sample ibeacon advertising packet:


This is the manufacturerdata I used:
0x4c, 0x00, 0x02, 0x15, 0xa1, 0x96, 0xc8, 0x76, 0xde, 0x8c, 0x4c, 0x47, 0xab, 0x5a, 0xd7, 0xaf, 0xd5, 0xae, 0x71, 0x27, 0x00, 0x12, 0x00, 0x25, 0xcb, 0x5c

The breakdown is as follows:
0x4c 0x00 = Apple Company
0x02 0x15 = Ibeacon Identifier
0xa1 0x96 0xc8 0x76 0xde 0x8c 0x4c 0x47 0xab 0x5a 0xd7 0xaf 0xd5 0xae 0x71 0x27 =UUID
0x00 0x12 = Major
0x00 0x25 = Minor
0xcb 0x5c = Transmitted Power(-53dBm)

Here is the complete sketch:
#include <SPI.h>
#include <BLEPeripheral.h>

const char * localName  = "LED On"; 
BLEPeripheral blePeriph();

void setup() {
  // put your setup code here, to run once:
Serial.begin(115200);
  blePeriph.setDeviceName(localName);
  blePeriph.setLocalName(localName);
  blePeriph.setTxPower(measuredPower);
  const unsigned char  manufacturerData[26] = {0x4c, 0x00, 0x02, 0x15, 0xa1, 0x96, 0xc8, 0x76, 0xde, 0x8c, 0x4c, 0x47, 0xab, 0x5a, 0xd7, 0xaf, 0xd5, 0xae, 0x71, 0x27, 0x00, 0x12, 0x00, 0x25, 0xcb, 0x5c};
  unsigned int lng         = 26;
  blePeriph.setManufacturerData(manufacturerData, lng);
  blePeriph.begin();
  
}

void loop() {
  // put your main code here, to run repeatedly:
 blePeriph.poll();
}

Sunday, July 29, 2018

Changing the Local Name of Sparkfun's nrf52832 IOT Board

I had been playing with Sparkfun's nrf52832 IOT Board(there is no Chinese spoof version yet and I guess there will never be) ever since I found the IB003N-SHT to be defective. My goal is to develop a firmware using Arduino IDE to make the board function as Ibeacon/Eddystone and at the same be able to advertise sensor data in a different frame. I am still familiarizing my self how to make things done and am currently trying make a prototype whether it is possible to change beacon parameters without hard-resetting the device.

I have so far succeeded. My initial test was to change the local name which a very common function and I have not made it to function as a beacon. I am taking it 1 step at a time. I used the sample program provided by Sparkfun on their website which is the Ble Blink Example. I added the following features:

  1. Added a new Service to change the local name
  2. Added a characteristics under the new Service
  3. When the value on the said characteristic change, it will change the local name and reset the BLE.
The logic is very much the same as the original program when turning on/off the LED connected at pin 7. And here is the source code :
// Import libraries (BLEPeripheral depends on SPI)
#include <SPI.h>
#include <BLEPeripheral.h>

//////////////
// Hardware //
//////////////
#define LED_PIN    7 // LED on pin 7
#define LED_ACTIVE LOW // Pin 7 LED is active low
#define LED_DEFAULT LOW

///////////////////////
// BLE Advertisments //
///////////////////////
const char * localName = "LED Off"; //change the local name
BLEPeripheral blePeriph;
BLEService bleServ("1207");
BLEService chgName("1208");//added new service
BLECharCharacteristic ledChar("1207", BLERead | BLEWrite);
BLECharCharacteristic chgChar("1208", BLERead | BLEWrite);//added new characteristics
int vb =0;
void setup() 
{
  Serial.begin(115200); // Set up serial at 115200 baud
  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, !LED_ACTIVE);

  setupBLE();
}

void loop() 
{
  blePeriph.poll();
//--
  if (ledChar.written())
  {
    int ledState = ledChar.value();
     if (ledState) {
      digitalWrite(LED_PIN, LED_ACTIVE);
     } else {
      digitalWrite(LED_PIN, !LED_ACTIVE);
    }
}
//--
//--This my added service when change this is triggered
  if (chgChar.written())
  {
    int chgState = chgChar.value();
    
    if (chgState) {
  
       blePeriph.end();
       setupBLE0();
     
    } else {
     
     blePeriph.end();
     setupBLE1();
    }
}
//--
}

void setupBLE()
{
  // Advertise name and service:
  blePeriph.setDeviceName(localName);
  blePeriph.setLocalName(localName);
  blePeriph.setAdvertisedServiceUuid(bleServ.uuid());

  // Add service
  blePeriph.addAttribute(bleServ);
  // Add characteristic
  blePeriph.addAttribute(ledChar);
  //my New Service and characteristic
  blePeriph.addAttribute(chgName);
  blePeriph.addAttribute(chgChar);

// Now that device6, service, characteristic are set up,
// initialize BLE:
  blePeriph.begin();
// Set led characteristic to default value:
  ledChar.setValue(!LED_ACTIVE);  
}
void setupBLE1()
{
 // Advertise name and service:
  blePeriph.setDeviceName("LED Off");
  blePeriph.setLocalName("LED Off");
 // initialize BLE:
  blePeriph.begin();
}
void setupBLE0()
{
  // Advertise name and service:
  blePeriph.setDeviceName(localName);
  blePeriph.setLocalName(localName);
// initialize BLE:
  blePeriph.begin();
}
And here is the video on how it is done(1208 is the new service visible in nRF Connect:

Friday, July 27, 2018

IB003N-SHT Honest Review

Not long ago, I bought this beacons from Alibaba. What attracted me most and main consideration of choosing this beacons against a number of China made beacons are the following:


  1. It can broadcast 3 frames(Ibeacon, eddystone(URL or UID) and Accelerometer)
  2. It has a specialize temperature sensor
  3. It has buzzer

For some reasons, the Chinese seller had delayed the delivery considering that I paid expensive shipping charge($30) but the delivery time took almost a month which is just like having it shipped for free via postal mail(small packets) but I didn't mind it since the product I bought are really loaded with tons features.

Ok the item arrived and my initial testing which is to check whether it really can broadcast the 3 frames and it worked. Days later, when I tried to check the data being broadcasted and verify if it really has all the goodies and to my surprised, I found that it is not what they claimed it be which really had disappointed me. Here are my actual findings:

  1. Ibeacon and Temperature Sensor issue. According to their documentation, the temperature readings are being broadcasted at the major and minor (least significant bits). During my test, I could not find the major value and the minor value turns out to be the least significant bit. I reported this issue to the Chinese seller and after a few days of discussion, they have admitted that the major value is unusable. They did not mentioned this in the technical documentation they have provided nor on their advertisement. Another issue I found is that most of the time, the temperature reading is 0 which is weird and I found this to be a hardware defect.
  2. Eddystone issue. The data being broadcasted is not Eddystone standard compliant. The main identifer of Eddystone "AAFE" is missing, I have confirmed this because even nRFConnect can not identify the frame as Eddystone. Their counting of UID begins at the "02" byte which is absolutely wrong. The transmittion power is missing. And worst is that when I tried to populate the characteristics "FFD02", the Eddystone frame goes blank which stunned or shocked me.
  3. Buzzer Issue. 20dB is very loud, and based on their technical documentaion, it can be adjusted through GATT. But during my testing, the loudness could not be adjusted. With that loudness, I could hardly hear it.
After I found these defects, I stopped the testing of other features. I have already concluded that the IB003N-SHT is full of defects. I tried to negotiate with the Chinese seller by returning the product to them due to the above mentioned defects, but I got this reply from them:

"Our products have no defects, but if you are not satisfied, you may return the items to us. But pls do not include the batteries. We will deduct $2 for each item for the batteries. We will test each items after receiving them from you and we find no defects, we will refund your money. Shipping and delivery charge will be deducted."

I think this is not what I have expected from them, with this transaction, I would suffer $127 loss which way too much.


Thursday, June 28, 2018

Reading Temperature and Humidity on AppsFactory Beacons

AppsFactory Beacons have SHT20 High precision Temperature and Humidity sensor embedded in them. Reading the values from the beacons is not that easy that is why this post is written which will serve as guide. Temperature and Humidity is important as it will allow building owners discover patterns that can not be detected by ordinary humans not unless of course humans are so super intelligent that they may not need tools to predict or discover patterns which could suggest something is just about to happen.

There are two ways to read the sensor data which are as follows:

  1. can be read via GATT
  2. can be included in the beacon advertisement data.

Here is the detail:

1. Reading the Temperature and Humidity via GATT Service
The data can be accessed via GATT Service 0xFFB0 see table below:
The characteristic 0xFFB3 is used to enable the measured Teperature and Humidity on the Advertisement Data. The possible values are as follows(2 bytes):

  • 0x0 - Enable
  • 0x00 - Disable 
Other values maybe entered to specify the rate which it will be advertised, example if 0x0F was entered means the temp and humidity will be advertised every 30 seconds. 
2. Reading the Temperature and Humidity from Beacon Advertisement Data
The Temperature and Humidity is included at the last bytes of the major and minor of the Ibeacon frame.

After obtaining the value, the conversion formula to get the actual values are as follows:

Monday, June 25, 2018

Beacon Scanner App Updated

Remember the app I created to scan Ibeacons and list them on screen and wrote about it that it is possible to modify the app to scan EddyStones as well? To prove it, I have decided to modify it myself. In case you haven't read the previous posts, here are the links:
A Simple Ibeacon Scanner App in Android
An Update to the Ibeacon Scanner App for Android
The a small change I made is to change the name of device whether it is an Ibeacon or an EddyStone-UID.

Like I said, the file DeviceScanActivity.java needs to be modified to detect the 3 Eddystone frames, but I only modified it to scan the UID frame on for demo purposes. And here is the code I insterted:


This is the raw data taken from Ibeacon Detector App:

And here is the resulting app:


Sunday, June 10, 2018

How to Setup AppsFactory Beacons to Broadcast Ibeacon/EddyStone/TLM(Sensor Data)

AppsFactory Beacons Model A just arrived and has made me busy doing tests on each features that the beacons were design to have whether it really works. Doing the program was  not that easy and to see your design work as expected makes you happy.

One notable feature of the beacons is that it can be configured over the air using nRfConnect App for Android or IOS. And can be made to broadcast ibeacon, eddystone and sensor data at an alternating interval. the beacon is also capable of motion triggered broadcast but I haven't test this part yet.

BTW, the sensor data consists of acceleration and temperature data. I will this this part later.



I have designed the beacon to be configured at Bluetooth service 0xff70, and under this is characteristic 0x2a80. The possible values that can be enterered are the ff:
No advertisement: 0x01
iBeacon only: 0x02
Eddystone only:0x08
TLM only: 0x20
To broadcast all three frames : 0x02 + 0x08 + 0x20 = 0x2A

And here is the video:


Sunday, May 20, 2018

How To Make China to Be not Aggressive

With all the current buzz about China being too aggressive by militarizing the South China Sea which include the West Philippine Sea, the world can still make China not to be too aggressive. I think these are the best ways to do it:

1. Send all Chinese back to their homeland. Would you believe that it took China just a decade to overtake the Filipinos as the biggest Asian community in the USA alone? The Philippines took almost 5 decades to send 3M Pinoys to the US. This could have been possible because most Chinese found their way through Canada and then went to the US.

2. Ignore Chinese presence all over the world. Do not buy China made product. By doing this, Robinsons, SM, and other big mall operators will lose their commercial viability since 80% of their products come from China, not to mention the owners.

3. DO not be an opportunist. Just because someone is rich you will want to accept his marriage proposal. Just because you are poor and it is your chance to become rich is not an excuse that you will not be labled as opportunist.

4. Maintain closer relationship with your allies and rely more on locally produced goods. Stop importing too much, even if the locally made products are inferior in terms of quality or more expensive, always remember that if you buy China made products, you are killing your country. The country should support R&D in electric motors and batteries to make electric vehicles. We already know how to manufacture solar panels so we can already achieve energy sufficiency. By doing this we can cut our imports by 50% since most of our imports are gasoline and energy related products.

5. Convince the US to ban all imports/exports to China like weapons, electronics, raw materials, chemicals, machineries, etc. The world could be at worst killing itself if they keep on buying products from China.

6. Ban all tourists coming from China even if they come from Hong Kong, Macau, Singapore, Malaysia, or Taiwan. Chinese make up 20% of the population in South East Asia so be cautious about dealing with these countries. And even with this huge communities, fellow South East Asians should be aware of their presence and the future of their country. I think the local Chinese are also competing with Pinoys in obtaining US visas that is why it has become very to difficult to obtain US visa.

7. Ban Chinese ownership in strategic and important industries like Airline, Telecommunications, Broadcasting, Infrastructure Development. Look at what happened to the last purchased of MRT trains, until now those trains are not yet being used, the people behind those must be prosecuted and should be made liable and labled as terrorists.

8. You can not rely on the US as an ally since they have very healthy economic relationship with China and they look at the Philippines as a tiny country and of no significance to world affairs so why rely on US for military help? Why haven't Pinoys developed weapon systems that could have served as the source of the country's strength? It could not just have been more than that, the Government could have generated jobs. Or exported those weapons to support the local economy.


Sunday, May 13, 2018

5 Indications that the IT Project is Fake

I got involved with different types of IT projects over the years and got scammed several times and wanted to share this based on experience. If you are in the same field you will agree with this too. Here are the 5 indications that the IT project is fake:

1. Measure the number of errors of the documents being handed to you. Yes, they are not Americans so it is an excuse to write carabao English or is it because they were hired for another reason? Errors(excluding those grammatical errors) in Technical Designs are those that are written to too specific. Instead of just writing: "Return an error if the customer code is not maintained in SAP Master Data"; the pretentious Technical Architect would write: "After obtaining customer code, you must check if the customer code exist in table lfa1". They should not be involving themselves in specifics but should just concentrate on higher level description and the different business scenarios. Giving too specific instructions would lead to more confusions and the programmer would just cut and paste which could lead to a more prolonged test period and you can not blame the programmer since you are invading his territory which he would immediately assume you are in full command which make their job a whole lot easier. Programming entails a lot of careful planning and meticulous design to produce a highly optimized solution. And giving too much information means you are the one who planned it and it is your design and not the programmer. There are a lot instance and I would say a major challenge to describe a certain specification and to hurdle such challenges, creativity and of course your competency is the key. The preparation of Technical Documents and Functional Specifications are more expensive than doing the actual programming or coding so you must realize that being a TA or BA or FA, you can already relax because you are on top of the Software Development Life Cycle, well that is where you are wrong.

2. Measure the competence of your peers. Do this secretly, if all your peers are female, you should begin to suspect something is going on.

3. Frequency of work and how fast it should be done and how many people have the same position like you have. Begin observing how they behave and all your movement must be calculated. The world's resources is scarse.

4. Other than your peers, how does the company's employees behave and the surrounding environment, how was it? Do they start offering other services or want to offer except that they just keep looking at you?

5. There are other circumstances where it is up to you to interpret which can trigger something in you that you think violates certain moral standards, do not ignore it. Your instincts does not lie to you.

Wednesday, May 2, 2018

Agencies In Metro Manila still Flourishes

Agencies(Companies who's clients are Companies that do not want to have regular employees) still flourishes in Metro Manila.This in spite of the fact that Pinoys opted to vote for a semi illiterate President who promised to eradicate contractualization.

Contractualization destabilizes livelihood of individuals. It makes the person in constant struggle to find decent jobs. It really makes me angry to hear recruiters having fun to find a guy that is willing to accept jobs on a contractual basis. This is what overloading of buses is like. Constant struggle just to get a place so that one can go home it's because there are no decent jobs on the country side, people are poor and have no knowledge to create opportunities and big companies take advantage of this situation. This vulnerability that is exposed for all scammers to take advantage of is what makes Agencies flourish. Even IT companies aka Agencies are there. They survive on big Companies that are not willing to hire employees and regularized them. I understand that they are poor but why do they make use of technology that they can't afford anyway? It is because they take advantage of the poor.

This is an unfair competition, one should be aware of this and should be able to crate a way to equalize or balance the competition. One should be aware that life is a like a rolling wheel, one may be on top today but he is not sure what is going to happen in the future. There is always a balancing force as one becomes powerful that is when the opposition intensifies their effort to ovethrow him.

Monday, April 23, 2018

Breath Fresh Air anytime with Breath Happy Multi Function Airpurifer

The air we breath is getting dirtier each day. Based on the study conducted by the Environmental Protection Agency (EPA), the air inside a home might be two to five times more contaminated with pollutants, be it animal dander, cigarette smoke, or soot.

Enter the air purifier. They can be hugely beneficial for allergy and asthma sufferers, as well as anyone who lives near major highways or other pollutant-filled areas, like coal plants. The best ones use fans to cycle air through a series of filters, capturing impurities and jetting clean air back into the room. Choosing the right one comes down to its CADR rating — the measurement for how well an air purifier actually works. Aside from that, the right type of filter — a true HEPA is key — and making it sure it can accommodate the size of room you want will have you breathing easy.

Breath Happy Air purifier performs way above the minimum expectations set by CADR because it uses several air filtration stages.It is also equipped with UV Light and IONizer to ensure that bad odors and contaminant are eliminated effectively.

Here are the images:








Ideally, air purifiers can remove the existing air contaminants but it is not finite, so for example the pollution directly comes from the exhaust of a car, the device due to its small size could not do miracle to remove all pollution coming from the car. It is better to get rid of the source first but does not yet guarantee that the car is only the source there are other sources inside the house and these sources does not produce air pollution as fast as the car or the smell from your neighbors while they are cooking. This is where the device can perform well. Another observation I found while using the device is that it could not suck in the air inside a room it needs an assistance from an electric fan to effectively keep the air circulating inside the room so that all air particles and contaminants will be constantly moving and as they go near the device, they get sucked in and purified.

I used to live in a neighborhood wherein I forget to close the window, some people will intentionally leave their car running the whole night just below my window or someone will smoke or cook a food that emits really pungent odor. So each night, I make sure that the whole room is sealed with very little air from out side coming in and I use this airpurifier device to get rid of any remaining air pollutants and of course an electric fan to keep the room cool and keep the air circulating.

I dont expect everybody to experience the same thing I did but as this device is necessary for any circumstances since there is car everywhere, people cook their food, people smoke, there paints on the walls and all over the house.


Wednesday, March 7, 2018

Electronic Device Assembly Business

Nowadays with the miniaturization of machines, small businessmen or engineers with brilliant ideas can easily compete with the giant players. Production machines used to be available only to people with huge funds has become cheaper and people that can afford to buy a car can easily invest their money in these machines to start an electronics assembly business from pcb fab to enclosure. And the best part is all these machines can easily fit on a small apartment.

The machines needed to start the business are the folliwing:

1. Design and Prototyping Equipments

  • Personal Computer
  • Mini Cnc(90mm x 120mm work area) for pcb prototyping
  • 3d Printer for the prototyping of enclosures
  • Laser Cutter for enclosure porotyping
  • Oscilloscope/Multimeter and other tools
  • CAD Software


2. Production Machines

  • Pick and Place Machine
  • Cnc Router-300*400
  • Reflow Oven
  • Pcb Stencil Printer
  • Mini Plastic Injection Machine
  • Laser Cutter- 300*400

All the above mentioned machines could only cost about the same price as a brand  new Toyota Vios or less than 1Million pesos.


The business is ideal for contract manufacturing or would cater to the market where inventors require to produce less than 100 units for experimenting how their product will be accepted by their target market. This market segment is where I belong because I have very limited budget. Based on my experience, the creation of the plastic mould itself is already unaffordable because it would cost around Php100,000(this is made in China because somebody has told me that the mould used in mineral water bottle caps was worth Php 375000 done locally) already and the manufacturer only accept a minimum of 1000 units. Plastic moulds can already be 3d printed because there are filaments that only melts at 210 degrees celcious while thermo plastics(the material used in plastic injection) easily melts at 130 degrees.

The equipments are also ideal and must haves for every school and/or  Univerisities because these machines are also being used by the industry so it is good for students to have hands on experience and if they have access to this equipments they will be encourage to be creative and who knows they could produce new products that could become like Samsung or Apple someday. The sales of both companies is enough to make the Phillippines become a very rich country.

Monday, February 19, 2018

Create a powerful Bluetooth based Network of Beacons

Beacons are not just for increasing sales or giving out more interactive physical environment to enhance user's experience. Beacons can be a powerful tool to detect patterns before a major catastrophe can happen resulting in the protection of properties and life.

A network of sensors for monitoring temperature and humidity, detect if an object has moved when should not have moved, an employee forgot to close the window or door, an employee stayed too long at the pantry or know how many customers checked a certain product are just a few of the useful data that can be collected with the networked beacons.  


The above figure shows all the necessary beacon types one will need to implement a networked beacons. 

Here are the actual images of the sensors and the gateway:

The Kit:(This is a great package to test a lot of use case scenarios. Available at olx.)

The Kit includes the following beacons(excluding the Apps Factory Beacon):

C7:

Size: 90 x 60 x 4 mm
Ibeacon Only
Disposable(Battery can not be replaced)
This is an ideal substitute to rfid badges
 E2:

Size: 72 x 72 x 18mm
Ibeacon + EddyStone
External ON/OFF switch
Battery can be replaced


E6:

Size: 42.5 x 23.5 x 5.3mm
Ambient Light Sensor
Battery can be replaced


G1(Gateway):

Size: 150 x 150 x 36mm
Bluetooth to Wifi Gateway
MicroUSB Power Input(5V1A)


I3:
Size: 72 x 45 x 22mm
Ibeacon Only
200m Range
Battery can be replaced



I7:
Size: 50 x 50 x 15mm
Ibeacon + EddyStone + Accelerometer
External On/Off Switch
Battery can be replaced

S1:

Size: 70.6 x 38 x 17.8mm
Ibeacon Only + EddyStone + Temperature + Humidity Sensor
Battery can be replaced


Apps Factory Beacon with Buzzer:


Wednesday, February 14, 2018

IT Company and Manpower Agency

An IT Company develops its own products and sells them to end users. They own the copyrights and their products are original.

A Manpower Agency recruits individuals and deploy them to their so called "client". These manpower agencies always dominate job sites and facebook groups for programmers.

There is a big question why manpower agencies name their companies as IT Companies to disguise themselves as IT Companies. A big question is why do they do this? This tactics originates from the USA and usually funded by the Chinese with Indians as their partners where ponzi schemes abounds.

I was lured into this because I was really in need of money and these scammers offers job with no interviews but offers no security but I was in it for the quick cash and I am not ignorant that these people are actually scammers they will say they are an IT Company which I dont believe or shoyld I say never believed at all. These are usually females walking all over the metro they easily fill in any available space like when you're eating at a mall and there is a vacant seat, 99% of the time, it will be filled up by a female recruiting or selling anything under the sun or when you ride an fx or jeepney, 99% of the passengers is always females. I am not a female hater I have just observed that their numbers is way too much to take. It is just too abnormal and vommiting. My mom does not go out much nor my relatives nor our neighbors. Is living in a small space makes them go out and hunt for something all the time? Is there someone that tells them they should always stay on the street? I dont see them buying, they just walk all over  and keep on riding public transport. I just wonder what they feed on.

These females are so proud of their jobs, I've read an article written by these females and they think of themselves as IT managers as she wrote, the client complained that she gave them a junior but they asked for a senior. I just could not imagine that they treat programming jobs as a commodity this female described in her article how she was able to pull out the junior and replaced him with a senior. It was a glorified scamming scheme and yet she's so proud of it.

Update:
I applied for a job at a certain tech company and not surprised that all recruiters again are females, but did not succeeded because it was not my primary skills and had not used it professionaly.

While on my way home, a female sat beside me and during our journey she put her sweaty arms on top of my legs which is very unusual. She also pretends looking at her cellphone but was somewhat wants to tell me something, this behavior is somewhat similar to those females in the office of the client of the agency that I am referring to in this post. (As I recall correctly when I am still working at the agency's client, there is not a day where their females keep looking at me as if I am a walking cash)I was waiting for her to say something but the vehicle stopped and a passenger got out so I immediately stayed away from this female and a manong sat between us. After a few minutes a sports car passed by and the female looked at me as if she wants me to buy her a sports car, that made me conclude that she was a well you know. She could have been tracking me and the "sitting beside me" incidence is not a coincidence. She could have been tracking me even when I am still at the office where I am applying. I heard that outsourcing from foreign clients usually involves in sex trade, but not all of course but with this incident, I am not surprised.

Even when I was on an airplane going to Thailand which was almost 10yrs ago, those Pinay looking ladies at the airplane exhibited similar behavior. They see single traveling male as a walking cash. This is why HIV is getting a big problem besause a lot of companies are very discreet, they should show their true colors to prevent hiv.

Monday, February 12, 2018

An Update to the Ibeacon Scanner App for Android

I have found a time to review the source code of the Ibeacon Scanner App and it would be easy to add the feature to include scanning Eddystone Beacons. To do this, the file DeviceScanActivity.java needs to be modified to detect the 3 Eddystone frames(UID, TLM, URL).

Here is the portion of the file that needs to be modified:

public void onLeScan(final BluetoothDevice device, final int rssi, final byte[]                             scanRecord) {
           int startByte = 2;
           boolean patternFound = false;
           while (startByte <= 5) {
           if ( ((int) scanRecord[startByte + 2] & 0xff) == 0x02 && //Identifies an iBeacon
                //Identifies correct data length
                ((int) scanRecord[startByte + 3] & 0xff) == 0x15) {
                 patternFound = true;
                 break;
             }
                startByte++;
            }
        if (patternFound) {
            //Convert to hex String
           byte[] uuidBytes = new byte[16];
           System.arraycopy(scanRecord, startByte+4, uuidBytes, 0, 16);
          String hexString = bytesToHex(uuidBytes);

        //Here is your UUID
       String uuid = hexString.substring(0,8) + "-" +
                             hexString.substring(8,12) + "-" +
                             hexString.substring(12,16) + "-" +
                             hexString.substring(16,20) + "-" +
                             hexString.substring(20,32);
       mUUID[mElems]=uuid;
       mRSSI[mElems]= String.valueOf(rssi);
       mElems++;
     //Here is your Major value
        int major = (scanRecord[startByte+20] & 0xff) * 0x100 +                                                                    (scanRecord[startByte+21] & 0xff);

     //Here is your Minor value
        int minor = (scanRecord[startByte+22] & 0xff) * 0x100 +                                                                     (scanRecord[startByte+23] & 0xff);
       runOnUiThread(new Runnable() {
     

The variable  patternFound was used to detect the ibeacon pattern and the scanRecord variable currently contains the data being processed and which is being examined whether it contains the ibeacon pattern. And from this, we can already insert the code to identify the current contents of scanRecord if it is an Eddystone pattern.